All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Makarand Pawagi <makarand.pawagi@nxp.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org,
	linux@armlinux.org.uk, jon@solid-run.com,
	Cristi Sovaiala <cristian.sovaiala@nxp.com>,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Varun Sethi <V.Sethi@nxp.com>,
	Calvin Johnson <calvin.johnson@nxp.com>,
	Pankaj Bansal <pankaj.bansal@nxp.com>,
	guohanjun@huawei.com, sudeep.holla@arm.com, rjw@rjwysocki.net,
	lenb@kernel.org, stuyoder@gmail.com, tglx@linutronix.de,
	jason@lakedaemon.net, shameerali.kolothum.thodi@huawei.com,
	will@kernel.org, robin.murphy@arm.com, nleeder@codeaurora.org,
	Andy Wang <Andy.Wang@arm.com>, Paul Yang <Paul.Yang@arm.com>
Subject: Re: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc
Date: Fri, 31 Jan 2020 11:06:52 +0000	[thread overview]
Message-ID: <12531d6c569c7e14dffe8e288d9f4a0b@kernel.org> (raw)
In-Reply-To: <DB8PR04MB7164DDF48480956F05886DABEB070@DB8PR04MB7164.eurprd04.prod.outlook.com>

On 2020-01-31 10:35, Makarand Pawagi wrote:
>> -----Original Message-----
>> From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>> Sent: Tuesday, January 28, 2020 4:39 PM
>> To: Makarand Pawagi <makarand.pawagi@nxp.com>
>> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; linux-acpi@vger.kernel.org; 
>> linux@armlinux.org.uk;
>> jon@solid-run.com; Cristi Sovaiala <cristian.sovaiala@nxp.com>; 
>> Laurentiu
>> Tudor <laurentiu.tudor@nxp.com>; Ioana Ciornei 
>> <ioana.ciornei@nxp.com>;
>> Varun Sethi <V.Sethi@nxp.com>; Calvin Johnson 
>> <calvin.johnson@nxp.com>;
>> Pankaj Bansal <pankaj.bansal@nxp.com>; guohanjun@huawei.com;
>> sudeep.holla@arm.com; rjw@rjwysocki.net; lenb@kernel.org;
>> stuyoder@gmail.com; tglx@linutronix.de; jason@lakedaemon.net;
>> maz@kernel.org; shameerali.kolothum.thodi@huawei.com; will@kernel.org;
>> robin.murphy@arm.com; nleeder@codeaurora.org
>> Subject: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc
>> 
>> Caution: EXT Email
>> 
>> On Tue, Jan 28, 2020 at 01:38:45PM +0530, Makarand Pawagi wrote:
>> > ACPI support is added in the fsl-mc driver. Driver will parse MC DSDT
>> > table to extract memory and other resorces.
>> >
>> > Interrupt (GIC ITS) information will be extracted from MADT table by
>> > drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c.
>> >
>> > IORT table will be parsed to configure DMA.
>> >
>> > Signed-off-by: Makarand Pawagi <makarand.pawagi@nxp.com>
>> > ---
>> >  drivers/acpi/arm64/iort.c                   | 53 +++++++++++++++++++++
>> >  drivers/bus/fsl-mc/dprc-driver.c            |  3 +-
>> >  drivers/bus/fsl-mc/fsl-mc-bus.c             | 48 +++++++++++++------
>> >  drivers/bus/fsl-mc/fsl-mc-msi.c             | 10 +++-
>> >  drivers/bus/fsl-mc/fsl-mc-private.h         |  4 +-
>> >  drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 71
>> ++++++++++++++++++++++++++++-
>> >  include/linux/acpi_iort.h                   |  5 ++
>> >  7 files changed, 174 insertions(+), 20 deletions(-)
>> >
>> > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
>> > index 33f7198..beb9cd5 100644
>> > --- a/drivers/acpi/arm64/iort.c
>> > +++ b/drivers/acpi/arm64/iort.c
>> > @@ -15,6 +15,7 @@
>> >  #include <linux/kernel.h>
>> >  #include <linux/list.h>
>> >  #include <linux/pci.h>
>> > +#include <linux/fsl/mc.h>
>> >  #include <linux/platform_device.h>
>> >  #include <linux/slab.h>
>> >
>> > @@ -622,6 +623,29 @@ static int iort_dev_find_its_id(struct device
>> > *dev, u32 req_id,  }
>> >
>> >  /**
>> > + * iort_get_fsl_mc_device_domain() - Find MSI domain related to a
>> > +device
>> > + * @dev: The device.
>> > + * @mc_icid: ICID for the fsl_mc device.
>> > + *
>> > + * Returns: the MSI domain for this device, NULL otherwise  */ struct
>> > +irq_domain *iort_get_fsl_mc_device_domain(struct device *dev,
>> > +                                                     u32 mc_icid) {
>> > +     struct fwnode_handle *handle;
>> > +     int its_id;
>> > +
>> > +     if (iort_dev_find_its_id(dev, mc_icid, 0, &its_id))
>> > +             return NULL;
>> > +
>> > +     handle = iort_find_domain_token(its_id);
>> > +     if (!handle)
>> > +             return NULL;
>> > +
>> > +     return irq_find_matching_fwnode(handle, DOMAIN_BUS_FSL_MC_MSI);
>> > +}
>> 
>> NAK
>> 
>> I am not willing to take platform specific code in the generic IORT 
>> layer.
>> 
>> ACPI on ARM64 works on platforms that comply with SBSA/SBBR 
>> guidelines:
>> 
>> 
>> https://developer.arm.com/architectures/platform-design/server-systems
>> 
>> Deviating from those requires butchering ACPI specifications (ie IORT) 
>> and
>> related kernel code which goes totally against what ACPI is meant for 
>> on ARM64
>> systems, so there is no upstream pathway for this code I am afraid.
>> 
> Reason of adding this platform specific function in the generic IORT 
> layer is
> That iort_get_device_domain() only deals with PCI bus 
> (DOMAIN_BUS_PCI_MSI).
> 
> fsl-mc objects when probed, need to find irq_domain which is associated 
> with
> the fsl-mc bus (DOMAIN_BUS_FSL_MC_MSI). It will not be possible to do 
> that
> if we do not add this function because there are no other suitable APIs 
> exported
> by IORT layer to do the job.

