Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-16 Thread Lorenzo Pieralisi
On Wed, Dec 16, 2015 at 06:21:37PM +0530, Jayachandran C. wrote:

[...]

> > That list is there to manage hotplug bridges, what makes you think
> > it is not necessary ? Jiang (in CC) can certainly comment on that and
> > how that list handling can be updated/simplified, if possible.
> 
> Looking thru the code, I think moving the MCFG code to common can be
> done in a simpler way. I have posted a new patchset for this.
> (And I don't see how the hotplug case needs the list, but that is not
>  relevant now)

You must work with Tomasz and come up with a unified patchset that
implements ACPI PCIe support for ARM64. We do not need more churn, we
need a working set, period. Posting separate RFCs just adds to the
confusion and to maintainers' review backlog, with the end result of
confusing everyone and achieving nothing.

Lorenzo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-16 Thread Lorenzo Pieralisi
On Wed, Dec 16, 2015 at 06:21:37PM +0530, Jayachandran C. wrote:

[...]

> > That list is there to manage hotplug bridges, what makes you think
> > it is not necessary ? Jiang (in CC) can certainly comment on that and
> > how that list handling can be updated/simplified, if possible.
> 
> Looking thru the code, I think moving the MCFG code to common can be
> done in a simpler way. I have posted a new patchset for this.
> (And I don't see how the hotplug case needs the list, but that is not
>  relevant now)

You must work with Tomasz and come up with a unified patchset that
implements ACPI PCIe support for ARM64. We do not need more churn, we
need a working set, period. Posting separate RFCs just adds to the
confusion and to maintainers' review backlog, with the end result of
confusing everyone and achieving nothing.

Lorenzo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-09 Thread Lorenzo Pieralisi
On Wed, Dec 09, 2015 at 03:31:41PM +0530, Jayachandran C. wrote:
> [trimmed the cc list a bit]
> On Mon, Dec 07, 2015 at 02:31:17PM -0600, Bjorn Helgaas wrote:
> > On Tue, Oct 27, 2015 at 05:38:31PM +0100, Tomasz Nowicki wrote:
> [...]
> > > 
> > > Tomasz Nowicki (10):
> > >   x86, pci: Reorder logic of pci_mmconfig_insert() function
> > >   x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code
> > > out of arch/x86/ directory
> > >   pci, acpi, mcfg: Provide generic implementation of MCFG code
> > > initialization.
> > >   x86, pci: mmconfig_{32,64}.c code refactoring - remove code
> > > duplication.
> > >   x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM
> > > driver.
> > >   pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
> > >   pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
> > > added or not.
> > >   x86, pci: Use previously added ECAM hot_added flag to remove ECAM
> > > regions.
> [...]
> > 
> > Waiting for an updated version after all the discussion.
> 
> Hi Bjorn,
> 
> After looking thru the code, I don't think moving the mmconfig code out
> of x86 and using it in ARM64 is a good idea.
> 
> The code maintains a list of mapping of ECAM regions which can modified
> at run time, and ends doing this sequence for doing a config access:
> 
> rcu_read_lock();
> addr = pci_dev_base(seg, bus, devfn);
>   list_for_each_entry_rcu(cfg, _mmcfg_list, list)
>   ...find mapping...
>   do pci operation
>   rcu_read_unlock();
> 
> A lot of the complexity in mmconfig_*.c is to maintain and validate
> the pci_mmcfg_list which seems to be unecessary.

That list is there to manage hotplug bridges, what makes you think
it is not necessary ? Jiang (in CC) can certainly comment on that and
how that list handling can be updated/simplified, if possible.

> The better way would be to keep the mapping of ECAM region in the PCI
> host bridge sysdata like pci-host-generic and directly access using
> map_bus/read/write.
> 
> I see that early raw_pci_read/raw_pci_write may need to be supported.
> I am not sure if this is needed in ARM64 - and if it is, we can handle
> this by taking an early mapping for ECAM regions until the PCI host
> bridges are setup, and dropping the mapping at that point.

I do not think it is needed (and if it is it can be added later, it
should not block this series), this was already debated in previous
threads (and in the ASWG, where basically nobody could provide a reason
why those raw accessors in ACPICA are meant to exist, they are there for
AML to access config space, why that has to be happen before PCI busses
are enumerated is still a mystery to me).

