aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-10-08 09:44:38 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-08 15:32:36 -0400
commit4fa1970a23bf8fc68e86b65a87c32556e20a6be6 (patch)
treeb6b46dd929623c302b3c3732cbeb5dbff2f7e95f /arch
parent3dbb8c62897f96bbf5d4e4fe649e5d3791fc33c5 (diff)
[PATCH] alpha pt_regs cleanups: machine_check()
do set_irq_regs() in caller, kill pt_regs argument. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/core_apecs.c5
-rw-r--r--arch/alpha/kernel/core_cia.c5
-rw-r--r--arch/alpha/kernel/core_lca.c6
-rw-r--r--arch/alpha/kernel/core_mcpcia.c5
-rw-r--r--arch/alpha/kernel/core_polaris.c5
-rw-r--r--arch/alpha/kernel/core_t2.c5
-rw-r--r--arch/alpha/kernel/core_tsunami.c5
-rw-r--r--arch/alpha/kernel/core_wildfire.c5
-rw-r--r--arch/alpha/kernel/err_ev6.c5
-rw-r--r--arch/alpha/kernel/err_ev7.c2
-rw-r--r--arch/alpha/kernel/err_impl.h10
-rw-r--r--arch/alpha/kernel/err_marvel.c4
-rw-r--r--arch/alpha/kernel/err_titan.c14
-rw-r--r--arch/alpha/kernel/irq_alpha.c11
-rw-r--r--arch/alpha/kernel/proto.h23
-rw-r--r--arch/alpha/kernel/sys_jensen.c2
-rw-r--r--arch/alpha/kernel/sys_mikasa.c5
-rw-r--r--arch/alpha/kernel/sys_nautilus.c7
-rw-r--r--arch/alpha/kernel/sys_noritake.c5
19 files changed, 60 insertions, 69 deletions
diff --git a/arch/alpha/kernel/core_apecs.c b/arch/alpha/kernel/core_apecs.c
index a27ba12ba35e..ca46b2c24457 100644
--- a/arch/alpha/kernel/core_apecs.c
+++ b/arch/alpha/kernel/core_apecs.c
@@ -387,8 +387,7 @@ apecs_pci_clr_err(void)
387} 387}
388 388
389void 389void
390apecs_machine_check(unsigned long vector, unsigned long la_ptr, 390apecs_machine_check(unsigned long vector, unsigned long la_ptr)
391 struct pt_regs * regs)
392{ 391{
393 struct el_common *mchk_header; 392 struct el_common *mchk_header;
394 struct el_apecs_procdata *mchk_procdata; 393 struct el_apecs_procdata *mchk_procdata;
@@ -412,7 +411,7 @@ apecs_machine_check(unsigned long vector, unsigned long la_ptr,
412 wrmces(0x7); /* reset machine check pending flag */ 411 wrmces(0x7); /* reset machine check pending flag */
413 mb(); 412 mb();
414 413
415 process_mcheck_info(vector, la_ptr, regs, "APECS", 414 process_mcheck_info(vector, la_ptr, "APECS",
416 (mcheck_expected(0) 415 (mcheck_expected(0)
417 && (mchk_sysdata->epic_dcsr & 0x0c00UL))); 416 && (mchk_sysdata->epic_dcsr & 0x0c00UL)));
418} 417}
diff --git a/arch/alpha/kernel/core_cia.c b/arch/alpha/kernel/core_cia.c
index fd563064363c..1d6ee6c985f9 100644
--- a/arch/alpha/kernel/core_cia.c
+++ b/arch/alpha/kernel/core_cia.c
@@ -1192,8 +1192,7 @@ cia_decode_mchk(unsigned long la_ptr)
1192} 1192}
1193 1193
1194void 1194void
1195cia_machine_check(unsigned long vector, unsigned long la_ptr, 1195cia_machine_check(unsigned long vector, unsigned long la_ptr)
1196 struct pt_regs * regs)
1197{ 1196{
1198 int expected; 1197 int expected;
1199 1198
@@ -1208,5 +1207,5 @@ cia_machine_check(unsigned long vector, unsigned long la_ptr,
1208 expected = mcheck_expected(0); 1207 expected = mcheck_expected(0);
1209 if (!expected && vector == 0x660) 1208 if (!expected && vector == 0x660)
1210 expected = cia_decode_mchk(la_ptr); 1209 expected = cia_decode_mchk(la_ptr);
1211 process_mcheck_info(vector, la_ptr, regs, "CIA", expected); 1210 process_mcheck_info(vector, la_ptr, "CIA", expected);
1212} 1211}
diff --git a/arch/alpha/kernel/core_lca.c b/arch/alpha/kernel/core_lca.c
index 6a5a9145c676..4843f6ec9f3a 100644
--- a/arch/alpha/kernel/core_lca.c
+++ b/arch/alpha/kernel/core_lca.c
@@ -19,6 +19,7 @@
19#include <linux/tty.h> 19#include <linux/tty.h>
20 20
21#include <asm/ptrace.h> 21#include <asm/ptrace.h>
22#include <asm/irq_regs.h>
22#include <asm/smp.h> 23#include <asm/smp.h>
23 24
24#include "proto.h" 25#include "proto.h"
@@ -386,8 +387,7 @@ ioc_error(__u32 stat0, __u32 stat1)
386} 387}
387 388
388void 389void
389lca_machine_check(unsigned long vector, unsigned long la_ptr, 390lca_machine_check(unsigned long vector, unsigned long la_ptr)
390 struct pt_regs *regs)
391{ 391{
392 const char * reason; 392 const char * reason;
393 union el_lca el; 393 union el_lca el;
@@ -397,7 +397,7 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr,
397 wrmces(rdmces()); /* reset machine check pending flag */ 397 wrmces(rdmces()); /* reset machine check pending flag */
398 398
399 printk(KERN_CRIT "LCA machine check: vector=%#lx pc=%#lx code=%#x\n", 399 printk(KERN_CRIT "LCA machine check: vector=%#lx pc=%#lx code=%#x\n",
400 vector, regs->pc, (unsigned int) el.c->code); 400 vector, get_irq_regs()->pc, (unsigned int) el.c->code);
401 401
402 /* 402 /*
403 * The first quadword after the common header always seems to 403 * The first quadword after the common header always seems to
diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c
index 28849c894153..8d019071190a 100644
--- a/arch/alpha/kernel/core_mcpcia.c
+++ b/arch/alpha/kernel/core_mcpcia.c
@@ -572,8 +572,7 @@ mcpcia_print_system_area(unsigned long la_ptr)
572} 572}
573 573
574void 574void
575mcpcia_machine_check(unsigned long vector, unsigned long la_ptr, 575mcpcia_machine_check(unsigned long vector, unsigned long la_ptr)
576 struct pt_regs * regs)
577{ 576{
578 struct el_common *mchk_header; 577 struct el_common *mchk_header;
579 struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; 578 struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
@@ -610,7 +609,7 @@ mcpcia_machine_check(unsigned long vector, unsigned long la_ptr,
610 wrmces(0x7); 609 wrmces(0x7);
611 mb(); 610 mb();
612 611
613 process_mcheck_info(vector, la_ptr, regs, "MCPCIA", expected != 0); 612 process_mcheck_info(vector, la_ptr, "MCPCIA", expected != 0);
614 if (!expected && vector != 0x620 && vector != 0x630) { 613 if (!expected && vector != 0x620 && vector != 0x630) {
615 mcpcia_print_uncorrectable(mchk_logout); 614 mcpcia_print_uncorrectable(mchk_logout);
616 mcpcia_print_system_area(la_ptr); 615 mcpcia_print_system_area(la_ptr);
diff --git a/arch/alpha/kernel/core_polaris.c b/arch/alpha/kernel/core_polaris.c
index 277674a500ff..c5a271d37abd 100644
--- a/arch/alpha/kernel/core_polaris.c
+++ b/arch/alpha/kernel/core_polaris.c
@@ -187,8 +187,7 @@ polaris_pci_clr_err(void)
187} 187}
188 188
189void 189void
190polaris_machine_check(unsigned long vector, unsigned long la_ptr, 190polaris_machine_check(unsigned long vector, unsigned long la_ptr)
191 struct pt_regs * regs)
192{ 191{
193 /* Clear the error before any reporting. */ 192 /* Clear the error before any reporting. */
194 mb(); 193 mb();
@@ -198,6 +197,6 @@ polaris_machine_check(unsigned long vector, unsigned long la_ptr,
198 wrmces(0x7); 197 wrmces(0x7);
199 mb(); 198 mb();
200 199
201 process_mcheck_info(vector, la_ptr, regs, "POLARIS", 200 process_mcheck_info(vector, la_ptr, "POLARIS",
202 mcheck_expected(0)); 201 mcheck_expected(0));
203} 202}
diff --git a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c
index ecce09e3626a..f5ca5255eb06 100644
--- a/arch/alpha/kernel/core_t2.c
+++ b/arch/alpha/kernel/core_t2.c
@@ -551,8 +551,7 @@ t2_clear_errors(int cpu)
551 * Hence all the taken/expected/any_expected/last_taken stuff... 551 * Hence all the taken/expected/any_expected/last_taken stuff...
552 */ 552 */
553void 553void
554t2_machine_check(unsigned long vector, unsigned long la_ptr, 554t2_machine_check(unsigned long vector, unsigned long la_ptr)
555 struct pt_regs * regs)
556{ 555{
557 int cpu = smp_processor_id(); 556 int cpu = smp_processor_id();
558#ifdef CONFIG_VERBOSE_MCHECK 557#ifdef CONFIG_VERBOSE_MCHECK
@@ -618,5 +617,5 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr,
618 } 617 }
619#endif 618#endif
620 619
621 process_mcheck_info(vector, la_ptr, regs, "T2", mcheck_expected(cpu)); 620 process_mcheck_info(vector, la_ptr, "T2", mcheck_expected(cpu));
622} 621}
diff --git a/arch/alpha/kernel/core_tsunami.c b/arch/alpha/kernel/core_tsunami.c
index 8aa305bd6a2c..ce623c6e55e1 100644
--- a/arch/alpha/kernel/core_tsunami.c
+++ b/arch/alpha/kernel/core_tsunami.c
@@ -443,8 +443,7 @@ tsunami_pci_clr_err(void)
443} 443}
444 444
445void 445void
446tsunami_machine_check(unsigned long vector, unsigned long la_ptr, 446tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
447 struct pt_regs * regs)
448{ 447{
449 /* Clear error before any reporting. */ 448 /* Clear error before any reporting. */
450 mb(); 449 mb();
@@ -454,6 +453,6 @@ tsunami_machine_check(unsigned long vector, unsigned long la_ptr,
454 wrmces(0x7); 453 wrmces(0x7);
455 mb(); 454 mb();
456 455
457 process_mcheck_info(vector, la_ptr, regs, "TSUNAMI", 456 process_mcheck_info(vector, la_ptr, "TSUNAMI",
458 mcheck_expected(smp_processor_id())); 457 mcheck_expected(smp_processor_id()));
459} 458}
diff --git a/arch/alpha/kernel/core_wildfire.c b/arch/alpha/kernel/core_wildfire.c
index 2b767a1bad96..7e072443d7fd 100644
--- a/arch/alpha/kernel/core_wildfire.c
+++ b/arch/alpha/kernel/core_wildfire.c
@@ -322,8 +322,7 @@ wildfire_init_arch(void)
322} 322}
323 323
324void 324void
325wildfire_machine_check(unsigned long vector, unsigned long la_ptr, 325wildfire_machine_check(unsigned long vector, unsigned long la_ptr)
326 struct pt_regs * regs)
327{ 326{
328 mb(); 327 mb();
329 mb(); /* magic */ 328 mb(); /* magic */
@@ -332,7 +331,7 @@ wildfire_machine_check(unsigned long vector, unsigned long la_ptr,
332 wrmces(0x7); 331 wrmces(0x7);
333 mb(); 332 mb();
334 333
335 process_mcheck_info(vector, la_ptr, regs, "WILDFIRE", 334 process_mcheck_info(vector, la_ptr, "WILDFIRE",
336 mcheck_expected(smp_processor_id())); 335 mcheck_expected(smp_processor_id()));
337} 336}
338 337
diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c
index 64f59f2fcf5c..69b5f4ea7355 100644
--- a/arch/alpha/kernel/err_ev6.c
+++ b/arch/alpha/kernel/err_ev6.c
@@ -11,6 +11,7 @@
11#include <linux/sched.h> 11#include <linux/sched.h>
12 12
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/irq_regs.h>
14#include <asm/hwrpb.h> 15#include <asm/hwrpb.h>
15#include <asm/smp.h> 16#include <asm/smp.h>
16#include <asm/err_common.h> 17#include <asm/err_common.h>
@@ -229,7 +230,7 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print)
229} 230}
230 231
231void 232void
232ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 233ev6_machine_check(u64 vector, u64 la_ptr)
233{ 234{
234 struct el_common *mchk_header = (struct el_common *)la_ptr; 235 struct el_common *mchk_header = (struct el_common *)la_ptr;
235 236
@@ -260,7 +261,7 @@ ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
260 (unsigned int)vector, (int)smp_processor_id()); 261 (unsigned int)vector, (int)smp_processor_id());
261 262
262 ev6_process_logout_frame(mchk_header, 1); 263 ev6_process_logout_frame(mchk_header, 1);
263 dik_show_regs(regs, NULL); 264 dik_show_regs(get_irq_regs(), NULL);
264 265
265 err_print_prefix = saved_err_prefix; 266 err_print_prefix = saved_err_prefix;
266 } 267 }
diff --git a/arch/alpha/kernel/err_ev7.c b/arch/alpha/kernel/err_ev7.c
index fed6b3d1b803..95463ab1cf35 100644
--- a/arch/alpha/kernel/err_ev7.c
+++ b/arch/alpha/kernel/err_ev7.c
@@ -118,7 +118,7 @@ ev7_collect_logout_frame_subpackets(struct el_subpacket *el_ptr,
118} 118}
119 119
120void 120void
121ev7_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 121ev7_machine_check(u64 vector, u64 la_ptr)
122{ 122{
123 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr; 123 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr;
124 char *saved_err_prefix = err_print_prefix; 124 char *saved_err_prefix = err_print_prefix;
diff --git a/arch/alpha/kernel/err_impl.h b/arch/alpha/kernel/err_impl.h
index 64e9b73809fa..3c12258158e6 100644
--- a/arch/alpha/kernel/err_impl.h
+++ b/arch/alpha/kernel/err_impl.h
@@ -60,26 +60,26 @@ extern struct ev7_lf_subpackets *
60ev7_collect_logout_frame_subpackets(struct el_subpacket *, 60ev7_collect_logout_frame_subpackets(struct el_subpacket *,
61 struct ev7_lf_subpackets *); 61 struct ev7_lf_subpackets *);
62extern void ev7_register_error_handlers(void); 62extern void ev7_register_error_handlers(void);
63extern void ev7_machine_check(u64, u64, struct pt_regs *); 63extern void ev7_machine_check(u64, u64);
64 64
65/* 65/*
66 * err_ev6.c 66 * err_ev6.c
67 */ 67 */
68extern void ev6_register_error_handlers(void); 68extern void ev6_register_error_handlers(void);
69extern int ev6_process_logout_frame(struct el_common *, int); 69extern int ev6_process_logout_frame(struct el_common *, int);
70extern void ev6_machine_check(u64, u64, struct pt_regs *); 70extern void ev6_machine_check(u64, u64);
71 71
72/* 72/*
73 * err_marvel.c 73 * err_marvel.c
74 */ 74 */
75extern void marvel_machine_check(u64, u64, struct pt_regs *); 75extern void marvel_machine_check(u64, u64);
76extern void marvel_register_error_handlers(void); 76extern void marvel_register_error_handlers(void);
77 77
78/* 78/*
79 * err_titan.c 79 * err_titan.c
80 */ 80 */
81extern int titan_process_logout_frame(struct el_common *, int); 81extern int titan_process_logout_frame(struct el_common *, int);
82extern void titan_machine_check(u64, u64, struct pt_regs *); 82extern void titan_machine_check(u64, u64);
83extern void titan_register_error_handlers(void); 83extern void titan_register_error_handlers(void);
84extern int privateer_process_logout_frame(struct el_common *, int); 84extern int privateer_process_logout_frame(struct el_common *, int);
85extern void privateer_machine_check(u64, u64, struct pt_regs *); 85extern void privateer_machine_check(u64, u64);
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
index 70b38b1d2af3..f2956ac8dccc 100644
--- a/arch/alpha/kernel/err_marvel.c
+++ b/arch/alpha/kernel/err_marvel.c
@@ -1042,7 +1042,7 @@ marvel_process_logout_frame(struct ev7_lf_subpackets *lf_subpackets, int print)
1042} 1042}
1043 1043
1044void 1044void
1045marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 1045marvel_machine_check(u64 vector, u64 la_ptr)
1046{ 1046{
1047 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr; 1047 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr;
1048 int (*process_frame)(struct ev7_lf_subpackets *, int) = NULL; 1048 int (*process_frame)(struct ev7_lf_subpackets *, int) = NULL;
@@ -1077,7 +1077,7 @@ marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
1077 1077
1078 default: 1078 default:
1079 /* Don't know it - pass it up. */ 1079 /* Don't know it - pass it up. */
1080 ev7_machine_check(vector, la_ptr, regs); 1080 ev7_machine_check(vector, la_ptr);
1081 return; 1081 return;
1082 } 1082 }
1083 1083
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c
index 7e6720d45f02..2e6e62933327 100644
--- a/arch/alpha/kernel/err_titan.c
+++ b/arch/alpha/kernel/err_titan.c
@@ -379,7 +379,7 @@ titan_process_logout_frame(struct el_common *mchk_header, int print)
379} 379}
380 380
381void 381void
382titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 382titan_machine_check(u64 vector, u64 la_ptr)
383{ 383{
384 struct el_common *mchk_header = (struct el_common *)la_ptr; 384 struct el_common *mchk_header = (struct el_common *)la_ptr;
385 struct el_TITAN_sysdata_mcheck *tmchk = 385 struct el_TITAN_sysdata_mcheck *tmchk =
@@ -408,7 +408,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
408 * Only handle system errors here 408 * Only handle system errors here
409 */ 409 */
410 if ((vector != SCB_Q_SYSMCHK) && (vector != SCB_Q_SYSERR)) { 410 if ((vector != SCB_Q_SYSMCHK) && (vector != SCB_Q_SYSERR)) {
411 ev6_machine_check(vector, la_ptr, regs); 411 ev6_machine_check(vector, la_ptr);
412 return; 412 return;
413 } 413 }
414 414
@@ -442,7 +442,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
442#ifdef CONFIG_VERBOSE_MCHECK 442#ifdef CONFIG_VERBOSE_MCHECK
443 titan_process_logout_frame(mchk_header, alpha_verbose_mcheck); 443 titan_process_logout_frame(mchk_header, alpha_verbose_mcheck);
444 if (alpha_verbose_mcheck) 444 if (alpha_verbose_mcheck)
445 dik_show_regs(regs, NULL); 445 dik_show_regs(get_irq_regs(), NULL);
446#endif /* CONFIG_VERBOSE_MCHECK */ 446#endif /* CONFIG_VERBOSE_MCHECK */
447 447
448 err_print_prefix = saved_err_prefix; 448 err_print_prefix = saved_err_prefix;
@@ -452,7 +452,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
452 * machine checks to interrupts 452 * machine checks to interrupts
453 */ 453 */
454 irqmask = tmchk->c_dirx & TITAN_MCHECK_INTERRUPT_MASK; 454 irqmask = tmchk->c_dirx & TITAN_MCHECK_INTERRUPT_MASK;
455 titan_dispatch_irqs(irqmask, regs); 455 titan_dispatch_irqs(irqmask, get_irq_regs());
456 } 456 }
457 457
458 458
@@ -701,7 +701,7 @@ privateer_process_logout_frame(struct el_common *mchk_header, int print)
701} 701}
702 702
703void 703void
704privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 704privateer_machine_check(u64 vector, u64 la_ptr)
705{ 705{
706 struct el_common *mchk_header = (struct el_common *)la_ptr; 706 struct el_common *mchk_header = (struct el_common *)la_ptr;
707 struct el_TITAN_sysdata_mcheck *tmchk = 707 struct el_TITAN_sysdata_mcheck *tmchk =
@@ -723,7 +723,7 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
723 * Only handle system events here. 723 * Only handle system events here.
724 */ 724 */
725 if (vector != SCB_Q_SYSEVENT) 725 if (vector != SCB_Q_SYSEVENT)
726 return titan_machine_check(vector, la_ptr, regs); 726 return titan_machine_check(vector, la_ptr);
727 727
728 /* 728 /*
729 * Report the event - System Events should be reported even if no 729 * Report the event - System Events should be reported even if no
@@ -746,7 +746,7 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
746 /* 746 /*
747 * Dispatch the interrupt(s). 747 * Dispatch the interrupt(s).
748 */ 748 */
749 titan_dispatch_irqs(irqmask, regs); 749 titan_dispatch_irqs(irqmask, get_irq_regs());
750 750
751 /* 751 /*
752 * Release the logout frame. 752 * Release the logout frame.
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index 51d66b7f99e3..6dd126b8be85 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -72,7 +72,9 @@ do_entInt(unsigned long type, unsigned long vector,
72 set_irq_regs(old_regs); 72 set_irq_regs(old_regs);
73 return; 73 return;
74 case 2: 74 case 2:
75 alpha_mv.machine_check(vector, la_ptr, regs); 75 old_regs = set_irq_regs(regs);
76 alpha_mv.machine_check(vector, la_ptr);
77 set_irq_regs(old_regs);
76 return; 78 return;
77 case 3: 79 case 3:
78 old_regs = set_irq_regs(regs); 80 old_regs = set_irq_regs(regs);
@@ -125,8 +127,7 @@ struct mcheck_info __mcheck_info;
125 127
126void 128void
127process_mcheck_info(unsigned long vector, unsigned long la_ptr, 129process_mcheck_info(unsigned long vector, unsigned long la_ptr,
128 struct pt_regs *regs, const char *machine, 130 const char *machine, int expected)
129 int expected)
130{ 131{
131 struct el_common *mchk_header; 132 struct el_common *mchk_header;
132 const char *reason; 133 const char *reason;
@@ -153,7 +154,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
153 mchk_header = (struct el_common *)la_ptr; 154 mchk_header = (struct el_common *)la_ptr;
154 155
155 printk(KERN_CRIT "%s machine check: vector=0x%lx pc=0x%lx code=0x%x\n", 156 printk(KERN_CRIT "%s machine check: vector=0x%lx pc=0x%lx code=0x%x\n",
156 machine, vector, regs->pc, mchk_header->code); 157 machine, vector, get_irq_regs()->pc, mchk_header->code);
157 158
158 switch (mchk_header->code) { 159 switch (mchk_header->code) {
159 /* Machine check reasons. Defined according to PALcode sources. */ 160 /* Machine check reasons. Defined according to PALcode sources. */
@@ -194,7 +195,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
194 printk(KERN_CRIT "machine check type: %s%s\n", 195 printk(KERN_CRIT "machine check type: %s%s\n",
195 reason, mchk_header->retry ? " (retryable)" : ""); 196 reason, mchk_header->retry ? " (retryable)" : "");
196 197
197 dik_show_regs(regs, NULL); 198 dik_show_regs(get_irq_regs(), NULL);
198 199
199#ifdef CONFIG_VERBOSE_MCHECK 200#ifdef CONFIG_VERBOSE_MCHECK
200 if (alpha_verbose_mcheck > 1) { 201 if (alpha_verbose_mcheck > 1) {
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
index 408bda25b0b1..3fff88734190 100644
--- a/arch/alpha/kernel/proto.h
+++ b/arch/alpha/kernel/proto.h
@@ -20,7 +20,7 @@ struct pci_controller;
20extern struct pci_ops apecs_pci_ops; 20extern struct pci_ops apecs_pci_ops;
21extern void apecs_init_arch(void); 21extern void apecs_init_arch(void);
22extern void apecs_pci_clr_err(void); 22extern void apecs_pci_clr_err(void);
23extern void apecs_machine_check(u64, u64, struct pt_regs *); 23extern void apecs_machine_check(u64, u64);
24extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 24extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
25 25
26/* core_cia.c */ 26/* core_cia.c */
@@ -29,7 +29,7 @@ extern void cia_init_pci(void);
29extern void cia_init_arch(void); 29extern void cia_init_arch(void);
30extern void pyxis_init_arch(void); 30extern void pyxis_init_arch(void);
31extern void cia_kill_arch(int); 31extern void cia_kill_arch(int);
32extern void cia_machine_check(u64, u64, struct pt_regs *); 32extern void cia_machine_check(u64, u64);
33extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 33extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
34 34
35/* core_irongate.c */ 35/* core_irongate.c */
@@ -42,14 +42,14 @@ extern void irongate_machine_check(u64, u64, struct pt_regs *);
42/* core_lca.c */ 42/* core_lca.c */
43extern struct pci_ops lca_pci_ops; 43extern struct pci_ops lca_pci_ops;
44extern void lca_init_arch(void); 44extern void lca_init_arch(void);
45extern void lca_machine_check(u64, u64, struct pt_regs *); 45extern void lca_machine_check(u64, u64);
46extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 46extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
47 47
48/* core_marvel.c */ 48/* core_marvel.c */
49extern struct pci_ops marvel_pci_ops; 49extern struct pci_ops marvel_pci_ops;
50extern void marvel_init_arch(void); 50extern void marvel_init_arch(void);
51extern void marvel_kill_arch(int); 51extern void marvel_kill_arch(int);
52extern void marvel_machine_check(u64, u64, struct pt_regs *); 52extern void marvel_machine_check(u64, u64);
53extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 53extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
54extern int marvel_pa_to_nid(unsigned long); 54extern int marvel_pa_to_nid(unsigned long);
55extern int marvel_cpuid_to_nid(int); 55extern int marvel_cpuid_to_nid(int);
@@ -64,7 +64,7 @@ void io7_clear_errors(struct io7 *io7);
64extern struct pci_ops mcpcia_pci_ops; 64extern struct pci_ops mcpcia_pci_ops;
65extern void mcpcia_init_arch(void); 65extern void mcpcia_init_arch(void);
66extern void mcpcia_init_hoses(void); 66extern void mcpcia_init_hoses(void);
67extern void mcpcia_machine_check(u64, u64, struct pt_regs *); 67extern void mcpcia_machine_check(u64, u64);
68extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 68extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
69 69
70/* core_polaris.c */ 70/* core_polaris.c */
@@ -72,21 +72,21 @@ extern struct pci_ops polaris_pci_ops;
72extern int polaris_read_config_dword(struct pci_dev *, int, u32 *); 72extern int polaris_read_config_dword(struct pci_dev *, int, u32 *);
73extern int polaris_write_config_dword(struct pci_dev *, int, u32); 73extern int polaris_write_config_dword(struct pci_dev *, int, u32);
74extern void polaris_init_arch(void); 74extern void polaris_init_arch(void);
75extern void polaris_machine_check(u64, u64, struct pt_regs *); 75extern void polaris_machine_check(u64, u64);
76#define polaris_pci_tbi ((void *)0) 76#define polaris_pci_tbi ((void *)0)
77 77
78/* core_t2.c */ 78/* core_t2.c */
79extern struct pci_ops t2_pci_ops; 79extern struct pci_ops t2_pci_ops;
80extern void t2_init_arch(void); 80extern void t2_init_arch(void);
81extern void t2_kill_arch(int); 81extern void t2_kill_arch(int);
82extern void t2_machine_check(u64, u64, struct pt_regs *); 82extern void t2_machine_check(u64, u64);
83extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 83extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
84 84
85/* core_titan.c */ 85/* core_titan.c */
86extern struct pci_ops titan_pci_ops; 86extern struct pci_ops titan_pci_ops;
87extern void titan_init_arch(void); 87extern void titan_init_arch(void);
88extern void titan_kill_arch(int); 88extern void titan_kill_arch(int);
89extern void titan_machine_check(u64, u64, struct pt_regs *); 89extern void titan_machine_check(u64, u64);
90extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 90extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
91extern struct _alpha_agp_info *titan_agp_info(void); 91extern struct _alpha_agp_info *titan_agp_info(void);
92 92
@@ -94,14 +94,14 @@ extern struct _alpha_agp_info *titan_agp_info(void);
94extern struct pci_ops tsunami_pci_ops; 94extern struct pci_ops tsunami_pci_ops;
95extern void tsunami_init_arch(void); 95extern void tsunami_init_arch(void);
96extern void tsunami_kill_arch(int); 96extern void tsunami_kill_arch(int);
97extern void tsunami_machine_check(u64, u64, struct pt_regs *); 97extern void tsunami_machine_check(u64, u64);
98extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 98extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
99 99
100/* core_wildfire.c */ 100/* core_wildfire.c */
101extern struct pci_ops wildfire_pci_ops; 101extern struct pci_ops wildfire_pci_ops;
102extern void wildfire_init_arch(void); 102extern void wildfire_init_arch(void);
103extern void wildfire_kill_arch(int); 103extern void wildfire_kill_arch(int);
104extern void wildfire_machine_check(u64, u64, struct pt_regs *); 104extern void wildfire_machine_check(u64, u64);
105extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 105extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
106extern int wildfire_pa_to_nid(unsigned long); 106extern int wildfire_pa_to_nid(unsigned long);
107extern int wildfire_cpuid_to_nid(int); 107extern int wildfire_cpuid_to_nid(int);
@@ -214,5 +214,4 @@ extern struct mcheck_info
214#endif 214#endif
215 215
216extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr, 216extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr,
217 struct pt_regs *regs, const char *machine, 217 const char *machine, int expected);
218 int expected);
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c
index a7b89022938e..2c3de97de46c 100644
--- a/arch/alpha/kernel/sys_jensen.c
+++ b/arch/alpha/kernel/sys_jensen.c
@@ -244,7 +244,7 @@ jensen_init_arch(void)
244} 244}
245 245
246static void 246static void
247jensen_machine_check (u64 vector, u64 la, struct pt_regs *regs) 247jensen_machine_check (u64 vector, u64 la)
248{ 248{
249 printk(KERN_CRIT "Machine check\n"); 249 printk(KERN_CRIT "Machine check\n");
250} 250}
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c
index ba98048d61a8..8d3e9429c5ee 100644
--- a/arch/alpha/kernel/sys_mikasa.c
+++ b/arch/alpha/kernel/sys_mikasa.c
@@ -182,8 +182,7 @@ mikasa_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
182 182
183#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO) 183#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
184static void 184static void
185mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr, 185mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr)
186 struct pt_regs * regs)
187{ 186{
188#define MCHK_NO_DEVSEL 0x205U 187#define MCHK_NO_DEVSEL 0x205U
189#define MCHK_NO_TABT 0x204U 188#define MCHK_NO_TABT 0x204U
@@ -202,7 +201,7 @@ mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr,
202 mb(); 201 mb();
203 202
204 code = mchk_header->code; 203 code = mchk_header->code;
205 process_mcheck_info(vector, la_ptr, regs, "MIKASA APECS", 204 process_mcheck_info(vector, la_ptr, "MIKASA APECS",
206 (mcheck_expected(0) 205 (mcheck_expected(0)
207 && (code == MCHK_NO_DEVSEL 206 && (code == MCHK_NO_DEVSEL
208 || code == MCHK_NO_TABT))); 207 || code == MCHK_NO_TABT)));
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
index c0d696efec5b..93744bab73fb 100644
--- a/arch/alpha/kernel/sys_nautilus.c
+++ b/arch/alpha/kernel/sys_nautilus.c
@@ -124,8 +124,7 @@ naut_sys_machine_check(unsigned long vector, unsigned long la_ptr,
124 in the system. They are analysed separately but all starts here. */ 124 in the system. They are analysed separately but all starts here. */
125 125
126void 126void
127nautilus_machine_check(unsigned long vector, unsigned long la_ptr, 127nautilus_machine_check(unsigned long vector, unsigned long la_ptr)
128 struct pt_regs *regs)
129{ 128{
130 char *mchk_class; 129 char *mchk_class;
131 130
@@ -165,7 +164,7 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
165 else if (vector == SCB_Q_SYSMCHK) 164 else if (vector == SCB_Q_SYSMCHK)
166 mchk_class = "Fatal"; 165 mchk_class = "Fatal";
167 else { 166 else {
168 ev6_machine_check(vector, la_ptr, regs); 167 ev6_machine_check(vector, la_ptr);
169 return; 168 return;
170 } 169 }
171 170
@@ -173,7 +172,7 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
173 "[%s System Machine Check (NMI)]\n", 172 "[%s System Machine Check (NMI)]\n",
174 vector, mchk_class); 173 vector, mchk_class);
175 174
176 naut_sys_machine_check(vector, la_ptr, regs); 175 naut_sys_machine_check(vector, la_ptr, get_irq_regs());
177 176
178 /* Tell the PALcode to clear the machine check */ 177 /* Tell the PALcode to clear the machine check */
179 draina(); 178 draina();
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c
index 679836205f04..de6ba3432e8a 100644
--- a/arch/alpha/kernel/sys_noritake.c
+++ b/arch/alpha/kernel/sys_noritake.c
@@ -264,8 +264,7 @@ noritake_swizzle(struct pci_dev *dev, u8 *pinp)
264 264
265#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO) 265#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
266static void 266static void
267noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr, 267noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr)
268 struct pt_regs * regs)
269{ 268{
270#define MCHK_NO_DEVSEL 0x205U 269#define MCHK_NO_DEVSEL 0x205U
271#define MCHK_NO_TABT 0x204U 270#define MCHK_NO_TABT 0x204U
@@ -284,7 +283,7 @@ noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr,
284 mb(); 283 mb();
285 284
286 code = mchk_header->code; 285 code = mchk_header->code;
287 process_mcheck_info(vector, la_ptr, regs, "NORITAKE APECS", 286 process_mcheck_info(vector, la_ptr, "NORITAKE APECS",
288 (mcheck_expected(0) 287 (mcheck_expected(0)
289 && (code == MCHK_NO_DEVSEL 288 && (code == MCHK_NO_DEVSEL
290 || code == MCHK_NO_TABT))); 289 || code == MCHK_NO_TABT)));