11 #include <linux/module.h>
17 #include <asm/processor.h>
18 #include <asm/machvec.h>
19 #include <asm/uaccess.h>
20 #include <asm/thread_info.h>
21 #include <cpu/mmu_context.h>
33 printk(
"unexpected IRQ trap at vector %02x\n", irq);
36 #if defined(CONFIG_PROC_FS)
55 #ifdef CONFIG_IRQSTACKS
70 static inline void handle_one_irq(
unsigned int irq)
83 if (curctx != irqctx) {
86 isp = (
u32 *)((
char *)irqctx +
sizeof(*irqctx));
88 irqctx->
tinfo.previous_sp = current_stack_pointer;
94 irqctx->
tinfo.preempt_count =
108 :
"memory",
"r0",
"r1",
"r2",
"r3",
"r4",
109 "r5",
"r6",
"r7",
"r8",
"t",
"pr"
122 if (hardirq_ctx[cpu])
132 hardirq_ctx[
cpu] = irqctx;
138 irqctx->
tinfo.preempt_count = 0;
141 softirq_ctx[
cpu] = irqctx;
143 printk(
"CPU %u irqstacks, hard=%p soft=%p\n",
144 cpu, hardirq_ctx[cpu], softirq_ctx[cpu]);
168 irqctx->
tinfo.previous_sp = current_stack_pointer;
171 isp = (
u32 *)((
char *)irqctx +
sizeof(*irqctx));
182 :
"memory",
"r0",
"r1",
"r2",
"r3",
"r4",
183 "r5",
"r6",
"r7",
"r8",
"r9",
"r15",
"t",
"pr"
195 static inline void handle_one_irq(
unsigned int irq)
203 struct pt_regs *old_regs = set_irq_regs(regs);
216 set_irq_regs(old_regs);
226 if (
sh_mv.mv_init_irq)
234 #ifdef CONFIG_HOTPLUG_CPU
235 static void route_irq(
struct irq_data *
data,
unsigned int irq,
unsigned int cpu)
241 irq, data->
node, cpu);
257 for_each_active_irq(irq) {
260 if (data->
node == cpu) {
263 if (newcpu >= nr_cpu_ids) {
272 route_irq(data, irq, newcpu);