Skip to contentSkip to conversation

PCI/bwctrl: Remove also pcie_bwctrl_lbms_rwsem

PATCH Applied Ilpo Järvinen 4 participants 12 messages May 8, 2025 – May 15, 2025

Subsystems (2)
lore
Share & tools
lore

Ilpo Järvinen

author maintainer
#0 lore raw

PATCH 1/1 PCI/bwctrl: Remove also pcie_bwctrl_lbms_rwsem

The commit 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag") remove all code related to pcie_bwctrl_lbms_rwsem but forgot to remove the rwsem itself. Remove it and the associated info from the comment now.

Fixes 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag")

---

Bjorn, this should be folded into the original commit I think.

 drivers/pci/pcie/bwctrl.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/pci/pcie/bwctrl.c +1 -9
index fdafa20e4587..f31fbbd51490 100644
@@ -45,15 +45,7 @@ struct pcie_bwctrl_data {
 	struct thermal_cooling_device *cdev;
 };
 
-/*
- * Prevent port removal during LBMS count accessors and Link Speed changes.
- *
- * These have to be differentiated because pcie_bwctrl_change_speed() calls
- * pcie_retrain_link() which uses LBMS count reset accessor on success
- * (using just one rwsem triggers "possible recursive locking detected"
- * warning).
- */
-static DECLARE_RWSEM(pcie_bwctrl_lbms_rwsem);
+/* Prevent port removal during Link Speed changes. */
 static DECLARE_RWSEM(pcie_bwctrl_setspeed_rwsem);
 
 static bool pcie_valid_speed(enum pci_bus_speed speed)

base-commit: 0238f352a63a075ac1f35ea565b5bec3057ec8bd

Signature · 1 line
2.39.5
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ilpo Järvinen

The commit 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag") remove all code related to pcie_bwctrl_lbms_rwsem but forgot to remove the rwsem itself. Remove it and the associated info from the comment now.

Fixes 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag")
Quoted 33 lines

---

Bjorn, this should be folded into the original commit I think.

 drivers/pci/pcie/bwctrl.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/pci/pcie/bwctrl.c +1 -9
index fdafa20e4587..f31fbbd51490 100644
@@ -45,15 +45,7 @@ struct pcie_bwctrl_data {
 	struct thermal_cooling_device *cdev;
 };
 
-/*
- * Prevent port removal during LBMS count accessors and Link Speed changes.
- *
- * These have to be differentiated because pcie_bwctrl_change_speed() calls
- * pcie_retrain_link() which uses LBMS count reset accessor on success
- * (using just one rwsem triggers "possible recursive locking detected"
- * warning).
- */
-static DECLARE_RWSEM(pcie_bwctrl_lbms_rwsem);
+/* Prevent port removal during Link Speed changes. */
 static DECLARE_RWSEM(pcie_bwctrl_setspeed_rwsem);
 
 static bool pcie_valid_speed(enum pci_bus_speed speed)

base-commit: 0238f352a63a075ac1f35ea565b5bec3057ec8bd

Signature · 1 line
2.39.5
#3 lore raw
Quoted 11 lines · Krzysztof Wilczy??ski
Quoted 6 lines

The commit 0238f352a63a ("PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag") remove all code related to pcie_bwctrl_lbms_rwsem but forgot to remove the rwsem itself. Remove it and the associated info from the comment now.

Applied to bwctrl, thank you!

[1/1] PCI/bwctrl: Remove also pcie_bwctrl_lbms_rwsem

      https://git.kernel.org/pci/pci/c/256ab8a30905

This is now an individual commit on the bwctrl branch, but Ilpo requested to squash it with the other commit already on that branch...

"Bjorn, this should be folded into the original commit I think."

...because that other commit breaks the build:

https://lore.kernel.org/r/3840f086-91cf-4fec-8004-b272a21d86cf@paulmck-laptop/

Thanks,

Lukas

#4 lore raw

[...]

Quoted 5 lines
Quoted 4 lines

Applied to bwctrl, thank you!

[1/1] PCI/bwctrl: Remove also pcie_bwctrl_lbms_rwsem

      https://git.kernel.org/pci/pci/c/256ab8a30905
Quoted 8 lines

