All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	lorenzo.pieralisi@arm.com, bhelgaas@google.com,
	svarbanov@mm-sol.com, bjorn.andersson@linaro.org,
	robh@kernel.org, linux-pci@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Sven Peter <sven@svenpeter.dev>
Subject: Re: [PATCH] PCI: qcom: Fix warning generated due to the incorrect data type
Date: Tue, 30 Nov 2021 18:35:01 +0000	[thread overview]
Message-ID: <87czmhmqzu.wl-maz@kernel.org> (raw)
In-Reply-To: <20211130160338.GA2739234@bhelgaas>

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.

      parent reply	other threads:[~2021-11-30 18:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 14:04 [PATCH] PCI: qcom: Fix warning generated due to the incorrect data type Manivannan Sadhasivam
2021-11-30  3:36 ` Bjorn Helgaas
2021-11-30  6:21   ` Manivannan Sadhasivam
2021-11-30 16:03     ` Bjorn Helgaas
2021-11-30 16:35       ` Sven Peter
2021-11-30 18:35       ` Marc Zyngier [this message]

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=87czmhmqzu.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alyssa@rosenzweig.io \
    --cc=bhelgaas@google.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    --cc=svarbanov@mm-sol.com \
    --cc=sven@svenpeter.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.