From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Claude:claude-opus-5-5" <noreply@anthropic.com>,
stable@vger.kernel.org
Subject: [PATCH 2/3] PCI: Fix start of available space for the next bridge during distribution
Date: Mon, 9 Nov 2026 16:45:52 +0200 [thread overview]
Message-ID: <20261109144553.2516-3-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20261109144553.2516-1-ilpo.jarvinen@linux.intel.com>
After distributing space to a bridge,
pci_bus_distribute_available_resources() advances available[i].start with
"+= end + 1". As .start and .end are addresses, not a base and a size,
this adds start a second time. The space left for the following bridges
then starts at a bogus address, which skews their alignment calculations.
Set start to just past the space given to the previous bridge.
Fixes: 08f0a15ee8ad ("PCI: Align extra resources for hotplug bridges properly")
Reported-by: Claude:claude-opus-5-5 <noreply@anthropic.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Cc: stable@vger.kernel.org
---
drivers/pci/setup-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index bd0974def921..9d8b22d1e6ad 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -2077,7 +2077,7 @@ static void pci_bus_distribute_available_resources(struct pci_bus *bus,
pci_bus_distribute_available_resources(b, add_list, available);
for (i = 0; i < PCI_P2P_BRIDGE_RESOURCE_NUM; i++)
- available[i].start += available[i].end + 1;
+ available[i].start = available[i].end + 1;
}
}
--
2.47.3
next prev parent reply other threads:[~2026-11-09 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 14:45 [PATCH 0/3] PCI: Fix hotplug memory distribute Ilpo Järvinen
2026-11-09 14:45 ` [PATCH 1/3] PCI: Fix NULL dereference when shrinking window without optional size Ilpo Järvinen
2026-11-09 14:45 ` Ilpo Järvinen [this message]
2026-11-09 14:45 ` [PATCH 3/3] PCI: Honor window granularity during resource distribution Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261109144553.2516-3-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=noreply@anthropic.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®