Commit f39650de authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Torvalds
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Co-developed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Acked-by: default avatarCorey Minyard <cminyard@mvista.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarWei Liu <wei.liu@kernel.org>
Acked-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarSebastian Reichel <sre@kernel.org>
Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
Acked-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Helge Deller <deller@gmx.de> # parisc
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 070c4650
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <linux/init.h>
#include <linux/string.h>
#include <linux/ioport.h>
#include <linux/panic_notifier.h>
#include <linux/platform_device.h>
#include <linux/memblock.h>
#include <linux/pci.h>
@@ -46,7 +47,6 @@
#include <linux/log2.h>
#include <linux/export.h>

extern struct atomic_notifier_head panic_notifier_list;
static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
static struct notifier_block alpha_panic_block = {
	alpha_panic_event,
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <linux/interrupt.h>
#include <linux/smp.h>
#include <linux/fs.h>
#include <linux/panic_notifier.h>
#include <linux/proc_fs.h>
#include <linux/memblock.h>
#include <linux/of_fdt.h>
+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@

#include <linux/types.h>
#include <asm/fpu.h>
#include <asm/intrinsics.h>

/*
 * Data types needed to pass information into PAL procedures and
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/kernel.h>
#include <linux/libfdt.h>
#include <linux/of_fdt.h>
#include <linux/panic_notifier.h>
#include <linux/sched/task.h>
#include <linux/start_kernel.h>
#include <linux/string.h>
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/sched/signal.h>
#include <linux/notifier.h>
#include <linux/panic_notifier.h>
#include <linux/pm.h>
#include <linux/timer.h>

Loading