diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-05 19:32:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-05 19:32:01 -0400 |
commit | 44aefd2706bb6f5b65ba2c38cd89e7609e2b43d3 (patch) | |
tree | 93824f573767da634fbc82c388b6d33cc454212b /arch/i386/kernel/irq.c | |
parent | c1a26e7d40fb814716950122353a1a556844286b (diff) | |
parent | 7d12e780e003f93433d49ce78cfedf4b4c52adc5 (diff) |
Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6:
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
IRQ: Typedef the IRQ handler function type
IRQ: Typedef the IRQ flow handler function type
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 | ||