From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
mani@kernel.org, lpieralisi@kernel.org, kwilczynski@kernel.org,
robh@kernel.org, bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Loic Poulain <loic.poulain@oss.qualcomm.com>
Subject: Re: [PATCH] PCI: qcom: Honor IOMMU provider's #iommu-cells in qcom_pcie_config_sid_1_9_0()
Date: Tue, 8 Sep 2026 09:24:08 +0200 [thread overview]
Message-ID: <edad7581-ac99-4d76-9320-861792b07082@oss.qualcomm.com> (raw)
In-Reply-To: <20260907143349.317495-1-mani@kernel.org>
On 9/7/26 4:33 PM, Manivannan Sadhasivam wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
>
> qcom_pcie_config_sid_1_9_0() reads the "iommu-map" property as an array
> of fixed four-word {rid-base, phandle, sid, rid-len} entries to program
> the BDF to SID translation table. But that layout only holds for an
> IOMMU with '#iommu-cells = <1>'. The PCIe SMMUs on these SoCs use
> '#iommu-cells = <2>' (SID and mask), so per the pci-iommu binding each
> entry is really five cells long.
[...]
> + /*
> + * Retain backward compatibility with DTs that describe iommu-map
> + * with 4-cell entries against an IOMMU declaring #iommu-cells = 2,
> + * matching the fallback in drivers/of/base.c::of_check_bad_map().
Can we export it from there instead?
Perhaps as a follow-up change given this is a fix to a current
breakage..
I was hoping this whole logic could be simplified a bit by reusing
the map parsing logic from of/property.c, but alas it doesn't seem
feasible given we essentially need more data
Konrad
next prev parent reply other threads:[~2026-09-08 7:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 14:33 Manivannan Sadhasivam
2026-09-07 15:43 ` Loic Poulain
2026-09-07 15:46 ` Neil Armstrong
2026-09-08 7:24 ` Konrad Dybcio [this message]
2026-09-17 6:00 ` Manivannan Sadhasivam
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=edad7581-ac99-4d76-9320-861792b07082@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=bhelgaas@google.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--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
all inboxes | Powered by JetHome®