linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove deprecated IRQF_DISABLED flag entirely
@ 2015-03-05 12:59 Valentin Rothberg
  2015-03-05 13:08 ` Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Valentin Rothberg @ 2015-03-05 12:59 UTC (permalink / raw)
  To: akpm
  Cc: Valentin Rothberg, Jonathan Corbet, Ralf Baechle,
	David Woodhouse, Brian Norris, Greg Kroah-Hartman, Paul Bolle,
	Jiri Kosina, Ewan Milne, Hannes Reinecke, Christoph Hellwig,
	Huacai Chen, Hongliang Tao, Nishanth Menon, Santosh Shilimkar,
	Peter Ujfalusi, Tony Lindgren, Rajendra Nayak, Sricharan R,
	Afzal Mohammed, Keerthy, Dan Carpenter, Zhou Wang, Felipe Balbi,
	Laurent Pinchart, Thomas Gleixner, Randy Dunlap, Kukjin Kim,
	Rafael J. Wysocki, Quentin Lambert, Eyal Perry, Arnd Bergmann,
	Peter Zijlstra, linux-doc, linux-kernel, linux-mips,
	iss_storagedev, linux-mtd, linux-usb

The IRQF_DISABLED is a NOOP and has been scheduled for removal since
Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
core code").

According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
interrupts disabled") running IRQ handlers with interrupts enabled can
cause stack overflows when the interrupt line of the issuing device is
still active.

This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
in older versions of Linux) and removes the definition and all remaining
usages of this flag.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
---
The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
as IRQF_DISABLED is gone now; the usage in older kernel versions
(including the old SA_INTERRUPT flag) should be discouraged.  The
trouble of using IRQF_SHARED is a general problem and not specific to
any driver.

I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
it has already been removed in linux-next by commit b0e1ee8e1405
("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").

All remaining references are changelogs that I suggest to keep.
---
 Documentation/scsi/ncr53c8xx.txt     | 25 -------------------------
 Documentation/scsi/tmscsim.txt       |  4 ----
 arch/mips/loongson/loongson-3/hpet.c |  2 +-
 drivers/block/cpqarray.c             |  4 ++--
 drivers/bus/omap_l3_noc.c            |  4 ++--
 drivers/bus/omap_l3_smx.c            | 10 ++++------
 drivers/mtd/nand/hisi504_nand.c      |  3 +--
 drivers/usb/isp1760/isp1760-core.c   |  3 +--
 drivers/usb/isp1760/isp1760-udc.c    |  4 ++--
 include/linux/interrupt.h            |  3 ---
 10 files changed, 13 insertions(+), 49 deletions(-)

diff --git a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt
index 1d508dcbf859..8586efff1e99 100644
--- a/Documentation/scsi/ncr53c8xx.txt
+++ b/Documentation/scsi/ncr53c8xx.txt
@@ -786,7 +786,6 @@ port address 0x1400.
         irqm:1     same as initial settings (assumed BIOS settings)
         irqm:2     always totem pole
         irqm:0x10  driver will not use IRQF_SHARED flag when requesting irq
-        irqm:0x20  driver will not use IRQF_DISABLED flag when requesting irq
 
     (Bits 0x10 and 0x20 can be combined with hardware irq mode option)
 
@@ -1231,30 +1230,6 @@ they only refer to system buffers that are well aligned. So, a work around
 may only be needed under Linux when a scatter/gather list is not used and 
 when the SCSI DATA IN phase is reentered after a phase mismatch.
 
-14.5 IRQ sharing problems
-
-When an IRQ is shared by devices that are handled by different drivers, it 
-may happen that one driver complains about the request of the IRQ having 
-failed. Inder Linux-2.0, this may be due to one driver having requested the 
-IRQ using the IRQF_DISABLED flag but some other having requested the same IRQ
-without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by 
-one driver not having requested the IRQ with the IRQF_SHARED flag.
-
-By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the 
-IRQF_DISABLED and the IRQF_SHARED flag under Linux-2.0 and with only the IRQF_SHARED
-flag under Linux-2.2.
-
-Under Linux-2.0, you can disable use of IRQF_DISABLED flag from the boot
-command line by using the following option:
-
-     ncr53c8xx=irqm:0x20   (for the generic ncr53c8xx driver)
-     sym53c8xx=irqm:0x20   (for the sym53c8xx driver)
-
-If this does not fix the problem, then you may want to check how all other 
-drivers are requesting the IRQ and report the problem. Note that if at least 
-a single driver does not request the IRQ with the IRQF_SHARED flag (share IRQ),
-then the request of the IRQ obviously will not succeed for all the drivers.
-
 15. SCSI problem troubleshooting
 
 15.1 Problem tracking
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt
index 0810132772a8..0e0322bf0020 100644
--- a/Documentation/scsi/tmscsim.txt
+++ b/Documentation/scsi/tmscsim.txt
@@ -107,10 +107,6 @@ produced errors and started to corrupt my disks. So don't do that! A 37.50
 MHz PCI bus works for me, though, but I don't recommend using higher clocks
 than the 33.33 MHz being in the PCI spec.
 
-If you want to share the IRQ with another device and the driver refuses to
-do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to 
-IRQF_SHARED | IRQF_DISABLED.
-
 
 3.Features
 ----------
diff --git a/arch/mips/loongson/loongson-3/hpet.c b/arch/mips/loongson/loongson-3/hpet.c
index e898d68668a9..5c21cd3bd339 100644
--- a/arch/mips/loongson/loongson-3/hpet.c
+++ b/arch/mips/loongson/loongson-3/hpet.c
@@ -162,7 +162,7 @@ static irqreturn_t hpet_irq_handler(int irq, void *data)
 
 static struct irqaction hpet_irq = {
 	.handler = hpet_irq_handler,
-	.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
+	.flags = IRQF_NOBALANCING | IRQF_TIMER,
 	.name = "hpet",
 };
 
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 2b9440384536..f749df9e15cd 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -405,8 +405,8 @@ static int cpqarray_register_ctlr(int i, struct pci_dev *pdev)
 		goto Enomem4;
 	}
 	hba[i]->access.set_intr_mask(hba[i], 0);
-	if (request_irq(hba[i]->intr, do_ida_intr,
-		IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i]))
+	if (request_irq(hba[i]->intr, do_ida_intr, IRQF_SHARED,
+			hba[i]->devname, hba[i]))
 	{
 		printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n",
 				hba[i]->intr, hba[i]->devname);
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 029bc73de001..11f7982cbdb3 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -284,7 +284,7 @@ static int omap_l3_probe(struct platform_device *pdev)
 	 */
 	l3->debug_irq = platform_get_irq(pdev, 0);
 	ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler,
-			       IRQF_DISABLED, "l3-dbg-irq", l3);
+			       0x0, "l3-dbg-irq", l3);
 	if (ret) {
 		dev_err(l3->dev, "request_irq failed for %d\n",
 			l3->debug_irq);
@@ -293,7 +293,7 @@ static int omap_l3_probe(struct platform_device *pdev)
 
 	l3->app_irq = platform_get_irq(pdev, 1);
 	ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler,
-			       IRQF_DISABLED, "l3-app-irq", l3);
+			       0x0, "l3-app-irq", l3);
 	if (ret)
 		dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq);
 
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index 597fdaee7315..360a5c0a4ee0 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -251,18 +251,16 @@ static int omap3_l3_probe(struct platform_device *pdev)
 	}
 
 	l3->debug_irq = platform_get_irq(pdev, 0);
-	ret = request_irq(l3->debug_irq, omap3_l3_app_irq,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING,
-		"l3-debug-irq", l3);
+	ret = request_irq(l3->debug_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
+			  "l3-debug-irq", l3);
 	if (ret) {
 		dev_err(&pdev->dev, "couldn't request debug irq\n");
 		goto err1;
 	}
 
 	l3->app_irq = platform_get_irq(pdev, 1);
-	ret = request_irq(l3->app_irq, omap3_l3_app_irq,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING,
-		"l3-app-irq", l3);
+	ret = request_irq(l3->app_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
+			  "l3-app-irq", l3);
 	if (ret) {
 		dev_err(&pdev->dev, "couldn't request app irq\n");
 		goto err2;
diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
index 289ad3ac3e80..7f9f9c827c1d 100644
--- a/drivers/mtd/nand/hisi504_nand.c
+++ b/drivers/mtd/nand/hisi504_nand.c
@@ -758,8 +758,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
 
 	hisi_nfc_host_init(host);
 
-	ret = devm_request_irq(dev, irq, hinfc_irq_handle, IRQF_DISABLED,
-				"nandc", host);
+	ret = devm_request_irq(dev, irq, hinfc_irq_handle, "nandc", host);
 	if (ret) {
 		dev_err(dev, "failed to request IRQ\n");
 		goto err_res;
diff --git a/drivers/usb/isp1760/isp1760-core.c b/drivers/usb/isp1760/isp1760-core.c
index b9827556455f..5c37f40f6122 100644
--- a/drivers/usb/isp1760/isp1760-core.c
+++ b/drivers/usb/isp1760/isp1760-core.c
@@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, unsigned long irqflags,
 	}
 
 	if (IS_ENABLED(CONFIG_USB_ISP1761_UDC) && !udc_disabled) {
-		ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
-					   IRQF_DISABLED);
+		ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED);
 		if (ret < 0) {
 			isp1760_hcd_unregister(&isp->hcd);
 			return ret;
diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c
index 9612d7990565..0b46ff01299f 100644
--- a/drivers/usb/isp1760/isp1760-udc.c
+++ b/drivers/usb/isp1760/isp1760-udc.c
@@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, int irq,
 
 	sprintf(udc->irqname, "%s (udc)", devname);
 
-	ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
-			  irqflags, udc->irqname, udc);
+	ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
+			  udc->irqname, udc);
 	if (ret < 0)
 		goto error;
 
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index d9b05b5bf8c7..bb4ecaeb4a14 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -39,8 +39,6 @@
  * These flags used only by the kernel as part of the
  * irq handling routines.
  *
- * IRQF_DISABLED - keep irqs disabled when calling the action handler.
- *                 DEPRECATED. This flag is a NOOP and scheduled to be removed
  * 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
@@ -58,7 +56,6 @@
  * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device
  *                resume time.
  */
-#define IRQF_DISABLED		0x00000020
 #define IRQF_SHARED		0x00000080
 #define IRQF_PROBE_SHARED	0x00000100
 #define __IRQF_TIMER		0x00000200
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 12:59 [PATCH] Remove deprecated IRQF_DISABLED flag entirely Valentin Rothberg
@ 2015-03-05 13:08 ` Dan Carpenter
  2015-03-05 13:33   ` Valentin Rothberg
  2015-03-05 13:11 ` Hannes Reinecke
  2015-03-05 14:23 ` [PATCH v2] " Valentin Rothberg
  2 siblings, 1 reply; 14+ messages in thread
From: Dan Carpenter @ 2015-03-05 13:08 UTC (permalink / raw)
  To: Valentin Rothberg
  Cc: akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Brian Norris, Greg Kroah-Hartman, Paul Bolle, Jiri Kosina,
	Ewan Milne, Hannes Reinecke, Christoph Hellwig, Huacai Chen,
	Hongliang Tao, Nishanth Menon, Santosh Shilimkar, Peter Ujfalusi,
	Tony Lindgren, Rajendra Nayak, Sricharan R, Afzal Mohammed,
	Keerthy, Zhou Wang, Felipe Balbi, Laurent Pinchart,
	Thomas Gleixner, Randy Dunlap, Kukjin Kim, Rafael J. Wysocki,
	Quentin Lambert, Eyal Perry, Arnd Bergmann, Peter Zijlstra,
	linux-doc, linux-kernel, linux-mips, iss_storagedev, linux-mtd,
	linux-usb

On Thu, Mar 05, 2015 at 01:59:39PM +0100, Valentin Rothberg wrote:
> diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
> index 289ad3ac3e80..7f9f9c827c1d 100644
> --- a/drivers/mtd/nand/hisi504_nand.c
> +++ b/drivers/mtd/nand/hisi504_nand.c
> @@ -758,8 +758,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
>  
>  	hisi_nfc_host_init(host);
>  
> -	ret = devm_request_irq(dev, irq, hinfc_irq_handle, IRQF_DISABLED,
> -				"nandc", host);
> +	ret = devm_request_irq(dev, irq, hinfc_irq_handle, "nandc", host);

I think this breaks the build.

>  	if (ret) {
>  		dev_err(dev, "failed to request IRQ\n");
>  		goto err_res;

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 12:59 [PATCH] Remove deprecated IRQF_DISABLED flag entirely Valentin Rothberg
  2015-03-05 13:08 ` Dan Carpenter