I think we all understood the patch. What both Lorenzo and myself are 
saying is
that we do not want non-PCI support in IORT.

You have decided to have exotic hardware, and sidestep all the 
standardization
efforts. This is your right. But you can't have your cake and eat it.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Makarand Pawagi <makarand.pawagi@nxp.com>
Cc: Calvin Johnson <calvin.johnson@nxp.com>,
	stuyoder@gmail.com, nleeder@codeaurora.org,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Cristi Sovaiala <cristian.sovaiala@nxp.com>,
	guohanjun@huawei.com, will@kernel.org,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Pankaj Bansal <pankaj.bansal@nxp.com>,
	jon@solid-run.com, linux@armlinux.org.uk,
	linux-acpi@vger.kernel.org, lenb@kernel.org,
	jason@lakedaemon.net, Andy Wang <Andy.Wang@arm.com>,
	Varun Sethi <V.Sethi@nxp.com>,
	tglx@linutronix.de, linux-arm-kernel@lists.infradead.org,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>,
	Paul Yang <Paul.Yang@arm.com>,
	netdev@vger.kernel.org, rjw@rjwysocki.net,
	linux-kernel@vger.kernel.org,
	shameerali.kolothum.thodi@huawei.com, sudeep.holla@arm.com,
	robin.murphy@arm.com
Subject: Re: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc
Date: Fri, 31 Jan 2020 11:06:52 +0000	[thread overview]
Message-ID: <12531d6c569c7e14dffe8e288d9f4a0b@kernel.org> (raw)
In-Reply-To: <DB8PR04MB7164DDF48480956F05886DABEB070@DB8PR04MB7164.eurprd04.prod.outlook.com>

On 2020-01-31 10:35, Makarand Pawagi wrote:
>> -----Original Message-----
>> From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>> Sent: Tuesday, January 28, 2020 4:39 PM
>> To: Makarand Pawagi <makarand.pawagi@nxp.com>
>> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; linux-acpi@vger.kernel.org; 
>> linux@armlinux.org.uk;
>> jon@solid-run.com; Cristi Sovaiala <cristian.sovaiala@nxp.com>; 
>> Laurentiu
>> Tudor <laurentiu.tudor@nxp.com>; Ioana Ciornei 
>> <ioana.ciornei@nxp.com>;
>> Varun Sethi <V.Sethi@nxp.com>; Calvin Johnson 
>> <calvin.johnson@nxp.com>;
>> Pankaj Bansal <pankaj.bansal@nxp.com>; guohanjun@huawei.com;
>> sudeep.holla@arm.com; rjw@rjwysocki.net; lenb@kernel.org;
>> stuyoder@gmail.com; tglx@linutronix.de; jason@lakedaemon.net;
>> maz@kernel.org; shameerali.kolothum.thodi@huawei.com; will@kernel.org;
>> robin.murphy@arm.com; nleeder@codeaurora.org
>> Subject: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc
>> 
>> Caution: EXT Email
>> 
>> On Tue, Jan 28, 2020 at 01:38:45PM +0530, Makarand Pawagi wrote:
>> > ACPI support is added in the fsl-mc driver. Driver will parse MC DSDT
>> > table to extract memory and other resorces.
>> >
>> > Interrupt (GIC ITS) information will be extracted from MADT table by
>> > drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c.
>> >
>> > IORT table will be parsed to configure DMA.
>> >
>> > Signed-off-by: Makarand Pawagi <makarand.pawagi@nxp.com>
>> > ---
>> >  drivers/acpi/arm64/iort.c                   | 53 +++++++++++++++++++++
>> >  drivers/bus/fsl-mc/dprc-driver.c            |  3 +-
>> >  drivers/bus/fsl-mc/fsl-mc-bus.c             | 48 +++++++++++++------
>> >  drivers/bus/fsl-mc/fsl-mc-msi.c             | 10 +++-
>> >  drivers/bus/fsl-mc/fsl-mc-private.h         |  4 +-
>> >  drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 71
>> ++++++++++++++++++++++++++++-
>> >  include/linux/acpi_iort.h                   |  5 ++
>> >  7 files changed, 174 insertions(+), 20 deletions(-)
>> >
>> > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
>> > index 33f7198..beb9cd5 100644
>> > --- a/drivers/acpi/arm64/iort.c
>> > +++ b/drivers/acpi/arm64/iort.c
>> > @@ -15,6 +15,7 @@
>> >  #include <linux/kernel.h>
>> >  #include <linux/list.h>
>> >  #include <linux/pci.h>
>> > +#include <linux/fsl/mc.h>
>> >  #include <linux/platform_device.h>
>> >  #include <linux/slab.h>
>> >
>> > @@ -622,6 +623,29 @@ static int iort_dev_find_its_id(struct device
>> > *dev, u32 req_id,  }
>> >
>> >  /**
>> > + * iort_get_fsl_mc_device_domain() - Find MSI domain related to a
>> > +device
>> > + * @dev: The device.
>> > + * @mc_icid: ICID for the fsl_mc device.
>> > + *
>> > + * Returns: the MSI domain for this device, NULL otherwise  */ struct
>> > +irq_domain *iort_get_fsl_mc_device_domain(struct device *dev,
>> > +                                                     u32 mc_icid) {
>> > +     struct fwnode_handle *handle;
>> > +     int its_id;
>> > +
>> > +     if (iort_dev_find_its_id(dev, mc_icid, 0, &its_id))
>> > +             return NULL;
>> > +
>> > +     handle = iort_find_domain_token(its_id);
>> > +     if (!handle)
>> > +             return NULL;
>> > +
>> > +     return irq_find_matching_fwnode(handle, DOMAIN_BUS_FSL_MC_MSI);
>> > +}
>> 
>> NAK
>> 
>> I am not willing to take platform specific code in the generic IORT 
>> layer.
>> 
>> ACPI on ARM64 works on platforms that comply with SBSA/SBBR 
>> guidelines:
>> 
>> 
>> https://developer.arm.com/architectures/platform-design/server-systems
>> 
>> Deviating from those requires butchering ACPI specifications (ie IORT) 
>> and
>> related kernel code which goes totally against what ACPI is meant for 
>> on ARM64
>> systems, so there is no upstream pathway for this code I am afraid.
>> 
> Reason of adding this platform specific function in the generic IORT 
> layer is
> That iort_get_device_domain() only deals with PCI bus 
> (DOMAIN_BUS_PCI_MSI).
> 
> fsl-mc objects when probed, need to find irq_domain which is associated 
> with
> the fsl-mc bus (DOMAIN_BUS_FSL_MC_MSI). It will not be possible to do 
> that
> if we do not add this function because there are no other suitable APIs 
> exported
> by IORT layer to do the job.

I think we all understood the patch. What both Lorenzo and myself are 
saying is
that we do not want non-PCI support in IORT.

