Skip to content

Commit f39650d

Browse files
andy-shevtorvalds
authored andcommitted
kernel.h: split out panic and oops helpers
kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out panic and oops helpers. There are several purposes of doing this: - dropping dependency in bug.h - dropping a loop by moving out panic_notifier.h - unload kernel.h from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. [akpm@linux-foundation.org: thread_info.h needs limits.h] [andriy.shevchenko@linux.intel.com: ia64 fix] Link: https://lkml.kernel.org/r/20210520130557.55277-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20210511074137.33666-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Co-developed-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Corey Minyard <cminyard@mvista.com> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Kees Cook <keescook@chromium.org> Acked-by: Wei Liu <wei.liu@kernel.org> Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Sebastian Reichel <sre@kernel.org> Acked-by: Luis Chamberlain <mcgrof@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Helge Deller <deller@gmx.de> # parisc Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 070c465 commit f39650d

File tree

55 files changed

+169
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+169
-85
lines changed

arch/alpha/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/init.h>
2929
#include <linux/string.h>
3030
#include <linux/ioport.h>
31+
#include <linux/panic_notifier.h>
3132
#include <linux/platform_device.h>
3233
#include <linux/memblock.h>
3334
#include <linux/pci.h>
@@ -46,7 +47,6 @@
4647
#include <linux/log2.h>
4748
#include <linux/export.h>
4849

49-
extern struct atomic_notifier_head panic_notifier_list;
5050
static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
5151
static struct notifier_block alpha_panic_block = {
5252
alpha_panic_event,

arch/arm64/kernel/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/interrupt.h>
2424
#include <linux/smp.h>
2525
#include <linux/fs.h>
26+
#include <linux/panic_notifier.h>
2627
#include <linux/proc_fs.h>
2728
#include <linux/memblock.h>
2829
#include <linux/of_fdt.h>

arch/ia64/include/asm/pal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999

100100
#include <linux/types.h>
101101
#include <asm/fpu.h>
102+
#include <asm/intrinsics.h>
102103

103104
/*
104105
* Data types needed to pass information into PAL procedures and

arch/mips/kernel/relocate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/kernel.h>
1919
#include <linux/libfdt.h>
2020
#include <linux/of_fdt.h>
21+
#include <linux/panic_notifier.h>
2122
#include <linux/sched/task.h>
2223
#include <linux/start_kernel.h>
2324
#include <linux/string.h>

arch/mips/sgi-ip22/ip22-reset.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/kernel.h>
1313
#include <linux/sched/signal.h>
1414
#include <linux/notifier.h>
15+
#include <linux/panic_notifier.h>
1516
#include <linux/pm.h>
1617
#include <linux/timer.h>
1718

arch/mips/sgi-ip32/ip32-reset.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/init.h>
1313
#include <linux/kernel.h>
1414
#include <linux/module.h>
15+
#include <linux/panic_notifier.h>
1516
#include <linux/sched.h>
1617
#include <linux/sched/signal.h>
1718
#include <linux/notifier.h>

arch/parisc/kernel/pdc_chassis.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/init.h>
2121
#include <linux/module.h>
2222
#include <linux/kernel.h>
23+
#include <linux/panic_notifier.h>
2324
#include <linux/reboot.h>
2425
#include <linux/notifier.h>
2526
#include <linux/cache.h>

arch/powerpc/kernel/setup-common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#undef DEBUG
1010

1111
#include <linux/export.h>
12+
#include <linux/panic_notifier.h>
1213
#include <linux/string.h>
1314
#include <linux/sched.h>
1415
#include <linux/init.h>

arch/s390/kernel/ipl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/init.h>
1414
#include <linux/device.h>
1515
#include <linux/delay.h>
16+
#include <linux/panic_notifier.h>
1617
#include <linux/reboot.h>
1718
#include <linux/ctype.h>
1819
#include <linux/fs.h>

arch/sparc/kernel/sstate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <linux/kernel.h>
88
#include <linux/notifier.h>
9+
#include <linux/panic_notifier.h>
910
#include <linux/reboot.h>
1011
#include <linux/init.h>
1112

0 commit comments

Comments
 (0)