@ 2015-03-05 13:11 ` Hannes Reinecke
  2015-03-05 13:41   ` Valentin Rothberg
  2015-03-06 19:41   ` Dmitry Torokhov
  2015-03-05 14:23 ` [PATCH v2] " Valentin Rothberg
  2 siblings, 2 replies; 14+ messages in thread
From: Hannes Reinecke @ 2015-03-05 13:11 UTC (permalink / raw)
  To: Valentin Rothberg, akpm
  Cc: Jonathan Corbet, Ralf Baechle, David Woodhouse, Brian Norris,
	Greg Kroah-Hartman, Paul Bolle, Jiri Kosina, Ewan Milne,
	Christoph Hellwig, Huacai Chen, Hongliang Tao, Nishanth Menon,
	Santosh Shilimkar, Peter Ujfalusi, Tony Lindgren, Rajendra Nayak,
	Sricharan R, Afzal Mohammed, Keerthy, Dan Carpenter, Zhou Wang,
	Felipe Balbi, Laurent Pinchart, Thomas Gleixner, Randy Dunlap,
	Kukjin Kim, Rafael J. Wysocki, Quentin Lambert, Eyal Perry,
	Arnd Bergmann, Peter Zijlstra, linux-doc, linux-kernel,
	linux-mips, iss_storagedev, linux-mtd, linux-usb

On 03/05/2015 01:59 PM, Valentin Rothberg wrote:
> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
> core code").
> 
> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
> interrupts disabled") running IRQ handlers with interrupts enabled can
> cause stack overflows when the interrupt line of the issuing device is
> still active.
> 
> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
> in older versions of Linux) and removes the definition and all remaining
> usages of this flag.
> 
> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
> ---
> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
> as IRQF_DISABLED is gone now; the usage in older kernel versions
> (including the old SA_INTERRUPT flag) should be discouraged.  The
> trouble of using IRQF_SHARED is a general problem and not specific to
> any driver.
> 
> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
> it has already been removed in linux-next by commit b0e1ee8e1405
> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
> 
> All remaining references are changelogs that I suggest to keep.

While you're at it: having '0x0' as a value for the irq flags looks
a bit silly, and makes you wonder what the parameter is for.

I would rather like to have

#define IRQF_NONE 0x0

and use it for these cases.
That way the scope of that parameter is clear.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 13:08 ` Dan Carpenter
@ 2015-03-05 13:33   ` Valentin Rothberg
  0 siblings, 0 replies; 14+ messages in thread
