Skip to content

Commit 7ca5605

Browse files
Al ViroLinus Torvalds
authored andcommitted
[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 <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 8dab42a commit 7ca5605

22 files changed

Lines changed: 83 additions & 77 deletions

‎arch/alpha/kernel/irq_alpha.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ asmlinkage void
3939
do_entInt(unsigned long type, unsigned long vector,
4040
unsigned long la_ptr, struct pt_regs *regs)
4141
{
42+
struct pt_regs *old_regs;
4243
switch (type) {
4344
case 0:
4445
#ifdef CONFIG_SMP
@@ -72,7 +73,9 @@ do_entInt(unsigned long type, unsigned long vector,
7273
alpha_mv.machine_check(vector, la_ptr, regs);
7374
return;
7475
case 3:
75-
alpha_mv.device_interrupt(vector, regs);
76+
old_regs = set_irq_regs(regs);
77+
alpha_mv.device_interrupt(vector);
78+
set_irq_regs(old_regs);
7679
return;
7780
case 4:
7881
perf_irq(la_ptr, regs);

‎arch/alpha/kernel/irq_i8259.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ init_i8259a_irqs(void)
137137

138138
#if defined(IACK_SC)
139139
void
140-
isa_device_interrupt(unsigned long vector, struct pt_regs *regs)
140+
isa_device_interrupt(unsigned long vector)
141141
{
142142
/*
143143
* Generate a PCI interrupt acknowledge cycle. The PIC will
@@ -147,7 +147,7 @@ isa_device_interrupt(unsigned long vector, struct pt_regs *regs)
147147
*/
148148
int j = *(vuip) IACK_SC;
149149
j &= 0xff;
150-
handle_irq(j, regs);
150+
handle_irq(j, get_irq_regs());
151151
}
152152
#endif
153153

‎arch/alpha/kernel/irq_impl.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
#define RTC_IRQ 8
1717

18-
extern void isa_device_interrupt(unsigned long, struct pt_regs *);
18+
extern void isa_device_interrupt(unsigned long);
1919
extern void isa_no_iack_sc_device_interrupt(unsigned long, struct pt_regs *);
20-
extern void srm_device_interrupt(unsigned long, struct pt_regs *);
21-
extern void pyxis_device_interrupt(unsigned long, struct pt_regs *);
20+
extern void srm_device_interrupt(unsigned long);
21+
extern void pyxis_device_interrupt(unsigned long);
2222

2323
extern struct irqaction timer_irqaction;
2424
extern struct irqaction isa_cascade_irqaction;

‎arch/alpha/kernel/irq_pyxis.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static struct hw_interrupt_type pyxis_irq_type = {
8181
};
8282

8383
void
84-
pyxis_device_interrupt(unsigned long vector, struct pt_regs *regs)
84+
pyxis_device_interrupt(unsigned long vector)
8585
{
8686
unsigned long pld;
8787
unsigned int i;
@@ -98,9 +98,9 @@ pyxis_device_interrupt(unsigned long vector, struct pt_regs *regs)
9898
i = ffz(~pld);
9999
pld &= pld - 1; /* clear least bit set */
100100
if (i == 7)
101-
isa_device_interrupt(vector, regs);
101+
isa_device_interrupt(vector);
102102
else
103-
handle_irq(16+i, regs);
103+
handle_irq(16+i, get_irq_regs());
104104
}
105105
}
106106

‎arch/alpha/kernel/irq_srm.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
7272
}
7373

7474
void
75-
srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
75+
srm_device_interrupt(unsigned long vector)
7676
{
7777
int irq = (vector - 0x800) >> 4;
78-
handle_irq(irq, regs);
78+
handle_irq(irq, get_irq_regs());
7979
}

‎arch/alpha/kernel/sys_alcor.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static struct hw_interrupt_type alcor_irq_type = {
100100
};
101101

102102
static void
103-
alcor_device_interrupt(unsigned long vector, struct pt_regs *regs)
103+
alcor_device_interrupt(unsigned long vector)
104104
{
105105
unsigned long pld;
106106
unsigned int i;
@@ -116,9 +116,9 @@ alcor_device_interrupt(unsigned long vector, struct pt_regs *regs)
116116
i = ffz(~pld);
117117
pld &= pld - 1; /* clear least bit set */
118118
if (i == 31) {
119-
isa_device_interrupt(vector, regs);
119+
isa_device_interrupt(vector);
120120
} else {
121-
handle_irq(16 + i, regs);
121+
handle_irq(16 + i, get_irq_regs());
122122
}
123123
}
124124
}

‎arch/alpha/kernel/sys_cabriolet.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static struct hw_interrupt_type cabriolet_irq_type = {
8282
};
8383

8484
static void
85-
cabriolet_device_interrupt(unsigned long v, struct pt_regs *r)
85+
cabriolet_device_interrupt(unsigned long v)
8686
{
8787
unsigned long pld;
8888
unsigned int i;
@@ -98,15 +98,15 @@ cabriolet_device_interrupt(unsigned long v, struct pt_regs *r)
9898
i = ffz(~pld);
9999
pld &= pld - 1; /* clear least bit set */
100100
if (i == 4) {
101-
isa_device_interrupt(v, r);
101+
isa_device_interrupt(v);
102102
} else {
103-
handle_irq(16 + i, r);
103+
handle_irq(16 + i, get_irq_regs());
104104
}
105105
}
106106
}
107107