You have decided to have exotic hardware, and sidestep all the 
standardization
efforts. This is your right. But you can't have your cake and eat it.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-01-31 11:06 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28  8:08 [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc Makarand Pawagi
2020-01-28  8:08 ` Makarand Pawagi
2020-01-28 10:58 ` Marc Zyngier
2020-01-28 10:58   ` Marc Zyngier
2020-01-28 11:09 ` Lorenzo Pieralisi
2020-01-28 11:09   ` Lorenzo Pieralisi
2020-01-31 10:35   ` [EXT] " Makarand Pawagi
2020-01-31 10:35     ` Makarand Pawagi
2020-01-31 11:06     ` Lorenzo Pieralisi
2020-01-31 11:06       ` Lorenzo Pieralisi
2020-01-31 11:06     ` Marc Zyngier [this message]
2020-01-31 11:06       ` Marc Zyngier
2020-01-31 12:01       ` Ard Biesheuvel
2020-01-31 12:01         ` Ard Biesheuvel
2020-01-31 12:28         ` Jon Nettleton
2020-01-31 12:28           ` Jon Nettleton
2020-01-31 12:48           ` Robin Murphy
2020-01-31 12:48             ` Robin Murphy
2020-01-31 13:11             ` Jon Nettleton
2020-01-31 13:11               ` Jon Nettleton
2020-01-31 13:29               ` Ard Biesheuvel
2020-01-31 13:29                 ` Ard Biesheuvel
2020-01-31 13:39               ` Robin Murphy
2020-01-31 13:39                 ` Robin Murphy
2020-01-31 14:29                 ` Andrew Lunn
2020-01-31 14:29                   ` Andrew Lunn
2020-01-31 14:47                   ` Will Deacon
2020-01-31 14:47                     ` Will Deacon
2020-01-31 15:09                     ` Andrew Lunn
2020-01-31 15:09                       ` Andrew Lunn
2020-01-31 15:14                       ` Jon Nettleton
2020-01-31 15:14                         ` Jon Nettleton
2020-01-31 15:41                         ` Andrew Lunn
2020-01-31 15:41                           ` Andrew Lunn
2020-01-31 15:39                       ` Russell King - ARM Linux admin
2020-01-31 15:39                         ` Russell King - ARM Linux admin
2020-01-31 15:15                   ` Russell King - ARM Linux admin
2020-01-31 15:15                     ` Russell King - ARM Linux admin
2020-01-31 15:40                     ` Jakub Kicinski
2020-01-31 15:40                       ` Jakub Kicinski
2020-02-01 11:49                       ` Russell King - ARM Linux admin
2020-02-01 11:49                         ` Russell King - ARM Linux admin
2020-02-01 17:36                         ` Jakub Kicinski
2020-02-01 17:36                           ` Jakub Kicinski
2020-02-14 15:05         ` Pankaj Bansal
2020-02-14 15:05           ` Pankaj Bansal
2020-02-14 15:54           ` Marc Zyngier
2020-02-14 15:54             ` Marc Zyngier
2020-02-14 15:58             ` Pankaj Bansal
2020-02-14 15:58               ` Pankaj Bansal
2020-02-14 16:19               ` Lorenzo Pieralisi
2020-02-14 16:19                 ` Lorenzo Pieralisi
2020-02-14 16:35                 ` Pankaj Bansal
2020-02-14 16:35                   ` Pankaj Bansal
2020-02-14 17:49                   ` Lorenzo Pieralisi
2020-02-14 17:49                     ` Lorenzo Pieralisi
2020-02-17 12:35                     ` Pankaj Bansal
2020-02-17 12:35                       ` Pankaj Bansal
2020-02-17 15:25                       ` Lorenzo Pieralisi
2020-02-17 15:25                         ` Lorenzo Pieralisi
2020-02-17 15:35                         ` Marc Zyngier
2020-02-17 15:35                           ` Marc Zyngier
2020-02-17 16:26                           ` Lorenzo Pieralisi
2020-02-17 16:26                             ` Lorenzo Pieralisi
2020-02-18  8:02                         ` Pankaj Bansal (OSS)
2020-02-18  8:02                           ` Pankaj Bansal (OSS)
2020-02-14 16:29               ` Robin Murphy
2020-02-14 16:29                 ` Robin Murphy

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=12531d6c569c7e14dffe8e288d9f4a0b@kernel.org \
    --to=maz@kernel.org \
    --cc=Andy.Wang@arm.com \
    --cc=Paul.Yang@arm.com \
    --cc=V.Sethi@nxp.com \
    --cc=calvin.johnson@nxp.com \
    --cc=cristian.sovaiala@nxp.com \
    --cc=guohanjun@huawei.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=jason@lakedaemon.net \
    --cc=jon@solid-run.com \
    --cc=laurentiu.tudor@nxp.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=makarand.pawagi@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=nleeder@codeaurora.org \
    --cc=pankaj.bansal@nxp.com \
    --cc=rjw@rjwysocki.net \
    --cc=robin.murphy@arm.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=stuyoder@gmail.com \
    --cc=sudeep.holla@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will@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 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.