diff options
author | 2025-02-12 17:19:13 +0530 | |
---|---|---|
committer | 2025-02-21 16:17:13 +0000 | |
commit | 46006ceb5d029f92df405db15c9a31f0ee41628c (patch) | |
tree | 3a131fa66fe588feaac6becccaebdcdfae23fba7 /include/linux/coresight.h | |
parent | coresight: tmc-etr: Add support to use reserved trace memory (diff) | |
download | wireguard-linux-46006ceb5d029f92df405db15c9a31f0ee41628c.tar.xz wireguard-linux-46006ceb5d029f92df405db15c9a31f0ee41628c.zip |
coresight: core: Add provision for panic callbacks
Panic callback handlers allows coresight device drivers to sync
relevant trace data and trace metadata to reserved memory
regions so that they can be retrieved later in the subsequent
boot or in the crashdump kernel.
Signed-off-by: Linu Cherian <lcherian@marvell.com>
Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250212114918.548431-4-lcherian@marvell.com
Diffstat (limited to 'include/linux/coresight.h')
-rw-r--r-- | include/linux/coresight.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 17276965ff1d..3eef4e91df3f 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -340,6 +340,7 @@ enum cs_mode { #define link_ops(csdev) csdev->ops->link_ops #define helper_ops(csdev) csdev->ops->helper_ops #define ect_ops(csdev) csdev->ops->ect_ops +#define panic_ops(csdev) csdev->ops->panic_ops /** * struct coresight_ops_sink - basic operations for a sink @@ -409,11 +410,22 @@ struct coresight_ops_helper { int (*disable)(struct coresight_device *csdev, void *data); }; + +/** + * struct coresight_ops_panic - Generic device ops for panic handing + * + * @sync : Sync the device register state/trace data + */ +struct coresight_ops_panic { + int (*sync)(struct coresight_device *csdev); +}; + struct coresight_ops { const struct coresight_ops_sink *sink_ops; const struct coresight_ops_link *link_ops; const struct coresight_ops_source *source_ops; const struct coresight_ops_helper *helper_ops; + const struct coresight_ops_panic *panic_ops; }; static inline u32 csdev_access_relaxed_read32(struct csdev_access *csa, |