All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-06-28 16:17 ` Kevin Hilman
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Hilman @ 2012-06-28 16:17 UTC (permalink / raw)
  To: rtc-linux, linux-omap; +Cc: Alessandro Zummo, Thomas Gleixner, linux-arm-kernel

Requesting a threaded interrupt without a primary handler and without
IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
bogus threaded irq requests), these requests are rejected.  This
causes ->probe() to fail, and the RTC driver not to be availble.

To fix, add IRQF_ONESHOT to the IRQ flags.

Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
to wake from system suspend multiple times.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
This fix is needed in v3.5.
Applies on top of v3.5-rc4.

 drivers/rtc/rtc-twl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 258abea..c5d06fe 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
 	}
 
 	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
-				   IRQF_TRIGGER_RISING,
+				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				   dev_name(&rtc->dev), rtc);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "IRQ is not free.\n");
-- 
1.7.9.2

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

* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-06-28 16:17 ` Kevin Hilman
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Hilman @ 2012-06-28 16:17 UTC (permalink / raw)
  To: linux-arm-kernel

Requesting a threaded interrupt without a primary handler and without
IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
bogus threaded irq requests), these requests are rejected.  This
causes ->probe() to fail, and the RTC driver not to be availble.

To fix, add IRQF_ONESHOT to the IRQ flags.

Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
to wake from system suspend multiple times.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
This fix is needed in v3.5.
Applies on top of v3.5-rc4.

 drivers/rtc/rtc-twl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 258abea..c5d06fe 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
 	}
 
 	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
-				   IRQF_TRIGGER_RISING,
+				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				   dev_name(&rtc->dev), rtc);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "IRQ is not free.\n");
-- 
1.7.9.2

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

