From 6e21361619328751e2637b004e14cf360aafbddc Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 1 Jul 2006 19:29:03 -0700 Subject: [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 Cc: Ingo Molnar Cc: "David S. Miller" Cc: Benjamin Herrenschmidt Cc: "Randy.Dunlap" Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: "Antonino A. Daplas" Cc: Greg KH Cc: Russell King Cc: James Bottomley Cc: Kyle McMartin Cc: Jeff Garzik Cc: Mauro Carvalho Chehab Cc: Karsten Keil Cc: Jody McIntyre Cc: Ben Collins Cc: Stefan Richter Cc: Alan Cox Cc: Bartlomiej Zolnierkiewicz Cc: Dave Airlie Cc: Jens Axboe Cc: Chris Zankel Cc: Andi Kleen Cc: Miles Bader Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Ralf Baechle Cc: Roman Zippel Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: "Luck, Tony" Cc: Yoshinori Sato Cc: David Howells Cc: Mikael Starvik Cc: Russell King Cc: Ivan Kokshaysky Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/irq.h | 55 ++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 28 deletions(-) (limited to 'include/linux/irq.h') 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 @@ /* * IRQ line status. + * + * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h + * + * IRQ types */ -#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */ -#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */ -#define IRQ_PENDING 4 /* IRQ pending - replay on enable */ -#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */ -#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */ -#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ -#define IRQ_LEVEL 64 /* IRQ level triggered */ -#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ +#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */ +#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */ +#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */ +#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) +#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */ +#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */ +#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */ +#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ + +/* Internal flags */ +#define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */ +#define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */ +#define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */ +#define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */ +#define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */ +#define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ +#define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ +#define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ #ifdef CONFIG_IRQ_PER_CPU -# define IRQ_PER_CPU 256 /* IRQ is per CPU */ +# define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) #else # define CHECK_IRQ_PER_CPU(var) 0 #endif -#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ -#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ -#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */ -#define IRQ_DELAYED_DISABLE \ - 4096 /* IRQ disable (masking) happens delayed. */ - -/* - * IRQ types, see also include/linux/interrupt.h - */ -#define IRQ_TYPE_NONE 0x0000 /* Default, unspecified type */ -#define IRQ_TYPE_EDGE_RISING 0x0001 /* Edge rising type */ -#define IRQ_TYPE_EDGE_FALLING 0x0002 /* Edge falling type */ -#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) -#define IRQ_TYPE_LEVEL_HIGH 0x0004 /* Level high type */ -#define IRQ_TYPE_LEVEL_LOW 0x0008 /* Level low type */ -#define IRQ_TYPE_SENSE_MASK 0x000f /* Mask of the above */ -#define IRQ_TYPE_SIMPLE 0x0010 /* Simple type */ -#define IRQ_TYPE_PERCPU 0x0020 /* Per CPU type */ -#define IRQ_TYPE_PROBE 0x0040 /* Probing in progress */ +#define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */ +#define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ +#define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ +#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ struct proc_dir_entry; -- cgit v1.2.3-55-g7522