PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
Subsystems (2)
Ilpo Järvinen
maintainerPATCH 1/1 PCI/bwctrl: Remove IRQF_ONESHOT and handle hardirqs instead
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.
--- drivers/pci/pcie/bwctrl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/pci/pcie/bwctrl.c +3 -5
@@ -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;
Signature · 1 line
2.39.5
Hi,
Am 15.11.24 um 17:57 schrieb Ilpo Järvinen:
Quoted 7 lines
bwctrl cannot use
IRQF_ONESHOTbecause it shares interrupt with other service drivers that are not usingIRQF_ONESHOTnor compatible with it.Remove
IRQF_ONESHOTfrom bwctrl and convert the irq thread to hardirq handler. Rename the handler topcie_bwnotif_irq()to indicate its new purpose.
Quoted 7 lines
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 <[email protected]>Signed-off-by Ilpo Järvinen <[email protected]>
this fixed the probing issue. Thanks
Is there anything more I can/should test?
Quoted 30 lines
--- drivers/pci/pcie/bwctrl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)drivers/pci/pcie/bwctrl.c +3
-5@@ -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;
Quoted 7 lines · Ilpo Järvinen
bwctrl cannot use
IRQF_ONESHOTbecause it shares interrupt with other service drivers that are not usingIRQF_ONESHOTnor compatible with it.Remove
IRQF_ONESHOTfrom bwctrl and convert the irq thread to hardirq handler. Rename the handler topcie_bwnotif_irq()to indicate its new purpose.
Quoted 7 lines
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 <[email protected]>Signed-off-by Ilpo Järvinen <[email protected]>
Squashed into 058a4cb11620, thanks!
Also added your tested-by, Stefan, thanks very much for doing that!
Quoted 33 lines
--- drivers/pci/pcie/bwctrl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)drivers/pci/pcie/bwctrl.c +3
-5@@ -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;Signature · 1 line
2.39.5
Ilpo Järvinen
maintainerQuoted 11 lines · Bjorn Helgaas
Quoted 10 lines · Ilpo Järvinen
bwctrl cannot use
IRQF_ONESHOTbecause it shares interrupt with other service drivers that are not usingIRQF_ONESHOTnor compatible with it.Remove
IRQF_ONESHOTfrom bwctrl and convert the irq thread to hardirq handler. Rename the handler topcie_bwnotif_irq()to indicate its new purpose.The IRQ handler is simple enough to not require not require other changes.
Quoted 8 lines
Quoted 4 lines
Fixes 058a4cb11620 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")Reported-by Stefan Wahren <[email protected]>Signed-off-by Ilpo Järvinen <[email protected]>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 :-).
Signature · 1 line
i.
Quoted 34 lines
Quoted 33 lines
--- drivers/pci/pcie/bwctrl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)drivers/pci/pcie/bwctrl.c +3
-5@@ -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;Signature · 1 line
2.39.5
Quoted 20 lines · Ilpo Järvinen
Quoted 18 lines · Bjorn Helgaas
Quoted 7 lines · Ilpo Järvinen
bwctrl cannot use
IRQF_ONESHOTbecause it shares interrupt with other service drivers that are not usingIRQF_ONESHOTnor compatible with it.Remove
IRQF_ONESHOTfrom bwctrl and convert the irq thread to hardirq handler. Rename the handler topcie_bwnotif_irq()to indicate its new purpose.Quoted 7 lines
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 <[email protected]>Signed-off-by Ilpo Järvinen <[email protected]>Squashed into
058a4cb11620, thanks!
Quoted 7 lines
Quoted 1 line
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_ONESHOTso it won't confuse anybody when looking at this years from now :-).
Removed, thanks for that!