This is now an individual commit on the bwctrl branch, but Ilpo requested to squash it with the other commit already on that branch...

"Bjorn, this should be folded into the original commit I think."

...because that other commit breaks the build:

https://lore.kernel.org/r/3840f086-91cf-4fec-8004-b272a21d86cf@paulmck-laptop/

Done. Squashed with the first commit from Ilpo, see:

https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=bwctrl&id=2389d8dc38fee18176c49e9c4804f5ecc55807fa

Let me know if there is anything else needed.

Thank you!

Krzysztof

#5 lore raw
Quoted 3 lines · Krzysztof Wilczy??ski

Done. Squashed with the first commit from Ilpo, see:

https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=bwctrl&id=2389d8dc38fee18176c49e9c4804f5ecc55807fa

Awesome, thank you!

Quoted 1 line

Let me know if there is anything else needed.

Actually, two small things:

- That patch on the pci/bwctrl topic branch is still marked "New" in patchwork, even though it's been applied:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

- Version 1 of the same patch is likewise marked "New", even though it's been superseded:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

Unfortunately I can't update it myself because I'm not the submitter. (Ilpo could do it if he has a patchwork.kernel.org account.)

Something unrelated (only if you feel like doing it):

On the pci/enumeration branch, Bjorn queued up a revert which was waiting to be ack'ed by AMD IOMMU maintainers:
https://lore.kernel.org/r/20250425163259.GA546441@bhelgaas/

In the meantime the ack has arrived:
https://lore.kernel.org/r/[email protected]/

So the remaining housekeeping items are:

- Add Jörg's Acked-by to commit e86c7278eba8 on pci/enumeration
- Remove the "XXX" marker from the subject line
- Remove "Needs AMD IOMMU ack" from the commit message

Again, only if you feel like doing it. No urgency.

Thanks,

Lukas

author maintainer
#6 lore raw
Quoted 2 lines · Lukas Wunner
Quoted 1 line · Krzysztof Wilczy??ski

Done. Squashed with the first commit from Ilpo, see:

Thanks Krzysztof for handling this, I should have put the note about squashing it to the resubmission but I forgot (this time I didn't do the diff against the previous version before sending it which I normally do).

Quoted 12 lines
Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=bwctrl&id=2389d8dc38fee18176c49e9c4804f5ecc55807fa

Awesome, thank you!

Quoted 1 line

Let me know if there is anything else needed.

Actually, two small things:

- That patch on the pci/bwctrl topic branch is still marked "New" in patchwork, even though it's been applied:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

Quoted 6 lines

- Version 1 of the same patch is likewise marked "New", even though it's been superseded:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

Unfortunately I can't update it myself because I'm not the submitter. (Ilpo could do it if he has a patchwork.kernel.org account.)

I'm a pdx86 maintainer so I do have an account, yes. I actually had the patchwork page listing my PCI patches already open, but I just hadn't hit "update" button yet.

I've done those two changes now.

I'm a bit hesitant to mark "Accepted" state though, I did it this time but in general I feel I might be overstepping my authority even if I know some patches have been accepted.

Quoted 16 lines

Something unrelated (only if you feel like doing it):

On the pci/enumeration branch, Bjorn queued up a revert which was waiting to be ack'ed by AMD IOMMU maintainers:
https://lore.kernel.org/r/20250425163259.GA546441@bhelgaas/

In the meantime the ack has arrived:
https://lore.kernel.org/r/[email protected]/

So the remaining housekeeping items are:

- Add Jörg's Acked-by to commit e86c7278eba8 on pci/enumeration
- Remove the "XXX" marker from the subject line
- Remove "Needs AMD IOMMU ack" from the commit message

Again, only if you feel like doing it. No urgency.

Signature · 1 line
 i.
#7 lore raw
Quoted 3 lines · Ilpo Järvinen

I'm a bit hesitant to mark "Accepted" state though, I did it this time but in general I feel I might be overstepping my authority even if I know some patches have been accepted.

Bjorn has encouraged submitters to mark their own patches as "Superseded":

"If you're really gung-ho, you can go to Patchwork [2] and mark
your superseded patches as "Superseded" so I don't have to do that myself."

https://lore.kernel.org/r/[email protected]/

... and I was assuming that also applies to marking one's own patches as "Accepted", but I might be jumping to the wrong conclusion.

Thanks,

Lukas

#8 lore raw

Hello,

Quoted 6 lines
Quoted 3 lines

I'm a bit hesitant to mark "Accepted" state though, I did it this time but in general I feel I might be overstepping my authority even if I know some patches have been accepted.

Bjorn has encouraged submitters to mark their own patches as "Superseded":

Quoted 8 lines

"If you're really gung-ho, you can go to Patchwork [2] and mark
your superseded patches as "Superseded" so I don't have to do that myself."

https://lore.kernel.org/r/[email protected]/

... and I was assuming that also applies to marking one's own patches as "Accepted", but I might be jumping to the wrong conclusion.

Between Bjorn, Lorenzo, Mani and I, we are getting better as leveraging Patchwork for a little bit of tracking and "project management", so to speak.

But, any help with the housekeeping always appreciated. :)

