mirror-linux/arch/sh/include/asm
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
..
Kbuild ring-buffer: Flush and stop persistent ring buffer on panic 2026-05-21 08:20:58 -04:00
adc.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
addrspace.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
alignment.h
asm-offsets.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
atomic-grb.h locking/atomic: sh: add preprocessor symbols 2023-06-05 09:57:16 +02:00
atomic-irq.h locking/atomic: sh: add preprocessor symbols 2023-06-05 09:57:16 +02:00
atomic-llsc.h locking/atomic: sh: add preprocessor symbols 2023-06-05 09:57:16 +02:00
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
barrier.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
bitops-cas.h
bitops-grb.h
bitops-llsc.h
bitops-op32.h provide arch_test_bit_acquire for architectures that define test_bit 2022-08-27 09:49:54 -07:00
bitops.h sh: Add __attribute_const__ to ffs()-family implementations 2025-09-08 14:58:51 -07:00
bl_bit.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
bl_bit_32.h
bug.h bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output 2025-07-28 08:06:43 +02:00
cache.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
cache_insns.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
cache_insns_32.h
cacheflush.h sh: cache: Move forward declarations to <asm/cacheflush.h> 2024-05-02 12:01:31 +02:00
cachetype.h Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
checksum.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
checksum_32.h sh: checksum: add missing linux/uaccess.h include 2023-01-30 21:04:21 -08:00
clock.h
cmpxchg-cas.h
cmpxchg-grb.h
cmpxchg-irq.h
cmpxchg-llsc.h
cmpxchg-xchg.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cmpxchg.h sh: Emulate one-byte cmpxchg 2024-09-13 07:10:38 -07:00
device.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
dma-register.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
dma.h sh: dma: Remove unused functionality 2024-05-02 12:01:25 +02:00
dmabrg.h
dwarf.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
elf.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
entry-macros.S
extable.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
fixmap.h sh/highmem: Remove all traces of unused cruft 2020-11-06 23:14:54 +01:00
flat.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
fpu.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
freq.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
ftrace.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
futex-cas.h
futex-irq.h
futex-llsc.h
futex.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
hardirq.h sh: irqstat: Use the generic irq_cpustat_t 2020-11-23 10:31:06 +01:00
hd64461.h sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ 2023-07-13 08:37:53 +02:00
heartbeat.h
hugetlb.h mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
hw_breakpoint.h sh: hw_breakpoint: Add missing forward declaration for arch_bp_generic_fields() 2024-05-02 12:01:23 +02:00
hw_irq.h
i2c-sh7760.h
io.h - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
io_generic.h
io_noioport.h sh: add <asm-generic/io.h> including 2023-08-18 10:12:34 -07:00
io_trapped.h
irq.h sh: Remove unused declarations for make_maskreg_irq() and irq_mask_register 2024-09-26 17:24:51 +02:00
irqflags.h
kdebug.h Revert "sh: add loglvl to printk_address()" 2020-08-14 22:05:07 -04:00
kexec.h sh, kexec: fix the incorrect ifdeffery and dependency of CONFIG_KEXEC 2023-12-12 17:20:18 -08:00
kgdb.h
kprobes.h kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
linkage.h
machvec.h sh: machvec: Remove custom ioport_{un,}map() 2023-10-25 16:50:30 +02:00
mmiowb.h sh/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() 2019-04-08 12:00:21 +01:00
mmu.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
mmu_context.h sh: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:38 +01:00
mmu_context_32.h sh: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:38 +01:00
mmzone.h arch, mm: move definition of node_data to generic code 2024-09-03 21:15:28 -07:00
module.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
page.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
pci.h PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h 2022-07-22 17:23:45 -05:00
perf_event.h
pgalloc.h mm: pgtable: convert some architectures to use tlb_remove_ptdesc() 2025-04-01 15:17:13 -07:00
pgtable-2level.h sh: add support for folded p4d page tables 2020-06-04 19:06:21 -07:00
pgtable-3level.h sh/mm: Fix pmd_t for real 2023-01-10 05:31:42 -06:00
pgtable.h arch, mm: consolidate empty_zero_page 2026-04-05 13:53:01 -07:00
pgtable_32.h mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
platform_early.h sh: Fix typo in SPDX license ID lines 2026-04-18 10:23:05 +02:00
posix_types.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
processor.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
processor_32.h sh: sanitize the flags on sigreturn 2023-03-09 10:01:59 -08:00
ptrace.h sh: don't use asm-generic/ptrace.h 2019-07-01 17:51:40 +02:00
ptrace_32.h
push-switch.h
reboot.h
romimage-macros.h
rtc.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
seccomp.h sh: Enable seccomp architecture tracking 2020-11-20 11:16:35 -08:00
sections.h sh: machvec: Use char[] for section boundaries 2022-09-13 10:33:17 -07:00
setup.h sh: Fix fallout from ZERO_PAGE consolidation 2026-05-03 16:35:40 +02:00
sfp-machine.h sh: define __BIG_ENDIAN for math-emu 2021-10-27 16:51:24 -04:00
sh7760fb.h
sh_bios.h
shmparam.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
siu.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
smc37c93x.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
smp-ops.h sh/cpu: Mark play_dead() __noreturn 2023-03-08 08:44:24 -08:00
smp.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
sparsemem.h Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
spi.h
spinlock-cas.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
spinlock-llsc.h sh/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() 2019-04-08 12:00:21 +01:00
spinlock.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
spinlock_types.h Improve consistency of '#error' directive messages 2024-11-11 17:17:04 -08:00
sram.h
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h sh: stacktrace: Remove stacktrace_ops.stack() 2020-08-14 22:05:11 -04:00
string.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
string_32.h Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
suspend.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
switch_to.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
switch_to_32.h
syscall.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
syscall_32.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
syscalls.h sh: syscall: Add missing forward declaration for sys_cacheflush() 2024-05-02 12:01:23 +02:00
syscalls_32.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
thread_info.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
timex.h
tlb.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
tlbflush.h
topology.h arch/sh/include/asm/topology.h: remove unused parent_node() macro 2017-11-17 16:10:04 -08:00
traps.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
traps_32.h arch: add do_page_fault prototypes 2023-11-23 11:32:32 +01:00
types.h sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers 2025-06-07 15:16:21 +02:00
uaccess.h sh: remove CONFIG_SET_FS support 2022-02-25 09:36:06 +01:00
uaccess_32.h sh: Implement __get_user_u64() required for 64-bit get_user() 2020-08-14 22:05:04 -04:00
uncached.h
unistd.h clone3: drop __ARCH_WANT_SYS_CLONE3 macro 2024-07-10 14:23:38 +02:00
unwinder.h
user.h asm/user.h: killed unused macros 2022-01-30 21:17:00 -05:00
vermagic.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
vmlinux.lds.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
watchdog.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
word-at-a-time.h kernel.h: removed REPEAT_BYTE from kernel.h 2024-02-01 09:47:59 -08:00