108108
static void __init
109-
common_init_irq(void (*srm_dev_int)(unsigned long v, struct pt_regs *r))
109+
common_init_irq(void (*srm_dev_int)(unsigned long v))
110110
{
111111
init_i8259a_irqs();
112112

@@ -154,18 +154,18 @@ cabriolet_init_irq(void)
154154
too invasive though. */
155155

156156
static void
157-
pc164_srm_device_interrupt(unsigned long v, struct pt_regs *r)
157+
pc164_srm_device_interrupt(unsigned long v)
158158
{
159159
__min_ipl = getipl();
160-
srm_device_interrupt(v, r);
160+
srm_device_interrupt(v);
161161
__min_ipl = 0;
162162
}
163163

164164
static void
165-
pc164_device_interrupt(unsigned long v, struct pt_regs *r)
165+
pc164_device_interrupt(unsigned long v)
166166
{
167167
__min_ipl = getipl();
168-
cabriolet_device_interrupt(v, r);
168+
cabriolet_device_interrupt(v);
169169
__min_ipl = 0;
170170
}
171171

‎arch/alpha/kernel/sys_dp264.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static struct hw_interrupt_type clipper_irq_type = {
217217
};
218218

219219
static void
220-
dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
220+
dp264_device_interrupt(unsigned long vector)
221221
{
222222
#if 1
223223
printk("dp264_device_interrupt: NOT IMPLEMENTED YET!! \n");
@@ -236,9 +236,9 @@ dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
236236
i = ffz(~pld);
237237
pld &= pld - 1; /* clear least bit set */
238238
if (i == 55)
239-
isa_device_interrupt(vector, regs);
239+
isa_device_interrupt(vector);
240240
else
241-
handle_irq(16 + i, 16 + i, regs);
241+
handle_irq(16 + i, get_irq_regs());
242242
#if 0
243243
TSUNAMI_cchip->dir0.csr = 1UL << i; mb();
244244
tmp = TSUNAMI_cchip->dir0.csr;
@@ -248,7 +248,7 @@ dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
248248
}
249249

250250
static void
251-
dp264_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
251+
dp264_srm_device_interrupt(unsigned long vector)
252252
{
253253
int irq;
254254

@@ -268,11 +268,11 @@ dp264_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
268268
if (irq >= 32)
269269
irq -= 16;
270270

271-
handle_irq(irq, regs);
271+
handle_irq(irq, get_irq_regs());
272272
}
273273

274274
static void
275-
clipper_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
275+
clipper_srm_device_interrupt(unsigned long vector)
276276
{
277277
int irq;
278278

@@ -290,7 +290,7 @@ clipper_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
290290
*
291291
* Eg IRQ 24 is DRIR bit 8, etc, etc
292292
*/
293-
handle_irq(irq, regs);
293+
handle_irq(irq, get_irq_regs());
294294
}
295295

296296
static void __init

‎arch/alpha/kernel/sys_eb64p.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static struct hw_interrupt_type eb64p_irq_type = {
8080
};
8181

8282
static void
83-
eb64p_device_interrupt(unsigned long vector, struct pt_regs *regs)
83+
eb64p_device_interrupt(unsigned long vector)
8484
{
8585
unsigned long pld;
8686
unsigned int i;
@@ -97,9 +97,9 @@ eb64p_device_interrupt(unsigned long vector, struct pt_regs *regs)
9797
pld &= pld - 1; /* clear least bit set */
9898

9999
if (i == 5) {
100-
isa_device_interrupt(vector, regs);
100+
isa_device_interrupt(vector);
101101
} else {
102-
handle_irq(16 + i, regs);
102+
handle_irq(16 + i, get_irq_regs());
103103
}
104104
}
105105
}

‎arch/alpha/kernel/sys_eiger.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static struct hw_interrupt_type eiger_irq_type = {
9191
};
9292

9393
static void
94-
eiger_device_interrupt(unsigned long vector, struct pt_regs * regs)
94+
eiger_device_interrupt(unsigned long vector)
9595
{
9696
unsigned intstatus;
9797

@@ -118,20 +118,20 @@ eiger_device_interrupt(unsigned long vector, struct pt_regs * regs)
118118
* despatch an interrupt if it's set.
119119
*/
120120

121-
if (intstatus & 8) handle_irq(16+3, regs);
122-
if (intstatus & 4) handle_irq(16+2, regs);
123-
if (intstatus & 2) handle_irq(16+1, regs);
124-
if (intstatus & 1) handle_irq(16+0, regs);
121+
if (intstatus & 8) handle_irq(16+3, get_irq_regs());
122+
if (intstatus & 4) handle_irq(16+2, get_irq_regs());
123+
if (intstatus & 2) handle_irq(16+1, get_irq_regs());
124+
if (intstatus & 1) handle_irq(16+0, get_irq_regs());
125125
} else {
126-
isa_device_interrupt(vector, regs);
126+
isa_device_interrupt(vector);
127127
}
128128
}
129129

130130
static void
131-
eiger_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
131+
eiger_srm_device_interrupt(unsigned long vector)
132132
{
133133
int irq = (vector - 0x800) >> 4;
134-
handle_irq(irq, regs);
134+
handle_irq(irq, get_irq_regs());
135135
}
136136

137137
static void __init

0 commit comments

Comments
 (0)