From: Valentin Rothberg @ 2015-03-05 13:33 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Brian Norris, Greg Kroah-Hartman, Paul Bolle, Jiri Kosina,
	Ewan Milne, Hannes Reinecke, Christoph Hellwig, Huacai Chen,
	Hongliang Tao, Nishanth Menon, Santosh Shilimkar, Peter Ujfalusi,
	Tony Lindgren, Rajendra Nayak, Sricharan R, Afzal Mohammed,
	Keerthy, Zhou Wang, Felipe Balbi, Laurent Pinchart,
	Thomas Gleixner, Randy Dunlap, Kukjin Kim, Rafael J. Wysocki,
	Quentin Lambert, Eyal Perry, Arnd Bergmann, Peter Zijlstra,
	linux-doc, linux-kernel, linux-mips, iss_storagedev, linux-mtd,
	linux-usb

On Thu, Mar 5, 2015 at 2:08 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Thu, Mar 05, 2015 at 01:59:39PM +0100, Valentin Rothberg wrote:
>> diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
>> index 289ad3ac3e80..7f9f9c827c1d 100644
>> --- a/drivers/mtd/nand/hisi504_nand.c
>> +++ b/drivers/mtd/nand/hisi504_nand.c
>> @@ -758,8 +758,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
>>
>>       hisi_nfc_host_init(host);
>>
>> -     ret = devm_request_irq(dev, irq, hinfc_irq_handle, IRQF_DISABLED,
>> -                             "nandc", host);
>> +     ret = devm_request_irq(dev, irq, hinfc_irq_handle, "nandc", host);
>
> I think this breaks the build.

You're completely right, thanks!  Obviously I missed compiling this
driver.  I will fix it.

Kind regards,
 Valentin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 13:11 ` Hannes Reinecke
@ 2015-03-05 13:41   ` Valentin Rothberg
  2015-03-06 19:41   ` Dmitry Torokhov
  1 sibling, 0 replies; 14+ messages in thread
From: Valentin Rothberg @ 2015-03-05 13:41 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Brian Norris, Greg Kroah-Hartman, Paul Bolle, Jiri Kosina,
	Ewan Milne, Christoph Hellwig, Huacai Chen, Hongliang Tao,
	Nishanth Menon, Santosh Shilimkar, Peter Ujfalusi, Tony Lindgren,
	Rajendra Nayak, Sricharan R, Afzal Mohammed, Keerthy,
	Dan Carpenter, Zhou Wang, Felipe Balbi, Laurent Pinchart,
	Thomas Gleixner, Randy Dunlap, Kukjin Kim, Rafael J. Wysocki,
	Quentin Lambert, Eyal Perry, Arnd Bergmann, Peter Zijlstra,
	linux-doc, linux-kernel, linux-mips, iss_storagedev, linux-mtd,
	linux-usb

On Thu, Mar 5, 2015 at 2:11 PM, Hannes Reinecke <hare@suse.de> wrote:
> On 03/05/2015 01:59 PM, Valentin Rothberg wrote:
>> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
>> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
>> core code").
>>
>> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
>> interrupts disabled") running IRQ handlers with interrupts enabled can
>> cause stack overflows when the interrupt line of the issuing device is
>> still active.
>>
>> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
>> in older versions of Linux) and removes the definition and all remaining
>> usages of this flag.
>>
>> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
>> ---
>> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
>> as IRQF_DISABLED is gone now; the usage in older kernel versions
>> (including the old SA_INTERRUPT flag) should be discouraged.  The
>> trouble of using IRQF_SHARED is a general problem and not specific to
>> any driver.
>>
>> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
>> it has already been removed in linux-next by commit b0e1ee8e1405
>> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
>>
>> All remaining references are changelogs that I suggest to keep.
>
> While you're at it: having '0x0' as a value for the irq flags looks
> a bit silly, and makes you wonder what the parameter is for.
>
> I would rather like to have
>
> #define IRQF_NONE 0x0
>
> and use it for these cases.
> That way the scope of that parameter is clear.

I like the idea.  I checked the source code for such cases and passing
0 or 0x0 as IRQ flags appears quite often (also in the devm
counterparts).
If nobody is against your proposal, then I will prepare a Coccinelle
script that takes care of it and send it in  a patch series (e.g.,
introduce definition of IRQF_NONE, the Coccinelle and following a big
patch that applies changes proposed by the script).

Kind regards,
 Valentin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 12:59 [PATCH] Remove deprecated IRQF_DISABLED flag entirely Valentin Rothberg
  2015-03-05 13:08 ` Dan Carpenter
  2015-03-05 13:11 ` Hannes Reinecke
@ 2015-03-05 14:23 ` Valentin Rothberg
  2015-03-06  8:37   ` [tip:irq/core] genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() " tip-bot for Valentin Rothberg
                     ` (3 more replies)
  2 siblings, 4 replies; 14+ messages in thread
From: Valentin Rothberg @ 2015-03-05 14:23 UTC (permalink / raw)
  To: akpm
  Cc: Valentin Rothberg, Jonathan Corbet, Ralf Baechle,
	David Woodhouse, Brian Norris, Greg Kroah-Hartman, Paul Bolle,
	Jiri Kosina, Hannes Reinecke, Ewan Milne, Christoph Hellwig,
	Hongliang Tao, Huacai Chen, Nishanth Menon, Peter Ujfalusi,
	Santosh Shilimkar, Tony Lindgren, Rajendra Nayak, Afzal Mohammed,
	Keerthy, Sricharan R, Zhou Wang, Dan Carpenter, Felipe Balbi,
	Laurent Pinchart, Thomas Gleixner, Quentin Lambert,
	Arnd Bergmann, Ingo Molnar, Eyal Perry, Peter Zijlstra,
	linux-doc, linux-kernel, linux-mips, iss_storagedev, linux-mtd,
	linux-usb

The IRQF_DISABLED is a NOOP and has been scheduled for removal since
Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
core code").

According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
interrupts disabled") running IRQ handlers with interrupts enabled can
cause stack overflows when the interrupt line of the issuing device is
still active.

This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
in older versions of Linux) and removes the definition and all remaining
usages of this flag.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
---
The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
as IRQF_DISABLED is gone now; the usage in older kernel versions
(including the old SA_INTERRUPT flag) should be discouraged.  The
trouble of using IRQF_SHARED is a general problem and not specific to
any driver.

I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
it has already been removed in linux-next by commit b0e1ee8e1405
("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").

All remaining references are changelogs that I suggest to keep.

Changelog

v2: Correct previous change to drivers/mtd/nand/hisi504_nand.c that
broke compilation.  Reported by Dan Carpenter.
---
 Documentation/scsi/ncr53c8xx.txt     | 25 -------------------------
 Documentation/scsi/tmscsim.txt       |  4 ----
 arch/mips/loongson/loongson-3/hpet.c |  2 +-
 drivers/block/cpqarray.c             |  4 ++--
 drivers/bus/omap_l3_noc.c            |  4 ++--
 drivers/bus/omap_l3_smx.c            | 10 ++++------
 drivers/mtd/nand/hisi504_nand.c      |  3 +--
 drivers/usb/isp1760/isp1760-core.c   |  3 +--
 drivers/usb/isp1760/isp1760-udc.c    |  4 ++--
 include/linux/interrupt.h            |  3 ---
 10 files changed, 13 insertions(+), 49 deletions(-)

diff --git a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt
index 1d508dcbf859..8586efff1e99 100644
--- a/Documentation/scsi/ncr53c8xx.txt
+++ b/Documentation/scsi/ncr53c8xx.txt
@@ -786,7 +786,6 @@ port address 0x1400.
         irqm:1     same as initial settings (assumed BIOS settings)
         irqm:2     always totem pole
         irqm:0x10  driver will not use IRQF_SHARED flag when requesting irq
-        irqm:0x20  driver will not use IRQF_DISABLED flag when requesting irq
 
     (Bits 0x10 and 0x20 can be combined with hardware irq mode option)
 