* Re: [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
  2012-06-28 16:17 ` Kevin Hilman
@ 2012-07-06 14:25   ` Hilman, Kevin
  -1 siblings, 0 replies; 12+ messages in thread
From: Hilman, Kevin @ 2012-07-06 14:25 UTC (permalink / raw)
  To: Alessandro Zummo, rtc-linux; +Cc: linux-arm-kernel, Thomas Gleixner, linux-omap

Alessandro,

Gentle reminder ping on this one so it can make it in for v3.5-rc.   Thanks.

On Thu, Jun 28, 2012 at 9:17 AM, Kevin Hilman <khilman@ti.com> wrote:
> Requesting a threaded interrupt without a primary handler and without
> IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
> bogus threaded irq requests), these requests are rejected.  This
> causes ->probe() to fail, and the RTC driver not to be availble.
>
> To fix, add IRQF_ONESHOT to the IRQ flags.
>
> Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
> to wake from system suspend multiple times.
>
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
> This fix is needed in v3.5.
> Applies on top of v3.5-rc4.
>
>  drivers/rtc/rtc-twl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
> index 258abea..c5d06fe 100644
> --- a/drivers/rtc/rtc-twl.c
> +++ b/drivers/rtc/rtc-twl.c
> @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
>         }
>
>         ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
> -                                  IRQF_TRIGGER_RISING,
> +                                  IRQF_TRIGGER_RISING | IRQF_ONESHOT,
>                                    dev_name(&rtc->dev), rtc);
>         if (ret < 0) {
>                 dev_err(&pdev->dev, "IRQ is not free.\n");
> --
> 1.7.9.2
>

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

* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-07-06 14:25   ` Hilman, Kevin
  0 siblings, 0 replies; 12+ messages in thread
From: Hilman, Kevin @ 2012-07-06 14:25 UTC (permalink / raw)
  To: linux-arm-kernel

Alessandro,

Gentle reminder ping on this one so it can make it in for v3.5-rc.   Thanks.

On Thu, Jun 28, 2012 at 9:17 AM, Kevin Hilman <khilman@ti.com> wrote:
> Requesting a threaded interrupt without a primary handler and without
> IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
> bogus threaded irq requests), these requests are rejected.  This
> causes ->probe() to fail, and the RTC driver not to be availble.
>
> To fix, add IRQF_ONESHOT to the IRQ flags.
>
> Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
> to wake from system suspend multiple times.
>
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
> This fix is needed in v3.5.
> Applies on top of v3.5-rc4.
>
>  drivers/rtc/rtc-twl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
> index 258abea..c5d06fe 100644
> --- a/drivers/rtc/rtc-twl.c
> +++ b/drivers/rtc/rtc-twl.c
> @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
>         }
>
>         ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
> -                                  IRQF_TRIGGER_RISING,
> +                                  IRQF_TRIGGER_RISING | IRQF_ONESHOT,
>                                    dev_name(&rtc->dev), rtc);
>         if (ret < 0) {
>                 dev_err(&pdev->dev, "IRQ is not free.\n");
> --
> 1.7.9.2
>

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

* Re: [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
  2012-07-09 22:15   ` Andrew Morton
@ 2012-07-10 11:54     ` Mark Brown
  -1 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2012-07-10 11:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kevin Hilman, Alessandro Zummo, rtc-linux, linux-kernel,
	Thomas Gleixner, linux-omap, linux-arm-kernel

On Mon, Jul 09, 2012 at 03:15:27PM -0700, Andrew Morton wrote:

> OK, this is the second such patch I've seen and it's time to wonder if
> we should get grumpy at tglx.  afacit 1c6c6952 broke the following
> drivers:

> sound/soc/codecs/wm8994.c
> drivers/mfd/wm831x-auxadc.c
> drivers/mfd/wm8350-core.c
> drivers/regulator/wm831x-isink.c
> drivers/regulator/wm831x-ldo.c
> drivers/regulator/wm831x-dcdc.c
> drivers/input/misc/wm831x-on.c

> what am I missing here?

At least the above (and possibly a good proportion of the others from
the looks of things) aren't affected by this change because they are
nested IRQs for MFDs where we can guarantee that there will never be a
primary IRQ.  _ONESHOT shouldn't make any odds in these situations.

> drivers/base/regmap/regmap-irq.c

This is using irq_flags passed in by the caller so should be unaffected,
it's always been the responsibility of the caller to set the flags.

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

* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-07-10 11:54     ` Mark Brown
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2012-07-10 11:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 03:15:27PM -0700, Andrew Morton wrote:

> OK, this is the second such patch I've seen and it's time to wonder if
> we should get grumpy at tglx.  afacit 1c6c6952 broke the following
> drivers:

> sound/soc/codecs/wm8994.c
> drivers/mfd/wm831x-auxadc.c
> drivers/mfd/wm8350-core.c
> drivers/regulator/wm831x-isink.c
> drivers/regulator/wm831x-ldo.c
> drivers/regulator/wm831x-dcdc.c
> drivers/input/misc/wm831x-on.c

> what am I missing here?

At least the above (and possibly a good proportion of the others from
the looks of things) aren't affected by this change because they are
nested IRQs for MFDs where we can guarantee that there will never be a
primary IRQ.  _ONESHOT shouldn't make any odds in these situations.

> drivers/base/regmap/regmap-irq.c

This is using irq_flags passed in by the caller so should be unaffected,
it's always been the responsibility of the caller to set the flags.

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

* Re: [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
  2012-07-09 22:15   ` Andrew Morton
@ 2012-07-10  7:32     ` Lars-Peter Clausen
  -1 siblings, 0 replies; 12+ messages in thread
From: Lars-Peter Clausen @ 2012-07-10  7:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kevin Hilman, Alessandro Zummo, rtc-linux, linux-kernel,
	Thomas Gleixner, linux-omap, linux-arm-kernel

On 07/10/2012 12:15 AM, Andrew Morton wrote:
> On Fri,  6 Jul 2012 09:33:54 -0700
> Kevin Hilman <khilman@ti.com> wrote:
> 
>> Requesting a threaded interrupt without a primary handler and without
>> IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
>> bogus threaded irq requests), these requests are rejected.  This
>> causes ->probe() to fail, and the RTC driver not to be availble.
>>
>> To fix, add IRQF_ONESHOT to the IRQ flags.
>>
>> Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
>> to wake from system suspend multiple times.
>>
>> Signed-off-by: Kevin Hilman <khilman@ti.com>
>> ---
>> Resending to broader audience and including Andrew.  Since, I understand
>> that drivers/rtc is somewhat orphaned, Andrew, can you queue this fix for
>> v3.5.  Thanks.
>>
>>  drivers/rtc/rtc-twl.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
>> index 258abea..c5d06fe 100644
>> --- a/drivers/rtc/rtc-twl.c
>> +++ b/drivers/rtc/rtc-twl.c
>> @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
>>  	}
>>  
>>  	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
>> -				   IRQF_TRIGGER_RISING,
>> +				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
>>  				   dev_name(&rtc->dev), rtc);
>>  	if (ret < 0) {
>>  		dev_err(&pdev->dev, "IRQ is not free.\n");
> 
> OK, this is the second such patch I've seen and it's time to wonder if
> we should get grumpy at tglx.  afacit 1c6c6952 broke the following
> drivers:

If you want to be grumpy, be grumpy at Linus. Thomas actually posted a patch
which just emits a warning, instead of failing to request the IRQ, but Linus
didn't want to take it. The whole thread is here
https://lkml.org/lkml/2012/6/12/151

> 
> 
> sound/soc/codecs/wm8994.c
> sound/soc/codecs/max98095.c
> sound/soc/codecs/twl6040.c
> drivers/usb/otg/ab8500-usb.c
> drivers/usb/otg/twl4030-usb.c
> drivers/gpio/gpio-sx150x.c
> drivers/gpio/gpio-ab8500.c
> drivers/mfd/ab8500-gpadc.c
> drivers/mfd/ti-ssp.c
> drivers/mfd/twl4030-madc.c
> drivers/mfd/htc-i2cpld.c
> drivers/mfd/wm831x-auxadc.c
> drivers/mfd/twl6040-core.c
> drivers/mfd/wm8350-core.c
> drivers/extcon/extcon-max8997.c
> drivers/mmc/host/of_mmc_spi.c
> drivers/mmc/core/cd-gpio.c
> drivers/net/can/mcp251x.c
> drivers/nfc/pn544_hci.c
> drivers/nfc/pn544.c
> drivers/power/ab8500_btemp.c
> drivers/power/twl4030_charger.c
> drivers/power/lp8727_charger.c
> drivers/power/smb347-charger.c
> drivers/power/max17042_battery.c
> drivers/power/wm831x_power.c
> drivers/power/ab8500_fg.c
> drivers/power/max8903_charger.c
> drivers/power/ab8500_charger.c
> drivers/regulator/wm831x-isink.c
> drivers/regulator/wm831x-ldo.c
> drivers/regulator/wm831x-dcdc.c
> drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
> drivers/staging/iio/adc/adt7310.c
> drivers/staging/iio/adc/adt7410.c
> drivers/staging/iio/adc/ad7816.c
> drivers/staging/iio/cdc/ad7150.c
> drivers/staging/iio/accel/sca3000_core.c
> drivers/staging/cptm1217/clearpad_tm1217.c
> drivers/input/keyboard/tc3589x-keypad.c
> drivers/input/keyboard/twl4030_keypad.c
> drivers/input/misc/twl4030-pwrbutton.c
> drivers/input/misc/twl6040-vibra.c
> drivers/input/misc/wm831x-on.c
> drivers/media/radio/si470x/radio-si470x-i2c.c
> drivers/base/regmap/regmap-irq.c
> drivers/rtc/rtc-wm831x.c
> drivers/rtc/rtc-twl.c
> drivers/rtc/rtc-ab8500.c
> drivers/rtc/rtc-max8998.c
> drivers/rtc/rtc-isl1208.c
> drivers/platform/x86/intel_mid_powerbtn.c
> include/linux/mfd/wm8994/core.h
> include/linux/mfd/wm8350/core.h
> 
> what am I missing here?
> 

Most of these drivers are not broken (anymore), the majority drivers which
were broken by Thomas's patch have already been fixed. As for your list:
I've already sent out a fix for all of the staging/iio/ drivers a couple of
days ago. And drivers which use nested interrupts are not affected by this
problem. In your list these are basically all drivers with wm*, twl* and
ab8500 in their names. But still leaves a handful of broken driver which
should be fixed.

- Lars

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

* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-07-10  7:32     ` Lars-Peter Clausen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars-Peter Clausen @ 2012-07-10  7:32 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/10/2012 12:15 AM, Andrew Morton wrote:
> On Fri,  6 Jul 2012 09:33:54 -0700
> Kevin Hilman <khilman@ti.com> wrote:
> 
>> Requesting a threaded interrupt without a primary handler and without
>> IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
>> bogus threaded irq requests), these requests are rejected.  This
>> causes ->probe() to fail, and the RTC driver not to be availble.
>>
>> To fix, add IRQF_ONESHOT to the IRQ flags.
>>
>> Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
>> to wake from system suspend multiple times.
>>
>> Signed-off-by: Kevin Hilman <khilman@ti.com>
>> ---
>> Resending to broader audience and including Andrew.  Since, I understand
>> that drivers/rtc is somewhat orphaned, Andrew, can you queue this fix for
>> v3.5.  Thanks.
>>
>>  drivers/rtc/rtc-twl.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
>> index 258abea..c5d06fe 100644
>> --- a/drivers/rtc/rtc-twl.c
>> +++ b/drivers/rtc/rtc-twl.c
>> @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
>>  	}
>>  
>>  	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
>> -				   IRQF_TRIGGER_RISING,
>> +				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
>>  				   dev_name(&rtc->dev), rtc);
>>  	if (ret < 0) {
>>  		dev_err(&pdev->dev, "IRQ is not free.\n");
> 
> OK, this is the second such patch I've seen and it's time to wonder if
> we should get grumpy at tglx.  afacit 1c6c6952 broke the following
> drivers:

If you want to be grumpy, be grumpy at Linus. Thomas actually posted a patch
which just emits a warning, instead of failing to request the IRQ, but Linus
didn't want to take it. The whole thread is here
https://lkml.org/lkml/2012/6/12/151

> 
> 
> sound/soc/codecs/wm8994.c
> sound/soc/codecs/max98095.c
> sound/soc/codecs/twl6040.c
> drivers/usb/otg/ab8500-usb.c
> drivers/usb/otg/twl4030-usb.c
> drivers/gpio/gpio-sx150x.c
> drivers/gpio/gpio-ab8500.c
> drivers/mfd/ab8500-gpadc.c
> drivers/mfd/ti-ssp.c
> drivers/mfd/twl4030-madc.c
> drivers/mfd/htc-i2cpld.c
> drivers/mfd/wm831x-auxadc.c
> drivers/mfd/twl6040-core.c
> drivers/mfd/wm8350-core.c
> drivers/extcon/extcon-max8997.c
> drivers/mmc/host/of_mmc_spi.c
> drivers/mmc/core/cd-gpio.c
> drivers/net/can/mcp251x.c
> drivers/nfc/pn544_hci.c
> drivers/nfc/pn544.c
> drivers/power/ab8500_btemp.c
> drivers/power/twl4030_charger.c
> drivers/power/lp8727_charger.c
> drivers/power/smb347-charger.c
> drivers/power/max17042_battery.c
> drivers/power/wm831x_power.c
> drivers/power/ab8500_fg.c
> drivers/power/max8903_charger.c
> drivers/power/ab8500_charger.c
> drivers/regulator/wm831x-isink.c
> drivers/regulator/wm831x-ldo.c
> drivers/regulator/wm831x-dcdc.c
> drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
> drivers/staging/iio/adc/adt7310.c
> drivers/staging/iio/adc/adt7410.c
> drivers/staging/iio/adc/ad7816.c
> drivers/staging/iio/cdc/ad7150.c
> drivers/staging/iio/accel/sca3000_core.c
> drivers/staging/cptm1217/clearpad_tm1217.c
> drivers/input/keyboard/tc3589x-keypad.c
> drivers/input/keyboard/twl4030_keypad.c
> drivers/input/misc/twl4030-pwrbutton.c
> drivers/input/misc/twl6040-vibra.c
> drivers/input/misc/wm831x-on.c
> drivers/media/radio/si470x/radio-si470x-i2c.c
> drivers/base/regmap/regmap-irq.c
> drivers/rtc/rtc-wm831x.c
> drivers/rtc/rtc-twl.c
> drivers/rtc/rtc-ab8500.c
> drivers/rtc/rtc-max8998.c
> drivers/rtc/rtc-isl1208.c
> drivers/platform/x86/intel_mid_powerbtn.c
> include/linux/mfd/wm8994/core.h
> include/linux/mfd/wm8350/core.h
> 
> what am I missing here?
> 

Most of these drivers are not broken (anymore), the majority drivers which
were broken by Thomas's patch have already been fixed. As for your list:
I've already sent out a fix for all of the staging/iio/ drivers a couple of
days ago. And drivers which use nested interrupts are not affected by this
problem. In your list these are basically all drivers with wm*, twl* and
ab8500 in their names. But still leaves a handful of broken driver which
should be fixed.

- Lars

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

* Re: [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
  2012-07-06 16:33 ` Kevin Hilman
@ 2012-07-09 22:15   ` Andrew Morton
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2012-07-09 22:15 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: rtc-linux, Alessandro Zummo, linux-omap, linux-arm-kernel,
	linux-kernel, Thomas Gleixner

On Fri,  6 Jul 2012 09:33:54 -0700
Kevin Hilman <khilman@ti.com> wrote:

> Requesting a threaded interrupt without a primary handler and without
> IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
> bogus threaded irq requests), these requests are rejected.  This
> causes ->probe() to fail, and the RTC driver not to be availble.
> 
> To fix, add IRQF_ONESHOT to the IRQ flags.
> 
> Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
> to wake from system suspend multiple times.
> 
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
> Resending to broader audience and including Andrew.  Since, I understand
> that drivers/rtc is somewhat orphaned, Andrew, can you queue this fix for
> v3.5.  Thanks.
> 
>  drivers/rtc/rtc-twl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
> index 258abea..c5d06fe 100644
> --- a/drivers/rtc/rtc-twl.c
> +++ b/drivers/rtc/rtc-twl.c
> @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
>  	}
>  
>  	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
> -				   IRQF_TRIGGER_RISING,
> +				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
>  				   dev_name(&rtc->dev), rtc);
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "IRQ is not free.\n");

OK, this is the second such patch I've seen and it's time to wonder if
we should get grumpy at tglx.  afacit 1c6c6952 broke the following
drivers:


sound/soc/codecs/wm8994.c
sound/soc/codecs/max98095.c
sound/soc/codecs/twl6040.c
drivers/usb/otg/ab8500-usb.c
drivers/usb/otg/twl4030-usb.c
drivers/gpio/gpio-sx150x.c
drivers/gpio/gpio-ab8500.c
drivers/mfd/ab8500-gpadc.c
drivers/mfd/ti-ssp.c
drivers/mfd/twl4030-madc.c
drivers/mfd/htc-i2cpld.c
drivers/mfd/wm831x-auxadc.c
drivers/mfd/twl6040-core.c
drivers/mfd/wm8350-core.c
drivers/extcon/extcon-max8997.c
drivers/mmc/host/of_mmc_spi.c
drivers/mmc/core/cd-gpio.c
drivers/net/can/mcp251x.c
drivers/nfc/pn544_hci.c
drivers/nfc/pn544.c
drivers/power/ab8500_btemp.c
drivers/power/twl4030_charger.c
drivers/power/lp8727_charger.c
drivers/power/smb347-charger.c
drivers/power/max17042_battery.c
drivers/power/wm831x_power.c
drivers/power/ab8500_fg.c
drivers/power/max8903_charger.c
drivers/power/ab8500_charger.c
drivers/regulator/wm831x-isink.c
drivers/regulator/wm831x-ldo.c
drivers/regulator/wm831x-dcdc.c
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
drivers/staging/iio/adc/adt7310.c
drivers/staging/iio/adc/adt7410.c
drivers/staging/iio/adc/ad7816.c
drivers/staging/iio/cdc/ad7150.c
drivers/staging/iio/accel/sca3000_core.c
drivers/staging/cptm1217/clearpad_tm1217.c
drivers/input/keyboard/tc3589x-keypad.c
drivers/input/keyboard/twl4030_keypad.c
drivers/input/misc/twl4030-pwrbutton.c
drivers/input/misc/twl6040-vibra.c
drivers/input/misc/wm831x-on.c
drivers/media/radio/si470x/radio-si470x-i2c.c
drivers/base/regmap/regmap-irq.c
drivers/rtc/rtc-wm831x.c
drivers/rtc/rtc-twl.c
drivers/rtc/rtc-ab8500.c
drivers/rtc/rtc-max8998.c
drivers/rtc/rtc-isl1208.c
drivers/platform/x86/intel_mid_powerbtn.c
include/linux/mfd/wm8994/core.h
include/linux/mfd/wm8350/core.h

what am I missing here?

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

* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-07-09 22:15   ` Andrew Morton
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2012-07-09 22:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri,  6 Jul 2012 09:33:54 -0700
Kevin Hilman <khilman@ti.com> wrote:

> Requesting a threaded interrupt without a primary handler and without
> IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
> bogus threaded irq requests), these requests are rejected.  This
> causes ->probe() to fail, and the RTC driver not to be availble.
> 
> To fix, add IRQF_ONESHOT to the IRQ flags.
> 
> Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
> to wake from system suspend multiple times.
> 
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
> Resending to broader audience and including Andrew.  Since, I understand
> that drivers/rtc is somewhat orphaned, Andrew, can you queue this fix for
> v3.5.  Thanks.
> 
>  drivers/rtc/rtc-twl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
> index 258abea..c5d06fe 100644
> --- a/drivers/rtc/rtc-twl.c
> +++ b/drivers/rtc/rtc-twl.c
> @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
>  	}
>  
>  	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
> -				   IRQF_TRIGGER_RISING,
> +				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
>  				   dev_name(&rtc->dev), rtc);
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "IRQ is not free.\n");