Lorenzo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-09 Thread Lorenzo Pieralisi
On Wed, Dec 09, 2015 at 03:31:41PM +0530, Jayachandran C. wrote:
> [trimmed the cc list a bit]
> On Mon, Dec 07, 2015 at 02:31:17PM -0600, Bjorn Helgaas wrote:
> > On Tue, Oct 27, 2015 at 05:38:31PM +0100, Tomasz Nowicki wrote:
> [...]
> > > 
> > > Tomasz Nowicki (10):
> > >   x86, pci: Reorder logic of pci_mmconfig_insert() function
> > >   x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code
> > > out of arch/x86/ directory
> > >   pci, acpi, mcfg: Provide generic implementation of MCFG code
> > > initialization.
> > >   x86, pci: mmconfig_{32,64}.c code refactoring - remove code
> > > duplication.
> > >   x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM
> > > driver.
> > >   pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
> > >   pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
> > > added or not.
> > >   x86, pci: Use previously added ECAM hot_added flag to remove ECAM
> > > regions.
> [...]
> > 
> > Waiting for an updated version after all the discussion.
> 
> Hi Bjorn,
> 
> After looking thru the code, I don't think moving the mmconfig code out
> of x86 and using it in ARM64 is a good idea.
> 
> The code maintains a list of mapping of ECAM regions which can modified
> at run time, and ends doing this sequence for doing a config access:
> 
> rcu_read_lock();
> addr = pci_dev_base(seg, bus, devfn);
>   list_for_each_entry_rcu(cfg, _mmcfg_list, list)
>   ...find mapping...
>   do pci operation
>   rcu_read_unlock();
> 
> A lot of the complexity in mmconfig_*.c is to maintain and validate
> the pci_mmcfg_list which seems to be unecessary.

That list is there to manage hotplug bridges, what makes you think
it is not necessary ? Jiang (in CC) can certainly comment on that and
how that list handling can be updated/simplified, if possible.

> The better way would be to keep the mapping of ECAM region in the PCI
> host bridge sysdata like pci-host-generic and directly access using
> map_bus/read/write.
> 
> I see that early raw_pci_read/raw_pci_write may need to be supported.
> I am not sure if this is needed in ARM64 - and if it is, we can handle
> this by taking an early mapping for ECAM regions until the PCI host
> bridges are setup, and dropping the mapping at that point.

I do not think it is needed (and if it is it can be added later, it
should not block this series), this was already debated in previous
threads (and in the ASWG, where basically nobody could provide a reason
why those raw accessors in ACPICA are meant to exist, they are there for
AML to access config space, why that has to be happen before PCI busses
are enumerated is still a mystery to me).

Lorenzo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-08 Thread Jeremy Linton

On 10/27/2015 11:38 AM, Tomasz Nowicki wrote:

 From the functionality point of view this series might be split into two logic 
parts:
1. Making MMCONFIG code arch-agnostic which allows all architectures to collect
PCI config regions and used when necessary.
2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
initialization for ARM64



Tested with legacy interrupts on ARM Juno R1, HP m400 (APM Potenza), and 
APM mustang. The latter two platforms have an additional pci quirk patch 
applied (to be posted shortly) to fix their problems with the config 
space accessors.


Tested-by: Jeremy Linton 

Thanks!



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-08 Thread Jeremy Linton

On 10/27/2015 11:38 AM, Tomasz Nowicki wrote:

 From the functionality point of view this series might be split into two logic 
parts:
1. Making MMCONFIG code arch-agnostic which allows all architectures to collect
PCI config regions and used when necessary.
2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
initialization for ARM64



Tested with legacy interrupts on ARM Juno R1, HP m400 (APM Potenza), and 
APM mustang. The latter two platforms have an additional pci quirk patch 
applied (to be posted shortly) to fix their problems with the config 
space accessors.


Tested-by: Jeremy Linton 

