usb: io_ti: Make edge_remove_sysfs_attrs the port_remove method.
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / cris / kernel / irq.c
blob788eb2248916785d0f0afda6d8b23dda2f3c250f
1 /*
3 * linux/arch/cris/kernel/irq.c
5 * Copyright (c) 2000,2007 Axis Communications AB
7 * Authors: Bjorn Wesen (bjornw@axis.com)
9 * This file contains the code used by various IRQ handling routines:
10 * asking for different IRQs should be done through these routines
11 * instead of just grabbing them. Thus setups with different IRQ numbers
12 * shouldn't result in any weird surprises, and installing new handlers
13 * should be easier.
18 * IRQs are in fact implemented a bit like signal handlers for the kernel.
19 * Naturally it's not a 1:1 relation, but there are similarities.
22 #include <linux/module.h>
23 #include <linux/ptrace.h>
24 #include <linux/irq.h>
26 #include <linux/kernel_stat.h>
27 #include <linux/signal.h>
28 #include <linux/sched.h>
29 #include <linux/ioport.h>
30 #include <linux/interrupt.h>
31 #include <linux/timex.h>
32 #include <linux/random.h>
33 #include <linux/init.h>
34 #include <linux/seq_file.h>
35 #include <linux/errno.h>
36 #include <linux/spinlock.h>
38 #include <asm/io.h>
40 /* called by the assembler IRQ entry functions defined in irq.h
41 * to dispatch the interrupts to registered handlers
42 * interrupts are disabled upon entry - depending on if the
43 * interrupt was registered with IRQF_DISABLED or not, interrupts
44 * are re-enabled or not.
47 asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
49 unsigned long sp;
50 struct pt_regs *old_regs = set_irq_regs(regs);
51 irq_enter();
52 sp = rdsp();
53 if (unlikely((sp & (PAGE_SIZE - 1)) < (PAGE_SIZE/8))) {
54 printk("do_IRQ: stack overflow: %lX\n", sp);
55 show_stack(NULL, (unsigned long *)sp);
57 generic_handle_irq(irq);
58 irq_exit();
59 set_irq_regs(old_regs);
62 void weird_irq(void)
64 local_irq_disable();
65 printk("weird irq\n");
66 while(1);