~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/arch/um/kernel/irq.c

Version: ~ [ 0.6-2.3.46 ] ~
Architecture: ~ [ um ] ~

** Warning: Cannot open xref database.

1 #include "linux/stddef.h" 2 #include "asm/ptrace.h" 3 #include "linux/cache.h" 4 #include "linux/interrupt.h" 5 #include "linux/mm.h" 6 #include "linux/malloc.h" 7 #include "linux/tasks.h" 8 #include "asm/irq.h" 9 #include "asm/signal.h" 10 #include "asm/errno.h" 11 12 extern void rand_initialize_irq(int irq); 13 14 static struct irqaction *irq_action[NR_IRQS]; 15 16 unsigned int local_irq_count[NR_CPUS]; 17 18 static inline void unmask_irq(unsigned int irq_nr) 19 { 20 } 21 22 int request_irq(unsigned int irq, 23 void (*handler)(int, void *, struct pt_regs *), 24 unsigned long irqflags, 25 const char * devname, 26 void *dev_id) 27 { 28 int shared = 0; 29 struct irqaction * action, **p; 30 unsigned long flags; 31 32 if (irq >= NR_IRQS) 33 return -EINVAL; 34 if (!handler) 35 return -EINVAL; 36 p = irq_action + irq; 37 action = *p; 38 if (action) { 39 /* Can't share interrupts unless both agree to */ 40 if (!(action->flags & irqflags & SA_SHIRQ)) 41 return -EBUSY; 42 43 /* Can't share interrupts unless both are same type */ 44 if ((action->flags ^ irqflags) & SA_INTERRUPT) 45 return -EBUSY; 46 47 /* add new interrupt at end of irq queue */ 48 do { 49 p = &action->next; 50 action = *p; 51 } while (action); 52 shared = 1; 53 } 54 55 action = (struct irqaction *)kmalloc(sizeof(struct irqaction), 56 GFP_KERNEL); 57 if (!action) 58 return -ENOMEM; 59 60 if (irqflags & SA_SAMPLE_RANDOM) 61 rand_initialize_irq(irq); 62 63 action->handler = handler; 64 action->flags = irqflags; 65 action->mask = 0; 66 action->name = devname; 67 action->next = NULL; 68 action->dev_id = dev_id; 69 70 save_flags(flags); 71 cli(); 72 *p = action; 73 74 if (!shared) 75 unmask_irq(irq); 76 77 restore_flags(flags); 78 return 0; 79 } 80 81 unsigned long probe_irq_on(void) 82 { 83 return(1); 84 } 85 86 int probe_irq_off(unsigned long n) 87 { 88 return(1); 89 } 90

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.