@@ -1231,30 +1230,6 @@ they only refer to system buffers that are well aligned. So, a work around
 may only be needed under Linux when a scatter/gather list is not used and 
 when the SCSI DATA IN phase is reentered after a phase mismatch.
 
-14.5 IRQ sharing problems
-
-When an IRQ is shared by devices that are handled by different drivers, it 
-may happen that one driver complains about the request of the IRQ having 
-failed. Inder Linux-2.0, this may be due to one driver having requested the 
-IRQ using the IRQF_DISABLED flag but some other having requested the same IRQ
-without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by 
-one driver not having requested the IRQ with the IRQF_SHARED flag.
-
-By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the 
-IRQF_DISABLED and the IRQF_SHARED flag under Linux-2.0 and with only the IRQF_SHARED
-flag under Linux-2.2.
-
-Under Linux-2.0, you can disable use of IRQF_DISABLED flag from the boot
-command line by using the following option:
-
-     ncr53c8xx=irqm:0x20   (for the generic ncr53c8xx driver)
-     sym53c8xx=irqm:0x20   (for the sym53c8xx driver)
-
-If this does not fix the problem, then you may want to check how all other 
-drivers are requesting the IRQ and report the problem. Note that if at least 
-a single driver does not request the IRQ with the IRQF_SHARED flag (share IRQ),
-then the request of the IRQ obviously will not succeed for all the drivers.
-
 15. SCSI problem troubleshooting
 
 15.1 Problem tracking
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt
index 0810132772a8..0e0322bf0020 100644
--- a/Documentation/scsi/tmscsim.txt
+++ b/Documentation/scsi/tmscsim.txt
@@ -107,10 +107,6 @@ produced errors and started to corrupt my disks. So don't do that! A 37.50
 MHz PCI bus works for me, though, but I don't recommend using higher clocks
 than the 33.33 MHz being in the PCI spec.
 
-If you want to share the IRQ with another device and the driver refuses to
-do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to 
-IRQF_SHARED | IRQF_DISABLED.
-
 
 3.Features
 ----------
diff --git a/arch/mips/loongson/loongson-3/hpet.c b/arch/mips/loongson/loongson-3/hpet.c
index e898d68668a9..5c21cd3bd339 100644
--- a/arch/mips/loongson/loongson-3/hpet.c
+++ b/arch/mips/loongson/loongson-3/hpet.c
@@ -162,7 +162,7 @@ static irqreturn_t hpet_irq_handler(int irq, void *data)
 
 static struct irqaction hpet_irq = {
 	.handler = hpet_irq_handler,
-	.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
+	.flags = IRQF_NOBALANCING | IRQF_TIMER,
 	.name = "hpet",
 };
 
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 2b9440384536..f749df9e15cd 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -405,8 +405,8 @@ static int cpqarray_register_ctlr(int i, struct pci_dev *pdev)
 		goto Enomem4;
 	}
 	hba[i]->access.set_intr_mask(hba[i], 0);
-	if (request_irq(hba[i]->intr, do_ida_intr,
-		IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i]))
+	if (request_irq(hba[i]->intr, do_ida_intr, IRQF_SHARED,
+			hba[i]->devname, hba[i]))
 	{
 		printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n",
 				hba[i]->intr, hba[i]->devname);
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 029bc73de001..11f7982cbdb3 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -284,7 +284,7 @@ static int omap_l3_probe(struct platform_device *pdev)
 	 */
 	l3->debug_irq = platform_get_irq(pdev, 0);
 	ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler,
-			       IRQF_DISABLED, "l3-dbg-irq", l3);
+			       0x0, "l3-dbg-irq", l3);
 	if (ret) {
 		dev_err(l3->dev, "request_irq failed for %d\n",
 			l3->debug_irq);
@@ -293,7 +293,7 @@ static int omap_l3_probe(struct platform_device *pdev)
 
 	l3->app_irq = platform_get_irq(pdev, 1);
 	ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler,
-			       IRQF_DISABLED, "l3-app-irq", l3);
+			       0x0, "l3-app-irq", l3);
 	if (ret)
 		dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq);
 
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index 597fdaee7315..360a5c0a4ee0 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -251,18 +251,16 @@ static int omap3_l3_probe(struct platform_device *pdev)
 	}
 
 	l3->debug_irq = platform_get_irq(pdev, 0);
-	ret = request_irq(l3->debug_irq, omap3_l3_app_irq,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING,
-		"l3-debug-irq", l3);
+	ret = request_irq(l3->debug_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
+			  "l3-debug-irq", l3);
 	if (ret) {
 		dev_err(&pdev->dev, "couldn't request debug irq\n");
 		goto err1;
 	}
 
 	l3->app_irq = platform_get_irq(pdev, 1);
-	ret = request_irq(l3->app_irq, omap3_l3_app_irq,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING,
-		"l3-app-irq", l3);
+	ret = request_irq(l3->app_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
+			  "l3-app-irq", l3);
 	if (ret) {
 		dev_err(&pdev->dev, "couldn't request app irq\n");
 		goto err2;
diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
index 289ad3ac3e80..8dcc7b8fee40 100644
--- a/drivers/mtd/nand/hisi504_nand.c
+++ b/drivers/mtd/nand/hisi504_nand.c
@@ -758,8 +758,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
 
 	hisi_nfc_host_init(host);
 
-	ret = devm_request_irq(dev, irq, hinfc_irq_handle, IRQF_DISABLED,
-				"nandc", host);
+	ret = devm_request_irq(dev, irq, hinfc_irq_handle, 0x0, "nandc", host);
 	if (ret) {
 		dev_err(dev, "failed to request IRQ\n");
 		goto err_res;
diff --git a/drivers/usb/isp1760/isp1760-core.c b/drivers/usb/isp1760/isp1760-core.c
index b9827556455f..5c37f40f6122 100644
--- a/drivers/usb/isp1760/isp1760-core.c
+++ b/drivers/usb/isp1760/isp1760-core.c
@@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, unsigned long irqflags,
 	}
 
 	if (IS_ENABLED(CONFIG_USB_ISP1761_UDC) && !udc_disabled) {
-		ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
-					   IRQF_DISABLED);
+		ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED);
 		if (ret < 0) {
 			isp1760_hcd_unregister(&isp->hcd);
 			return ret;
diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c
index 9612d7990565..0b46ff01299f 100644
--- a/drivers/usb/isp1760/isp1760-udc.c
+++ b/drivers/usb/isp1760/isp1760-udc.c
@@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, int irq,
 
 	sprintf(udc->irqname, "%s (udc)", devname);
 
-	ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
-			  irqflags, udc->irqname, udc);
+	ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
+			  udc->irqname, udc);
 	if (ret < 0)
 		goto error;
 
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index d9b05b5bf8c7..bb4ecaeb4a14 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -39,8 +39,6 @@
  * These flags used only by the kernel as part of the
  * irq handling routines.
  *
- * IRQF_DISABLED - keep irqs disabled when calling the action handler.
- *                 DEPRECATED. This flag is a NOOP and scheduled to be removed
  * 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
@@ -58,7 +56,6 @@
  * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device
  *                resume time.
  */
