aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/irq.h95
-rw-r--r--kernel/irq/settings.h16
2 files changed, 62 insertions, 49 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index be73c0a3c19d..2e3d1e5f0408 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -36,44 +36,73 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
36/* 36/*
37 * IRQ line status. 37 * IRQ line status.
38 * 38 *
39 * Bits 0-7 are reserved for the IRQF_* bits in linux/interrupt.h 39 * Bits 0-7 are the same as the IRQF_* bits in linux/interrupt.h
40 *
41 * IRQ_TYPE_NONE - default, unspecified type
42 * IRQ_TYPE_EDGE_RISING - rising edge triggered
43 * IRQ_TYPE_EDGE_FALLING - falling edge triggered
44 * IRQ_TYPE_EDGE_BOTH - rising and falling edge triggered
45 * IRQ_TYPE_LEVEL_HIGH - high level triggered
46 * IRQ_TYPE_LEVEL_LOW - low level triggered
47 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits
48 * IRQ_TYPE_SENSE_MASK - Mask for all the above bits
49 * IRQ_TYPE_PROBE - Special flag for probing in progress
50 *
51 * Bits which can be modified via irq_set/clear/modify_status_flags()
52 * IRQ_LEVEL - Interrupt is level type. Will be also
53 * updated in the code when the above trigger
54 * bits are modified via set_irq_type()
55 * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect
56 * it from affinity setting
57 * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing
58 * IRQ_NOREQUEST - Interrupt cannot be requested via
59 * request_irq()
60 * IRQ_NOAUTOEN - Interrupt is not automatically enabled in
61 * request/setup_irq()
62 * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set)
63 * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context
64 * IRQ_NESTED_TRHEAD - Interrupt nests into another thread
65 *
66 * Deprecated bits. They are kept updated as long as
67 * CONFIG_GENERIC_HARDIRQS_NO_COMPAT is not set. Will go away soon. These bits
68 * are internal state of the core code and if you really need to acces
69 * them then talk to the genirq maintainer instead of hacking
70 * something weird.
40 * 71 *
41 * IRQ types
42 */ 72 */
43#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */ 73enum {
44#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */ 74 IRQ_TYPE_NONE = 0x00000000,
45#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */ 75 IRQ_TYPE_EDGE_RISING = 0x00000001,
46#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) 76 IRQ_TYPE_EDGE_FALLING = 0x00000002,
47#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */ 77 IRQ_TYPE_EDGE_BOTH = (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING),
48#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */ 78 IRQ_TYPE_LEVEL_HIGH = 0x00000004,
49#define IRQ_TYPE_LEVEL_MASK (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH) 79 IRQ_TYPE_LEVEL_LOW = 0x00000008,
50#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */ 80 IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH),
51 81 IRQ_TYPE_SENSE_MASK = 0x0000000f,
52#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ 82
53 83 IRQ_TYPE_PROBE = 0x00000010,
54/* Internal flags */ 84
85 IRQ_LEVEL = (1 << 8),
86 IRQ_PER_CPU = (1 << 9),
87 IRQ_NOPROBE = (1 << 10),
88 IRQ_NOREQUEST = (1 << 11),
89 IRQ_NOAUTOEN = (1 << 12),
90 IRQ_NO_BALANCING = (1 << 13),
91 IRQ_MOVE_PCNTXT = (1 << 14),
92 IRQ_NESTED_THREAD = (1 << 15),
55 93
56#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT 94#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
57#define IRQ_INPROGRESS 0x00000100 /* DEPRECATED */ 95 IRQ_INPROGRESS = (1 << 16),
58#define IRQ_REPLAY 0x00000200 /* DEPRECATED */ 96 IRQ_REPLAY = (1 << 17),
59#define IRQ_WAITING 0x00000400 /* DEPRECATED */ 97 IRQ_WAITING = (1 << 18),
60#define IRQ_DISABLED 0x00000800 /* DEPRECATED */ 98 IRQ_DISABLED = (1 << 19),
61#define IRQ_PENDING 0x00001000 /* DEPRECATED */ 99 IRQ_PENDING = (1 << 20),
62#define IRQ_MASKED 0x00002000 /* DEPRECATED */ 100 IRQ_MASKED = (1 << 21),
63/* DEPRECATED use irq_setaffinity_pending() instead*/ 101 IRQ_MOVE_PENDING = (1 << 22),
64#define IRQ_MOVE_PENDING 0x00004000 102 IRQ_AFFINITY_SET = (1 << 23),
65#define IRQ_AFFINITY_SET 0x02000000 /* DEPRECATED */ 103 IRQ_WAKEUP = (1 << 24),
66#endif 104#endif
67 105};
68#define IRQ_LEVEL 0x00008000 /* IRQ level triggered */
69#define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */
70#define IRQ_NOPROBE 0x00020000 /* IRQ is not valid for probing */
71#define IRQ_NOREQUEST 0x00040000 /* IRQ cannot be requested */
72#define IRQ_NOAUTOEN 0x00080000 /* IRQ will not be enabled on request irq */
73#define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */
74#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
75#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
76#define IRQ_NESTED_THREAD 0x10000000 /* IRQ is nested into another, no own handler thread */
77 106
78#define IRQF_MODIFY_MASK \ 107#define IRQF_MODIFY_MASK \
79 (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ 108 (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \
diff --git a/kernel/irq/settings.h b/kernel/irq/settings.h
index 47bcd3b9f399..55ebe1e09da4 100644
--- a/kernel/irq/settings.h
+++ b/kernel/irq/settings.h
@@ -15,37 +15,21 @@ enum {
15 _IRQF_MODIFY_MASK = IRQF_MODIFY_MASK, 15 _IRQF_MODIFY_MASK = IRQF_MODIFY_MASK,
16}; 16};
17 17
18#undef IRQ_INPROGRESS
19#define IRQ_INPROGRESS GOT_YOU_MORON 18#define IRQ_INPROGRESS GOT_YOU_MORON
20#undef IRQ_REPLAY
21#define IRQ_REPLAY GOT_YOU_MORON 19#define IRQ_REPLAY GOT_YOU_MORON
22#undef IRQ_WAITING
23#define IRQ_WAITING GOT_YOU_MORON 20#define IRQ_WAITING GOT_YOU_MORON
24#undef IRQ_DISABLED
25#define IRQ_DISABLED GOT_YOU_MORON 21#define IRQ_DISABLED GOT_YOU_MORON
26#undef IRQ_PENDING
27#define IRQ_PENDING GOT_YOU_MORON 22#define IRQ_PENDING GOT_YOU_MORON
28#undef IRQ_MASKED
29#define IRQ_MASKED GOT_YOU_MORON 23#define IRQ_MASKED GOT_YOU_MORON
30#undef IRQ_WAKEUP
31#define IRQ_WAKEUP GOT_YOU_MORON 24#define IRQ_WAKEUP GOT_YOU_MORON
32#undef IRQ_MOVE_PENDING
33#define IRQ_MOVE_PENDING GOT_YOU_MORON 25#define IRQ_MOVE_PENDING GOT_YOU_MORON
34#undef IRQ_PER_CPU
35#define IRQ_PER_CPU GOT_YOU_MORON 26#define IRQ_PER_CPU GOT_YOU_MORON
36#undef IRQ_NO_BALANCING
37#define IRQ_NO_BALANCING GOT_YOU_MORON 27#define IRQ_NO_BALANCING GOT_YOU_MORON
38#undef IRQ_AFFINITY_SET
39#define IRQ_AFFINITY_SET GOT_YOU_MORON 28#define IRQ_AFFINITY_SET GOT_YOU_MORON
40#undef IRQ_LEVEL
41#define IRQ_LEVEL GOT_YOU_MORON 29#define IRQ_LEVEL GOT_YOU_MORON
42#undef IRQ_NOPROBE
43#define IRQ_NOPROBE GOT_YOU_MORON 30#define IRQ_NOPROBE GOT_YOU_MORON
44#undef IRQ_NOREQUEST
45#define IRQ_NOREQUEST GOT_YOU_MORON 31#define IRQ_NOREQUEST GOT_YOU_MORON
46#undef IRQ_NOAUTOEN
47#define IRQ_NOAUTOEN GOT_YOU_MORON 32#define IRQ_NOAUTOEN GOT_YOU_MORON
48#undef IRQ_NESTED_THREAD
49#define IRQ_NESTED_THREAD GOT_YOU_MORON 33#define IRQ_NESTED_THREAD GOT_YOU_MORON
50#undef IRQF_MODIFY_MASK 34#undef IRQF_MODIFY_MASK
51#define IRQF_MODIFY_MASK GOT_YOU_MORON 35#define IRQF_MODIFY_MASK GOT_YOU_MORON