aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-07-01 22:29:03 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-02 16:58:46 -0400
commit6e21361619328751e2637b004e14cf360aafbddc (patch)
treeca52e5321d429a6b346ef17c629c2186f88c781d
parentd63fb6c55f5f9eb3032fc5c3ab6eb9a26dd67cdc (diff)
[PATCH] irq-flags: consolidate flags for request_irq
The recent interrupt rework introduced bit value conflicts with sparc. Instead of introducing new architecture flags mess, move the interrupt SA_ flags out of the signal namespace and replace them by interrupt related flags. This allows to remove the obsolete SA_INTERRUPT flag and clean up the bit field values. This patch: Move the interrupt related SA_ flags out of linux/signal.h and rename them to IRQF_ . This moves the interrupt related flags out of the signal namespace and allows to remove the architecture dependencies. SA_INTERRUPT is not needed by userspace and glibc so it can be removed safely. The existing SA_ constants are kept for easy transition and will be removed after a 6 month grace period. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Greg KH <greg@kroah.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Jeff Garzik <jeff@garzik.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Karsten Keil <kkeil@suse.de> Cc: Jody McIntyre <scjody@modernduck.com> Cc: Ben Collins <bcollins@debian.org> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Dave Airlie <airlied@linux.ie> Cc: Jens Axboe <axboe@suse.de> Cc: Chris Zankel <chris@zankel.net> Cc: Andi Kleen <ak@muc.de> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Cc: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Greg Ungerer <gerg@uclinux.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: David Howells <dhowells@redhat.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--include/linux/interrupt.h47
-rw-r--r--include/linux/irq.h55
-rw-r--r--include/linux/signal.h26
4 files changed, 83 insertions, 54 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 1cbbb8e28999..99f219a01e0e 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -257,3 +257,12 @@ Why: Code does no longer build since at least 2.6.0, apparently there is
257Who: Ralf Baechle <ralf@linux-mips.org> 257Who: Ralf Baechle <ralf@linux-mips.org>
258 258
259--------------------------- 259---------------------------
260
261What: Interrupt only SA_* flags
262When: Januar 2007
263Why: The interrupt related SA_* flags are replaced by IRQF_* to move them
264 out of the signal namespace.
265
266Who: Thomas Gleixner <tglx@linutronix.de>
267
268---------------------------
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index db2a63a11633..cf682a73a6f9 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -14,6 +14,53 @@
14#include <asm/ptrace.h> 14#include <asm/ptrace.h>
15#include <asm/system.h> 15#include <asm/system.h>
16 16
17/*
18 * These correspond to the IORESOURCE_IRQ_* defines in
19 * linux/ioport.h to select the interrupt line behaviour. When
20 * requesting an interrupt without specifying a IRQF_TRIGGER, the
21 * setting should be assumed to be "as already configured", which
22 * may be as per machine or firmware initialisation.
23 */
24#define IRQF_TRIGGER_NONE 0x00000000
25#define IRQF_TRIGGER_RISING 0x00000001
26#define IRQF_TRIGGER_FALLING 0x00000002
27#define IRQF_TRIGGER_HIGH 0x00000004
28#define IRQF_TRIGGER_LOW 0x00000008
29#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
30 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
31#define IRQF_TRIGGER_PROBE 0x00000010
32
33/*
34 * These flags used only by the kernel as part of the
35 * irq handling routines.
36 *
37 * IRQF_DISABLED - keep irqs disabled when calling the action handler
38 * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
39 * IRQF_SHARED - allow sharing the irq among several devices
40 * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
41 * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
42 */
43#define IRQF_DISABLED 0x00000020
44#define IRQF_SAMPLE_RANDOM 0x00000040
45#define IRQF_SHARED 0x00000080
46#define IRQF_PROBE_SHARED 0x00000100
47#define IRQF_TIMER 0x00000200
48
49/*
50 * Migration helpers. Scheduled for removal in 1/2007
51 * Do not use for new code !
52 */
53#define SA_INTERRUPT IRQF_DISABLED
54#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM
55#define SA_SHIRQ IRQF_SHARED
56#define SA_PROBEIRQ IRQF_PROBE_SHARED
57
58#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW
59#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH
60#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING
61#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
62#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
63
17struct irqaction { 64struct irqaction {
18 irqreturn_t (*handler)(int, void *, struct pt_regs *); 65 irqreturn_t (*handler)(int, void *, struct pt_regs *);
19 unsigned long flags; 66 unsigned long flags;
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 0832149cdb18..ae1e422f18e3 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -24,41 +24,40 @@
24 24
25/* 25/*
26 * IRQ line status. 26 * IRQ line status.
27 *
28 * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h
29 *
30 * IRQ types
27 */ 31 */
28#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */ 32#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */
29#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */ 33#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */
30#define IRQ_PENDING 4 /* IRQ pending - replay on enable */ 34#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */
31#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */ 35#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
32#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */ 36#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */
33#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ 37#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */
34#define IRQ_LEVEL 64 /* IRQ level triggered */ 38#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */
35#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ 39#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */
40
41/* Internal flags */
42#define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */
43#define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */
44#define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */
45#define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */
46#define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */
47#define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */
48#define IRQ_LEVEL 0x00400000 /* IRQ level triggered */
49#define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */
36#ifdef CONFIG_IRQ_PER_CPU 50#ifdef CONFIG_IRQ_PER_CPU
37# define IRQ_PER_CPU 256 /* IRQ is per CPU */ 51# define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */
38# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 52# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
39#else 53#else
40# define CHECK_IRQ_PER_CPU(var) 0 54# define CHECK_IRQ_PER_CPU(var) 0
41#endif 55#endif
42 56
43#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ 57#define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */
44#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ 58#define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */
45#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */ 59#define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */
46#define IRQ_DELAYED_DISABLE \ 60#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */
47 4096 /* IRQ disable (masking) happens delayed. */
48
49/*
50 * IRQ types, see also include/linux/interrupt.h
51 */
52#define IRQ_TYPE_NONE 0x0000 /* Default, unspecified type */
53#define IRQ_TYPE_EDGE_RISING 0x0001 /* Edge rising type */
54#define IRQ_TYPE_EDGE_FALLING 0x0002 /* Edge falling type */
55#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
56#define IRQ_TYPE_LEVEL_HIGH 0x0004 /* Level high type */
57#define IRQ_TYPE_LEVEL_LOW 0x0008 /* Level low type */
58#define IRQ_TYPE_SENSE_MASK 0x000f /* Mask of the above */
59#define IRQ_TYPE_SIMPLE 0x0010 /* Simple type */
60#define IRQ_TYPE_PERCPU 0x0020 /* Per CPU type */
61#define IRQ_TYPE_PROBE 0x0040 /* Probing in progress */
62 61
63struct proc_dir_entry; 62struct proc_dir_entry;
64 63
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 1e4ce7225eee..117135e33d67 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -9,32 +9,6 @@
9#include <linux/spinlock.h> 9#include <linux/spinlock.h>
10 10
11/* 11/*
12 * These values of sa_flags are used only by the kernel as part of the
13 * irq handling routines.
14 *
15 * SA_INTERRUPT is also used by the irq handling routines.
16 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
17 * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur
18 */
19#define SA_SAMPLE_RANDOM SA_RESTART
20#define SA_SHIRQ 0x04000000
21#define SA_PROBEIRQ 0x08000000
22
23/*
24 * As above, these correspond to the IORESOURCE_IRQ_* defines in
25 * linux/ioport.h to select the interrupt line behaviour. When
26 * requesting an interrupt without specifying a SA_TRIGGER, the
27 * setting should be assumed to be "as already configured", which
28 * may be as per machine or firmware initialisation.
29 */
30#define SA_TRIGGER_LOW 0x00000008
31#define SA_TRIGGER_HIGH 0x00000004
32#define SA_TRIGGER_FALLING 0x00000002
33#define SA_TRIGGER_RISING 0x00000001
34#define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\
35 SA_TRIGGER_RISING|SA_TRIGGER_FALLING)
36
37/*
38 * Real Time signals may be queued. 12 * Real Time signals may be queued.
39 */ 13 */
40 14