-#define IRQF_DISABLED		0x00000020
 #define IRQF_SHARED		0x00000080
 #define IRQF_PROBE_SHARED	0x00000100
 #define __IRQF_TIMER		0x00000200
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [tip:irq/core] genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely
  2015-03-05 14:23 ` [PATCH v2] " Valentin Rothberg
@ 2015-03-06  8:37   ` tip-bot for Valentin Rothberg
  2015-03-06 18:31   ` [PATCH v2] Remove deprecated IRQF_DISABLED " Tony Lindgren
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: tip-bot for Valentin Rothberg @ 2015-03-06  8:37 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tony, emilne, j-keerthy, chenhc, gregkh, tglx, r.sricharan,
	torvalds, nm, balbi, mingo, hch, eyalpe, taohl, hare, afzal,
	arnd, linux-kernel, ralf, jkosina, wangzhou1, dan.carpenter,
	peter.ujfalusi, rnayak, lambert.quentin, corbet, hpa,
	laurent.pinchart, computersforpeace, dwmw2, valentinrothberg,
	santosh.shilimkar, peterz, pebolle

Commit-ID:  d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc
Gitweb:     http://git.kernel.org/tip/d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc
Author:     Valentin Rothberg <valentinrothberg@gmail.com>
AuthorDate: Thu, 5 Mar 2015 15:23:08 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 5 Mar 2015 20:53:06 +0100

genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely

The IRQF_DISABLED flag is a NOOP and has been scheduled for removal
since Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove
IRQF_DISABLED from core code").

According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
interrupts disabled"), running IRQ handlers with interrupts
enabled can cause stack overflows when the interrupt line of the
issuing device is still active.

This patch ends the grace period for IRQF_DISABLED (i.e.,
SA_INTERRUPT in older versions of Linux) and removes the
definition and all remaining usages of this flag.

There's still a few non-functional references left in the kernel
source:

  - The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
    as IRQF_DISABLED is gone now; the usage in older kernel versions
    (including the old SA_INTERRUPT flag) should be discouraged.  The
    trouble of using IRQF_SHARED is a general problem and not specific to
    any driver.

  - I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
    it has already been removed in linux-next.

  - All remaining references are changelogs that I suggest to keep.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Cc: Afzal Mohammed <afzal@ti.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Ewan Milne <emilne@redhat.com>
Cc: Eyal Perry <eyalpe@mellanox.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Hongliang Tao <taohl@lemote.com>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Lambert <lambert.quentin@gmail.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Sricharan R <r.sricharan@ti.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Zhou Wang <wangzhou1@hisilicon.com>
Cc: iss_storagedev@hp.com
Cc: linux-mips@linux-mips.org
Cc: linux-mtd@lists.infradead.org
Link: http://lkml.kernel.org/r/1425565425-12604-1-git-send-email-valentinrothberg@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 Documentation/scsi/ncr53c8xx.txt     | 25 -------------------------
 Documentation/scsi/tmscsim.txt       |  4 ----
 arch/mips/loongson/loongson-3/hpet.c |  2 +-
 drivers/block/cpqarray.c             |  4 ++--
 drivers/bus/omap_l3_noc.c            |  4 ++--
 drivers/bus/omap_l3_smx.c            | 10 ++++------
 drivers/mtd/nand/hisi504_nand.c      |  3 +--
 drivers/usb/isp1760/isp1760-core.c   |  3 +--
 drivers/usb/isp1760/isp1760-udc.c    |  4 ++--
 include/linux/interrupt.h            |  3 ---
 10 files changed, 13 insertions(+), 49 deletions(-)

diff --git a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt
index 1d508dc..8586eff 100644
--- a/Documentation/scsi/ncr53c8xx.txt
+++ b/Documentation/scsi/ncr53c8xx.txt
@@ -786,7 +786,6 @@ port address 0x1400.
         irqm:1     same as initial settings (assumed BIOS settings)
         irqm:2     always totem pole
         irqm:0x10  driver will not use IRQF_SHARED flag when requesting irq
-        irqm:0x20  driver will not use IRQF_DISABLED flag when requesting irq
 
     (Bits 0x10 and 0x20 can be combined with hardware irq mode option)
 
@@ -1231,30 +1230,6 @@ they only refer to system buffers that are well aligned. So, a work around
 may only be needed under Linux when a scatter/gather list is not used and 
 when the SCSI DATA IN phase is reentered after a phase mismatch.
 
-14.5 IRQ sharing problems
-
-When an IRQ is shared by devices that are handled by different drivers, it 
-may happen that one driver complains about the request of the IRQ having 
-failed. Inder Linux-2.0, this may be due to one driver having requested the 
-IRQ using the IRQF_DISABLED flag but some other having requested the same IRQ
-without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by 
-one driver not having requested the IRQ with the IRQF_SHARED flag.
-
-By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the 
-IRQF_DISABLED and the IRQF_SHARED flag under Linux-2.0 and with only the IRQF_SHARED
-flag under Linux-2.2.
-
-Under Linux-2.0, you can disable use of IRQF_DISABLED flag from the boot
-command line by using the following option:
-
-     ncr53c8xx=irqm:0x20   (for the generic ncr53c8xx driver)
-     sym53c8xx=irqm:0x20   (for the sym53c8xx driver)
-
-If this does not fix the problem, then you may want to check how all other 
-drivers are requesting the IRQ and report the problem. Note that if at least 
-a single driver does not request the IRQ with the IRQF_SHARED flag (share IRQ),
-then the request of the IRQ obviously will not succeed for all the drivers.
-
 15. SCSI problem troubleshooting
 
 15.1 Problem tracking
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt
index 0810132..0e0322b 100644
--- a/Documentation/scsi/tmscsim.txt
+++ b/Documentation/scsi/tmscsim.txt
@@ -107,10 +107,6 @@ produced errors and started to corrupt my disks. So don't do that! A 37.50
 MHz PCI bus works for me, though, but I don't recommend using higher clocks
 than the 33.33 MHz being in the PCI spec.
 
-If you want to share the IRQ with another device and the driver refuses to
-do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to 
-IRQF_SHARED | IRQF_DISABLED.
-
 
 3.Features
 ----------
diff --git a/arch/mips/loongson/loongson-3/hpet.c b/arch/mips/loongson/loongson-3/hpet.c
index e898d68..5c21cd3 100644
--- a/arch/mips/loongson/loongson-3/hpet.c
+++ b/arch/mips/loongson/loongson-3/hpet.c
@@ -162,7 +162,7 @@ static irqreturn_t hpet_irq_handler(int irq, void *data)
 
 static struct irqaction hpet_irq = {
 	.handler = hpet_irq_handler,
-	.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
+	.flags = IRQF_NOBALANCING | IRQF_TIMER,
 	.name = "hpet",
 };
 
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 2b94403..f749df9 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -405,8 +405,8 @@ static int cpqarray_register_ctlr(int i, struct pci_dev *pdev)
 		goto Enomem4;
 	}
 	hba[i]->access.set_intr_mask(hba[i], 0);
-	if (request_irq(hba[i]->intr, do_ida_intr,
-		IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i]))
+	if (request_irq(hba[i]->intr, do_ida_intr, IRQF_SHARED,
+			hba[i]->devname, hba[i]))
 	{
 		printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n",
 				hba[i]->intr, hba[i]->devname);
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 029bc73..11f7982 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -284,7 +284,7 @@ static int omap_l3_probe(struct platform_device *pdev)
 	 */
 	l3->debug_irq = platform_get_irq(pdev, 0);
 	ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler,
-			       IRQF_DISABLED, "l3-dbg-irq", l3);
+			       0x0, "l3-dbg-irq", l3);
 	if (ret) {
 		dev_err(l3->dev, "request_irq failed for %d\n",
 			l3->debug_irq);
@@ -293,7 +293,7 @@ static int omap_l3_probe(struct platform_device *pdev)
 
 	l3->app_irq = platform_get_irq(pdev, 1);
 	ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler,
-			       IRQF_DISABLED, "l3-app-irq", l3);
+			       0x0, "l3-app-irq", l3);
 	if (ret)
 		dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq);
 
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index 597fdae..360a5c0 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -251,18 +251,16 @@ static int omap3_l3_probe(struct platform_device *pdev)
 	}
 
 	l3->debug_irq = platform_get_irq(pdev, 0);
-	ret = request_irq(l3->debug_irq, omap3_l3_app_irq,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING,
-		"l3-debug-irq", l3);
+	ret = request_irq(l3->debug_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
+			  "l3-debug-irq", l3);
 	if (ret) {
 		dev_err(&pdev->dev, "couldn't request debug irq\n");
 		goto err1;
 	}
 
 	l3->app_irq = platform_get_irq(pdev, 1);
-	ret = request_irq(l3->app_irq, omap3_l3_app_irq,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING,
-		"l3-app-irq", l3);
+	ret = request_irq(l3->app_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
+			  "l3-app-irq", l3);
 	if (ret) {
 		dev_err(&pdev->dev, "couldn't request app irq\n");
 		goto err2;
diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
index 289ad3a..8dcc7b8 100644
--- a/drivers/mtd/nand/hisi504_nand.c
+++ b/drivers/mtd/nand/hisi504_nand.c
@@ -758,8 +758,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
 
 	hisi_nfc_host_init(host);
 
-	ret = devm_request_irq(dev, irq, hinfc_irq_handle, IRQF_DISABLED,
-				"nandc", host);
+	ret = devm_request_irq(dev, irq, hinfc_irq_handle, 0x0, "nandc", host);
 	if (ret) {
 		dev_err(dev, "failed to request IRQ\n");
 		goto err_res;
diff --git a/drivers/usb/isp1760/isp1760-core.c b/drivers/usb/isp1760/isp1760-core.c
index b982755..5c37f40 100644
--- a/drivers/usb/isp1760/isp1760-core.c
+++ b/drivers/usb/isp1760/isp1760-core.c
@@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, unsigned long irqflags,
 	}
 
 	if (IS_ENABLED(CONFIG_USB_ISP1761_UDC) && !udc_disabled) {
-		ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
-					   IRQF_DISABLED);
+		ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED);
 		if (ret < 0) {
 			isp1760_hcd_unregister(&isp->hcd);
 			return ret;
diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c
index 9612d79..0b46ff0 100644
--- a/drivers/usb/isp1760/isp1760-udc.c
+++ b/drivers/usb/isp1760/isp1760-udc.c
@@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, int irq,
 
 	sprintf(udc->irqname, "%s (udc)", devname);
 
-	ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
-			  irqflags, udc->irqname, udc);
+	ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
+			  udc->irqname, udc);
 	if (ret < 0)
 		goto error;
 
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 3bb01b9..2cee176 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -39,8 +39,6 @@
  * These flags used only by the kernel as part of the
  * irq handling routines.
  *
- * IRQF_DISABLED - keep irqs disabled when calling the action handler.
- *                 DEPRECATED. This flag is a NOOP and scheduled to be removed
  * 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
@@ -58,7 +56,6 @@
  * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device
  *                resume time.
  */
-#define IRQF_DISABLED		0x00000020
 #define IRQF_SHARED		0x00000080
 #define IRQF_PROBE_SHARED	0x00000100
 #define __IRQF_TIMER		0x00000200

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 14:23 ` [PATCH v2] " Valentin Rothberg
  2015-03-06  8:37   ` [tip:irq/core] genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() " tip-bot for Valentin Rothberg
@ 2015-03-06 18:31   ` Tony Lindgren
  2015-03-06 18:46   ` Brian Norris
  2015-03-09 16:52   ` Felipe Balbi
  3 siblings, 0 replies; 14+ messages in thread
