[PARISC] Allow overriding personality with sys_personality
[linux-2.6.22.y-op.git] / include / asm-arm26 / irqchip.h
blob6a007a95409844ef4e4be49bd2045f97bad28382
1 /*
2 * linux/include/asm-arm/mach/irq.h
4 * Copyright (C) 1995-2000 Russell King.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10 #ifndef __ASM_ARM_MACH_IRQ_H
11 #define __ASM_ARM_MACH_IRQ_H
13 struct irqdesc;
14 struct pt_regs;
15 struct seq_file;
17 typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *);
18 typedef void (*irq_control_t)(unsigned int);
20 struct irqchip {
22 * Acknowledge the IRQ.
23 * If this is a level-based IRQ, then it is expected to mask the IRQ
24 * as well.
26 void (*ack)(unsigned int);
28 * Mask the IRQ in hardware.
30 void (*mask)(unsigned int);
32 * Unmask the IRQ in hardware.
34 void (*unmask)(unsigned int);
36 * Re-run the IRQ
38 void (*rerun)(unsigned int);
40 * Set the type of the IRQ.
42 int (*type)(unsigned int, unsigned int);
45 struct irqdesc {
46 irq_handler_t handle;
47 struct irqchip *chip;
48 struct irqaction *action;
50 unsigned int enabled : 1; /* IRQ is currently enabled */
51 unsigned int triggered: 1; /* IRQ has occurred */
52 unsigned int running : 1; /* IRQ is running */
53 unsigned int pending : 1; /* IRQ is pending */
54 unsigned int probing : 1; /* IRQ in use for a probe */
55 unsigned int probe_ok : 1; /* IRQ can be used for probe */
56 unsigned int valid : 1; /* IRQ claimable */
57 unsigned int noautoenable : 1; /* don't automatically enable IRQ */
58 unsigned int unused :23;
59 unsigned int depth; /* disable depth */
62 * IRQ lock detection
64 unsigned int lck_cnt;
65 unsigned int lck_pc;
66 unsigned int lck_jif;
69 extern struct irqdesc irq_desc[];
72 * This is internal. Do not use it.
74 extern void (*init_arch_irq)(void);
75 extern void init_FIQ(void);
76 extern int show_fiq_list(struct seq_file *, void *);
77 void __set_irq_handler(unsigned int irq, irq_handler_t, int);
80 * External stuff.
82 #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0)
83 #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1)
85 void set_irq_chip(unsigned int irq, struct irqchip *);
86 void set_irq_flags(unsigned int irq, unsigned int flags);
88 #define IRQF_VALID (1 << 0)
89 #define IRQF_PROBE (1 << 1)
90 #define IRQF_NOAUTOEN (1 << 2)
93 * Built-in IRQ handlers.
95 void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
96 void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
97 void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
98 void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
99 void dummy_mask_unmask_irq(unsigned int irq);
101 #endif