* [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
@ 2024-11-15 16:57 Ilpo Järvinen
2024-11-15 18:29 ` Stefan Wahren
2024-11-15 21:02 ` Bjorn Helgaas
0 siblings, 2 replies; 5+ messages in thread
From: Ilpo Järvinen @ 2024-11-15 16:57 UTC (permalink / raw)
To: Stefan Wahren, Florian Fainelli, Lukas Wunner, Ilpo Järvinen,
Bjorn Helgaas, Jonathan Cameron, linux-pci, linux-kernel
bwctrl cannot use IRQF_ONESHOT because it shares interrupt with other
service drivers that are not using IRQF_ONESHOT nor compatible with it.
Remove IRQF_ONESHOT from bwctrl and convert the irq thread to hardirq
handler. Rename the handler to pcie_bwnotif_irq() to indicate its new
purpose.
The IRQ handler is simple enough to not require not require other
changes.
Fixes: 058a4cb11620 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")
Reported-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@gmx.net/
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/pci/pcie/bwctrl.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
index ff5d12e01f9c..a6c65bbe3735 100644
--- a/drivers/pci/pcie/bwctrl.c
+++ b/drivers/pci/pcie/bwctrl.c
@@ -230,7 +230,7 @@ static void pcie_bwnotif_disable(struct pci_dev *port)
PCI_EXP_LNKCTL_LBMIE | PCI_EXP_LNKCTL_LABIE);
}
-static irqreturn_t pcie_bwnotif_irq_thread(int irq, void *context)
+static irqreturn_t pcie_bwnotif_irq(int irq, void *context)
{
struct pcie_device *srv = context;
struct pcie_bwctrl_data *data = srv->port->link_bwctrl;
@@ -302,10 +302,8 @@ static int pcie_bwnotif_probe(struct pcie_device *srv)
if (ret)
return ret;
- ret = devm_request_threaded_irq(&srv->device, srv->irq, NULL,
- pcie_bwnotif_irq_thread,
- IRQF_SHARED | IRQF_ONESHOT,
- "PCIe bwctrl", srv);
+ ret = devm_request_irq(&srv->device, srv->irq, pcie_bwnotif_irq,
+ IRQF_SHARED, "PCIe bwctrl", srv);
if (ret)
return ret;
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
2024-11-15 16:57 [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead Ilpo Järvinen
@ 2024-11-15 18:29 ` Stefan Wahren
2024-11-15 21:02 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Wahren @ 2024-11-15 18:29 UTC (permalink / raw)
To: Ilpo Järvinen, Florian Fainelli, Lukas Wunner, Bjorn Helgaas,
Jonathan Cameron, linux-pci, linux-kernel
Hi,
Am 15.11.24 um 17:57 schrieb Ilpo Järvinen:
> bwctrl cannot use IRQF_ONESHOT because it shares interrupt with other
> service drivers that are not using IRQF_ONESHOT nor compatible with it.
>
> Remove IRQF_ONESHOT from bwctrl and convert the irq thread to hardirq
> handler. Rename the handler to pcie_bwnotif_irq() to indicate its new
> purpose.
>
> The IRQ handler is simple enough to not require not require other
> changes.
>
> Fixes: 058a4cb11620 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")
> Reported-by: Stefan Wahren <wahrenst@gmx.net>
> Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@gmx.net/
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
this fixed the probing issue. Thanks
Tested-by: Stefan Wahren <wahrenst@gmx.net>
Is there anything more I can/should test?
> ---
> drivers/pci/pcie/bwctrl.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
> index ff5d12e01f9c..a6c65bbe3735 100644
> --- a/drivers/pci/pcie/bwctrl.c
> +++ b/drivers/pci/pcie/bwctrl.c
> @@ -230,7 +230,7 @@ static void pcie_bwnotif_disable(struct pci_dev *port)
> PCI_EXP_LNKCTL_LBMIE | PCI_EXP_LNKCTL_LABIE);
> }
>
> -static irqreturn_t pcie_bwnotif_irq_thread(int irq, void *context)
> +static irqreturn_t pcie_bwnotif_irq(int irq, void *context)
> {
> struct pcie_device *srv = context;
> struct pcie_bwctrl_data *data = srv->port->link_bwctrl;
> @@ -302,10 +302,8 @@ static int pcie_bwnotif_probe(struct pcie_device *srv)
> if (ret)
> return ret;
>
> - ret = devm_request_threaded_irq(&srv->device, srv->irq, NULL,
> - pcie_bwnotif_irq_thread,
> - IRQF_SHARED | IRQF_ONESHOT,
> - "PCIe bwctrl", srv);
> + ret = devm_request_irq(&srv->device, srv->irq, pcie_bwnotif_irq,
> + IRQF_SHARED, "PCIe bwctrl", srv);
> if (ret)
> return ret;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
2024-11-15 16:57 [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead Ilpo Järvinen
2024-11-15 18:29 ` Stefan Wahren
@ 2024-11-15 21:02 ` Bjorn Helgaas
2024-11-16 14:40 ` Ilpo Järvinen
1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2024-11-15 21:02 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Stefan Wahren, Florian Fainelli, Lukas Wunner, Bjorn Helgaas,
Jonathan Cameron, linux-pci, linux-kernel
On Fri, Nov 15, 2024 at 06:57:17PM +0200, Ilpo Järvinen wrote:
> bwctrl cannot use IRQF_ONESHOT because it shares interrupt with other
> service drivers that are not using IRQF_ONESHOT nor compatible with it.
>
> Remove IRQF_ONESHOT from bwctrl and convert the irq thread to hardirq
> handler. Rename the handler to pcie_bwnotif_irq() to indicate its new
> purpose.
>
> The IRQ handler is simple enough to not require not require other
> changes.
>
> Fixes: 058a4cb11620 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")
> Reported-by: Stefan Wahren <wahrenst@gmx.net>
> Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@gmx.net/
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Squashed into 058a4cb11620, thanks!
Also added your tested-by, Stefan, thanks very much for doing that!
> ---
> drivers/pci/pcie/bwctrl.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
> index ff5d12e01f9c..a6c65bbe3735 100644
> --- a/drivers/pci/pcie/bwctrl.c
> +++ b/drivers/pci/pcie/bwctrl.c
> @@ -230,7 +230,7 @@ static void pcie_bwnotif_disable(struct pci_dev *port)
> PCI_EXP_LNKCTL_LBMIE | PCI_EXP_LNKCTL_LABIE);
> }
>
> -static irqreturn_t pcie_bwnotif_irq_thread(int irq, void *context)
> +static irqreturn_t pcie_bwnotif_irq(int irq, void *context)
> {
> struct pcie_device *srv = context;
> struct pcie_bwctrl_data *data = srv->port->link_bwctrl;
> @@ -302,10 +302,8 @@ static int pcie_bwnotif_probe(struct pcie_device *srv)
> if (ret)
> return ret;
>
> - ret = devm_request_threaded_irq(&srv->device, srv->irq, NULL,
> - pcie_bwnotif_irq_thread,
> - IRQF_SHARED | IRQF_ONESHOT,
> - "PCIe bwctrl", srv);
> + ret = devm_request_irq(&srv->device, srv->irq, pcie_bwnotif_irq,
> + IRQF_SHARED, "PCIe bwctrl", srv);
> if (ret)
> return ret;
>
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
2024-11-15 21:02 ` Bjorn Helgaas
@ 2024-11-16 14:40 ` Ilpo Järvinen
2024-11-16 16:10 ` Bjorn Helgaas
0 siblings, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2024-11-16 14:40 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Stefan Wahren, Florian Fainelli, Lukas Wunner, Bjorn Helgaas,
Jonathan Cameron, linux-pci, LKML
[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]
On Fri, 15 Nov 2024, Bjorn Helgaas wrote:
> On Fri, Nov 15, 2024 at 06:57:17PM +0200, Ilpo Järvinen wrote:
> > bwctrl cannot use IRQF_ONESHOT because it shares interrupt with other
> > service drivers that are not using IRQF_ONESHOT nor compatible with it.
> >
> > Remove IRQF_ONESHOT from bwctrl and convert the irq thread to hardirq
> > handler. Rename the handler to pcie_bwnotif_irq() to indicate its new
> > purpose.
> >
> > The IRQ handler is simple enough to not require not require other
> > changes.
> >
> > Fixes: 058a4cb11620 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")
> > Reported-by: Stefan Wahren <wahrenst@gmx.net>
> > Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@gmx.net/
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>
> Squashed into 058a4cb11620, thanks!
>
> Also added your tested-by, Stefan, thanks very much for doing that!
Hi Bjorn,
You might want to also remove "3) ..." part from the commit message as it
still refers to threaded IRQ and IRQF_ONESHOT so it won't confuse anybody
when looking at this years from now :-).
--
i.
> > ---
> > drivers/pci/pcie/bwctrl.c | 8 +++-----
> > 1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/pci/pcie/bwctrl.c b/drivers/pci/pcie/bwctrl.c
> > index ff5d12e01f9c..a6c65bbe3735 100644
> > --- a/drivers/pci/pcie/bwctrl.c
> > +++ b/drivers/pci/pcie/bwctrl.c
> > @@ -230,7 +230,7 @@ static void pcie_bwnotif_disable(struct pci_dev *port)
> > PCI_EXP_LNKCTL_LBMIE | PCI_EXP_LNKCTL_LABIE);
> > }
> >
> > -static irqreturn_t pcie_bwnotif_irq_thread(int irq, void *context)
> > +static irqreturn_t pcie_bwnotif_irq(int irq, void *context)
> > {
> > struct pcie_device *srv = context;
> > struct pcie_bwctrl_data *data = srv->port->link_bwctrl;
> > @@ -302,10 +302,8 @@ static int pcie_bwnotif_probe(struct pcie_device *srv)
> > if (ret)
> > return ret;
> >
> > - ret = devm_request_threaded_irq(&srv->device, srv->irq, NULL,
> > - pcie_bwnotif_irq_thread,
> > - IRQF_SHARED | IRQF_ONESHOT,
> > - "PCIe bwctrl", srv);
> > + ret = devm_request_irq(&srv->device, srv->irq, pcie_bwnotif_irq,
> > + IRQF_SHARED, "PCIe bwctrl", srv);
> > if (ret)
> > return ret;
> >
> > --
> > 2.39.5
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
2024-11-16 14:40 ` Ilpo Järvinen
@ 2024-11-16 16:10 ` Bjorn Helgaas
0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2024-11-16 16:10 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Stefan Wahren, Florian Fainelli, Lukas Wunner, Bjorn Helgaas,
Jonathan Cameron, linux-pci, LKML
On Sat, Nov 16, 2024 at 04:40:51PM +0200, Ilpo Järvinen wrote:
> On Fri, 15 Nov 2024, Bjorn Helgaas wrote:
>
> > On Fri, Nov 15, 2024 at 06:57:17PM +0200, Ilpo Järvinen wrote:
> > > bwctrl cannot use IRQF_ONESHOT because it shares interrupt with other
> > > service drivers that are not using IRQF_ONESHOT nor compatible with it.
> > >
> > > Remove IRQF_ONESHOT from bwctrl and convert the irq thread to hardirq
> > > handler. Rename the handler to pcie_bwnotif_irq() to indicate its new
> > > purpose.
> > >
> > > The IRQ handler is simple enough to not require not require other
> > > changes.
> > >
> > > Fixes: 058a4cb11620 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")
> > > Reported-by: Stefan Wahren <wahrenst@gmx.net>
> > > Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@gmx.net/
> > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> >
> > Squashed into 058a4cb11620, thanks!
> >
> > Also added your tested-by, Stefan, thanks very much for doing that!
>
> Hi Bjorn,
>
> You might want to also remove "3) ..." part from the commit message as it
> still refers to threaded IRQ and IRQF_ONESHOT so it won't confuse anybody
> when looking at this years from now :-).
Removed, thanks for that!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-16 16:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 16:57 [PATCH 1/1] PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead Ilpo Järvinen
2024-11-15 18:29 ` Stefan Wahren
2024-11-15 21:02 ` Bjorn Helgaas
2024-11-16 14:40 ` Ilpo Järvinen
2024-11-16 16:10 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox