From: Frank Li <Frank.li@nxp.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Jesper Nilsson" <jesper.nilsson@axis.com>,
"Lars Persson" <lars.persson@axis.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-arm-kernel@axis.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH RFC NOT TESTED 2/2] PCI: artpec6: Use use_parent_dt_ranges and clean up artpec6_pcie_cpu_addr_fixup()
Date: Tue, 4 Mar 2025 15:12:11 -0500 [thread overview]
Message-ID: <Z8dem5gBf3xLxSIT@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250304190816.GA253203@bhelgaas>
On Tue, Mar 04, 2025 at 01:08:16PM -0600, Bjorn Helgaas wrote:
> On Tue, Mar 04, 2025 at 12:49:36PM -0500, Frank Li wrote:
> > Remove artpec6_pcie_cpu_addr_fixup() as the DT bus fabric should provide correct
> > address translation. Set use_parent_dt_ranges to allow the DWC core driver to
> > fetch address translation from the device tree.
>
> Shouldn't we be able to detect platforms where DT doesn't describe the
> translation correctly? E.g., by running .cpu_addr_fixup() on a
> res.start value and comparing the result to the parent_bus_addr()?
> Then we could complain about it if they don't match.
Can't detect because:
There are case, driver have not provide .cpu_addr_fixup, but dts still be
wrong. such as
bus@10000000
{
ranges = <0xdeaddead 0x1000000 size>;
pci@90000000 {
reg = <...>, <0xdeaddead>;
reg-names = <...>, <config>;
}
};
above dts can work with current driver, but parent bus address 0xdeaddead
is totally fake address. We can't detect this case because no
.cpu_addr_fixup() at all.
Frank
>
> Bjorn
next prev parent reply other threads:[~2025-03-04 20:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 17:49 [PATCH RFC NOT TESTED 0/2] PCI: artpec6: Try to clean up artpec6_pcie_cpu_addr_fixup() Frank Li
2025-03-04 17:49 ` [PATCH RFC NOT TESTED 1/2] ARM: dts: artpec6: Move PCIe nodes under bus@c0000000 Frank Li
2025-03-04 17:49 ` [PATCH RFC NOT TESTED 2/2] PCI: artpec6: Use use_parent_dt_ranges and clean up artpec6_pcie_cpu_addr_fixup() Frank Li
2025-03-04 19:08 ` Bjorn Helgaas
2025-03-04 20:12 ` Frank Li [this message]
2025-03-04 20:31 ` Bjorn Helgaas
2025-03-04 21:02 ` Frank Li
2025-03-05 11:18 ` [PATCH RFC NOT TESTED 0/2] PCI: artpec6: Try to " Niklas Cassel
2025-03-05 11:26 ` Niklas Cassel
2025-03-05 15:33 ` Jesper Nilsson
2025-03-10 16:47 ` Jesper Nilsson
2025-03-10 20:45 ` Frank Li
2025-03-17 17:54 ` Bjorn Helgaas
2025-03-18 9:01 ` Niklas Cassel
2025-03-20 21:54 ` Bjorn Helgaas
2025-03-21 17:17 ` Jesper Nilsson
2025-03-21 17:54 ` Bjorn Helgaas
2025-03-11 15:19 ` Rob Herring (Arm)
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=Z8dem5gBf3xLxSIT@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=helgaas@kernel.org \
--cc=jesper.nilsson@axis.com \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=lars.persson@axis.com \
--cc=linux-arm-kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=robh@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