aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/mm/fault.c26
-rw-r--r--arch/ia64/kernel/traps.c30
-rw-r--r--arch/m32r/mm/fault-nommu.c26
-rw-r--r--arch/m32r/mm/fault.c26
-rw-r--r--arch/s390/mm/fault.c4
-rw-r--r--arch/x86_64/mm/fault.c21
-rw-r--r--lib/Makefile5
-rw-r--r--lib/bust_spinlocks.c2
8 files changed, 5 insertions, 135 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index aaaa4d225f7e..cba9b3894a33 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -60,32 +60,6 @@ static inline int notify_page_fault(enum die_val val, const char *str,
60} 60}
61 61
62/* 62/*
63 * Unlock any spinlocks which will prevent us from getting the
64 * message out
65 */
66void bust_spinlocks(int yes)
67{
68 int loglevel_save = console_loglevel;
69
70 if (yes) {
71 oops_in_progress = 1;
72 return;
73 }
74#ifdef CONFIG_VT
75 unblank_screen();
76#endif
77 oops_in_progress = 0;
78 /*
79 * OK, the message is on the console. Now we call printk()
80 * without oops_in_progress set so that printk will give klogd
81 * a poke. Hold onto your hats...
82 */
83 console_loglevel = 15; /* NMI oopser may have shut the console up */
84 printk(" ");
85 console_loglevel = loglevel_save;
86}
87
88/*
89 * Return EIP plus the CS segment base. The segment limit is also 63 * Return EIP plus the CS segment base. The segment limit is also
90 * adjusted, clamped to the kernel/user address space (whichever is 64 * adjusted, clamped to the kernel/user address space (whichever is
91 * appropriate), and returned in *eip_limit. 65 * appropriate), and returned in *eip_limit.
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index ab684747036f..765cbe5ba6ae 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -24,8 +24,6 @@
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25#include <asm/kdebug.h> 25#include <asm/kdebug.h>
26 26
27extern spinlock_t timerlist_lock;
28
29fpswa_interface_t *fpswa_interface; 27fpswa_interface_t *fpswa_interface;
30EXPORT_SYMBOL(fpswa_interface); 28EXPORT_SYMBOL(fpswa_interface);
31 29
@@ -53,34 +51,6 @@ trap_init (void)
53 fpswa_interface = __va(ia64_boot_param->fpswa); 51 fpswa_interface = __va(ia64_boot_param->fpswa);
54} 52}
55 53
56/*
57 * Unlock any spinlocks which will prevent us from getting the message out (timerlist_lock
58 * is acquired through the console unblank code)
59 */
60void
61bust_spinlocks (int yes)
62{
63 int loglevel_save = console_loglevel;
64
65 if (yes) {
66 oops_in_progress = 1;
67 return;
68 }
69
70#ifdef CONFIG_VT
71 unblank_screen();
72#endif
73 oops_in_progress = 0;
74 /*
75 * OK, the message is on the console. Now we call printk() without
76 * oops_in_progress set so that printk will give klogd a poke. Hold onto
77 * your hats...
78 */
79 console_loglevel = 15; /* NMI oopser may have shut the console up */
80 printk(" ");
81 console_loglevel = loglevel_save;
82}
83
84void 54void
85die (const char *str, struct pt_regs *regs, long err) 55die (const char *str, struct pt_regs *regs, long err)
86{ 56{
diff --git a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c
index 0a09cc01212b..9880abac3f54 100644
--- a/arch/m32r/mm/fault-nommu.c
+++ b/arch/m32r/mm/fault-nommu.c
@@ -44,32 +44,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS];
44#define tlb_entry_d tlb_entry_d_dat[smp_processor_id()] 44#define tlb_entry_d tlb_entry_d_dat[smp_processor_id()]
45#endif 45#endif
46 46
47/*
48 * Unlock any spinlocks which will prevent us from getting the
49 * message out
50 */
51void bust_spinlocks(int yes)
52{
53 int loglevel_save = console_loglevel;
54
55 if (yes) {
56 oops_in_progress = 1;
57 return;
58 }
59#ifdef CONFIG_VT
60 unblank_screen();
61#endif
62 oops_in_progress = 0;
63 /*
64 * OK, the message is on the console. Now we call printk()
65 * without oops_in_progress set so that printk will give klogd
66 * a poke. Hold onto your hats...
67 */
68 console_loglevel = 15; /* NMI oopser may have shut the console up */
69 printk(" ");
70 console_loglevel = loglevel_save;
71}
72
73void do_BUG(const char *file, int line) 47void do_BUG(const char *file, int line)
74{ 48{
75 bust_spinlocks(1); 49 bust_spinlocks(1);
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
index fc7ccdf829e2..037d58e82fb5 100644
--- a/arch/m32r/mm/fault.c
+++ b/arch/m32r/mm/fault.c
@@ -49,32 +49,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS];
49 49
50extern void init_tlb(void); 50extern void init_tlb(void);
51 51
52/*
53 * Unlock any spinlocks which will prevent us from getting the
54 * message out
55 */
56void bust_spinlocks(int yes)
57{
58 int loglevel_save = console_loglevel;
59
60 if (yes) {
61 oops_in_progress = 1;
62 return;
63 }
64#ifdef CONFIG_VT
65 unblank_screen();
66#endif
67 oops_in_progress = 0;
68 /*
69 * OK, the message is on the console. Now we call printk()
70 * without oops_in_progress set so that printk will give klogd
71 * a poke. Hold onto your hats...
72 */
73 console_loglevel = 15; /* NMI oopser may have shut the console up */
74 printk(" ");
75 console_loglevel = loglevel_save;
76}
77
78/*======================================================================* 52/*======================================================================*
79 * do_page_fault() 53 * do_page_fault()
80 *======================================================================* 54 *======================================================================*
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 9ff143e87746..641aef36ccc4 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -83,12 +83,10 @@ static inline int notify_page_fault(enum die_val val, const char *str,
83} 83}
84#endif 84#endif
85 85
86extern spinlock_t timerlist_lock;
87 86
88/* 87/*
89 * Unlock any spinlocks which will prevent us from getting the 88 * Unlock any spinlocks which will prevent us from getting the
90 * message out (timerlist_lock is acquired through the 89 * message out.
91 * console unblank code)
92 */ 90 */
93void bust_spinlocks(int yes) 91void bust_spinlocks(int yes)
94{ 92{
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index a65fc6f1dcaf..49e8cf2e06f8 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -69,27 +69,6 @@ static inline int notify_page_fault(enum die_val val, const char *str,
69 return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args); 69 return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args);
70} 70}
71 71
72void bust_spinlocks(int yes)
73{
74 int loglevel_save = console_loglevel;
75 if (yes) {
76 oops_in_progress = 1;
77 } else {
78#ifdef CONFIG_VT
79 unblank_screen();
80#endif
81 oops_in_progress = 0;
82 /*
83 * OK, the message is on the console. Now we call printk()
84 * without oops_in_progress set so that printk will give klogd
85 * a poke. Hold onto your hats...
86 */
87 console_loglevel = 15; /* NMI oopser may have shut the console up */
88 printk(" ");
89 console_loglevel = loglevel_save;
90 }
91}
92
93/* Sometimes the CPU reports invalid exceptions on prefetch. 72/* Sometimes the CPU reports invalid exceptions on prefetch.
94 Check that here and ignore. 73 Check that here and ignore.
95 Opcode checker based on code by Richard Brunner */ 74 Opcode checker based on code by Richard Brunner */
diff --git a/lib/Makefile b/lib/Makefile
index 3b605da448f4..b819e37440db 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5lib-y := ctype.o string.o vsprintf.o cmdline.o \ 5lib-y := ctype.o string.o vsprintf.o cmdline.o \
6 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ 6 rbtree.o radix-tree.o dump_stack.o \
7 idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ 7 idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \
8 sha1.o irq_regs.o reciprocal_div.o 8 sha1.o irq_regs.o reciprocal_div.o
9 9
@@ -12,7 +12,8 @@ lib-$(CONFIG_SMP) += cpumask.o
12 12
13lib-y += kobject.o kref.o kobject_uevent.o klist.o 13lib-y += kobject.o kref.o kobject_uevent.o klist.o
14 14
15obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o iomap.o 15obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o iomap.o \
16 bust_spinlocks.o
16 17
17ifeq ($(CONFIG_DEBUG_KOBJECT),y) 18ifeq ($(CONFIG_DEBUG_KOBJECT),y)
18CFLAGS_kobject.o += -DDEBUG 19CFLAGS_kobject.o += -DDEBUG
diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c
index a2055bc3ef62..0ee968e8e023 100644
--- a/lib/bust_spinlocks.c
+++ b/lib/bust_spinlocks.c
@@ -14,7 +14,7 @@
14#include <linux/vt_kern.h> 14#include <linux/vt_kern.h>
15 15
16 16
17void bust_spinlocks(int yes) 17void __attribute__((weak)) bust_spinlocks(int yes)
18{ 18{
19 if (yes) { 19 if (yes) {
20 oops_in_progress = 1; 20 oops_in_progress = 1;