RE: [RFC PATCH 3/3] PCI/ACPI: hisi: Add ACPI support for HiSilicon SoCs Host Controllers

2016-07-12 Thread Gabriele Paoloni


> -Original Message-
> From: linuxarm-boun...@huawei.com [mailto:linuxarm-boun...@huawei.com]
> On Behalf Of Gabriele Paoloni
> Sent: 12 July 2016 18:22
> To: Arnd Bergmann; liudongdong (C)
> Cc: lorenzo.pieral...@arm.com; Chenxin (Charles); raf...@kernel.org;
> t...@semihalf.com; pratyush.an...@gmail.com; linux-kernel@vger.kernel.org;
> Linuxarm; linux-a...@vger.kernel.org; helg...@kernel.org; linux-
> p...@vger.kernel.org; j...@redhat.com
> Subject: RE: [RFC PATCH 3/3] PCI/ACPI: hisi: Add ACPI support for
> HiSilicon SoCs Host Controllers
> 
> > -Original Message-
> > From: Arnd Bergmann [mailto:a...@arndb.de]
> > Sent: 12 July 2016 16:35
> > To: liudongdong (C)
> > Cc: helg...@kernel.org; raf...@kernel.org; lorenzo.pieral...@arm.com;
> > t...@semihalf.com; Wangzhou (B); pratyush.an...@gmail.com; linux-
> > p...@vger.kernel.org; linux-a...@vger.kernel.org; linux-
> > ker...@vger.kernel.org; j...@redhat.com; Gabriele Paoloni; Chenxin
> > (Charles); Linuxarm
> > Subject: Re: [RFC PATCH 3/3] PCI/ACPI: hisi: Add ACPI support for
> > HiSilicon SoCs Host Controllers
> >
> > On Tuesday, July 12, 2016 10:42:24 AM CEST Dongdong Liu wrote:
> > >  MAINTAINERS   |   1 +
> > >  drivers/pci/host/Kconfig  |   7 ++
> > >  drivers/pci/host/Makefile |   1 +
> > >  drivers/pci/host/mcfg-quirks.c|   8 ++
> > >  drivers/pci/host/mcfg-quirks.h|   8 ++
> > >  drivers/pci/host/pcie-hisi-acpi.c | 151
> > ++
> > >  drivers/pci/host/pcie-hisi.c  |   2 -
> > >  drivers/pci/host/pcie-hisi.h  |   2 +
> > >  8 files changed, 178 insertions(+), 2 deletions(-)
> > >  create mode 100644 drivers/pci/host/pcie-hisi-acpi.c
> > >
> > >
> >
> > Please keep the quirks separate from the PCI host drivers.
> >
> > The ACPI code includes its own host driver and the only thing
> > you need to override here is the config space access, so just put
> that
> > into drivers/acpi/
> 
> Hi Arnd, thanks for replying.
> 
> Basically we just followed what Tomasz has done in
> "[RFC PATCH v4 0/5] ECAM quirks handling for ARM64 platforms"
> 
> In this case the ThunderX quirks have been defined in
> "drivers/pci/host/pci-thunder-pem.c".
> 

Also on top of this I think that from
"Re: [RFC PATCH v3 1/2] ACPI/PCI: Check platform specific ECAM quirks"

Lorenzo suggested to add the static array of quirks (and therefore the
respective quirk mechanisms in "drivers/pci/host").

See:
[...]
It should be easier to implement (provided we find a place where
to add this static array of hooks matching MCFG, I suspect it is
going to be a file in drivers/pci/host but Tomasz and I need
input on that) and prevent abuse (since it is a static array of
hooks in a single place, it is easier to manage than section
entries).
[...]

Thanks

Gab

> Cheers
> Gab
> 
> >
> > Arnd
> 
> ___
> linuxarm mailing list
> linux...@huawei.com
> http://rnd-openeuler.huawei.com/mailman/listinfo/linuxarm


RE: [RFC PATCH 3/3] PCI/ACPI: hisi: Add ACPI support for HiSilicon SoCs Host Controllers

2016-07-12 Thread Gabriele Paoloni
> -Original Message-
> From: Arnd Bergmann [mailto:a...@arndb.de]
> Sent: 12 July 2016 16:35
> To: liudongdong (C)
> Cc: helg...@kernel.org; raf...@kernel.org; lorenzo.pieral...@arm.com;
> t...@semihalf.com; Wangzhou (B); pratyush.an...@gmail.com; linux-
> p...@vger.kernel.org; linux-a...@vger.kernel.org; linux-
> ker...@vger.kernel.org; j...@redhat.com; Gabriele Paoloni; Chenxin
> (Charles); Linuxarm
> Subject: Re: [RFC PATCH 3/3] PCI/ACPI: hisi: Add ACPI support for
> HiSilicon SoCs Host Controllers
> 
> On Tuesday, July 12, 2016 10:42:24 AM CEST Dongdong Liu wrote:
> >  MAINTAINERS   |   1 +
> >  drivers/pci/host/Kconfig  |   7 ++
> >  drivers/pci/host/Makefile |   1 +
> >  drivers/pci/host/mcfg-quirks.c|   8 ++
> >  drivers/pci/host/mcfg-quirks.h|   8 ++
> >  drivers/pci/host/pcie-hisi-acpi.c | 151
> ++
> >  drivers/pci/host/pcie-hisi.c  |   2 -
> >  drivers/pci/host/pcie-hisi.h  |   2 +
> >  8 files changed, 178 insertions(+), 2 deletions(-)
> >  create mode 100644 drivers/pci/host/pcie-hisi-acpi.c
> >
> >
> 
> Please keep the quirks separate from the PCI host drivers.
> 
> The ACPI code includes its own host driver and the only thing
> you need to override here is the config space access, so just put that
> into drivers/acpi/

Hi Arnd, thanks for replying.

Basically we just followed what Tomasz has done in
"[RFC PATCH v4 0/5] ECAM quirks handling for ARM64 platforms"

In this case the ThunderX quirks have been defined in
"drivers/pci/host/pci-thunder-pem.c".

Cheers
Gab

> 
>   Arnd



Re: [RFC PATCH 3/3] PCI/ACPI: hisi: Add ACPI support for HiSilicon SoCs Host Controllers

2016-07-12 Thread Arnd Bergmann
On Tuesday, July 12, 2016 10:42:24 AM CEST Dongdong Liu wrote:
>  MAINTAINERS   |   1 +
>  drivers/pci/host/Kconfig  |   7 ++
>  drivers/pci/host/Makefile |   1 +
>  drivers/pci/host/mcfg-quirks.c|   8 ++
>  drivers/pci/host/mcfg-quirks.h|   8 ++
>  drivers/pci/host/pcie-hisi-acpi.c | 151 
> ++
>  drivers/pci/host/pcie-hisi.c  |   2 -
>  drivers/pci/host/pcie-hisi.h  |   2 +
>  8 files changed, 178 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/pci/host/pcie-hisi-acpi.c
> 
> 

Please keep the quirks separate from the PCI host drivers.

The ACPI code includes its own host driver and the only thing
you need to override here is the config space access, so just put that
into drivers/acpi/

Arnd