Thank you!

Krzysztof

#9 lore raw

Hello,

[...]

Quoted 1 line

But, any help with the housekeeping always appreciated. :)

Speaking of housekeeping...

Lukas, do you prefer US ASCII when sending e-mails?

I've noticed that the letter in my surname got broken here. It's also interesting that my "ń" broke, but Ilpo's "ä" didn't. I assumed both would be encoded as UTF-8.

Anyway, just curious. :)

Krzysztof

#10 lore raw
In reply to Ilpo Järvinen

Hello,

[...]

Quoted 6 lines
Quoted 1 line
Quoted 1 line

Done. Squashed with the first commit from Ilpo, see:

Thanks Krzysztof for handling this, I should have put the note about squashing it to the resubmission but I forgot (this time I didn't do the diff against the previous version before sending it which I normally do).

No problem! I am sorry for missing the ask in the first place.

[...]

Quoted 12 lines
Quoted 12 lines
Quoted 1 line

Let me know if there is anything else needed.

Actually, two small things:

- That patch on the pci/bwctrl topic branch is still marked "New" in patchwork, even though it's been applied:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

- Version 1 of the same patch is likewise marked "New", even though it's been superseded:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

Quoted 8 lines
Quoted 2 lines

Unfortunately I can't update it myself because I'm not the submitter. (Ilpo could do it if he has a patchwork.kernel.org account.)

I'm a pdx86 maintainer so I do have an account, yes. I actually had the patchwork page listing my PCI patches already open, but I just hadn't hit "update" button yet.

I've done those two changes now.

Thank you!

Krzysztof

#11 lore raw
In reply to Lukas Wunner

Hello,

[...]

Quoted 14 lines
Quoted 3 lines

Done. Squashed with the first commit from Ilpo, see:

https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=bwctrl&id=2389d8dc38fee18176c49e9c4804f5ecc55807fa

Awesome, thank you!

Quoted 1 line

Let me know if there is anything else needed.

Actually, two small things:

- That patch on the pci/bwctrl topic branch is still marked "New" in patchwork, even though it's been applied:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

Quoted 6 lines

- Version 1 of the same patch is likewise marked "New", even though it's been superseded:
https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/

Unfortunately I can't update it myself because I'm not the submitter. (Ilpo could do it if he has a patchwork.kernel.org account.)

I had a look and I think Ilpo beat me to it. Thank you Ilpo!

Also, thank you for chasing after this. Much appreciated. Good to know people use Patchwork to track what is up with our tree. :)

Quoted 6 lines

Something unrelated (only if you feel like doing it):

On the pci/enumeration branch, Bjorn queued up a revert which was waiting to be ack'ed by AMD IOMMU maintainers:
https://lore.kernel.org/r/20250425163259.GA546441@bhelgaas/

Quoted 8 lines

In the meantime the ack has arrived:
https://lore.kernel.org/r/[email protected]/

So the remaining housekeeping items are:

- Add Jörg's Acked-by to commit e86c7278eba8 on pci/enumeration
- Remove the "XXX" marker from the subject line
- Remove "Needs AMD IOMMU ack" from the commit message

Done. Have a look to make sure that things look correct now:

https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=enumeration&id=3be5fa236649da6404f1bca1491bf02d4b0d5cce

Quoted 1 line

Again, only if you feel like doing it. No urgency.

No problem! Any time. :)

Thank you!

Krzysztof