From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, Shawn Jin <shawn.jin@asteralabs.com>,
linuxppc-dev@lists.ozlabs.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 10/11] PCI: Lower bound bridge window alignment
Date: Fri, 12 Jun 2026 14:50:17 +0300 (EEST) [thread overview]
Message-ID: <4a35f669-b13b-c07a-fbd6-a8ea1ce9a38b@linux.intel.com> (raw)
In-Reply-To: <20260429122617.7324-11-ilpo.jarvinen@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]
On Wed, 29 Apr 2026, Ilpo Järvinen wrote:
> pci_resource_alignment() does not consider bridge windows special,
> yet their alignment is subject to different requirements from BAR
> alignment.
>
> Add lower bound to bridge window alignment to help callers out to
> always have large enough alignment.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Hi Bjorn,
Could you please pull this change and the subsequent one, the commits in
pci/resource:
ae09d28ecbbc ("PCI: Lower bound bridge window alignment")
cf996b886675 ("PCI: Return valid alignment for assigned resources")
The rest of the changes in this series seem okay and can proceed if you're
okay with keeping a partial series.
The reason for this request is the dev->bus vs dev->subordinate issue
sashiko mentioned in its review.
I've tried to come up with a solution to that but it has become so ugly
I have not been very happy with it. Maybe there's no other way but the
problem boils down with pci_min_window_alignment() having to be capable of
dealing two cases, each lacking one of the key pointers (bus or bridge
dev):
1) root bus without bus->self
2) bridge without a subordinate bus struct (if subordinate bus' alloc
failed)
Only way to solve that I could think of is passing both the bus and the
bridge device to pci_min_window_alignment() and the related arch side
function pcibios_window_alignment(). The ugliest parts then involve
getting a bus pointer compatible with both of those cases, like this:
struct pci_controller *phb = pci_bus_to_host(bus ? bus : bridge->bus);
But it's too late in the cycle now to try even that, IMO, so better to
wait to the next cycle.
--
i.
next prev parent reply other threads:[~2026-06-12 11:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 12:26 [PATCH 00/11] PCI: pci_resource_alignment() improvement + cleanups Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 01/11] PCI: Log all resource claims Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 02/11] PCI: Rename added to add_list Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 03/11] PCI: Consolidate add_list (aka realloc_head) empty sanity checks Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 04/11] PCI: Remove const removal cast Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 05/11] resource: Make resource_alignment() input const resource Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 06/11] powerpc/pseries: Make pseries_get_iov_fw_value() & pnv_iov_get() pci_dev const Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 07/11] PCI: Make pci_sriov_resource_alignment() " Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 08/11] PCI: Convert pci_resource_alignment() input parameters to const Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 09/11] PCI: Move pci_resource_alignment() to setup-res.c file Ilpo Järvinen
2026-04-29 12:26 ` [PATCH 10/11] PCI: Lower bound bridge window alignment Ilpo Järvinen
2026-06-12 11:50 ` Ilpo Järvinen [this message]
2026-06-12 14:12 ` Bjorn Helgaas
2026-04-29 12:26 ` [PATCH 11/11] PCI: Return valid alignment for assigned resources Ilpo Järvinen
2026-05-06 18:14 ` [PATCH 00/11] PCI: pci_resource_alignment() improvement + cleanups Bjorn Helgaas
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=4a35f669-b13b-c07a-fbd6-a8ea1ce9a38b@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=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=shawn.jin@asteralabs.com \
/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