From: Tony Lindgren @ 2015-03-06 18:31 UTC (permalink / raw)
  To: Valentin Rothberg
  Cc: akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Brian Norris, Greg Kroah-Hartman, Paul Bolle, Jiri Kosina,
	Hannes Reinecke, Ewan Milne, Christoph Hellwig, Hongliang Tao,
	Huacai Chen, Nishanth Menon, Peter Ujfalusi, Santosh Shilimkar,
	Rajendra Nayak, Afzal Mohammed, Keerthy, Sricharan R, Zhou Wang,
	Dan Carpenter, Felipe Balbi, Laurent Pinchart, Thomas Gleixner,
	Quentin Lambert, Arnd Bergmann, Ingo Molnar, Eyal Perry,
	Peter Zijlstra, linux-doc, linux-kernel, linux-mips,
	iss_storagedev, linux-mtd, linux-usb

* Valentin Rothberg <valentinrothberg@gmail.com> [150305 06:24]:
> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
> core code").
> 
> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
> interrupts disabled") running IRQ handlers with interrupts enabled can
> cause stack overflows when the interrupt line of the issuing device is
> still active.
> 
> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
> in older versions of Linux) and removes the definition and all remaining
> usages of this flag.
> 
> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>

Acked-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 14:23 ` [PATCH v2] " Valentin Rothberg
  2015-03-06  8:37   ` [tip:irq/core] genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() " tip-bot for Valentin Rothberg
  2015-03-06 18:31   ` [PATCH v2] Remove deprecated IRQF_DISABLED " Tony Lindgren
@ 2015-03-06 18:46   ` Brian Norris
  2015-03-09 16:52   ` Felipe Balbi
  3 siblings, 0 replies; 14+ messages in thread
From: Brian Norris @ 2015-03-06 18:46 UTC (permalink / raw)
  To: Valentin Rothberg
  Cc: akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Greg Kroah-Hartman, Paul Bolle, Jiri Kosina, Hannes Reinecke,
	Ewan Milne, Christoph Hellwig, Hongliang Tao, Huacai Chen,
	Nishanth Menon, Peter Ujfalusi, Santosh Shilimkar, Tony Lindgren,
	Rajendra Nayak, Afzal Mohammed, Keerthy, Sricharan R, Zhou Wang,
	Dan Carpenter, Felipe Balbi, Laurent Pinchart, Thomas Gleixner,
	Quentin Lambert, Arnd Bergmann, Ingo Molnar, Eyal Perry,
	Peter Zijlstra, linux-doc, linux-kernel, linux-mips,
	iss_storagedev, linux-mtd, linux-usb

On Thu, Mar 05, 2015 at 03:23:08PM +0100, Valentin Rothberg wrote:
> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
> core code").
> 
> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
> interrupts disabled") running IRQ handlers with interrupts enabled can
> cause stack overflows when the interrupt line of the issuing device is
> still active.
> 
> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
> in older versions of Linux) and removes the definition and all remaining
> usages of this flag.
> 
> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
> ---
> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
> as IRQF_DISABLED is gone now; the usage in older kernel versions
> (including the old SA_INTERRUPT flag) should be discouraged.  The
> trouble of using IRQF_SHARED is a general problem and not specific to
> any driver.
> 
> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
> it has already been removed in linux-next by commit b0e1ee8e1405
> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
> 
> All remaining references are changelogs that I suggest to keep.
> 
> Changelog
> 
> v2: Correct previous change to drivers/mtd/nand/hisi504_nand.c that
> broke compilation.  Reported by Dan Carpenter.
> ---
>  Documentation/scsi/ncr53c8xx.txt     | 25 -------------------------
>  Documentation/scsi/tmscsim.txt       |  4 ----
>  arch/mips/loongson/loongson-3/hpet.c |  2 +-
>  drivers/block/cpqarray.c             |  4 ++--
>  drivers/bus/omap_l3_noc.c            |  4 ++--
>  drivers/bus/omap_l3_smx.c            | 10 ++++------
>  drivers/mtd/nand/hisi504_nand.c      |  3 +--
>  drivers/usb/isp1760/isp1760-core.c   |  3 +--
>  drivers/usb/isp1760/isp1760-udc.c    |  4 ++--
>  include/linux/interrupt.h            |  3 ---
>  10 files changed, 13 insertions(+), 49 deletions(-)
> 

For this piece:

> diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
> index 289ad3ac3e80..8dcc7b8fee40 100644
> --- a/drivers/mtd/nand/hisi504_nand.c
> +++ b/drivers/mtd/nand/hisi504_nand.c
> @@ -758,8 +758,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
>  
>  	hisi_nfc_host_init(host);
>  
> -	ret = devm_request_irq(dev, irq, hinfc_irq_handle, IRQF_DISABLED,
> -				"nandc", host);
> +	ret = devm_request_irq(dev, irq, hinfc_irq_handle, 0x0, "nandc", host);
>  	if (ret) {
>  		dev_err(dev, "failed to request IRQ\n");
>  		goto err_res;

Acked-by: Brian Norris <computersforpeace@gmail.com>

Sorry for the oversight in review, and thanks for the fixup.

Brian

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 13:11 ` Hannes Reinecke
  2015-03-05 13:41   ` Valentin Rothberg
@ 2015-03-06 19:41   ` Dmitry Torokhov
  2015-03-09  8:41     ` Valentin Rothberg
  1 sibling, 1 reply; 14+ messages in thread
From: Dmitry Torokhov @ 2015-03-06 19:41 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Valentin Rothberg, Andrew Morton, Jonathan Corbet, Ralf Baechle,
	David Woodhouse, Brian Norris, Greg Kroah-Hartman, Paul Bolle,
	Jiri Kosina, Ewan Milne, Christoph Hellwig, Huacai Chen,
	Hongliang Tao, Nishanth Menon, Santosh Shilimkar, Peter Ujfalusi,
	Tony Lindgren, Rajendra Nayak, Sricharan R, Afzal Mohammed,
	Keerthy, Dan Carpenter, Zhou Wang, Felipe Balbi,
	Laurent Pinchart, Thomas Gleixner, Randy Dunlap, Kukjin Kim,
	Rafael J. Wysocki, Quentin Lambert, Eyal Perry, Arnd Bergmann,
	Peter Zijlstra, linux-doc, lkml, linux-mips, iss_storagedev,
	linux-mtd, linux-usb

On Thu, Mar 5, 2015 at 5:11 AM, Hannes Reinecke <hare@suse.de> wrote:
> On 03/05/2015 01:59 PM, Valentin Rothberg wrote:
>> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
>> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
>> core code").
>>
>> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
>> interrupts disabled") running IRQ handlers with interrupts enabled can
>> cause stack overflows when the interrupt line of the issuing device is
>> still active.
>>
>> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
>> in older versions of Linux) and removes the definition and all remaining
>> usages of this flag.
>>
>> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
>> ---
>> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
>> as IRQF_DISABLED is gone now; the usage in older kernel versions
>> (including the old SA_INTERRUPT flag) should be discouraged.  The
>> trouble of using IRQF_SHARED is a general problem and not specific to
>> any driver.
>>
>> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
>> it has already been removed in linux-next by commit b0e1ee8e1405
>> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
>>
>> All remaining references are changelogs that I suggest to keep.
>
> While you're at it: having '0x0' as a value for the irq flags looks
> a bit silly, and makes you wonder what the parameter is for.
>
> I would rather like to have
>
> #define IRQF_NONE 0x0
>
> and use it for these cases.
> That way the scope of that parameter is clear.

No, that would imply that IRQ never triggers whereas passing 0 means
we keep triggers that have been set by the platform.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-06 19:41   ` Dmitry Torokhov
@ 2015-03-09  8:41     ` Valentin Rothberg
  0 siblings, 0 replies; 14+ messages in thread
From: Valentin Rothberg @ 2015-03-09  8:41 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Hannes Reinecke, Andrew Morton, Jonathan Corbet, Ralf Baechle,
	David Woodhouse, Brian Norris, Greg Kroah-Hartman, Paul Bolle,
	Jiri Kosina, Ewan Milne, Christoph Hellwig, Huacai Chen,
	Hongliang Tao, Nishanth Menon, Santosh Shilimkar, Peter Ujfalusi,
	Tony Lindgren, Rajendra Nayak, Sricharan R, Afzal Mohammed,
	Keerthy, Dan Carpenter, Zhou Wang, Felipe Balbi,
	Laurent Pinchart, Thomas Gleixner, Randy Dunlap, Kukjin Kim,
	Rafael J. Wysocki, Quentin Lambert, Eyal Perry, Arnd Bergmann,
	Peter Zijlstra, linux-doc, lkml, linux-mips, iss_storagedev,
	linux-mtd, linux-usb

On Fri, Mar 6, 2015 at 8:41 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Thu, Mar 5, 2015 at 5:11 AM, Hannes Reinecke <hare@suse.de> wrote:
>> On 03/05/2015 01:59 PM, Valentin Rothberg wrote:
>>> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
>>> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
>>> core code").
>>>
>>> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
>>> interrupts disabled") running IRQ handlers with interrupts enabled can
>>> cause stack overflows when the interrupt line of the issuing device is
>>> still active.
>>>
>>> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
>>> in older versions of Linux) and removes the definition and all remaining
>>> usages of this flag.
>>>
>>> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
>>> ---
>>> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
>>> as IRQF_DISABLED is gone now; the usage in older kernel versions
>>> (including the old SA_INTERRUPT flag) should be discouraged.  The
>>> trouble of using IRQF_SHARED is a general problem and not specific to
>>> any driver.
>>>
>>> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
>>> it has already been removed in linux-next by commit b0e1ee8e1405
>>> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
>>>
>>> All remaining references are changelogs that I suggest to keep.
>>
>> While you're at it: having '0x0' as a value for the irq flags looks
>> a bit silly, and makes you wonder what the parameter is for.
>>
>> I would rather like to have
>>
>> #define IRQF_NONE 0x0
>>
>> and use it for these cases.
>> That way the scope of that parameter is clear.
>
> No, that would imply that IRQ never triggers whereas passing 0 means
> we keep triggers that have been set by the platform.

Are you against introducing a new flag or just don't like 'IRQF_NONE'?
 I think that passing 0 could mean anything when one does not know the
semantics.  Combining yours and Hannes' proposal could look like this:

#define IRQF_PLAT 0x0 - keep triggers that have been set by the platform

I wrote a Coccinelle script to check for such 0-flags and find 758
cases in current Linus' mainline.  The script only checks function
calls to {devm_}request_{threaded_}IRQ() but does not find flags
passed to wrapper functions or flags that are stored in a struct etc.

Kind regards,
 Valentin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-05 14:23 ` [PATCH v2] " Valentin Rothberg
                     ` (2 preceding siblings ...)
  2015-03-06 18:46   ` Brian Norris
@ 2015-03-09 16:52   ` Felipe Balbi
  2015-03-09 17:24     ` Valentin Rothberg
  3 siblings, 1 reply; 14+ messages in thread
From: Felipe Balbi @ 2015-03-09 16:52 UTC (permalink / raw)
  To: Valentin Rothberg
  Cc: akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Brian Norris, Greg Kroah-Hartman, Paul Bolle, Jiri Kosina,
	Hannes Reinecke, Ewan Milne, Christoph Hellwig, Hongliang Tao,
	Huacai Chen, Nishanth Menon, Peter Ujfalusi, Tony Lindgren,
	Afzal Mohammed, Keerthy, Zhou Wang, Dan Carpenter, Felipe Balbi,
	Laurent Pinchart, Thomas Gleixner, Quentin Lambert,
	Arnd Bergmann, Ingo Molnar, Eyal Perry, Peter Zijlstra,
	linux-doc, linux-kernel, linux-mips, iss_storagedev, linux-mtd,
	linux-usb

[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]

Hi,

On Thu, Mar 05, 2015 at 03:23:08PM +0100, Valentin Rothberg wrote:
> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
> core code").
> 
> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
> interrupts disabled") running IRQ handlers with interrupts enabled can
> cause stack overflows when the interrupt line of the issuing device is
> still active.
> 
> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
> in older versions of Linux) and removes the definition and all remaining
> usages of this flag.
> 
> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
> ---
> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
> as IRQF_DISABLED is gone now; the usage in older kernel versions
> (including the old SA_INTERRUPT flag) should be discouraged.  The
> trouble of using IRQF_SHARED is a general problem and not specific to
> any driver.
> 
> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
> it has already been removed in linux-next by commit b0e1ee8e1405
> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
> 
> All remaining references are changelogs that I suggest to keep.
> 
> Changelog
> 
> v2: Correct previous change to drivers/mtd/nand/hisi504_nand.c that
> broke compilation.  Reported by Dan Carpenter.
> ---
>  drivers/usb/isp1760/isp1760-core.c   |  3 +--
>  drivers/usb/isp1760/isp1760-udc.c    |  4 ++--

