mirror-linux/arch/sh
Masami Hiramatsu (Google) a494d3c8d5 ring-buffer: Flush and stop persistent ring buffer on panic
On real hardware, panic and machine reboot may not flush hardware cache
to memory. This means the persistent ring buffer, which relies on a
coherent state of memory, may not have its events written to the buffer
and they may be lost. Moreover, there may be inconsistency with the
counters which are used for validation of the integrity of the
persistent ring buffer which may cause all data to be discarded.

To avoid this issue, stop recording of the ring buffer on panic and
flush the cache of the ring buffer's memory.

Fixes: e645535a95 ("tracing: Add option to use memmapped memory for trace boot instance")
Cc: stable@vger.kernel.org
Cc: Will Deacon <will@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ian Rogers <irogers@google.com>
Link: https://patch.msgid.link/177751969602.2136606.12031934362587643488.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-05-21 08:20:58 -04:00
..
boards sh updates for v6.16 2025-06-07 10:00:03 -07:00
boot sh: Do not use hyphen in exported variable name 2025-07-26 17:15:41 +02:00
cchips sh: hd64461: Make setup_hd64461() static 2024-03-21 12:17:35 +01:00
configs sh updates for v7.1 2026-04-20 16:41:19 -07:00
drivers sh updates for v7.1 2026-04-20 16:41:19 -07:00
include ring-buffer: Flush and stop persistent ring buffer on panic 2026-05-21 08:20:58 -04:00
kernel arch, mm: consolidate empty_zero_page 2026-04-05 13:53:01 -07:00
lib sh: remove duplicate ioread/iowrite helpers 2025-03-11 10:41:18 +01:00
math-emu sh: math-emu: Add missing #include <asm/fpu.h> 2024-05-02 12:01:24 +02:00
mm arch, mm: consolidate empty_zero_page 2026-04-05 13:53:01 -07:00
tools
Kbuild sh: Migrate to the generic rule for built-in DTB 2025-02-01 10:43:18 +01:00
Kconfig tracing: Remove redundant config HAVE_FTRACE_MCOUNT_RECORD 2025-07-22 20:15:56 -04:00
Kconfig.cpu docs: move superh documentation under Documentation/arch/ 2023-03-30 13:00:35 -06:00
Kconfig.debug sh: bios: Revive earlyprintk support 2023-10-25 16:50:30 +02:00
Makefile sh: Do not use hyphen in exported variable name 2025-07-26 17:15:41 +02:00