diff options
author | Christoph Hellwig <hch@lst.de> | 2007-05-08 00:27:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 11:15:04 -0700 |
commit | 1eeb66a1bb973534dc3d064920a5ca683823372e (patch) | |
tree | 19c22d611e6adefb352dbc107b859e4d13ba38c1 /arch/x86_64 | |
parent | e3869792990f708c97be5877499cada70d469bd3 (diff) | |
download | op-kernel-dev-1eeb66a1bb973534dc3d064920a5ca683823372e.zip op-kernel-dev-1eeb66a1bb973534dc3d064920a5ca683823372e.tar.gz |
move die notifier handling to common code
This patch moves the die notifier handling to common code. Previous
various architectures had exactly the same code for it. Note that the new
code is compiled unconditionally, this should be understood as an appel to
the other architecture maintainer to implement support for it aswell (aka
sprinkling a notify_die or two in the proper place)
arm had a notifiy_die that did something totally different, I renamed it to
arm_notify_die as part of the patch and made it static to the file it's
declared and used at. avr32 used to pass slightly less information through
this interface and I brought it into line with the other architectures.
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
[bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: <linux-arch@vger.kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/crash.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/mce.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/reboot.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/traps.c | 18 | ||||
-rw-r--r-- | arch/x86_64/mm/fault.c | 3 |
10 files changed, 11 insertions, 26 deletions
diff --git a/arch/x86_64/kernel/crash.c b/arch/x86_64/kernel/crash.c index 95a7a2c..13432a1 100644 --- a/arch/x86_64/kernel/crash.c +++ b/arch/x86_64/kernel/crash.c @@ -17,13 +17,13 @@ #include <linux/delay.h> #include <linux/elf.h> #include <linux/elfcore.h> +#include <linux/kdebug.h> #include <asm/processor.h> #include <asm/hardirq.h> #include <asm/nmi.h> #include <asm/hw_irq.h> #include <asm/mach_apic.h> -#include <asm/kdebug.h> /* This keeps a track of which one is crashing cpu. */ static int crashing_cpu; diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index 209c8c0..90e7008 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c @@ -37,10 +37,10 @@ #include <linux/slab.h> #include <linux/preempt.h> #include <linux/module.h> +#include <linux/kdebug.h> #include <asm/cacheflush.h> #include <asm/pgtable.h> -#include <asm/kdebug.h> #include <asm/uaccess.h> void jprobe_return_end(void); diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index fa26726..44216964 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c @@ -20,10 +20,10 @@ #include <linux/percpu.h> #include <linux/ctype.h> #include <linux/kmod.h> +#include <linux/kdebug.h> #include <asm/processor.h> #include <asm/msr.h> #include <asm/mce.h> -#include <asm/kdebug.h> #include <asm/uaccess.h> #include <asm/smp.h> diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 6cd2b30..931c64b 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c @@ -21,11 +21,11 @@ #include <linux/sysctl.h> #include <linux/kprobes.h> #include <linux/cpumask.h> +#include <linux/kdebug.h> #include <asm/smp.h> #include <asm/nmi.h> #include <asm/proto.h> -#include <asm/kdebug.h> #include <asm/mce.h> int unknown_nmi_panic; diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 0a762e1..373ef66 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c @@ -22,13 +22,13 @@ #include <linux/topology.h> #include <linux/interrupt.h> #include <linux/bitops.h> +#include <linux/kdebug.h> #include <asm/atomic.h> #include <asm/io.h> #include <asm/mtrr.h> #include <asm/pgtable.h> #include <asm/proto.h> #include <asm/cacheflush.h> -#include <asm/kdebug.h> #include <asm/swiotlb.h> #include <asm/dma.h> #include <asm/k8.h> diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 4f21765..5909039 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -36,6 +36,7 @@ #include <linux/random.h> #include <linux/notifier.h> #include <linux/kprobes.h> +#include <linux/kdebug.h> #include <asm/uaccess.h> #include <asm/pgtable.h> @@ -46,7 +47,6 @@ #include <asm/mmu_context.h> #include <asm/pda.h> #include <asm/prctl.h> -#include <asm/kdebug.h> #include <asm/desc.h> #include <asm/proto.h> #include <asm/ia32.h> diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c index 2d67698..c116b54 100644 --- a/arch/x86_64/kernel/reboot.c +++ b/arch/x86_64/kernel/reboot.c @@ -7,8 +7,8 @@ #include <linux/ctype.h> #include <linux/string.h> #include <linux/pm.h> +#include <linux/kdebug.h> #include <asm/io.h> -#include <asm/kdebug.h> #include <asm/delay.h> #include <asm/hw_irq.h> #include <asm/system.h> diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 4d9dacf..193af99 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c @@ -49,11 +49,11 @@ #include <linux/delay.h> #include <linux/mc146818rtc.h> #include <linux/smp.h> +#include <linux/kdebug.h> #include <asm/mtrr.h> #include <asm/pgalloc.h> #include <asm/desc.h> -#include <asm/kdebug.h> #include <asm/tlbflush.h> #include <asm/proto.h> #include <asm/nmi.h> diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 0484a2c..8c2ac41 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -32,6 +32,7 @@ #include <linux/unwind.h> #include <linux/uaccess.h> #include <linux/bug.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/io.h> @@ -39,7 +40,6 @@ #include <asm/debugreg.h> #include <asm/desc.h> #include <asm/i387.h> -#include <asm/kdebug.h> #include <asm/processor.h> #include <asm/unwind.h> #include <asm/smp.h> @@ -71,22 +71,6 @@ asmlinkage void alignment_check(void); asmlinkage void machine_check(void); asmlinkage void spurious_interrupt_bug(void); -ATOMIC_NOTIFIER_HEAD(die_chain); -EXPORT_SYMBOL(die_chain); - -int register_die_notifier(struct notifier_block *nb) -{ - vmalloc_sync_all(); - return atomic_notifier_chain_register(&die_chain, nb); -} -EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */ - -int unregister_die_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&die_chain, nb); -} -EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */ - static inline void conditional_sti(struct pt_regs *regs) { if (regs->eflags & X86_EFLAGS_IF) diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index de99dba..fd6ecc2 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c @@ -21,16 +21,17 @@ #include <linux/tty.h> #include <linux/vt_kern.h> /* For unblank_screen() */ #include <linux/compiler.h> +#include <linux/vmalloc.h> #include <linux/module.h> #include <linux/kprobes.h> #include <linux/uaccess.h> +#include <linux/kdebug.h> #include <asm/system.h> #include <asm/pgalloc.h> #include <asm/smp.h> #include <asm/tlbflush.h> #include <asm/proto.h> -#include <asm/kdebug.h> #include <asm-generic/sections.h> /* Page fault error code bits */ |