Thanks!



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-07 Thread Bjorn Helgaas
On Tue, Oct 27, 2015 at 05:38:31PM +0100, Tomasz Nowicki wrote:
> From the functionality point of view this series might be split into two 
> logic parts:
> 1. Making MMCONFIG code arch-agnostic which allows all architectures to 
> collect
>PCI config regions and used when necessary.
> 2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
>initialization for ARM64
> 
> Patches has been built on top of:
> [Patch v7 0/7] Consolidate ACPI PCI root common code into ACPI core
> https://lkml.org/lkml/2015/10/14/31
> Git branch can be found here:
> https://git.linaro.org/leg/acpi/acpi.git/shortlog/refs/heads/pci-acpi-upstream
> 
> This has been tested on Cavium ThunderX 1 socket server.
> Any help in reviewing and testing is very appreciated.
> 
> Hanjun Guo (1):
>   XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y
> 
> Tomasz Nowicki (10):
>   x86, pci: Reorder logic of pci_mmconfig_insert() function
>   x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code
> out of arch/x86/ directory
>   pci, acpi, mcfg: Provide generic implementation of MCFG code
> initialization.
>   x86, pci: mmconfig_{32,64}.c code refactoring - remove code
> duplication.
>   x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM
> driver.
>   pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
>   pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
> added or not.
>   x86, pci: Use previously added ECAM hot_added flag to remove ECAM
> regions.
>   pci, acpi: Provide generic way to assign bus domain number.
>   arm64, pci, acpi: Support for ACPI based PCI hostbridge init
> 
>  arch/arm64/Kconfig |   6 +
>  arch/arm64/kernel/pci.c| 208 --
>  arch/x86/Kconfig   |   4 +
>  arch/x86/include/asm/pci_x86.h |  28 +
>  arch/x86/pci/acpi.c|  17 +--
>  arch/x86/pci/mmconfig-shared.c | 250 
> +++--
>  arch/x86/pci/mmconfig_32.c |  11 +-
>  arch/x86/pci/mmconfig_64.c |  67 +--
>  arch/x86/pci/numachip.c|   1 +
>  drivers/acpi/Makefile  |   1 +
>  drivers/acpi/mcfg.c| 104 +
>  drivers/acpi/pci_root.c|   2 +-
>  drivers/pci/Kconfig|  10 ++
>  drivers/pci/Makefile   |   5 +
>  drivers/pci/ecam.c | 234 ++
>  drivers/pci/pci.c  |  30 -
>  drivers/xen/pci.c  |   7 +-
>  include/linux/acpi.h   |   2 +
>  include/linux/ecam.h   |  44 
>  19 files changed, 691 insertions(+), 340 deletions(-)
>  create mode 100644 drivers/acpi/mcfg.c
>  create mode 100644 drivers/pci/ecam.c
>  create mode 100644 include/linux/ecam.h

Waiting for an updated version after all the discussion.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-07 Thread Bjorn Helgaas
On Tue, Oct 27, 2015 at 05:38:31PM +0100, Tomasz Nowicki wrote:
> From the functionality point of view this series might be split into two 
> logic parts:
> 1. Making MMCONFIG code arch-agnostic which allows all architectures to 
> collect
>PCI config regions and used when necessary.
> 2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
>initialization for ARM64
> 
> Patches has been built on top of:
> [Patch v7 0/7] Consolidate ACPI PCI root common code into ACPI core
> https://lkml.org/lkml/2015/10/14/31
> Git branch can be found here:
> https://git.linaro.org/leg/acpi/acpi.git/shortlog/refs/heads/pci-acpi-upstream
> 
> This has been tested on Cavium ThunderX 1 socket server.
> Any help in reviewing and testing is very appreciated.
> 
> Hanjun Guo (1):
>   XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y
> 
> Tomasz Nowicki (10):
>   x86, pci: Reorder logic of pci_mmconfig_insert() function
>   x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code
> out of arch/x86/ directory
>   pci, acpi, mcfg: Provide generic implementation of MCFG code
> initialization.
>   x86, pci: mmconfig_{32,64}.c code refactoring - remove code
> duplication.
>   x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM
> driver.
>   pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
>   pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
> added or not.
>   x86, pci: Use previously added ECAM hot_added flag to remove ECAM
> regions.
>   pci, acpi: Provide generic way to assign bus domain number.
>   arm64, pci, acpi: Support for ACPI based PCI hostbridge init
> 
>  arch/arm64/Kconfig |   6 +
>  arch/arm64/kernel/pci.c| 208 --
>  arch/x86/Kconfig   |   4 +
>  arch/x86/include/asm/pci_x86.h |  28 +
>  arch/x86/pci/acpi.c|  17 +--
>  arch/x86/pci/mmconfig-shared.c | 250 
> +++--
>  arch/x86/pci/mmconfig_32.c |  11 +-
>  arch/x86/pci/mmconfig_64.c |  67 +--
>  arch/x86/pci/numachip.c|   1 +
>  drivers/acpi/Makefile  |   1 +
>  drivers/acpi/mcfg.c| 104 +
>  drivers/acpi/pci_root.c|   2 +-
>  drivers/pci/Kconfig|  10 ++
>  drivers/pci/Makefile   |   5 +
>  drivers/pci/ecam.c | 234 ++
>  drivers/pci/pci.c  |  30 -
>  drivers/xen/pci.c  |   7 +-
>  include/linux/acpi.h   |   2 +
>  include/linux/ecam.h   |  44 
>  19 files changed, 691 insertions(+), 340 deletions(-)
>  create mode 100644 drivers/acpi/mcfg.c
>  create mode 100644 drivers/pci/ecam.c
>  create mode 100644 include/linux/ecam.h

