* [PATCH] usb/isp1760: set IRQ flags properly
@ 2015-02-27 13:29 Valentin Rothberg
2015-02-27 15:24 ` Felipe Balbi
2015-03-01 15:54 ` [PATCH v2] " Valentin Rothberg
0 siblings, 2 replies; 7+ messages in thread
From: Valentin Rothberg @ 2015-02-27 13:29 UTC (permalink / raw)
To: gregkh, balbi, laurent.pinchart, linux-kernel, linux-usb
Cc: Valentin Rothberg
The IRQF_DISABLED is a NOOP and scheduled to be removed. 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 removes using this deprecated flag and additionally removes
redundantly setting IRQF_SHARED.
Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
---
drivers/usb/isp1760/isp1760-core.c | 5 ++---
drivers/usb/isp1760/isp1760-udc.c | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/isp1760/isp1760-core.c b/drivers/usb/isp1760/isp1760-core.c
index b982755..9f4a0de 100644
--- a/drivers/usb/isp1760/isp1760-core.c
+++ b/drivers/usb/isp1760/isp1760-core.c
@@ -145,14 +145,13 @@ int isp1760_register(struct resource *mem, int irq, unsigned long irqflags,
if (IS_ENABLED(CONFIG_USB_ISP1760_HCD) && !usb_disabled()) {
ret = isp1760_hcd_register(&isp->hcd, isp->regs, mem, irq,
- irqflags | IRQF_SHARED, dev);
+ irqflags, dev);
if (ret < 0)
return ret;
}
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);
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;
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb/isp1760: set IRQ flags properly
2015-02-27 13:29 [PATCH] usb/isp1760: set IRQ flags properly Valentin Rothberg
@ 2015-02-27 15:24 ` Felipe Balbi
2015-02-27 15:48 ` Valentin Rothberg
2015-03-01 15:54 ` [PATCH v2] " Valentin Rothberg
1 sibling, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2015-02-27 15:24 UTC (permalink / raw)
To: Valentin Rothberg
Cc: gregkh, balbi, laurent.pinchart, linux-kernel, linux-usb
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
On Fri, Feb 27, 2015 at 02:29:40PM +0100, Valentin Rothberg wrote:
> The IRQF_DISABLED is a NOOP and scheduled to be removed. 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 removes using this deprecated flag and additionally removes
> redundantly setting IRQF_SHARED.
why is it redundant ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb/isp1760: set IRQ flags properly
2015-02-27 15:24 ` Felipe Balbi
@ 2015-02-27 15:48 ` Valentin Rothberg
2015-02-27 15:51 ` Felipe Balbi
0 siblings, 1 reply; 7+ messages in thread
From: Valentin Rothberg @ 2015-02-27 15:48 UTC (permalink / raw)
To: balbi; +Cc: Greg KH, laurent.pinchart, linux-kernel, linux-usb
On Fri, Feb 27, 2015 at 4:24 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Fri, Feb 27, 2015 at 02:29:40PM +0100, Valentin Rothberg wrote:
>> The IRQF_DISABLED is a NOOP and scheduled to be removed. 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 removes using this deprecated flag and additionally removes
>> redundantly setting IRQF_SHARED.
>
> why is it redundant ?
It's redundant in the call of isp1760_udc_register() as this function
sets the flag by requesting the IRQ. I mistakenly removed it also in
the call of isp1760_hcd_register() which does not alter the passed
irqflags. I will fix this in a second version of this patch. I am
sorry for this mistake.
Valentin
> --
> balbi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb/isp1760: set IRQ flags properly
2015-02-27 15:48 ` Valentin Rothberg
@ 2015-02-27 15:51 ` Felipe Balbi
0 siblings, 0 replies; 7+ messages in thread
From: Felipe Balbi @ 2015-02-27 15:51 UTC (permalink / raw)
To: Valentin Rothberg
Cc: balbi, Greg KH, laurent.pinchart, linux-kernel, linux-usb
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
On Fri, Feb 27, 2015 at 04:48:39PM +0100, Valentin Rothberg wrote:
> On Fri, Feb 27, 2015 at 4:24 PM, Felipe Balbi <balbi@ti.com> wrote:
> > On Fri, Feb 27, 2015 at 02:29:40PM +0100, Valentin Rothberg wrote:
> >> The IRQF_DISABLED is a NOOP and scheduled to be removed. 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 removes using this deprecated flag and additionally removes
> >> redundantly setting IRQF_SHARED.
> >
> > why is it redundant ?
>
> It's redundant in the call of isp1760_udc_register() as this function
> sets the flag by requesting the IRQ. I mistakenly removed it also in
> the call of isp1760_hcd_register() which does not alter the passed
> irqflags. I will fix this in a second version of this patch. I am
> sorry for this mistake.
no problem, s**t happens ;)
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] usb/isp1760: set IRQ flags properly
2015-02-27 13:29 [PATCH] usb/isp1760: set IRQ flags properly Valentin Rothberg
2015-02-27 15:24 ` Felipe Balbi
@ 2015-03-01 15:54 ` Valentin Rothberg
2015-03-02 15:30 ` laurent.pinchart
1 sibling, 1 reply; 7+ messages in thread
From: Valentin Rothberg @ 2015-03-01 15:54 UTC (permalink / raw)
To: valentin.rothberg, gregkh, balbi, laurent.pinchart, linux-usb,
linux-kernel
Cc: Valentin Rothberg
The IRQF_DISABLED is a NOOP and scheduled to be removed. 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 removes using this deprecated flag and additionally removes
redundantly setting IRQF_SHARED for isp1760_udc_register().
Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
---
v2: Reverted change that removed IRQF_SHARED in the call of
isp1760_hcd_register().
---
drivers/usb/isp1760/isp1760-core.c | 3 +--
drivers/usb/isp1760/isp1760-udc.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/isp1760/isp1760-core.c b/drivers/usb/isp1760/isp1760-core.c
index b982755..bfa402c 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);
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;
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] usb/isp1760: set IRQ flags properly
2015-03-01 15:54 ` [PATCH v2] " Valentin Rothberg
@ 2015-03-02 15:30 ` laurent.pinchart
2015-03-04 9:15 ` Valentin Rothberg
0 siblings, 1 reply; 7+ messages in thread
From: laurent.pinchart @ 2015-03-02 15:30 UTC (permalink / raw)
To: Valentin.Rothberg
Cc: gregkh, balbi, linux-usb, linux-kernel, valentin.rothberg
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 2287 bytes --]
Hi Valentin,
Thank you for the patch.
On Sun Mar 01 2015 17:54:32 GMT+0200 (EET), Valentin Rothberg wrote:
> The IRQF_DISABLED is a NOOP and scheduled to be removed. 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 removes using this deprecated flag and additionally removes
> redundantly setting IRQF_SHARED for isp1760_udc_register().
>
> Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> v2: Reverted change that removed IRQF_SHARED in the call of
> isp1760_hcd_register().
> ---
> drivers/usb/isp1760/isp1760-core.c | 3 +--
> drivers/usb/isp1760/isp1760-udc.c | 4 ++--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/isp1760/isp1760-core.c b/drivers/usb/isp1760/isp1760-core.c
> index b982755..bfa402c 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);
> 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;
>
> --
> 1.9.1
>
>ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] usb/isp1760: set IRQ flags properly
2015-03-02 15:30 ` laurent.pinchart
@ 2015-03-04 9:15 ` Valentin Rothberg
0 siblings, 0 replies; 7+ messages in thread
From: Valentin Rothberg @ 2015-03-04 9:15 UTC (permalink / raw)
To: laurent.pinchart; +Cc: Greg KH, balbi, linux-usb, linux-kernel
Andrew Morton asked me to prepare a big patch that removes
IRQF_DISABLED entirely (see https://lkml.org/lkml/2015/3/2/819). It
seems a good way to get rid of the few references and the definition
at once.
So please don't apply this patch. After, I can prepare another patch
later that takes care of the redundant setting of IRQF_SHARED for
isp1760_udc_register().
Kind regards,
Valentin
On Mon, Mar 2, 2015 at 4:30 PM, <laurent.pinchart@ideasonboard.com> wrote:
> Hi Valentin,
>
> Thank you for the patch.
>
> On Sun Mar 01 2015 17:54:32 GMT+0200 (EET), Valentin Rothberg wrote:
>> The IRQF_DISABLED is a NOOP and scheduled to be removed. 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 removes using this deprecated flag and additionally removes
>> redundantly setting IRQF_SHARED for isp1760_udc_register().
>>
>> Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
>> ---
>> v2: Reverted change that removed IRQF_SHARED in the call of
>> isp1760_hcd_register().
>> ---
>> drivers/usb/isp1760/isp1760-core.c | 3 +--
>> drivers/usb/isp1760/isp1760-udc.c | 4 ++--
>> 2 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/isp1760/isp1760-core.c b/drivers/usb/isp1760/isp1760-core.c
>> index b982755..bfa402c 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);
>> 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;
>>
>> --
>> 1.9.1
>>
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-03-04 9:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 13:29 [PATCH] usb/isp1760: set IRQ flags properly Valentin Rothberg
2015-02-27 15:24 ` Felipe Balbi
2015-02-27 15:48 ` Valentin Rothberg
2015-02-27 15:51 ` Felipe Balbi
2015-03-01 15:54 ` [PATCH v2] " Valentin Rothberg
2015-03-02 15:30 ` laurent.pinchart
2015-03-04 9:15 ` Valentin Rothberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®