+ irq-flags-consolidate-flags-for-request_irq.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     irq-flags: consolidate flags for request_irq

has been added to the -mm tree.  Its filename is

     irq-flags-consolidate-flags-for-request_irq.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: irq-flags: consolidate flags for request_irq
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: "Randy.Dunlap" <rdunlap@xxxxxxxxxxxx>
Cc: Jaroslav Kysela <perex@xxxxxxx>
Cc: Takashi Iwai <tiwai@xxxxxxx>
Cc: "Antonino A. Daplas" <adaplas@xxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Cc: Russell King <rmk@xxxxxxxxxxxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Cc: Kyle McMartin <kyle@xxxxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
Cc: Karsten Keil <kkeil@xxxxxxx>
Cc: Jody McIntyre <scjody@xxxxxxxxxxxxxx>
Cc: Ben Collins <bcollins@xxxxxxxxxx>
Cc: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@xxxxxxxxxxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxx>
Cc: Chris Zankel <chris@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxx>
Cc: Miles Bader <uclinux-v850@xxxxxxxxxxxxx>
Cc: Jeff Dike <jdike@xxxxxxxxxxx>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>
Cc: Paul Mundt <lethal@xxxxxxxxxxxx>
Cc: Kazumoto Kojima <kkojima@xxxxxxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>                                 Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: Roman Zippel <zippel@xxxxxxxxxxxxxx>
Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Greg Ungerer <gerg@xxxxxxxxxxx>
Cc: "Luck, Tony" <tony.luck@xxxxxxxxx>
Cc: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Mikael Starvik <starvik@xxxxxxxx>
Cc: Russell King <rmk@xxxxxxxxxxxxxxxx>
Cc: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>
Cc: Richard Henderson <rth@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 Documentation/feature-removal-schedule.txt |    9 +++
 include/linux/interrupt.h                  |   47 ++++++++++++++++
 include/linux/irq.h                        |   55 +++++++++----------
 include/linux/signal.h                     |   26 --------
 4 files changed, 83 insertions(+), 54 deletions(-)

diff -puN Documentation/feature-removal-schedule.txt~irq-flags-consolidate-flags-for-request_irq Documentation/feature-removal-schedule.txt
--- a/Documentation/feature-removal-schedule.txt~irq-flags-consolidate-flags-for-request_irq
+++ a/Documentation/feature-removal-schedule.txt
@@ -257,3 +257,12 @@ Why:	Code does no longer build since at 
 Who:	Ralf Baechle <ralf@xxxxxxxxxxxxxx>
 
 ---------------------------
+
+What:	Interrupt only SA_* flags
+When:	Januar 2007
+Why:	The interrupt related SA_* flags are replaced by IRQF_* to move them
+	out of the signal namespace.
+
+Who:	Thomas Gleixner <tglx@xxxxxxxxxxxxx>
+
+---------------------------
diff -puN include/linux/interrupt.h~irq-flags-consolidate-flags-for-request_irq include/linux/interrupt.h
--- a/include/linux/interrupt.h~irq-flags-consolidate-flags-for-request_irq
+++ a/include/linux/interrupt.h
@@ -14,6 +14,53 @@
 #include <asm/ptrace.h>
 #include <asm/system.h>
 