Waiting for an updated version after all the discussion.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-30 Thread Suravee Suthikulpanit
Tested on AMD Seattle platform (Overdrive revB) w/ both MSI and legacy 
interrupt.


Tested-by: Suravee Suthikulpanit 

Thanks,
Suravee

On 10/27/15 11:38, Tomasz Nowicki wrote:

 From the functionality point of view this series might be split into two logic 
parts:
1. Making MMCONFIG code arch-agnostic which allows all architectures to collect
PCI config regions and used when necessary.
2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
initialization for ARM64

Patches has been built on top of:
[Patch v7 0/7] Consolidate ACPI PCI root common code into ACPI core
https://lkml.org/lkml/2015/10/14/31
Git branch can be found here:
https://git.linaro.org/leg/acpi/acpi.git/shortlog/refs/heads/pci-acpi-upstream

This has been tested on Cavium ThunderX 1 socket server.
Any help in reviewing and testing is very appreciated.

Hanjun Guo (1):
   XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y

Tomasz Nowicki (10):
   x86, pci: Reorder logic of pci_mmconfig_insert() function
   x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code
 out of arch/x86/ directory
   pci, acpi, mcfg: Provide generic implementation of MCFG code
 initialization.
   x86, pci: mmconfig_{32,64}.c code refactoring - remove code
 duplication.
   x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM
 driver.
   pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
   pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
 added or not.
   x86, pci: Use previously added ECAM hot_added flag to remove ECAM
 regions.
   pci, acpi: Provide generic way to assign bus domain number.
   arm64, pci, acpi: Support for ACPI based PCI hostbridge init

  arch/arm64/Kconfig |   6 +
  arch/arm64/kernel/pci.c| 208 --
  arch/x86/Kconfig   |   4 +
  arch/x86/include/asm/pci_x86.h |  28 +
  arch/x86/pci/acpi.c|  17 +--
  arch/x86/pci/mmconfig-shared.c | 250 +++--
  arch/x86/pci/mmconfig_32.c |  11 +-
  arch/x86/pci/mmconfig_64.c |  67 +--
  arch/x86/pci/numachip.c|   1 +
  drivers/acpi/Makefile  |   1 +
  drivers/acpi/mcfg.c| 104 +
  drivers/acpi/pci_root.c|   2 +-
  drivers/pci/Kconfig|  10 ++
  drivers/pci/Makefile   |   5 +
  drivers/pci/ecam.c | 234 ++
  drivers/pci/pci.c  |  30 -
  drivers/xen/pci.c  |   7 +-
  include/linux/acpi.h   |   2 +
  include/linux/ecam.h   |  44 
  19 files changed, 691 insertions(+), 340 deletions(-)
  create mode 100644 drivers/acpi/mcfg.c
  create mode 100644 drivers/pci/ecam.c
  create mode 100644 include/linux/ecam.h


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-30 Thread Tomasz Nowicki