OK, this is the second such patch I've seen and it's time to wonder if
we should get grumpy at tglx.  afacit 1c6c6952 broke the following
drivers:


sound/soc/codecs/wm8994.c
sound/soc/codecs/max98095.c
sound/soc/codecs/twl6040.c
drivers/usb/otg/ab8500-usb.c
drivers/usb/otg/twl4030-usb.c
drivers/gpio/gpio-sx150x.c
drivers/gpio/gpio-ab8500.c
drivers/mfd/ab8500-gpadc.c
drivers/mfd/ti-ssp.c
drivers/mfd/twl4030-madc.c
drivers/mfd/htc-i2cpld.c
drivers/mfd/wm831x-auxadc.c
drivers/mfd/twl6040-core.c
drivers/mfd/wm8350-core.c
drivers/extcon/extcon-max8997.c
drivers/mmc/host/of_mmc_spi.c
drivers/mmc/core/cd-gpio.c
drivers/net/can/mcp251x.c
drivers/nfc/pn544_hci.c
drivers/nfc/pn544.c
drivers/power/ab8500_btemp.c
drivers/power/twl4030_charger.c
drivers/power/lp8727_charger.c
drivers/power/smb347-charger.c
drivers/power/max17042_battery.c
drivers/power/wm831x_power.c
drivers/power/ab8500_fg.c
drivers/power/max8903_charger.c
drivers/power/ab8500_charger.c
drivers/regulator/wm831x-isink.c
drivers/regulator/wm831x-ldo.c
drivers/regulator/wm831x-dcdc.c
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
drivers/staging/iio/adc/adt7310.c
drivers/staging/iio/adc/adt7410.c
drivers/staging/iio/adc/ad7816.c
drivers/staging/iio/cdc/ad7150.c
drivers/staging/iio/accel/sca3000_core.c
drivers/staging/cptm1217/clearpad_tm1217.c
drivers/input/keyboard/tc3589x-keypad.c
drivers/input/keyboard/twl4030_keypad.c
drivers/input/misc/twl4030-pwrbutton.c
drivers/input/misc/twl6040-vibra.c
drivers/input/misc/wm831x-on.c
drivers/media/radio/si470x/radio-si470x-i2c.c
drivers/base/regmap/regmap-irq.c
drivers/rtc/rtc-wm831x.c
drivers/rtc/rtc-twl.c
drivers/rtc/rtc-ab8500.c
drivers/rtc/rtc-max8998.c
drivers/rtc/rtc-isl1208.c
drivers/platform/x86/intel_mid_powerbtn.c
include/linux/mfd/wm8994/core.h
include/linux/mfd/wm8350/core.h

