mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
kernel debug: support resetting WARN_ONCE for all architectures
Some architectures store the WARN_ONCE state in the flags field of the bug_entry. Clear that one too when resetting once state through /sys/kernel/debug/clear_warn_once Pointed out by Michael Ellerman Improves the earlier patch that add clear_warn_once. [ak@linux.intel.com: add a missing ifdef CONFIG_MODULES] Link: http://lkml.kernel.org/r/20171020170633.9593-1-andi@firstfloor.org [akpm@linux-foundation.org: fix unused var warning] [akpm@linux-foundation.org: Use 0200 for clear_warn_once file, per mpe] [akpm@linux-foundation.org: clear BUGFLAG_DONE in clear_once_table(), per mpe] Link: http://lkml.kernel.org/r/20171019204642.7404-1-andi@firstfloor.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Tested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b1fca27d38
commit
aaf5dcfb22
@@ -43,6 +43,8 @@ enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs);
|
||||
/* These are defined by the architecture */
|
||||
int is_valid_bugaddr(unsigned long addr);
|
||||
|
||||
void generic_bug_clear_once(void);
|
||||
|
||||
#else /* !CONFIG_GENERIC_BUG */
|
||||
|
||||
static inline enum bug_trap_type report_bug(unsigned long bug_addr,
|
||||
@@ -51,6 +53,9 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
|
||||
return BUG_TRAP_TYPE_BUG;
|
||||
}
|
||||
|
||||
|
||||
static inline void generic_bug_clear_once(void) {}
|
||||
|
||||
#endif /* CONFIG_GENERIC_BUG */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user