On 10/30/2015 05:07 AM, Jon Masters wrote:

Hi Tomasz,

Thanks for posting this series.

On 10/27/2015 12:38 PM, Tomasz Nowicki wrote:


 From the functionality point of view this series might be split into two logic 
parts:
1. Making MMCONFIG code arch-agnostic which allows all architectures to collect
PCI config regions and used when necessary.
2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
initialization for ARM64

Can I confirm that the intention here is that this replaces Hanjun's
previous patch series? Here's the previous one we were tracking:

https://lkml.kernel.org/g/1432644564-24746-1-git-send-email-hanjun@linaro.org

Indeed, we can call it next version.


Assuming that is the case, then we will ping a number of folks to
conduct testing and provide acks (this has already been discussed in a
number of conversations with semiconductors over the past few days).

Yes, please, thanks!

Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-30 Thread Tomasz Nowicki


On 10/30/2015 05:07 AM, Jon Masters wrote:

Hi Tomasz,

Thanks for posting this series.

On 10/27/2015 12:38 PM, Tomasz Nowicki wrote:


 From the functionality point of view this series might be split into two logic 
parts:
1. Making MMCONFIG code arch-agnostic which allows all architectures to collect
PCI config regions and used when necessary.
2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
initialization for ARM64

Can I confirm that the intention here is that this replaces Hanjun's
previous patch series? Here's the previous one we were tracking:

https://lkml.kernel.org/g/1432644564-24746-1-git-send-email-hanjun@linaro.org

Indeed, we can call it next version.


Assuming that is the case, then we will ping a number of folks to
conduct testing and provide acks (this has already been discussed in a
number of conversations with semiconductors over the past few days).

Yes, please, thanks!

Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-30 Thread Suravee Suthikulpanit
Tested on AMD Seattle platform (Overdrive revB) w/ both MSI and legacy 
interrupt.


Tested-by: Suravee Suthikulpanit 

Thanks,
Suravee

On 10/27/15 11:38, Tomasz Nowicki wrote:

 From the functionality point of view this series might be split into two logic 
parts:
1. Making MMCONFIG code arch-agnostic which allows all architectures to collect
PCI config regions and used when necessary.
2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
initialization for ARM64

Patches has been built on top of:
[Patch v7 0/7] Consolidate ACPI PCI root common code into ACPI core
https://lkml.org/lkml/2015/10/14/31
Git branch can be found here:
https://git.linaro.org/leg/acpi/acpi.git/shortlog/refs/heads/pci-acpi-upstream

This has been tested on Cavium ThunderX 1 socket server.
Any help in reviewing and testing is very appreciated.

Hanjun Guo (1):
   XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y

Tomasz Nowicki (10):
   x86, pci: Reorder logic of pci_mmconfig_insert() function
   x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code
 out of arch/x86/ directory
   pci, acpi, mcfg: Provide generic implementation of MCFG code
 initialization.
   x86, pci: mmconfig_{32,64}.c code refactoring - remove code
 duplication.
   x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM
 driver.
   pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
   pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
 added or not.
   x86, pci: Use previously added ECAM hot_added flag to remove ECAM
 regions.
   pci, acpi: Provide generic way to assign bus domain number.
   arm64, pci, acpi: Support for ACPI based PCI hostbridge init

  arch/arm64/Kconfig |   6 +
  arch/arm64/kernel/pci.c| 208 --
  arch/x86/Kconfig   |   4 +
  arch/x86/include/asm/pci_x86.h |  28 +
  arch/x86/pci/acpi.c|  17 +--
  arch/x86/pci/mmconfig-shared.c | 250 +++--
  arch/x86/pci/mmconfig_32.c |  11 +-
  arch/x86/pci/mmconfig_64.c |  67 +--
  arch/x86/pci/numachip.c|   1 +
  drivers/acpi/Makefile  |   1 +
  drivers/acpi/mcfg.c| 104 +
  drivers/acpi/pci_root.c|   2 +-
  drivers/pci/Kconfig|  10 ++
  drivers/pci/Makefile   |   5 +
  drivers/pci/ecam.c | 234 ++
  drivers/pci/pci.c  |  30 -
  drivers/xen/pci.c  |   7 +-
  include/linux/acpi.h   |   2 +
  include/linux/ecam.h   |  44 
  19 files changed, 691 insertions(+), 340 deletions(-)
  create mode 100644 drivers/acpi/mcfg.c
  create mode 100644 drivers/pci/ecam.c
  create mode 100644 include/linux/ecam.h


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-29 Thread Hanjun Guo
Hi Jon,

