kmd: re-enable the panic_callback

- introduced a panic_flag in the tegra_rtcpu_trace.
- set panic_flag to 1 when kmd receives panic hsp
  message from RCE.
- the trace buffer readout thread calls rtcpu_trace_snapshot
  to dump out the snapshot section when panic_flag is set to 1.

Bug 5293085

Change-Id: Ief5d9431bfc944fc588f38a69f7758f829cf2e6e
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3368252
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
This commit is contained in:
yizhou
2025-05-21 06:58:19 +00:00
committed by Jon Hunter
parent b42f5d8ada
commit 737925e58e
4 changed files with 36 additions and 19 deletions

View File

@@ -17,7 +17,7 @@ struct tegra_rtcpu_trace *tegra_rtcpu_trace_create(
int tegra_rtcpu_trace_boot_sync(struct tegra_rtcpu_trace *tracer);
void tegra_rtcpu_trace_flush(struct tegra_rtcpu_trace *tracer);
void tegra_rtcpu_trace_destroy(struct tegra_rtcpu_trace *tracer);
void rtcpu_trace_snapshot(struct tegra_rtcpu_trace *tracer);
void rtcpu_trace_panic_callback(struct device *dev);
void tegra_rtcpu_trace_set_panic_flag(struct tegra_rtcpu_trace *tracer);
#endif