what am I missing here?

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

* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-07-06 16:33 ` Kevin Hilman
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Hilman @ 2012-07-06 16:33 UTC (permalink / raw)
  To: Andrew Morton, rtc-linux, Alessandro Zummo
  Cc: linux-omap, linux-arm-kernel, linux-kernel

Requesting a threaded interrupt without a primary handler and without
IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
bogus threaded irq requests), these requests are rejected.  This
causes ->probe() to fail, and the RTC driver not to be availble.

To fix, add IRQF_ONESHOT to the IRQ flags.

Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
to wake from system suspend multiple times.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
Resending to broader audience and including Andrew.  Since, I understand
that drivers/rtc is somewhat orphaned, Andrew, can you queue this fix for
v3.5.  Thanks.

 drivers/rtc/rtc-twl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 258abea..c5d06fe 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
 	}
 
 	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
-				   IRQF_TRIGGER_RISING,
+				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				   dev_name(&rtc->dev), rtc);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "IRQ is not free.\n");
-- 
1.7.9.2


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

* [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
@ 2012-07-06 16:33 ` Kevin Hilman
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Hilman @ 2012-07-06 16:33 UTC (permalink / raw)
  To: linux-arm-kernel

Requesting a threaded interrupt without a primary handler and without
IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject
bogus threaded irq requests), these requests are rejected.  This
causes ->probe() to fail, and the RTC driver not to be availble.

To fix, add IRQF_ONESHOT to the IRQ flags.

Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake
to wake from system suspend multiple times.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
Resending to broader audience and including Andrew.  Since, I understand
that drivers/rtc is somewhat orphaned, Andrew, can you queue this fix for
v3.5.  Thanks.

 drivers/rtc/rtc-twl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 258abea..c5d06fe 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
 	}
 
 	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
-				   IRQF_TRIGGER_RISING,
+				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				   dev_name(&rtc->dev), rtc);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "IRQ is not free.\n");
-- 
1.7.9.2

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

end of thread, other threads:[~2012-07-10 11:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28 16:17 [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT Kevin Hilman
2012-06-28 16:17 ` Kevin Hilman
2012-07-06 14:25 ` Hilman, Kevin
2012-07-06 14:25   ` Hilman, Kevin
2012-07-06 16:33 Kevin Hilman
2012-07-06 16:33 ` Kevin Hilman
2012-07-09 22:15 ` Andrew Morton
2012-07-09 22:15   ` Andrew Morton
2012-07-10  7:32   ` Lars-Peter Clausen
2012-07-10  7:32     ` Lars-Peter Clausen
2012-07-10 11:54   ` Mark Brown
2012-07-10 11:54     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.