Skip to content

Commit

Permalink
[PATCH] alpha pt_regs cleanups: handle_irq()
Browse files Browse the repository at this point in the history
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 <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 8, 2006
1 parent 7ca5605 commit 3dbb8c6
Show file tree
Hide file tree
Showing 22 changed files with 40 additions and 41 deletions.
5 changes: 1 addition & 4 deletions arch/alpha/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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);
}
6 changes: 4 additions & 2 deletions arch/alpha/kernel/irq_alpha.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions arch/alpha/kernel/irq_i8259.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
4 changes: 2 additions & 2 deletions arch/alpha/kernel/irq_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
2 changes: 1 addition & 1 deletion arch/alpha/kernel/irq_pyxis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/irq_srm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_alcor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_cabriolet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions arch/alpha/kernel/sys_dp264.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_eb64p.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions arch/alpha/kernel/sys_eiger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_jensen.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jensen_device_interrupt(unsigned long vector)
}
#endif

handle_irq(irq, get_irq_regs());
handle_irq(irq);
}

static void __init
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_marvel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_miata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_mikasa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions arch/alpha/kernel/sys_noritake.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_rawhide.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions arch/alpha/kernel/sys_rx164.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_sable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions arch/alpha/kernel/sys_takara.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_titan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_wildfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3dbb8c6

Please sign in to comment.