diff options
Diffstat (limited to 'arch/i386/kernel/irq.c')
-rw-r--r-- | arch/i386/kernel/irq.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index 3dd2e180151b..8cfc7dbec7b9 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c | |||
@@ -53,6 +53,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; | |||
53 | */ | 53 | */ |
54 | fastcall unsigned int do_IRQ(struct pt_regs *regs) | 54 | fastcall unsigned int do_IRQ(struct pt_regs *regs) |
55 | { | 55 | { |
56 | struct pt_regs *old_regs; | ||
56 | /* high bit used in ret_from_ code */ | 57 | /* high bit used in ret_from_ code */ |
57 | int irq = ~regs->orig_eax; | 58 | int irq = ~regs->orig_eax; |
58 | struct irq_desc *desc = irq_desc + irq; | 59 | struct irq_desc *desc = irq_desc + irq; |
@@ -67,6 +68,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) | |||
67 | BUG(); | 68 | BUG(); |
68 | } | 69 | } |
69 | 70 | ||
71 | old_regs = set_irq_regs(regs); | ||
70 | irq_enter(); | 72 | irq_enter(); |
71 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 73 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
72 | /* Debugging check for stack overflow: is there less than 1KB free? */ | 74 | /* Debugging check for stack overflow: is there less than 1KB free? */ |
@@ -95,7 +97,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) | |||
95 | * current stack (which is the irq stack already after all) | 97 | * current stack (which is the irq stack already after all) |
96 | */ | 98 | */ |
97 | if (curctx != irqctx) { | 99 | if (curctx != irqctx) { |
98 | int arg1, arg2, arg3, ebx; | 100 | int arg1, arg2, ebx; |
99 | 101 | ||
100 | /* build the stack frame on the IRQ stack */ | 102 | /* build the stack frame on the IRQ stack */ |
101 | isp = (u32*) ((char*)irqctx + sizeof(*irqctx)); | 103 | isp = (u32*) ((char*)irqctx + sizeof(*irqctx)); |
@@ -114,17 +116,17 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) | |||
114 | " xchgl %%ebx,%%esp \n" | 116 | " xchgl %%ebx,%%esp \n" |
115 | " call *%%edi \n" | 117 | " call *%%edi \n" |
116 | " movl %%ebx,%%esp \n" | 118 | " movl %%ebx,%%esp \n" |
117 | : "=a" (arg1), "=d" (arg2), "=c" (arg3), "=b" (ebx) | 119 | : "=a" (arg1), "=d" (arg2), "=b" (ebx) |
118 | : "0" (irq), "1" (desc), "2" (regs), "3" (isp), | 120 | : "0" (irq), "1" (desc), "2" (isp), |
119 | "D" (desc->handle_irq) | 121 | "D" (desc->handle_irq) |
120 | : "memory", "cc" | 122 | : "memory", "cc" |
121 | ); | 123 | ); |
122 | } else | 124 | } else |
123 | #endif | 125 | #endif |
124 | desc->handle_irq(irq, desc, regs); | 126 | desc->handle_irq(irq, desc); |
125 | 127 | ||
126 | irq_exit(); | 128 | irq_exit(); |
127 | 129 | set_irq_regs(old_regs); | |
128 | return 1; | 130 | return 1; |
129 | } | 131 | } |
130 | 132 | ||