From 7ca56053b29633ef08b14e5ca16c663363edac36 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 8 Oct 2006 14:36:08 +0100 Subject: [PATCH] alpha pt_regs cleanups: device_interrupt callers of ->device_interrupt() do set_irq_regs() now; pt_regs argument removed, remaining uses of regs in instances of ->device_interrupt() are switched to get_irq_regs() and will be gone in the next patch. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/alpha/kernel/sys_mikasa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/alpha/kernel/sys_mikasa.c') diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c index cc4c58111366..5429ba0e08f1 100644 --- a/arch/alpha/kernel/sys_mikasa.c +++ b/arch/alpha/kernel/sys_mikasa.c @@ -79,7 +79,7 @@ static struct hw_interrupt_type mikasa_irq_type = { }; static void -mikasa_device_interrupt(unsigned long vector, struct pt_regs *regs) +mikasa_device_interrupt(unsigned long vector) { unsigned long pld; unsigned int i; @@ -97,9 +97,9 @@ mikasa_device_interrupt(unsigned long vector, struct pt_regs *regs) i = ffz(~pld); pld &= pld - 1; /* clear least bit set */ if (i < 16) { - isa_device_interrupt(vector, regs); + isa_device_interrupt(vector); } else { - handle_irq(i, regs); + handle_irq(i, get_irq_regs()); } } } -- cgit v1.2.3 From 3dbb8c62897f96bbf5d4e4fe649e5d3791fc33c5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 8 Oct 2006 14:37:32 +0100 Subject: [PATCH] alpha pt_regs cleanups: handle_irq() isa_no_iack_sc_device_interrupt() always gets get_irq_regs() as argument; kill that argument. All but two callers of handle_irq() pass get_irq_regs() as argument; convert the remaining two, kill set_irq_regs() inside handle_irq(). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/alpha/kernel/irq.c | 5 +---- arch/alpha/kernel/irq_alpha.c | 6 ++++-- arch/alpha/kernel/irq_i8259.c | 6 +++--- arch/alpha/kernel/irq_impl.h | 4 ++-- arch/alpha/kernel/irq_pyxis.c | 2 +- arch/alpha/kernel/irq_srm.c | 2 +- arch/alpha/kernel/sys_alcor.c | 2 +- arch/alpha/kernel/sys_cabriolet.c | 2 +- arch/alpha/kernel/sys_dp264.c | 6 +++--- arch/alpha/kernel/sys_eb64p.c | 2 +- arch/alpha/kernel/sys_eiger.c | 10 +++++----- arch/alpha/kernel/sys_jensen.c | 2 +- arch/alpha/kernel/sys_marvel.c | 2 +- arch/alpha/kernel/sys_miata.c | 2 +- arch/alpha/kernel/sys_mikasa.c | 2 +- arch/alpha/kernel/sys_noritake.c | 4 ++-- arch/alpha/kernel/sys_rawhide.c | 2 +- arch/alpha/kernel/sys_rx164.c | 4 ++-- arch/alpha/kernel/sys_sable.c | 2 +- arch/alpha/kernel/sys_takara.c | 10 +++++----- arch/alpha/kernel/sys_titan.c | 2 +- arch/alpha/kernel/sys_wildfire.c | 2 +- 22 files changed, 40 insertions(+), 41 deletions(-) (limited to 'arch/alpha/kernel/sys_mikasa.c') diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index dba4e70926f5..facf82a5499a 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -127,9 +127,8 @@ unlock: #define MAX_ILLEGAL_IRQS 16 void -handle_irq(int irq, struct pt_regs * regs) +handle_irq(int irq) { - struct pt_regs *old_regs; /* * We ack quickly, we don't want the irq controller * thinking we're snobs just because some other CPU has @@ -150,7 +149,6 @@ handle_irq(int irq, struct pt_regs * regs) return; } - old_regs = set_irq_regs(regs); irq_enter(); /* * __do_IRQ() must be called with IPL_MAX. Note that we do not @@ -161,5 +159,4 @@ handle_irq(int irq, struct pt_regs * regs) local_irq_disable(); __do_IRQ(irq); irq_exit(); - set_irq_regs(old_regs); } diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index d14cc423aa48..51d66b7f99e3 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c @@ -52,6 +52,7 @@ do_entInt(unsigned long type, unsigned long vector, #endif break; case 1: + old_regs = set_irq_regs(regs); #ifdef CONFIG_SMP { long cpu; @@ -62,12 +63,13 @@ do_entInt(unsigned long type, unsigned long vector, if (cpu != boot_cpuid) { kstat_cpu(cpu).irqs[RTC_IRQ]++; } else { - handle_irq(RTC_IRQ, regs); + handle_irq(RTC_IRQ); } } #else - handle_irq(RTC_IRQ, regs); + handle_irq(RTC_IRQ); #endif + set_irq_regs(old_regs); return; case 2: alpha_mv.machine_check(vector, la_ptr, regs); diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c index 6c70f8b97b72..9405bee9894e 100644 --- a/arch/alpha/kernel/irq_i8259.c +++ b/arch/alpha/kernel/irq_i8259.c @@ -147,13 +147,13 @@ isa_device_interrupt(unsigned long vector) */ int j = *(vuip) IACK_SC; j &= 0xff; - handle_irq(j, get_irq_regs()); + handle_irq(j); } #endif #if defined(CONFIG_ALPHA_GENERIC) || !defined(IACK_SC) void -isa_no_iack_sc_device_interrupt(unsigned long vector, struct pt_regs *regs) +isa_no_iack_sc_device_interrupt(unsigned long vector) { unsigned long pic; @@ -176,7 +176,7 @@ isa_no_iack_sc_device_interrupt(unsigned long vector, struct pt_regs *regs) while (pic) { int j = ffz(~pic); pic &= pic - 1; - handle_irq(j, regs); + handle_irq(j); } } #endif diff --git a/arch/alpha/kernel/irq_impl.h b/arch/alpha/kernel/irq_impl.h index 5d84dbdcdb89..cc9a8a7aa279 100644 --- a/arch/alpha/kernel/irq_impl.h +++ b/arch/alpha/kernel/irq_impl.h @@ -16,7 +16,7 @@ #define RTC_IRQ 8 extern void isa_device_interrupt(unsigned long); -extern void isa_no_iack_sc_device_interrupt(unsigned long, struct pt_regs *); +extern void isa_no_iack_sc_device_interrupt(unsigned long); extern void srm_device_interrupt(unsigned long); extern void pyxis_device_interrupt(unsigned long); @@ -39,4 +39,4 @@ extern void i8259a_end_irq(unsigned int); extern struct hw_interrupt_type i8259a_irq_type; extern void init_i8259a_irqs(void); -extern void handle_irq(int irq, struct pt_regs * regs); +extern void handle_irq(int irq); diff --git a/arch/alpha/kernel/irq_pyxis.c b/arch/alpha/kernel/irq_pyxis.c index 686dc22111b2..d53edbccbfe5 100644 --- a/arch/alpha/kernel/irq_pyxis.c +++ b/arch/alpha/kernel/irq_pyxis.c @@ -100,7 +100,7 @@ pyxis_device_interrupt(unsigned long vector) if (i == 7) isa_device_interrupt(vector); else - handle_irq(16+i, get_irq_regs()); + handle_irq(16+i); } } diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c index 2e9f6d421a8e..32212014fbe9 100644 --- a/arch/alpha/kernel/irq_srm.c +++ b/arch/alpha/kernel/irq_srm.c @@ -75,5 +75,5 @@ void srm_device_interrupt(unsigned long vector) { int irq = (vector - 0x800) >> 4; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c index 2d412c876549..49bedfbbd31b 100644 --- a/arch/alpha/kernel/sys_alcor.c +++ b/arch/alpha/kernel/sys_alcor.c @@ -118,7 +118,7 @@ alcor_device_interrupt(unsigned long vector) if (i == 31) { isa_device_interrupt(vector); } else { - handle_irq(16 + i, get_irq_regs()); + handle_irq(16 + i); } } } diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c index e75f0cea6fcc..ace475c124f6 100644 --- a/arch/alpha/kernel/sys_cabriolet.c +++ b/arch/alpha/kernel/sys_cabriolet.c @@ -100,7 +100,7 @@ cabriolet_device_interrupt(unsigned long v) if (i == 4) { isa_device_interrupt(v); } else { - handle_irq(16 + i, get_irq_regs()); + handle_irq(16 + i); } } } diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 57dce0098a1b..85d2f933dd07 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c @@ -238,7 +238,7 @@ dp264_device_interrupt(unsigned long vector) if (i == 55) isa_device_interrupt(vector); else - handle_irq(16 + i, get_irq_regs()); + handle_irq(16 + i); #if 0 TSUNAMI_cchip->dir0.csr = 1UL << i; mb(); tmp = TSUNAMI_cchip->dir0.csr; @@ -268,7 +268,7 @@ dp264_srm_device_interrupt(unsigned long vector) if (irq >= 32) irq -= 16; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void @@ -290,7 +290,7 @@ clipper_srm_device_interrupt(unsigned long vector) * * Eg IRQ 24 is DRIR bit 8, etc, etc */ - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c index 90d27256d7d6..9c5a306dc0ee 100644 --- a/arch/alpha/kernel/sys_eb64p.c +++ b/arch/alpha/kernel/sys_eb64p.c @@ -99,7 +99,7 @@ eb64p_device_interrupt(unsigned long vector) if (i == 5) { isa_device_interrupt(vector); } else { - handle_irq(16 + i, get_irq_regs()); + handle_irq(16 + i); } } } diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c index f38cded2df97..7ef3b6fb3700 100644 --- a/arch/alpha/kernel/sys_eiger.c +++ b/arch/alpha/kernel/sys_eiger.c @@ -118,10 +118,10 @@ eiger_device_interrupt(unsigned long vector) * despatch an interrupt if it's set. */ - if (intstatus & 8) handle_irq(16+3, get_irq_regs()); - if (intstatus & 4) handle_irq(16+2, get_irq_regs()); - if (intstatus & 2) handle_irq(16+1, get_irq_regs()); - if (intstatus & 1) handle_irq(16+0, get_irq_regs()); + if (intstatus & 8) handle_irq(16+3); + if (intstatus & 4) handle_irq(16+2); + if (intstatus & 2) handle_irq(16+1); + if (intstatus & 1) handle_irq(16+0); } else { isa_device_interrupt(vector); } @@ -131,7 +131,7 @@ static void eiger_srm_device_interrupt(unsigned long vector) { int irq = (vector - 0x800) >> 4; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c index fc316369f4d4..a7b89022938e 100644 --- a/arch/alpha/kernel/sys_jensen.c +++ b/arch/alpha/kernel/sys_jensen.c @@ -198,7 +198,7 @@ jensen_device_interrupt(unsigned long vector) } #endif - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c index 4ea5615be43a..e349f03b830e 100644 --- a/arch/alpha/kernel/sys_marvel.c +++ b/arch/alpha/kernel/sys_marvel.c @@ -64,7 +64,7 @@ io7_device_interrupt(unsigned long vector) irq &= MARVEL_IRQ_VEC_IRQ_MASK; /* not too many bits */ irq |= pid << MARVEL_IRQ_VEC_PE_SHIFT; /* merge the pid */ - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static volatile unsigned long * diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c index fbbd95212a96..b8b817feb1ee 100644 --- a/arch/alpha/kernel/sys_miata.c +++ b/arch/alpha/kernel/sys_miata.c @@ -56,7 +56,7 @@ miata_srm_device_interrupt(unsigned long vector) if (irq >= 16) irq = irq + 8; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c index 5429ba0e08f1..ba98048d61a8 100644 --- a/arch/alpha/kernel/sys_mikasa.c +++ b/arch/alpha/kernel/sys_mikasa.c @@ -99,7 +99,7 @@ mikasa_device_interrupt(unsigned long vector) if (i < 16) { isa_device_interrupt(vector); } else { - handle_irq(i, get_irq_regs()); + handle_irq(i); } } } diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c index b9a843447b89..679836205f04 100644 --- a/arch/alpha/kernel/sys_noritake.c +++ b/arch/alpha/kernel/sys_noritake.c @@ -98,7 +98,7 @@ noritake_device_interrupt(unsigned long vector) if (i < 16) { isa_device_interrupt(vector); } else { - handle_irq(i, get_irq_regs()); + handle_irq(i); } } } @@ -122,7 +122,7 @@ noritake_srm_device_interrupt(unsigned long vector) if (irq >= 16) irq = irq + 1; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c index bef65162bfab..581d08c70b92 100644 --- a/arch/alpha/kernel/sys_rawhide.c +++ b/arch/alpha/kernel/sys_rawhide.c @@ -158,7 +158,7 @@ rawhide_srm_device_interrupt(unsigned long vector) /* Adjust by which hose it is from. */ irq -= ((irq + 16) >> 2) & 0x38; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c index fa8eef8dd8c6..ce1faa6f1df1 100644 --- a/arch/alpha/kernel/sys_rx164.c +++ b/arch/alpha/kernel/sys_rx164.c @@ -102,9 +102,9 @@ rx164_device_interrupt(unsigned long vector) i = ffz(~pld); pld &= pld - 1; /* clear least bit set */ if (i == 20) { - isa_no_iack_sc_device_interrupt(vector, get_irq_regs()); + isa_no_iack_sc_device_interrupt(vector); } else { - handle_irq(16+i, get_irq_regs()); + handle_irq(16+i); } } } diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c index 791379101e7c..906019cfa681 100644 --- a/arch/alpha/kernel/sys_sable.c +++ b/arch/alpha/kernel/sys_sable.c @@ -526,7 +526,7 @@ sable_lynx_srm_device_interrupt(unsigned long vector) printk("%s: vector 0x%lx bit 0x%x irq 0x%x\n", __FUNCTION__, vector, bit, irq); #endif - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c index ce2d3b081dc8..9bd9a31450c6 100644 --- a/arch/alpha/kernel/sys_takara.c +++ b/arch/alpha/kernel/sys_takara.c @@ -112,10 +112,10 @@ takara_device_interrupt(unsigned long vector) * despatch an interrupt if it's set. */ - if (intstatus & 8) handle_irq(16+3, get_irq_regs()); - if (intstatus & 4) handle_irq(16+2, get_irq_regs()); - if (intstatus & 2) handle_irq(16+1, get_irq_regs()); - if (intstatus & 1) handle_irq(16+0, get_irq_regs()); + if (intstatus & 8) handle_irq(16+3); + if (intstatus & 4) handle_irq(16+2); + if (intstatus & 2) handle_irq(16+1); + if (intstatus & 1) handle_irq(16+0); } else { isa_device_interrupt (vector); } @@ -125,7 +125,7 @@ static void takara_srm_device_interrupt(unsigned long vector) { int irq = (vector - 0x800) >> 4; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } static void __init diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 1473aa0e6982..e8e8ec9c0f4e 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c @@ -178,7 +178,7 @@ titan_srm_device_interrupt(unsigned long vector) int irq; irq = (vector - 0x800) >> 4; - handle_irq(irq, get_irq_regs()); + handle_irq(irq); } diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c index ddf5edd0cecd..42c3eede4d09 100644 --- a/arch/alpha/kernel/sys_wildfire.c +++ b/arch/alpha/kernel/sys_wildfire.c @@ -246,7 +246,7 @@ wildfire_device_interrupt(unsigned long vector) * bits 5-0: irq in PCA */ - handle_irq(irq, get_irq_regs()); + handle_irq(irq); return; } -- cgit v1.2.3 From 4fa1970a23bf8fc68e86b65a87c32556e20a6be6 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 8 Oct 2006 14:44:38 +0100 Subject: [PATCH] alpha pt_regs cleanups: machine_check() do set_irq_regs() in caller, kill pt_regs argument. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/alpha/kernel/core_apecs.c | 5 ++--- arch/alpha/kernel/core_cia.c | 5 ++--- arch/alpha/kernel/core_lca.c | 6 +++--- arch/alpha/kernel/core_mcpcia.c | 5 ++--- arch/alpha/kernel/core_polaris.c | 5 ++--- arch/alpha/kernel/core_t2.c | 5 ++--- arch/alpha/kernel/core_tsunami.c | 5 ++--- arch/alpha/kernel/core_wildfire.c | 5 ++--- arch/alpha/kernel/err_ev6.c | 5 +++-- arch/alpha/kernel/err_ev7.c | 2 +- arch/alpha/kernel/err_impl.h | 10 +++++----- arch/alpha/kernel/err_marvel.c | 4 ++-- arch/alpha/kernel/err_titan.c | 14 +++++++------- arch/alpha/kernel/irq_alpha.c | 11 ++++++----- arch/alpha/kernel/proto.h | 23 +++++++++++------------ arch/alpha/kernel/sys_jensen.c | 2 +- arch/alpha/kernel/sys_mikasa.c | 5 ++--- arch/alpha/kernel/sys_nautilus.c | 7 +++---- arch/alpha/kernel/sys_noritake.c | 5 ++--- include/asm-alpha/machvec.h | 3 +-- 20 files changed, 61 insertions(+), 71 deletions(-) (limited to 'arch/alpha/kernel/sys_mikasa.c') 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) } void -apecs_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +apecs_machine_check(unsigned long vector, unsigned long la_ptr) { struct el_common *mchk_header; struct el_apecs_procdata *mchk_procdata; @@ -412,7 +411,7 @@ apecs_machine_check(unsigned long vector, unsigned long la_ptr, wrmces(0x7); /* reset machine check pending flag */ mb(); - process_mcheck_info(vector, la_ptr, regs, "APECS", + process_mcheck_info(vector, la_ptr, "APECS", (mcheck_expected(0) && (mchk_sysdata->epic_dcsr & 0x0c00UL))); } 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) } void -cia_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +cia_machine_check(unsigned long vector, unsigned long la_ptr) { int expected; @@ -1208,5 +1207,5 @@ cia_machine_check(unsigned long vector, unsigned long la_ptr, expected = mcheck_expected(0); if (!expected && vector == 0x660) expected = cia_decode_mchk(la_ptr); - process_mcheck_info(vector, la_ptr, regs, "CIA", expected); + process_mcheck_info(vector, la_ptr, "CIA", expected); } 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 @@ #include #include +#include #include #include "proto.h" @@ -386,8 +387,7 @@ ioc_error(__u32 stat0, __u32 stat1) } void -lca_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs *regs) +lca_machine_check(unsigned long vector, unsigned long la_ptr) { const char * reason; union el_lca el; @@ -397,7 +397,7 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr, wrmces(rdmces()); /* reset machine check pending flag */ printk(KERN_CRIT "LCA machine check: vector=%#lx pc=%#lx code=%#x\n", - vector, regs->pc, (unsigned int) el.c->code); + vector, get_irq_regs()->pc, (unsigned int) el.c->code); /* * 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) } void -mcpcia_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +mcpcia_machine_check(unsigned long vector, unsigned long la_ptr) { struct el_common *mchk_header; struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; @@ -610,7 +609,7 @@ mcpcia_machine_check(unsigned long vector, unsigned long la_ptr, wrmces(0x7); mb(); - process_mcheck_info(vector, la_ptr, regs, "MCPCIA", expected != 0); + process_mcheck_info(vector, la_ptr, "MCPCIA", expected != 0); if (!expected && vector != 0x620 && vector != 0x630) { mcpcia_print_uncorrectable(mchk_logout); 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) } void -polaris_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +polaris_machine_check(unsigned long vector, unsigned long la_ptr) { /* Clear the error before any reporting. */ mb(); @@ -198,6 +197,6 @@ polaris_machine_check(unsigned long vector, unsigned long la_ptr, wrmces(0x7); mb(); - process_mcheck_info(vector, la_ptr, regs, "POLARIS", + process_mcheck_info(vector, la_ptr, "POLARIS", mcheck_expected(0)); } 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) * Hence all the taken/expected/any_expected/last_taken stuff... */ void -t2_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +t2_machine_check(unsigned long vector, unsigned long la_ptr) { int cpu = smp_processor_id(); #ifdef CONFIG_VERBOSE_MCHECK @@ -618,5 +617,5 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr, } #endif - process_mcheck_info(vector, la_ptr, regs, "T2", mcheck_expected(cpu)); + process_mcheck_info(vector, la_ptr, "T2", mcheck_expected(cpu)); } 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) } void -tsunami_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +tsunami_machine_check(unsigned long vector, unsigned long la_ptr) { /* Clear error before any reporting. */ mb(); @@ -454,6 +453,6 @@ tsunami_machine_check(unsigned long vector, unsigned long la_ptr, wrmces(0x7); mb(); - process_mcheck_info(vector, la_ptr, regs, "TSUNAMI", + process_mcheck_info(vector, la_ptr, "TSUNAMI", mcheck_expected(smp_processor_id())); } 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) } void -wildfire_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +wildfire_machine_check(unsigned long vector, unsigned long la_ptr) { mb(); mb(); /* magic */ @@ -332,7 +331,7 @@ wildfire_machine_check(unsigned long vector, unsigned long la_ptr, wrmces(0x7); mb(); - process_mcheck_info(vector, la_ptr, regs, "WILDFIRE", + process_mcheck_info(vector, la_ptr, "WILDFIRE", mcheck_expected(smp_processor_id())); } 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 @@ #include #include +#include #include #include #include @@ -229,7 +230,7 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print) } void -ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) +ev6_machine_check(u64 vector, u64 la_ptr) { struct el_common *mchk_header = (struct el_common *)la_ptr; @@ -260,7 +261,7 @@ ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) (unsigned int)vector, (int)smp_processor_id()); ev6_process_logout_frame(mchk_header, 1); - dik_show_regs(regs, NULL); + dik_show_regs(get_irq_regs(), NULL); err_print_prefix = saved_err_prefix; } 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, } void -ev7_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) +ev7_machine_check(u64 vector, u64 la_ptr) { struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr; 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 * ev7_collect_logout_frame_subpackets(struct el_subpacket *, struct ev7_lf_subpackets *); extern void ev7_register_error_handlers(void); -extern void ev7_machine_check(u64, u64, struct pt_regs *); +extern void ev7_machine_check(u64, u64); /* * err_ev6.c */ extern void ev6_register_error_handlers(void); extern int ev6_process_logout_frame(struct el_common *, int); -extern void ev6_machine_check(u64, u64, struct pt_regs *); +extern void ev6_machine_check(u64, u64); /* * err_marvel.c */ -extern void marvel_machine_check(u64, u64, struct pt_regs *); +extern void marvel_machine_check(u64, u64); extern void marvel_register_error_handlers(void); /* * err_titan.c */ extern int titan_process_logout_frame(struct el_common *, int); -extern void titan_machine_check(u64, u64, struct pt_regs *); +extern void titan_machine_check(u64, u64); extern void titan_register_error_handlers(void); extern int privateer_process_logout_frame(struct el_common *, int); -extern void privateer_machine_check(u64, u64, struct pt_regs *); +extern 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) } void -marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) +marvel_machine_check(u64 vector, u64 la_ptr) { struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr; 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) default: /* Don't know it - pass it up. */ - ev7_machine_check(vector, la_ptr, regs); + ev7_machine_check(vector, la_ptr); return; } 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) } void -titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) +titan_machine_check(u64 vector, u64 la_ptr) { struct el_common *mchk_header = (struct el_common *)la_ptr; struct el_TITAN_sysdata_mcheck *tmchk = @@ -408,7 +408,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) * Only handle system errors here */ if ((vector != SCB_Q_SYSMCHK) && (vector != SCB_Q_SYSERR)) { - ev6_machine_check(vector, la_ptr, regs); + ev6_machine_check(vector, la_ptr); return; } @@ -442,7 +442,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) #ifdef CONFIG_VERBOSE_MCHECK titan_process_logout_frame(mchk_header, alpha_verbose_mcheck); if (alpha_verbose_mcheck) - dik_show_regs(regs, NULL); + dik_show_regs(get_irq_regs(), NULL); #endif /* CONFIG_VERBOSE_MCHECK */ err_print_prefix = saved_err_prefix; @@ -452,7 +452,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) * machine checks to interrupts */ irqmask = tmchk->c_dirx & TITAN_MCHECK_INTERRUPT_MASK; - titan_dispatch_irqs(irqmask, regs); + titan_dispatch_irqs(irqmask, get_irq_regs()); } @@ -701,7 +701,7 @@ privateer_process_logout_frame(struct el_common *mchk_header, int print) } void -privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) +privateer_machine_check(u64 vector, u64 la_ptr) { struct el_common *mchk_header = (struct el_common *)la_ptr; struct el_TITAN_sysdata_mcheck *tmchk = @@ -723,7 +723,7 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) * Only handle system events here. */ if (vector != SCB_Q_SYSEVENT) - return titan_machine_check(vector, la_ptr, regs); + return titan_machine_check(vector, la_ptr); /* * 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) /* * Dispatch the interrupt(s). */ - titan_dispatch_irqs(irqmask, regs); + titan_dispatch_irqs(irqmask, get_irq_regs()); /* * 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, set_irq_regs(old_regs); return; case 2: - alpha_mv.machine_check(vector, la_ptr, regs); + old_regs = set_irq_regs(regs); + alpha_mv.machine_check(vector, la_ptr); + set_irq_regs(old_regs); return; case 3: old_regs = set_irq_regs(regs); @@ -125,8 +127,7 @@ struct mcheck_info __mcheck_info; void process_mcheck_info(unsigned long vector, unsigned long la_ptr, - struct pt_regs *regs, const char *machine, - int expected) + const char *machine, int expected) { struct el_common *mchk_header; const char *reason; @@ -153,7 +154,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr, mchk_header = (struct el_common *)la_ptr; printk(KERN_CRIT "%s machine check: vector=0x%lx pc=0x%lx code=0x%x\n", - machine, vector, regs->pc, mchk_header->code); + machine, vector, get_irq_regs()->pc, mchk_header->code); switch (mchk_header->code) { /* Machine check reasons. Defined according to PALcode sources. */ @@ -194,7 +195,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr, printk(KERN_CRIT "machine check type: %s%s\n", reason, mchk_header->retry ? " (retryable)" : ""); - dik_show_regs(regs, NULL); + dik_show_regs(get_irq_regs(), NULL); #ifdef CONFIG_VERBOSE_MCHECK 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; extern struct pci_ops apecs_pci_ops; extern void apecs_init_arch(void); extern void apecs_pci_clr_err(void); -extern void apecs_machine_check(u64, u64, struct pt_regs *); +extern void apecs_machine_check(u64, u64); extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); /* core_cia.c */ @@ -29,7 +29,7 @@ extern void cia_init_pci(void); extern void cia_init_arch(void); extern void pyxis_init_arch(void); extern void cia_kill_arch(int); -extern void cia_machine_check(u64, u64, struct pt_regs *); +extern void cia_machine_check(u64, u64); extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); /* core_irongate.c */ @@ -42,14 +42,14 @@ extern void irongate_machine_check(u64, u64, struct pt_regs *); /* core_lca.c */ extern struct pci_ops lca_pci_ops; extern void lca_init_arch(void); -extern void lca_machine_check(u64, u64, struct pt_regs *); +extern void lca_machine_check(u64, u64); extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); /* core_marvel.c */ extern struct pci_ops marvel_pci_ops; extern void marvel_init_arch(void); extern void marvel_kill_arch(int); -extern void marvel_machine_check(u64, u64, struct pt_regs *); +extern void marvel_machine_check(u64, u64); extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); extern int marvel_pa_to_nid(unsigned long); extern int marvel_cpuid_to_nid(int); @@ -64,7 +64,7 @@ void io7_clear_errors(struct io7 *io7); extern struct pci_ops mcpcia_pci_ops; extern void mcpcia_init_arch(void); extern void mcpcia_init_hoses(void); -extern void mcpcia_machine_check(u64, u64, struct pt_regs *); +extern void mcpcia_machine_check(u64, u64); extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); /* core_polaris.c */ @@ -72,21 +72,21 @@ extern struct pci_ops polaris_pci_ops; extern int polaris_read_config_dword(struct pci_dev *, int, u32 *); extern int polaris_write_config_dword(struct pci_dev *, int, u32); extern void polaris_init_arch(void); -extern void polaris_machine_check(u64, u64, struct pt_regs *); +extern void polaris_machine_check(u64, u64); #define polaris_pci_tbi ((void *)0) /* core_t2.c */ extern struct pci_ops t2_pci_ops; extern void t2_init_arch(void); extern void t2_kill_arch(int); -extern void t2_machine_check(u64, u64, struct pt_regs *); +extern void t2_machine_check(u64, u64); extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); /* core_titan.c */ extern struct pci_ops titan_pci_ops; extern void titan_init_arch(void); extern void titan_kill_arch(int); -extern void titan_machine_check(u64, u64, struct pt_regs *); +extern void titan_machine_check(u64, u64); extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); extern struct _alpha_agp_info *titan_agp_info(void); @@ -94,14 +94,14 @@ extern struct _alpha_agp_info *titan_agp_info(void); extern struct pci_ops tsunami_pci_ops; extern void tsunami_init_arch(void); extern void tsunami_kill_arch(int); -extern void tsunami_machine_check(u64, u64, struct pt_regs *); +extern void tsunami_machine_check(u64, u64); extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); /* core_wildfire.c */ extern struct pci_ops wildfire_pci_ops; extern void wildfire_init_arch(void); extern void wildfire_kill_arch(int); -extern void wildfire_machine_check(u64, u64, struct pt_regs *); +extern void wildfire_machine_check(u64, u64); extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); extern int wildfire_pa_to_nid(unsigned long); extern int wildfire_cpuid_to_nid(int); @@ -214,5 +214,4 @@ extern struct mcheck_info #endif extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr, - struct pt_regs *regs, const char *machine, - int expected); + const char *machine, 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) } static void -jensen_machine_check (u64 vector, u64 la, struct pt_regs *regs) +jensen_machine_check (u64 vector, u64 la) { printk(KERN_CRIT "Machine check\n"); } 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) #if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO) static void -mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr) { #define MCHK_NO_DEVSEL 0x205U #define MCHK_NO_TABT 0x204U @@ -202,7 +201,7 @@ mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr, mb(); code = mchk_header->code; - process_mcheck_info(vector, la_ptr, regs, "MIKASA APECS", + process_mcheck_info(vector, la_ptr, "MIKASA APECS", (mcheck_expected(0) && (code == MCHK_NO_DEVSEL || 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, in the system. They are analysed separately but all starts here. */ void -nautilus_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs *regs) +nautilus_machine_check(unsigned long vector, unsigned long la_ptr) { char *mchk_class; @@ -165,7 +164,7 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr, else if (vector == SCB_Q_SYSMCHK) mchk_class = "Fatal"; else { - ev6_machine_check(vector, la_ptr, regs); + ev6_machine_check(vector, la_ptr); return; } @@ -173,7 +172,7 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr, "[%s System Machine Check (NMI)]\n", vector, mchk_class); - naut_sys_machine_check(vector, la_ptr, regs); + naut_sys_machine_check(vector, la_ptr, get_irq_regs()); /* Tell the PALcode to clear the machine check */ 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) #if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO) static void -noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr, - struct pt_regs * regs) +noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr) { #define MCHK_NO_DEVSEL 0x205U #define MCHK_NO_TABT 0x204U @@ -284,7 +283,7 @@ noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr, mb(); code = mchk_header->code; - process_mcheck_info(vector, la_ptr, regs, "NORITAKE APECS", + process_mcheck_info(vector, la_ptr, "NORITAKE APECS", (mcheck_expected(0) && (code == MCHK_NO_DEVSEL || code == MCHK_NO_TABT))); diff --git a/include/asm-alpha/machvec.h b/include/asm-alpha/machvec.h index 7ae744240f80..a86c083cdf7f 100644 --- a/include/asm-alpha/machvec.h +++ b/include/asm-alpha/machvec.h @@ -15,7 +15,6 @@ struct task_struct; struct mm_struct; -struct pt_regs; struct vm_area_struct; struct linux_hose_info; struct pci_dev; @@ -80,7 +79,7 @@ struct alpha_machine_vector void (*update_irq_hw)(unsigned long, unsigned long, int); void (*ack_irq)(unsigned long); void (*device_interrupt)(unsigned long vector); - void (*machine_check)(u64 vector, u64 la, struct pt_regs *regs); + void (*machine_check)(u64 vector, u64 la); void (*smp_callin)(void); void (*init_arch)(void); -- cgit v1.2.3