mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
Bitmap definition for 'panic_print' is hard to remember and decode. Add 'panic_sys_info='sysctl to take human readable string like "tasks,mem,timers,locks,ftrace,..." and translate it into bitmap. The detailed mapping is: SYS_INFO_TASKS "tasks" SYS_INFO_MEM "mem" SYS_INFO_TIMERS "timers" SYS_INFO_LOCKS "locks" SYS_INFO_FTRACE "ftrace" SYS_INFO_ALL_CPU_BT "all_bt" SYS_INFO_BLOCKED_TASKS "blocked_tasks" [[email protected]: add __maybe_unused to sys_info_avail] Link: https://lkml.kernel.org/r/20250708-fix-clang-sys_info_avail-warning-v1-1-60d239eacd64@kernel.org Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Feng Tang <[email protected]> Suggested-by: Petr Mladek <[email protected]> Cc: John Ogness <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Lance Yang <[email protected]> Cc: "Paul E . McKenney" <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Andy Shevchenko <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
29 lines
831 B
C
29 lines
831 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_SYS_INFO_H
|
|
#define _LINUX_SYS_INFO_H
|
|
|
|
#include <linux/sysctl.h>
|
|
|
|
/*
|
|
* SYS_INFO_PANIC_CONSOLE_REPLAY is for panic case only, as it needs special
|
|
* handling which only fits panic case.
|
|
*/
|
|
#define SYS_INFO_TASKS 0x00000001
|
|
#define SYS_INFO_MEM 0x00000002
|
|
#define SYS_INFO_TIMERS 0x00000004
|
|
#define SYS_INFO_LOCKS 0x00000008
|
|
#define SYS_INFO_FTRACE 0x00000010
|
|
#define SYS_INFO_PANIC_CONSOLE_REPLAY 0x00000020
|
|
#define SYS_INFO_ALL_CPU_BT 0x00000040
|
|
#define SYS_INFO_BLOCKED_TASKS 0x00000080
|
|
|
|
void sys_info(unsigned long si_mask);
|
|
unsigned long sys_info_parse_param(char *str);
|
|
|
|
#ifdef CONFIG_SYSCTL
|
|
int sysctl_sys_info_handler(const struct ctl_table *ro_table, int write,
|
|
void *buffer, size_t *lenp,
|
|
loff_t *ppos);
|
|
#endif
|
|
#endif /* _LINUX_SYS_INFO_H */
|