Commit 3dbb8c62 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7ca56053
......@@ -127,9 +127,8 @@ show_interrupts(struct seq_file *p, void *v)
#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);
}
......@@ -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);
......
......@@ -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
......@@ -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);
......@@ -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);
}
}
......
......@@ -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);
}
......@@ -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);
}
}
}
......
......@@ -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);
}
}
}
......
......@@ -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
......
......@@ -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);
}
}
}
......
......@@ -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
......
......@@ -198,7 +198,7 @@ jensen_device_interrupt(unsigned long vector)
}
#endif
handle_irq(irq, get_irq_regs());
handle_irq(irq);
}
static void __init
......
......@@ -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 *
......
......@@ -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
......
......@@ -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);
}
}
}
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
}
}
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment