aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKirill Korotaev <dev@sw.ru>2007-02-10 04:46:18 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:34 -0500
commitcefc8be82403cfc4325e7b9b063f77dc0f34e19e (patch)
treed360f54c14860550b37f86b44757ecef749db1c0 /arch
parentc530cba649692512070e8c0131ba3eccade09269 (diff)
[PATCH] Consolidate bust_spinlocks()
Part of long forgotten patch http://groups.google.com/group/fa.linux.kernel/msg/e98e941ce1cf29f6?dmode=source Since then, m32r grabbed two copies. Leave s390 copy because of important absence of CONFIG_VT, but remove references to non-existent timerlist_lock. ia64 also loses timerlist_lock. Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Andi Kleen <ak@muc.de> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-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
6 files changed, 1 insertions, 132 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 */