irq.c (9372450cc22d185f708e5cc3557cf991be4b7dc5) irq.c (200c880420a2c02a0899120ce52d801fad705b90)
1/*
2 * Code to handle x86 style IRQs plus some generic interrupt stuff.
3 *
4 * Copyright (C) 1992 Linus Torvalds
5 * Copyright (C) 1994, 1995, 1996, 1997, 1998 Ralf Baechle
6 * Copyright (C) 1999 SuSE GmbH (Philipp Rumpf, prumpf@tux.org)
7 * Copyright (C) 1999-2000 Grant Grundler
8 * Copyright (c) 2005 Matthew Wilcox

--- 344 unchanged lines hidden (view full) ---

353 "(sp:%lx, stk bottom-top:%lx-%lx)\n",
354 current->comm, sp, stack_start, stack_start + THREAD_SIZE);
355
356 if (sysctl_panic_on_stackoverflow)
357 panic("low stack detected by irq handler - check messages\n");
358#endif
359}
360
1/*
2 * Code to handle x86 style IRQs plus some generic interrupt stuff.
3 *
4 * Copyright (C) 1992 Linus Torvalds
5 * Copyright (C) 1994, 1995, 1996, 1997, 1998 Ralf Baechle
6 * Copyright (C) 1999 SuSE GmbH (Philipp Rumpf, prumpf@tux.org)
7 * Copyright (C) 1999-2000 Grant Grundler
8 * Copyright (c) 2005 Matthew Wilcox

--- 344 unchanged lines hidden (view full) ---

353 "(sp:%lx, stk bottom-top:%lx-%lx)\n",
354 current->comm, sp, stack_start, stack_start + THREAD_SIZE);
355
356 if (sysctl_panic_on_stackoverflow)
357 panic("low stack detected by irq handler - check messages\n");
358#endif
359}
360
361#ifdef CONFIG_IRQSTACKS
362DEFINE_PER_CPU(union irq_stack_union, irq_stack_union);
363
364static void execute_on_irq_stack(void *func, unsigned long param1)
365{
366 unsigned long *irq_stack_start;
367 unsigned long irq_stack;
368 int cpu = smp_processor_id();
369
370 irq_stack_start = &per_cpu(irq_stack_union, cpu).stack[0];
371 irq_stack = (unsigned long) irq_stack_start;
372 irq_stack = ALIGN(irq_stack, 16); /* align for stack frame usage */
373
374 BUG_ON(*irq_stack_start); /* report bug if we were called recursive. */
375 *irq_stack_start = 1;
376
377 /* This is where we switch to the IRQ stack. */
378 call_on_stack(param1, func, irq_stack);
379
380 *irq_stack_start = 0;
381}
382#endif /* CONFIG_IRQSTACKS */
383
361/* ONLY called from entry.S:intr_extint() */
362void do_cpu_irq_mask(struct pt_regs *regs)
363{
364 struct pt_regs *old_regs;
365 unsigned long eirr_val;
366 int irq, cpu = smp_processor_id();
367#ifdef CONFIG_SMP
368 struct irq_desc *desc;

--- 19 unchanged lines hidden (view full) ---

388 printk(KERN_DEBUG "redirecting irq %d from CPU %d to %d\n",
389 irq, smp_processor_id(), cpu);
390 gsc_writel(irq + CPU_IRQ_BASE,
391 per_cpu(cpu_data, cpu).hpa);
392 goto set_out;
393 }
394#endif
395 stack_overflow_check(regs);
384/* ONLY called from entry.S:intr_extint() */
385void do_cpu_irq_mask(struct pt_regs *regs)
386{
387 struct pt_regs *old_regs;
388 unsigned long eirr_val;
389 int irq, cpu = smp_processor_id();
390#ifdef CONFIG_SMP
391 struct irq_desc *desc;

--- 19 unchanged lines hidden (view full) ---

411 printk(KERN_DEBUG "redirecting irq %d from CPU %d to %d\n",
412 irq, smp_processor_id(), cpu);
413 gsc_writel(irq + CPU_IRQ_BASE,
414 per_cpu(cpu_data, cpu).hpa);
415 goto set_out;
416 }
417#endif
418 stack_overflow_check(regs);
419
420#ifdef CONFIG_IRQSTACKS
421 execute_on_irq_stack(&generic_handle_irq, irq);
422#else
396 generic_handle_irq(irq);
423 generic_handle_irq(irq);
424#endif /* CONFIG_IRQSTACKS */
397
398 out:
399 irq_exit();
400 set_irq_regs(old_regs);
401 return;
402
403 set_out:
404 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));

--- 48 unchanged lines hidden ---
425
426 out:
427 irq_exit();
428 set_irq_regs(old_regs);
429 return;
430
431 set_out:
432 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));

--- 48 unchanged lines hidden ---