On 2015/10/30 12:07, Jon Masters wrote:
> Hi Tomasz,
>
> Thanks for posting this series.
>
> On 10/27/2015 12:38 PM, Tomasz Nowicki wrote:
>
>> From the functionality point of view this series might be split into two 
>> logic parts:
>> 1. Making MMCONFIG code arch-agnostic which allows all architectures to 
>> collect
>>PCI config regions and used when necessary.
>> 2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
>>initialization for ARM64
> Can I confirm that the intention here is that this replaces Hanjun's
> previous patch series? Here's the previous one we were tracking:
>
> https://lkml.kernel.org/g/1432644564-24746-1-git-send-email-hanjun@linaro.org

Yes, that's the new version according to the discussion from my version.

>
> Assuming that is the case, then we will ping a number of folks to
> conduct testing and provide acks (this has already been discussed in a
> number of conversations with semiconductors over the past few days).

Much appreciated.

Thanks
Hanjun

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-29 Thread Jon Masters
Hi Tomasz,

Thanks for posting this series.

On 10/27/2015 12:38 PM, Tomasz Nowicki wrote:

> From the functionality point of view this series might be split into two 
> logic parts:
> 1. Making MMCONFIG code arch-agnostic which allows all architectures to 
> collect
>PCI config regions and used when necessary.
> 2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
>initialization for ARM64

Can I confirm that the intention here is that this replaces Hanjun's
previous patch series? Here's the previous one we were tracking:

https://lkml.kernel.org/g/1432644564-24746-1-git-send-email-hanjun@linaro.org

Assuming that is the case, then we will ping a number of folks to
conduct testing and provide acks (this has already been discussed in a
number of conversations with semiconductors over the past few days).

Thanks,

Jon.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-29 Thread Hanjun Guo
Hi Jon,

On 2015/10/30 12:07, Jon Masters wrote:
> Hi Tomasz,
>
> Thanks for posting this series.
>
> On 10/27/2015 12:38 PM, Tomasz Nowicki wrote:
>
>> From the functionality point of view this series might be split into two 
>> logic parts:
>> 1. Making MMCONFIG code arch-agnostic which allows all architectures to 
>> collect
>>PCI config regions and used when necessary.
>> 2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
>>initialization for ARM64
> Can I confirm that the intention here is that this replaces Hanjun's
> previous patch series? Here's the previous one we were tracking:
>
> https://lkml.kernel.org/g/1432644564-24746-1-git-send-email-hanjun@linaro.org

Yes, that's the new version according to the discussion from my version.

>
> Assuming that is the case, then we will ping a number of folks to
> conduct testing and provide acks (this has already been discussed in a
> number of conversations with semiconductors over the past few days).

Much appreciated.

Thanks
Hanjun

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-10-29 Thread Jon Masters
Hi Tomasz,

Thanks for posting this series.

On 10/27/2015 12:38 PM, Tomasz Nowicki wrote:

> From the functionality point of view this series might be split into two 
> logic parts:
> 1. Making MMCONFIG code arch-agnostic which allows all architectures to 
> collect
>PCI config regions and used when necessary.
> 2. Using generic MMCONFIG code and introducing ACPI based PCI hostbridge
>initialization for ARM64

Can I confirm that the intention here is that this replaces Hanjun's
previous patch series? Here's the previous one we were tracking:

https://lkml.kernel.org/g/1432644564-24746-1-git-send-email-hanjun@linaro.org

Assuming that is the case, then we will ping a number of folks to
conduct testing and provide acks (this has already been discussed in a
number of conversations with semiconductors over the past few days).

Thanks,

Jon.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/