Skip to contentSkip to conversation

kernel.h: Split out panic and oops helpers

PATCH Superseded Andy Shevchenko 6 participants 7 messages Apr 9, 2021

Subsystems (40)
Networking Network drivers x86 VFS +36 more subsystems

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
v2:
- fixed all errors with allmodconfig on x86_64 (Andrew)
- checked with allyesconfig on x86_64
- additionally grepped source code for panic notifier list usage and converted all users
- elaborated commit message (Luis)
- collected given tags (incl. Andrew's SoB, see below)

I added Andrew's SoB since part of the fixes I took from him. Andrew, feel free to amend or tell me how you want me to do.

 arch/alpha/kernel/setup.c                     |  2 +-
 arch/arm64/kernel/setup.c                     |  1 +
 arch/mips/kernel/relocate.c                   |  1 +
 arch/mips/sgi-ip22/ip22-reset.c               |  1 +
 arch/mips/sgi-ip32/ip32-reset.c               |  1 +
 arch/parisc/kernel/pdc_chassis.c              |  1 +
 arch/powerpc/kernel/setup-common.c            |  1 +
 arch/s390/kernel/ipl.c                        |  1 +
 arch/sparc/kernel/sstate.c                    |  1 +
 arch/um/drivers/mconsole_kern.c               |  1 +
 arch/um/kernel/um_arch.c                      |  1 +
 arch/x86/include/asm/desc.h                   |  1 +
 arch/x86/kernel/cpu/mshyperv.c                |  1 +
 arch/x86/kernel/setup.c                       |  1 +
 arch/x86/purgatory/purgatory.c                |  2 +
 arch/x86/xen/enlighten.c                      |  1 +
 arch/xtensa/platforms/iss/setup.c             |  1 +
 drivers/bus/brcmstb_gisb.c                    |  1 +
 drivers/char/ipmi/ipmi_msghandler.c           |  1 +
 drivers/clk/analogbits/wrpll-cln28hpc.c       |  4 +
 drivers/edac/altera_edac.c                    |  1 +
 drivers/firmware/google/gsmi.c                |  1 +
 drivers/hv/vmbus_drv.c                        |  1 +
 .../hwtracing/coresight/coresight-cpu-debug.c |  1 +
 drivers/leds/trigger/ledtrig-activity.c       |  1 +
 drivers/leds/trigger/ledtrig-heartbeat.c      |  1 +
 drivers/leds/trigger/ledtrig-panic.c          |  1 +
 drivers/misc/bcm-vk/bcm_vk_dev.c              |  1 +
 drivers/misc/ibmasm/heartbeat.c               |  1 +
 drivers/misc/pvpanic/pvpanic.c                |  1 +
 drivers/net/ipa/ipa_smp2p.c                   |  1 +
 drivers/parisc/power.c                        |  1 +
 drivers/power/reset/ltc2952-poweroff.c        |  1 +
 drivers/remoteproc/remoteproc_core.c          |  1 +
 drivers/s390/char/con3215.c                   |  1 +
 drivers/s390/char/con3270.c                   |  1 +
 drivers/s390/char/sclp.c                      |  1 +
 drivers/s390/char/sclp_con.c                  |  1 +
 drivers/s390/char/sclp_vt220.c                |  1 +
 drivers/s390/char/zcore.c                     |  1 +
 drivers/soc/bcm/brcmstb/pm/pm-arm.c           |  1 +
 drivers/staging/olpc_dcon/olpc_dcon.c         |  1 +
 drivers/video/fbdev/hyperv_fb.c               |  1 +
 include/asm-generic/bug.h                     |  3 +-
 include/linux/kernel.h                        | 84 +---------------
 include/linux/panic.h                         | 98 +++++++++++++++++++
 include/linux/panic_notifier.h                | 12 +++
 kernel/hung_task.c                            |  1 +
 kernel/kexec_core.c                           |  1 +
 kernel/panic.c                                |  1 +
 kernel/rcu/tree.c                             |  2 +
 kernel/sysctl.c                               |  1 +
 kernel/trace/trace.c                          |  1 +
 53 files changed, 167 insertions(+), 85 deletions(-)
 create mode 100644 include/linux/panic.h
 create mode 100644 include/linux/panic_notifier.h
arch/alpha/kernel/setup.c +1 -1
index 03dda3beb3bd..5d1296534682 100644
@@ -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,
arch/arm64/kernel/setup.c +1 -0
index 61845c0821d9..787bc0f601b3 100644
@@ -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>
arch/mips/kernel/relocate.c +1 -0
index 499a5357c09f..56b51de2dc51 100644
@@ -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>
arch/mips/sgi-ip22/ip22-reset.c +1 -0
index c374f3ceec38..9028dbbb45dd 100644
@@ -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>
 
arch/mips/sgi-ip32/ip32-reset.c +1 -0
index 20d8637340be..18d1c115cd53 100644
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/panic_notifier.h>
 #include <linux/sched.h>
 #include <linux/sched/signal.h>
 #include <linux/notifier.h>
arch/parisc/kernel/pdc_chassis.c +1 -0
index 75ae88d13909..da154406d368 100644
@@ -20,6 +20,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/notifier.h>
 #include <linux/cache.h>
arch/powerpc/kernel/setup-common.c +1 -0
index 74a98fff2c2f..046fe21b5c3b 100644
@@ -9,6 +9,7 @@
 #undef DEBUG
 
 #include <linux/export.h>
+#include <linux/panic_notifier.h>
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/init.h>
arch/s390/kernel/ipl.c +1 -0
index 7a21eca498aa..e0b675dd7080 100644
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/delay.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/ctype.h>
 #include <linux/fs.h>
arch/sparc/kernel/sstate.c +1 -0
index ac8677c3841e..3bcc4ddc6911 100644
@@ -6,6 +6,7 @@
 
 #include <linux/kernel.h>
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
 
arch/um/drivers/mconsole_kern.c +1 -0
index 6d00af25ec6b..328b16f99b30 100644
@@ -12,6 +12,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/sched/debug.h>
 #include <linux/proc_fs.h>
arch/um/kernel/um_arch.c +1 -0
index 74e07e748a9b..9512253947d5 100644
@@ -7,6 +7,7 @@
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/module.h>
+#include <linux/panic_notifier.h>
 #include <linux/seq_file.h>
 #include <linux/string.h>
 #include <linux/utsname.h>
arch/x86/include/asm/desc.h +1 -0
index 476082a83d1c..ceb12683b6d1 100644
@@ -9,6 +9,7 @@
 #include <asm/irq_vectors.h>
 #include <asm/cpu_entry_area.h>
 
+#include <linux/debug_locks.h>
 #include <linux/smp.h>
 #include <linux/percpu.h>
 
arch/x86/kernel/cpu/mshyperv.c +1 -0
index 22f13343b5da..9e5c6f2b044d 100644
@@ -17,6 +17,7 @@
 #include <linux/irq.h>
 #include <linux/kexec.h>
 #include <linux/i8253.h>
+#include <linux/panic_notifier.h>
 #include <linux/random.h>
 #include <asm/processor.h>
 #include <asm/hypervisor.h>
arch/x86/kernel/setup.c +1 -0
index 59e5e0903b0c..570699eecf90 100644
@@ -14,6 +14,7 @@
 #include <linux/initrd.h>
 #include <linux/iscsi_ibft.h>
 #include <linux/memblock.h>
+#include <linux/panic_notifier.h>
 #include <linux/pci.h>
 #include <linux/root_dev.h>
 #include <linux/hugetlb.h>
arch/x86/purgatory/purgatory.c +2 -0
index f03b64d9cb51..7558139920f8 100644
@@ -9,6 +9,8 @@
  */
 
 #include <linux/bug.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
 #include <crypto/sha2.h>
 #include <asm/purgatory.h>
 
arch/x86/xen/enlighten.c +1 -0
index aa9f50fccc5d..c79bd0af2e8c 100644
@@ -6,6 +6,7 @@
 #include <linux/cpu.h>
 #include <linux/kexec.h>
 #include <linux/slab.h>
+#include <linux/panic_notifier.h>
 
 #include <xen/xen.h>
 #include <xen/features.h>
arch/xtensa/platforms/iss/setup.c +1 -0
index ed519aee0ec8..d3433e1bb94e 100644
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include <linux/printk.h>
 #include <linux/string.h>
 
drivers/bus/brcmstb_gisb.c +1 -0
index 7355fa2cb439..6551286a60cc 100644
@@ -6,6 +6,7 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/module.h>
+#include <linux/panic_notifier.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/sysfs.h>
drivers/char/ipmi/ipmi_msghandler.c +1 -0
index 8a0e97b33cae..e96cb5c4f97a 100644
@@ -16,6 +16,7 @@
 
 #include <linux/module.h>
 #include <linux/errno.h>
+#include <linux/panic_notifier.h>
 #include <linux/poll.h>
 #include <linux/sched.h>
 #include <linux/seq_file.h>
drivers/clk/analogbits/wrpll-cln28hpc.c +4 -0
index 776ead319ae9..7c64ea52a8d5 100644
@@ -23,8 +23,12 @@
 
 #include <linux/bug.h>
 #include <linux/err.h>
+#include <linux/limits.h>
 #include <linux/log2.h>
 #include <linux/math64.h>
+#include <linux/math.h>
+#include <linux/minmax.h>
+
 #include <linux/clk/analogbits-wrpll-cln28hpc.h>
 
 /* MIN_INPUT_FREQ: minimum input clock frequency, in Hz (Fref_min) */
drivers/edac/altera_edac.c +1 -0
index 5f7fd79ec82f..61c21bd880a4 100644
@@ -20,6 +20,7 @@
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
+#include <linux/panic_notifier.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/types.h>
drivers/firmware/google/gsmi.c +1 -0
index bb6e77ee3898..adaa492c3d2d 100644
@@ -19,6 +19,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/fs.h>
 #include <linux/slab.h>
+#include <linux/panic_notifier.h>
 #include <linux/ioctl.h>
 #include <linux/acpi.h>
 #include <linux/io.h>
drivers/hv/vmbus_drv.c +1 -0
index 004c3390c15f..7107b9b6eff4 100644
@@ -25,6 +25,7 @@
 
 #include <linux/delay.h>
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include <linux/ptrace.h>
 #include <linux/screen_info.h>
 #include <linux/kdebug.h>
drivers/hwtracing/coresight/coresight-cpu-debug.c +1 -0
index 2dcf13de751f..9731d3a96073 100644
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/panic_notifier.h>
 #include <linux/pm_qos.h>
 #include <linux/slab.h>
 #include <linux/smp.h>
drivers/leds/trigger/ledtrig-activity.c +1 -0
index 14ba7faaed9e..30bc9df03636 100644
@@ -11,6 +11,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/leds.h>
 #include <linux/module.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
drivers/leds/trigger/ledtrig-heartbeat.c +1 -0
index 36b6709afe9f..7fe0a05574d2 100644
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/panic_notifier.h>
 #include <linux/slab.h>
 #include <linux/timer.h>
 #include <linux/sched.h>
drivers/leds/trigger/ledtrig-panic.c +1 -0
index 5751cd032f9d..64abf2e91608 100644
@@ -8,6 +8,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include <linux/leds.h>
 #include "../leds.h"
 
drivers/misc/bcm-vk/bcm_vk_dev.c +1 -0
index 6bfea3210389..ad639ee85b2a 100644
@@ -9,6 +9,7 @@
 #include <linux/fs.h>
 #include <linux/idr.h>
 #include <linux/interrupt.h>
+#include <linux/panic_notifier.h>
 #include <linux/kref.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
drivers/misc/ibmasm/heartbeat.c +1 -0
index 4f5f3bdc814d..59c9a0d95659 100644
@@ -9,6 +9,7 @@
  */
 
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include "ibmasm.h"
 #include "dot_command.h"
 #include "lowlevel.h"
drivers/misc/pvpanic/pvpanic.c +1 -0
index 65f70a4da8c0..793ea0c01193 100644
@@ -13,6 +13,7 @@
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/panic_notifier.h>
 #include <linux/types.h>
 #include <linux/cdev.h>
 #include <linux/list.h>
drivers/net/ipa/ipa_smp2p.c +1 -0
index a5f7a79a1923..34b68dc43886 100644
@@ -8,6 +8,7 @@
 #include <linux/device.h>
 #include <linux/interrupt.h>
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include <linux/soc/qcom/smem.h>
 #include <linux/soc/qcom/smem_state.h>
 
drivers/parisc/power.c +1 -0
index ebaf6867b457..456776bd8ee6 100644
@@ -38,6 +38,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/notifier.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/sched/signal.h>
 #include <linux/kthread.h>
drivers/power/reset/ltc2952-poweroff.c +1 -0
index d1495af30081..8688c8ba8894 100644
@@ -52,6 +52,7 @@
 #include <linux/slab.h>
 #include <linux/kmod.h>
 #include <linux/module.h>
+#include <linux/panic_notifier.h>
 #include <linux/mod_devicetable.h>
 #include <linux/gpio/consumer.h>
 #include <linux/reboot.h>
drivers/remoteproc/remoteproc_core.c +1 -0
index 626a6b90fba2..76dd8e2b1e7e 100644
@@ -20,6 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/device.h>
+#include <linux/panic_notifier.h>
 #include <linux/slab.h>
 #include <linux/mutex.h>
 #include <linux/dma-map-ops.h>
drivers/s390/char/con3215.c +1 -0
index 1fd5bca9fa20..02523f4e29f4 100644
@@ -19,6 +19,7 @@
 #include <linux/console.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/serial.h> /* ASYNC_* flags */
 #include <linux/slab.h>
drivers/s390/char/con3270.c +1 -0
index e21962c0fd94..87cdbace1453 100644
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
+#include <linux/panic_notifier.h>
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/err.h>
drivers/s390/char/sclp.c +1 -0
index 986bbbc23d0a..6627820a5eb9 100644
@@ -11,6 +11,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/module.h>
 #include <linux/err.h>
+#include <linux/panic_notifier.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
 #include <linux/timer.h>
drivers/s390/char/sclp_con.c +1 -0
index 9b852a47ccc1..cc01a7b8595d 100644
@@ -10,6 +10,7 @@
 #include <linux/kmod.h>
 #include <linux/console.h>
 #include <linux/init.h>
+#include <linux/panic_notifier.h>
 #include <linux/timer.h>
 #include <linux/jiffies.h>
 #include <linux/termios.h>
drivers/s390/char/sclp_vt220.c +1 -0
index 7f4445b0f819..5b8a7b090a97 100644
@@ -9,6 +9,7 @@
 
 #include <linux/module.h>
 #include <linux/spinlock.h>
+#include <linux/panic_notifier.h>
 #include <linux/list.h>
 #include <linux/wait.h>
 #include <linux/timer.h>
drivers/s390/char/zcore.c +1 -0
index bd3c724bf695..b5b0848da93b 100644
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/debugfs.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 
 #include <asm/asm-offsets.h>
drivers/soc/bcm/brcmstb/pm/pm-arm.c +1 -0
index a673fdffe216..3cbb165d6e30 100644
@@ -28,6 +28,7 @@
 #include <linux/notifier.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/panic_notifier.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/printk.h>
drivers/staging/olpc_dcon/olpc_dcon.c +1 -0
index 6d8e9a481786..7284cb4ac395 100644
@@ -22,6 +22,7 @@
 #include <linux/device.h>
 #include <linux/uaccess.h>
 #include <linux/ctype.h>
+#include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/olpc-ec.h>
 #include <asm/tsc.h>
drivers/video/fbdev/hyperv_fb.c +1 -0
index 4dc9077dd2ac..ac06ee7c87d7 100644
@@ -52,6 +52,7 @@
 #include <linux/completion.h>
 #include <linux/fb.h>
 #include <linux/pci.h>
+#include <linux/panic_notifier.h>
 #include <linux/efi.h>
 #include <linux/console.h>
 
include/asm-generic/bug.h +2 -1
index 76a10e0dca9f..719410b93f99 100644
@@ -17,7 +17,8 @@
 #endif
 
 #ifndef __ASSEMBLY__
-#include <linux/kernel.h>
+#include <linux/panic.h>
+#include <linux/printk.h>
 
 #ifdef CONFIG_BUG
 
include/linux/kernel.h +1 -83

116 lines not on this page · raw message

include/linux/panic.h new file +98 -0

98 lines not on this page · raw message

include/linux/panic_notifier.h new file +12 -0
new file mode 100644
index 000000000000..41e32483d7a7
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_PANIC_NOTIFIERS_H
+#define _LINUX_PANIC_NOTIFIERS_H
+
+#include <linux/notifier.h>
+#include <linux/types.h>
+
+extern struct atomic_notifier_head panic_notifier_list;
+
+extern bool crash_kexec_post_notifiers;
+
+#endif	/* _LINUX_PANIC_NOTIFIERS_H */
kernel/hung_task.c +1 -0
index bb2e3e15c84c..2871076e4d29 100644
@@ -15,6 +15,7 @@
 #include <linux/kthread.h>
 #include <linux/lockdep.h>
 #include <linux/export.h>
+#include <linux/panic_notifier.h>
 #include <linux/sysctl.h>
 #include <linux/suspend.h>
 #include <linux/utsname.h>
kernel/kexec_core.c +1 -0
index f099baee3578..4b34a9aa32bc 100644
@@ -26,6 +26,7 @@
 #include <linux/suspend.h>
 #include <linux/device.h>
 #include <linux/freezer.h>
+#include <linux/panic_notifier.h>
 #include <linux/pm.h>
 #include <linux/cpu.h>
 #include <linux/uaccess.h>
kernel/panic.c +1 -0
index 332736a72a58..edad89660a2b 100644
@@ -23,6 +23,7 @@
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/kexec.h>
+#include <linux/panic_notifier.h>
 #include <linux/sched.h>
 #include <linux/sysrq.h>
 #include <linux/init.h>
kernel/rcu/tree.c +2 -0
index 03282196953a..67f8f65a9ada 100644
@@ -32,6 +32,8 @@
 #include <linux/export.h>
 #include <linux/completion.h>
 #include <linux/moduleparam.h>
+#include <linux/panic.h>
+#include <linux/panic_notifier.h>
 #include <linux/percpu.h>
 #include <linux/notifier.h>
 #include <linux/cpu.h>
kernel/sysctl.c +1 -0
index 3601786ddaeb..e5cf9c4ef5e1 100644
@@ -27,6 +27,7 @@
 #include <linux/sysctl.h>
 #include <linux/bitmap.h>
 #include <linux/signal.h>
+#include <linux/panic.h>
 #include <linux/printk.h>
 #include <linux/proc_fs.h>
 #include <linux/security.h>
kernel/trace/trace.c +1 -0
index 507a30bf26e4..9612a1d8fa13 100644
@@ -39,6 +39,7 @@
 #include <linux/slab.h>
 #include <linux/ctype.h>
 #include <linux/init.h>
+#include <linux/panic_notifier.h>
 #include <linux/poll.h>
 #include <linux/nmi.h>
 #include <linux/fs.h>
Signature · 1 line
2.30.2
maintainer Acked-by on v2 1/1
#1 lore raw

Hi,

Quoted 32 lines · Andy Shevchenko

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.

---
v2:
- fixed all errors with allmodconfig on x86_64 (Andrew)
- checked with allyesconfig on x86_64
- additionally grepped source code for panic notifier list usage and converted all users
- elaborated commit message (Luis)
- collected given tags (incl. Andrew's SoB, see below)

Quoted 6 lines

I added Andrew's SoB since part of the fixes I took from him. Andrew, feel free to amend or tell me how you want me to do.

[...]

 drivers/power/reset/ltc2952-poweroff.c        |  1 +

[...]

-- Sebastian

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

maintainer Acked-by on v2 1/1
#2 lore raw
In reply to Andy Shevchenko

Quoting Andy Shevchenko (2021-04-09 03:02:50)

Quoted 23 lines

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.

Quoted 3 lines

---

 drivers/clk/analogbits/wrpll-cln28hpc.c       |  4 +
Acked-by on v2 1/1
#3 lore raw
In reply to Andy Shevchenko
Quoted 13 lines · Andy Shevchenko

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.

Quoted 10 lines

Luis

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

maintainer Acked-by on v2 1/1
#4 lore raw
In reply to Andy Shevchenko
Quoted 13 lines · Andy Shevchenko

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.

Quoted 10 lines

Helge

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

maintainer Acked-by on v2 1/1
#5 lore raw
In reply to Andy Shevchenko
Quoted 13 lines · Andy Shevchenko

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.

Quoted 10 lines

Helge

maintainer Acked-by on v2 1/1
#6 lore raw
In reply to Andy Shevchenko
Quoted 32 lines · Andy Shevchenko

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.

---
v2:
- fixed all errors with allmodconfig on x86_64 (Andrew)
- checked with allyesconfig on x86_64
- additionally grepped source code for panic notifier list usage and converted all users
- elaborated commit message (Luis)
- collected given tags (incl. Andrew's SoB, see below)

Quoted 6 lines

I added Andrew's SoB since part of the fixes I took from him. Andrew, feel free to amend or tell me how you want me to do.

 arch/mips/kernel/relocate.c                   |  1 +
 arch/mips/sgi-ip22/ip22-reset.c               |  1 +
 arch/mips/sgi-ip32/ip32-reset.c               |  1 +
Signature · 7 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec