lkml.org 
[lkml]   [2021]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: qcom: Fix warning generated due to the incorrect data type
On Tue, 30 Nov 2021 16:03:38 +0000,
Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> [+cc Marc, Alyssa, Sven for RID-to-SID mapping insight. The patch at
> https://lore.kernel.org/all/20211130062137.GD205712@thinkpad/ merely
> fixes a warning. My meta-question is about the qcom BDF-to-SID
> mapping.]
>
> On Tue, Nov 30, 2021 at 11:51:37AM +0530, Manivannan Sadhasivam wrote:
> > On Mon, Nov 29, 2021 at 09:36:14PM -0600, Bjorn Helgaas wrote:
> > > ...
> > > I'm also curious why pcie-qcom.c is the only driver that does this.
> > > "iommu-map" is not specific to qcom, but no other drivers do similar
> > > things with it.
> >
> > Yes, on the recent qcom platforms starting from sm8250 we need to program
> > the BDF to SID mapping in the controller and that's the reason we are
> > extracting the "iommu-map" property in DT.
>
> This sounds like something that may not really be specific to sm8250.
>
> It looks vaguely similar to apple_pcie_add_device(). Compare the qcom
> code at [1] with the Apple code at [2].

It looks indeed similar in spirit, though the implementation seems
different. The qcom code seems to brute-force the mappings upfront,
while the apple driver relies on bus notifiers to map things on
demand.

The annoying thing with these blocks is that they are neither part of
the IOMMU nor the PCIe block. It is just a piece of glue logic in
the middle...

Thanks,

M.

--
Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2021-11-30 19:35    [W:0.089 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site