I have a commit in my tree for isp1760:

https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?h=testing/fixes&id=80b4a0f8feeb6ee7fa4430a2b4ae1155ed923bd2

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-09 16:52   ` Felipe Balbi
@ 2015-03-09 17:24     ` Valentin Rothberg
  2015-03-09 17:29       ` Felipe Balbi
  0 siblings, 1 reply; 14+ messages in thread
From: Valentin Rothberg @ 2015-03-09 17:24 UTC (permalink / raw)
  To: balbi
  Cc: akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Brian Norris, Greg Kroah-Hartman, Paul Bolle, Jiri Kosina,
	Hannes Reinecke, Ewan Milne, Christoph Hellwig, Hongliang Tao,
	Huacai Chen, Nishanth Menon, Peter Ujfalusi, Tony Lindgren,
	Afzal Mohammed, Keerthy, Zhou Wang, Dan Carpenter,
	Laurent Pinchart, Thomas Gleixner, Quentin Lambert,
	Arnd Bergmann, Ingo Molnar, Eyal Perry, Peter Zijlstra,
	linux-doc, linux-kernel, linux-mips, iss_storagedev, linux-mtd,
	linux-usb

On Mon, Mar 9, 2015 at 5:52 PM, Felipe Balbi <balbi@ti.com> wrote:
> Hi,
>
> On Thu, Mar 05, 2015 at 03:23:08PM +0100, Valentin Rothberg wrote:
>> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
>> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
>> core code").
>>
>> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
>> interrupts disabled") running IRQ handlers with interrupts enabled can
>> cause stack overflows when the interrupt line of the issuing device is
>> still active.
>>
>> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
>> in older versions of Linux) and removes the definition and all remaining
>> usages of this flag.
>>
>> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
>> ---
>> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
>> as IRQF_DISABLED is gone now; the usage in older kernel versions
>> (including the old SA_INTERRUPT flag) should be discouraged.  The
>> trouble of using IRQF_SHARED is a general problem and not specific to
>> any driver.
>>
>> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
>> it has already been removed in linux-next by commit b0e1ee8e1405
>> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
>>
>> All remaining references are changelogs that I suggest to keep.
>>
>> Changelog
>>
>> v2: Correct previous change to drivers/mtd/nand/hisi504_nand.c that
>> broke compilation.  Reported by Dan Carpenter.
>> ---
>>  drivers/usb/isp1760/isp1760-core.c   |  3 +--
>>  drivers/usb/isp1760/isp1760-udc.c    |  4 ++--
>
> I have a commit in my tree for isp1760:
>
> https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?h=testing/fixes&id=80b4a0f8feeb6ee7fa4430a2b4ae1155ed923bd2

I am sorry, but I did not receive an email that it has been applied.
Andrew asked me to do this patch, so I replied to the one you
mentioned to avoid this conflict:

http://comments.gmane.org/gmane.linux.kernel/1896211

Kind regards,
 Valentin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] Remove deprecated IRQF_DISABLED flag entirely
  2015-03-09 17:24     ` Valentin Rothberg
@ 2015-03-09 17:29       ` Felipe Balbi
  0 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2015-03-09 17:29 UTC (permalink / raw)
  To: Valentin Rothberg
  Cc: balbi, akpm, Jonathan Corbet, Ralf Baechle, David Woodhouse,
	Brian Norris, Greg Kroah-Hartman, Paul Bolle, Jiri Kosina,
	Hannes Reinecke, Ewan Milne, Christoph Hellwig, Hongliang Tao,
	Huacai Chen, Nishanth Menon, Peter Ujfalusi, Tony Lindgren,
	Afzal Mohammed, Keerthy, Zhou Wang, Dan Carpenter,
	Laurent Pinchart, Thomas Gleixner, Quentin Lambert,
	Arnd Bergmann, Ingo Molnar, Eyal Perry, Peter Zijlstra,
	linux-doc, linux-kernel, linux-mips, iss_storagedev, linux-mtd,
	linux-usb

[-- Attachment #1: Type: text/plain, Size: 2303 bytes --]

On Mon, Mar 09, 2015 at 06:24:29PM +0100, Valentin Rothberg wrote:
> On Mon, Mar 9, 2015 at 5:52 PM, Felipe Balbi <balbi@ti.com> wrote:
> > Hi,
> >
> > On Thu, Mar 05, 2015 at 03:23:08PM +0100, Valentin Rothberg wrote:
> >> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
> >> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
> >> core code").
> >>
> >> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
> >> interrupts disabled") running IRQ handlers with interrupts enabled can
> >> cause stack overflows when the interrupt line of the issuing device is
> >> still active.
> >>
> >> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
> >> in older versions of Linux) and removes the definition and all remaining
> >> usages of this flag.
> >>
> >> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
> >> ---
> >> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
> >> as IRQF_DISABLED is gone now; the usage in older kernel versions
> >> (including the old SA_INTERRUPT flag) should be discouraged.  The
> >> trouble of using IRQF_SHARED is a general problem and not specific to
> >> any driver.
> >>
> >> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
> >> it has already been removed in linux-next by commit b0e1ee8e1405
> >> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
> >>
> >> All remaining references are changelogs that I suggest to keep.
> >>
> >> Changelog
> >>
> >> v2: Correct previous change to drivers/mtd/nand/hisi504_nand.c that
> >> broke compilation.  Reported by Dan Carpenter.
> >> ---
> >>  drivers/usb/isp1760/isp1760-core.c   |  3 +--
> >>  drivers/usb/isp1760/isp1760-udc.c    |  4 ++--
> >
> > I have a commit in my tree for isp1760:
> >
> > https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?h=testing/fixes&id=80b4a0f8feeb6ee7fa4430a2b4ae1155ed923bd2
> 
> I am sorry, but I did not receive an email that it has been applied.
> Andrew asked me to do this patch, so I replied to the one you
> mentioned to avoid this conflict:

it's still in my testing/fixes, it'll be moved to fixes after I finish
testing that branch, then you'll receive an email

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-03-09 17:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-05 12:59 [PATCH] Remove deprecated IRQF_DISABLED flag entirely Valentin Rothberg
2015-03-05 13:08 ` Dan Carpenter
2015-03-05 13:33   ` Valentin Rothberg
2015-03-05 13:11 ` Hannes Reinecke
2015-03-05 13:41   ` Valentin Rothberg
2015-03-06 19:41   ` Dmitry Torokhov
2015-03-09  8:41     ` Valentin Rothberg
2015-03-05 14:23 ` [PATCH v2] " Valentin Rothberg
2015-03-06  8:37   ` [tip:irq/core] genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() " tip-bot for Valentin Rothberg
2015-03-06 18:31   ` [PATCH v2] Remove deprecated IRQF_DISABLED " Tony Lindgren
2015-03-06 18:46   ` Brian Norris
2015-03-09 16:52   ` Felipe Balbi
2015-03-09 17:24     ` Valentin Rothberg
2015-03-09 17:29       ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).