+/*
+ * These correspond to the IORESOURCE_IRQ_* defines in
+ * linux/ioport.h to select the interrupt line behaviour.  When
+ * requesting an interrupt without specifying a IRQF_TRIGGER, the
+ * setting should be assumed to be "as already configured", which
+ * may be as per machine or firmware initialisation.
+ */
+#define IRQF_TRIGGER_NONE	0x00000000
+#define IRQF_TRIGGER_RISING	0x00000001
+#define IRQF_TRIGGER_FALLING	0x00000002
+#define IRQF_TRIGGER_HIGH	0x00000004
+#define IRQF_TRIGGER_LOW	0x00000008
+#define IRQF_TRIGGER_MASK	(IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
+				 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
+#define IRQF_TRIGGER_PROBE	0x00000010
+
+/*
+ * These flags used only by the kernel as part of the
+ * irq handling routines.
+ *
+ * IRQF_DISABLED - keep irqs disabled when calling the action handler
+ * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
+ * IRQF_SHARED - allow sharing the irq among several devices
+ * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
+ * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
+ */
+#define IRQF_DISABLED		0x00000020
+#define IRQF_SAMPLE_RANDOM	0x00000040
+#define IRQF_SHARED		0x00000080
+#define IRQF_PROBE_SHARED	0x00000100
+#define IRQF_TIMER		0x00000200
+
+/*
+ * Migration helpers. Scheduled for removal in 1/2007
+ * Do not use for new code !
+ */
+#define SA_INTERRUPT		IRQF_DISABLED
+#define SA_SAMPLE_RANDOM	IRQF_SAMPLE_RANDOM
+#define SA_SHIRQ		IRQF_SHARED
+#define SA_PROBEIRQ		IRQF_PROBE_SHARED
+
+#define SA_TRIGGER_LOW		IRQF_TRIGGER_LOW
+#define SA_TRIGGER_HIGH		IRQF_TRIGGER_HIGH
+#define SA_TRIGGER_FALLING	IRQF_TRIGGER_FALLING
+#define SA_TRIGGER_RISING	IRQF_TRIGGER_RISING
+#define SA_TRIGGER_MASK		IRQF_TRIGGER_MASK
+
 struct irqaction {
 	irqreturn_t (*handler)(int, void *, struct pt_regs *);
 	unsigned long flags;
diff -puN include/linux/irq.h~irq-flags-consolidate-flags-for-request_irq include/linux/irq.h
--- a/include/linux/irq.h~irq-flags-consolidate-flags-for-request_irq
+++ a/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;
 
diff -puN include/linux/signal.h~irq-flags-consolidate-flags-for-request_irq include/linux/signal.h
--- a/include/linux/signal.h~irq-flags-consolidate-flags-for-request_irq
+++ a/include/linux/signal.h
@@ -9,32 +9,6 @@
 #include <linux/spinlock.h>
 
 /*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur
- */
-#define SA_SAMPLE_RANDOM	SA_RESTART
-#define SA_SHIRQ		0x04000000
-#define SA_PROBEIRQ		0x08000000
-
-/*
- * As above, these correspond to the IORESOURCE_IRQ_* defines in
- * linux/ioport.h to select the interrupt line behaviour.  When
- * requesting an interrupt without specifying a SA_TRIGGER, the
- * setting should be assumed to be "as already configured", which
- * may be as per machine or firmware initialisation.
- */
-#define SA_TRIGGER_LOW		0x00000008
-#define SA_TRIGGER_HIGH		0x00000004
-#define SA_TRIGGER_FALLING	0x00000002
-#define SA_TRIGGER_RISING	0x00000001
-#define SA_TRIGGER_MASK	(SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\
-				 SA_TRIGGER_RISING|SA_TRIGGER_FALLING)
-
-/*
  * Real Time signals may be queued.
  */
 
_

Patches currently in -mm which might be from tglx@xxxxxxxxxxxxx are

origin.patch
irq-use-sa_percpu_irq-not-irq_per_cpu-for-irqactionflags.patch
irq-warning-message-cleanup.patch
irq-flags-consolidate-flags-for-request_irq.patch
irq-flags-alpha-use-the-new-irqf_-constansts.patch
irq-flags-arm26-use-the-new-irqf_-constansts.patch
irq-flags-arm-use-the-new-irqf_-constansts.patch
irq-flags-chris-use-the-new-irqf_-constansts.patch
irq-flags-frv-use-the-new-irqf_-constansts.patch
irq-flags-h8300-use-the-new-irqf_-constansts.patch
irq-flags-i386-use-the-new-irqf_-constansts.patch
irq-flags-ia64-use-the-new-irqf_-constansts.patch
irq-flags-m32r-use-the-new-irqf_-constansts.patch
irq-flags-m68knommu-use-the-new-irqf_-constansts.patch
irq-flags-m68k-use-the-new-irqf_-constansts.patch
irq-flags-mips-use-the-new-irqf_-constansts.patch
irq-flags-parisc-use-the-new-irqf_-constansts.patch
irq-flags-powerpc-use-the-new-irqf_-constansts.patch
irq-flags-ppc-use-the-new-irqf_-constansts.patch
irq-flags-s390-use-the-new-irqf_-constansts.patch
irq-flags-sh64-use-the-new-irqf_-constansts.patch
irq-flags-sh-use-the-new-irqf_-constansts.patch
irq-flags-sparc64-use-the-new-irqf_-constansts.patch
irq-flags-sparc-use-the-new-irqf_-constansts.patch
irq-flags-um-use-the-new-irqf_-constansts.patch
irq-flags-v850-use-the-new-irqf_-constansts.patch
irq-flags-x86_64-use-the-new-irqf_-constansts.patch
irq-flags-xtensa-use-the-new-irqf_-constansts.patch
irq-flags-generic-irq-use-the-new-irqf_-constansts.patch
irq-flags-drivers-block-use-the-new-irqf_-constansts.patch
irq-flags-drivers-char-use-the-new-irqf_-constansts.patch
irq-flags-drivers-drm-use-the-new-irqf_-constansts.patch
irq-flags-ide-use-the-new-irqf_-constansts.patch
irq-flags-firewire-use-the-new-irqf_-constansts.patch
irq-flags-isdn-use-the-new-irqf_-constansts.patch
irq-flags-media-use-the-new-irqf_-constansts.patch
irq-flags-misc-drivers-use-the-new-irqf_-constansts.patch
irq-flags-drivers-net-use-the-new-irqf_-constansts.patch
irq-flags-parisc-use-the-new-irqf_-constansts-2.patch
irq-flags-pci-use-the-new-irqf_-constansts.patch
irq-flags-rio-use-the-new-irqf_-constansts.patch
irq-flags-scsi-use-the-new-irqf_-constansts.patch
irq-flags-serial-use-the-new-irqf_-constansts.patch
irq-flags-usb-use-the-new-irqf_-constansts.patch
irq-flags-video-use-the-new-irqf_-constansts.patch
irq-flags-sound-use-the-new-irqf_-constansts.patch
irq-flags-documentation-use-the-new-irqf_-constansts.patch
git-mtd.patch
lockdep-add-disable-enable_irq_lockdep-api.patch
genirq-convert-the-x86_64-architecture-to-irq-chips.patch
genirq-convert-the-i386-architecture-to-irq-chips.patch
genirq-irq-convert-the-move_irq-flag-from-a-32bit-word-to-a-single-bit.patch
genirq-irq-add-moved_masked_irq.patch
genirq-x86_64-irq-reenable-migrating-irqs-to-other-cpus.patch
genirq-x86_64-irq-reenable-migrating-irqs-to-other-cpus-fix.patch
genirq-msi-simplify-msi-enable-and-disable.patch
genirq-msi-simplify-msi-enable-and-disable-fix.patch
genirq-msi-make-the-msi-boolean-tests-return-either-0-or-1.patch
genirq-msi-implement-helper-functions-read_msi_msg-and-write_msi_msg.patch
genirq-msi-refactor-the-msi_ops.patch
genirq-msi-simplify-the-msi-irq-limit-policy.patch
genirq-irq-add-a-dynamic-irq-creation-api.patch
genirq-ia64-irq-dynamic-irq-support.patch
genirq-ia64-irq-dynamic-irq-support-fix.patch
genirq-i386-irq-dynamic-irq-support.patch
genirq-i386-irq-dynamic-irq-support-fix.patch
genirq-x86_64-irq-dynamic-irq-support.patch
genirq-msi-make-the-msi-code-irq-based-and-not-vector-based.patch
genirq-x86_64-irq-move-msi-message-composition-into-io_apicc.patch
genirq-i386-irq-move-msi-message-composition-into-io_apicc.patch
genirq-msi-only-build-msi-apicc-on-ia64.patch
genirq-x86_64-irq-remove-the-msi-assumption-that-irq-==-vector.patch
genirq-i386-irq-remove-the-msi-assumption-that-irq-==-vector.patch
genirq-i386-irq-remove-the-msi-assumption-that-irq-==-vector-fix.patch
genirq-irq-remove-msi-hacks.patch
genirq-irq-generalize-the-check-for-hardirq_bits.patch
genirq-x86_64-irq-make-the-external-irq-handlers-report-their-vector-not-the-irq-number.patch
genirq-x86_64-irq-make-vector_irq-per-cpu.patch
genirq-x86_64-irq-kill-gsi_irq_sharing.patch
genirq-x86_64-irq-kill-irq-compression.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux