linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@misterjones.org>
To: Xiaowei Bao <xiaowei.bao@nxp.com>
Cc: <robh+dt@kernel.org>, <frowand.list@gmail.com>,
	<minghuan.lian@nxp.com>, <mingkai.hu@nxp.com>, <roy.zang@nxp.com>,
	<lorenzo.pieralisi@arm.com>, <andrew.murray@arm.com>,
	<bhelgaas@google.com>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <zhiqiang.hou@nxp.com>
Subject: Re: [PATCH] PCI: layerscape: Add the SRIOV support in host side
Date: Mon, 02 Dec 2019 12:47:40 +0000	[thread overview]
Message-ID: <606a00a2edcf077aa868319e0daa4dbc@www.loen.fr> (raw)
In-Reply-To: <20191202104506.27916-1-xiaowei.bao@nxp.com>

On 2019-12-02 10:45, Xiaowei Bao wrote:
> GIC get the map relations of devid and stream id from the msi-map
> property of DTS, our platform add this property in u-boot base on
> the PCIe device in the bus, but if enable the vf device in kernel,
> the vf device msi-map will not set, so the vf device can't work,
> this patch purpose is that manage the stream id and device id map
> relations dynamically in kernel, and make the new PCIe device work
> in kernel.
>
> Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
> ---
>  drivers/of/irq.c                            |  9 +++
>  drivers/pci/controller/dwc/pci-layerscape.c | 94
> +++++++++++++++++++++++++++++
>  drivers/pci/probe.c                         |  6 ++
>  drivers/pci/remove.c                        |  6 ++
>  4 files changed, 115 insertions(+)
>
> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> index a296eaf..791e609 100644
> --- a/drivers/of/irq.c
> +++ b/drivers/of/irq.c
> @@ -576,6 +576,11 @@ void __init of_irq_init(const struct
> of_device_id *matches)
>  	}
>  }
>
> +u32 __weak ls_pcie_streamid_fix(struct device *dev, u32 rid)
> +{
> +	return rid;
> +}
> +
>  static u32 __of_msi_map_rid(struct device *dev, struct device_node 
> **np,
>  			    u32 rid_in)
>  {
> @@ -590,6 +595,10 @@ static u32 __of_msi_map_rid(struct device *dev,
> struct device_node **np,
>  		if (!of_map_rid(parent_dev->of_node, rid_in, "msi-map",
>  				"msi-map-mask", np, &rid_out))
>  			break;
> +
> +	if (rid_out == rid_in)
> +		rid_out = ls_pcie_streamid_fix(parent_dev, rid_in);

Over my dead body. Get your firmware to properly program the LUT
so that it presents the ITS with a reasonable topology. There is
absolutely no way this kind of change makes it into the kernel.

Thanks,

         M.
-- 
Who you jivin' with that Cosmik Debris?

  parent reply	other threads:[~2019-12-02 12:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 10:45 [PATCH] PCI: layerscape: Add the SRIOV support in host side Xiaowei Bao
2019-12-02 11:01 ` Lorenzo Pieralisi
2019-12-03  1:27   ` Xiaowei Bao
2019-12-02 12:47 ` Marc Zyngier [this message]
2019-12-03  1:42   ` Xiaowei Bao
2019-12-03 11:51     ` Marc Zyngier
2019-12-03 15:20       ` Robin Murphy
2019-12-04  4:34         ` Xiaowei Bao
2019-12-04  8:13           ` Marc Zyngier
2019-12-04 11:59           ` Robin Murphy
2019-12-05  2:56             ` Xiaowei Bao
2019-12-05 11:11           ` Laurentiu Tudor
2019-12-09  7:00             ` Xiaowei Bao
2019-12-05 10:44     ` Laurentiu Tudor
2019-12-09  7:03       ` Xiaowei Bao

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=606a00a2edcf077aa868319e0daa4dbc@www.loen.fr \
    --to=maz@misterjones.org \
    --cc=andrew.murray@arm.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=minghuan.lian@nxp.com \
    --cc=mingkai.hu@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=roy.zang@nxp.com \
    --cc=xiaowei.bao@nxp.com \
    --cc=zhiqiang.hou@nxp.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;
as well as URLs for NNTP newsgroup(s).