Re: [PATCH 3/3] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-22 Thread Lorenzo Pieralisi
On Thu, Sep 17, 2015 at 11:41:34PM +0100, David Daney wrote: > From: David Daney > > The config space for external PCIe root complexes on some Cavium > ThunderX SoCs is very similar to CAM and ECAM, but differs in the > shift values that have to be applied to the bus and

Re: [PATCH 3/3] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-22 Thread Lorenzo Pieralisi
On Tue, Sep 22, 2015 at 05:13:45PM +0100, David Daney wrote: > On 09/22/2015 09:05 AM, Lorenzo Pieralisi wrote: > > On Thu, Sep 17, 2015 at 11:41:34PM +0100, David Daney wrote: [...] > >> Properties of the host controller node: > >> > >> -- compatible

Re: [PATCH 05/11] x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code out of arch/x86/ directory

2015-09-25 Thread Lorenzo Pieralisi
On Fri, Sep 25, 2015 at 05:02:09PM +0100, Tomasz Nowicki wrote: [...] > > My concerns/ideas related to raw accessors for ARM64, please correct me > > at any point. > > > > ACPI spec - chapter: 19.5.96 OperationRegion (Declare Operation Region) > > defines PCI_Config as one of region types. Every

Re: [PATCH 2/3] PCI: Add quirks for devices found on Cavium ThunderX SoCs.

2015-09-22 Thread Lorenzo Pieralisi
On Fri, Sep 18, 2015 at 08:45:50PM +0100, Arnd Bergmann wrote: > On Friday 18 September 2015 10:00:32 David Daney wrote: > > On 09/18/2015 12:19 AM, Arnd Bergmann wrote: > > > On Thursday 17 September 2015 15:41:33 David Daney wrote: > > >> From: David Daney > > >> > > >>

Re: [PATCH] arm/ls1021a: Add Sleep feature for ls1021

2015-09-18 Thread Lorenzo Pieralisi
On Fri, Sep 18, 2015 at 03:37:15AM +0100, Wang Dongsheng wrote: [...] > > > How about PSCI 1.0 support, could you share some information about it? > > > > Lorenzo has implemented basic PSCI 1.0 support [1,2], and Sudeep has been > > working on SYSTEM_SUSPEND [3], though I'm not immediately

Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64.

2015-12-08 Thread Lorenzo Pieralisi
On Tue, Dec 08, 2015 at 03:03:03PM +0800, fu@linaro.org wrote: > From: Tomasz Nowicki [...] > +#if defined(__i386__) || defined(__x86_64__) > /* > * Check if firmware advertises firmware first mode. We need FF bit to be set > * along with a set of MC banks

Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64.

2015-12-08 Thread Lorenzo Pieralisi
On Tue, Dec 08, 2015 at 09:08:24PM +0800, Fu Wei wrote: > Hi Lorenzo, > > > > On 8 December 2015 at 20:52, Hanjun Guo <hanjun@linaro.org> wrote: > > Hi Lorenzo, > > > > On 12/08/2015 08:34 PM, Lorenzo Pieralisi wrote: > >> > >> On

Re: [PATCH v2] acpi, apei, arm64: APEI initial support for aarch64.

2015-12-02 Thread Lorenzo Pieralisi
On Wed, Dec 02, 2015 at 10:59:05PM +0800, fu@linaro.org wrote: [...] > +#ifdef CONFIG_ACPI_APEI > +extern int acpi_disable_cmcff; > +#endif > > static inline void disable_acpi(void) > { > @@ -94,6 +97,7 @@ static inline const char *acpi_get_enable_method(int cpu) > > #ifdef

Re: [RFC PATCH 1/2] PCI/ACPI: Add ACPI support for non ECAM Host Bridge Controllers

2015-12-04 Thread Lorenzo Pieralisi
On Thu, Dec 03, 2015 at 09:58:14PM +0100, Arnd Bergmann wrote: [...] > > Let's first rewind a bit though, to summarize: > > > > 1) we need a way to configure a "generic host controller" with host > >controller specific config methods (ie ECAM, even though is a PCI > >standard it is not

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

Re: [PATCH] arm64: dts: berlin4ct: support cpuidle-dt

2015-12-02 Thread Lorenzo Pieralisi
eng Zhang <jszh...@marvell.com> > --- > arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 16 > 1 file changed, 16 insertions(+) Acked-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > > diff --git a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi > b/arch/arm64/bo

Re: [RFC PATCH 1/2] PCI/ACPI: Add ACPI support for non ECAM Host Bridge Controllers

2015-12-03 Thread Lorenzo Pieralisi
Hi Gab, On Thu, Dec 03, 2015 at 11:19:58PM +0800, Gabriele Paoloni wrote: [...] > +void acpi_arm64_quirks(void) > +{ > + int i = 0; > + > + while (quirks_array[i]) { > + acpi_scan_add_handler(quirks_array[i]); > + i++; > + } > + > +} This code is not arm64

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

Re: arm64 qemu tests failing in linux-next since 'arm64: kernel: enforce pmuserenr_el0 initialization and restore'

2016-01-06 Thread Lorenzo Pieralisi
Hi Guenter, On Wed, Dec 23, 2015 at 04:52:51PM -0800, Guenter Roeck wrote: > Hi all, > > since commit 60792ad349f3 ("arm64: kernel: enforce pmuserenr_el0 > initialization > and restore"), my arm64 qemu tests of linux-next are failing. After this > commit, > qemu does not display any output. >

Re: [Qemu-devel] arm64 qemu tests failing in linux-next since 'arm64: kernel: enforce pmuserenr_el0 initialization and restore'

2016-01-07 Thread Lorenzo Pieralisi
On Thu, Jan 07, 2016 at 01:25:35PM +, Peter Maydell wrote: > On 24 December 2015 at 00:52, Guenter Roeck wrote: > > Hi all, > > > > since commit 60792ad349f3 ("arm64: kernel: enforce pmuserenr_el0 > > initialization > > and restore"), my arm64 qemu tests of linux-next are

Re: [PATCH V2 00/23] MMCONFIG refactoring and support for ARM64 PCI hostbridge init based on ACPI

2015-12-21 Thread Lorenzo Pieralisi
On Fri, Dec 18, 2015 at 06:56:39PM +, ok...@codeaurora.org wrote: [...] > Here is what I have as an IO resource. > > QWORDIO(//Consumed-And-produced resource > ResourceProducer, // bit 0 of general flags is 0 >

Re: [Patch v7 4/7] PCI/ACPI: Add interface acpi_pci_root_create()

2015-11-20 Thread Lorenzo Pieralisi
Hi Jiang, On Sat, Nov 14, 2015 at 01:49:08AM +0800, Jiang Liu wrote: [...] > > Not really. My concern is that there might be platforms out there with > > an offset between the CPU and PCI physical address spaces, and if we > > remove the offset value in acpi_decode_space we can break them, > >

Re: [PATCH v4 3/5] drivers: psci: refactor psci_cpu_init_idle in preparation for ACPI LPI support

2016-06-09 Thread Lorenzo Pieralisi
On Tue, Apr 19, 2016 at 01:30:11PM +0100, Sudeep Holla wrote: > Inorder to accomodate bot DT and ACPI LPI support in psci_cpu_init_idle, > move the device tree specific into psci_dt_cpu_init_idle. > > Cc: Mark Rutland <mark.rutl...@arm.com> > Cc: Lorenzo Pieralisi <lorenzo

[RFC PATCH v2 00/15] ACPI IORT ARM SMMU v3 support

2016-06-07 Thread Lorenzo Pieralisi
arly review/testing purposes here: git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git acpi/iort-smmu-v2 Tested on FVP models for ARM SMMU v3 probing path. Lorenzo Pieralisi (15): drivers: acpi: iort: fix struct pci_dev compiler warnings drivers: irqchip: its: fix its_acpi_prob

[RFC PATCH v2 06/15] drivers: acpi: iort: enhance device identifiers mappings

2016-06-07 Thread Lorenzo Pieralisi
ids mapping API to cater for all mappings allowed by the IORT specification. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Hanjun Guo <hanjun@linaro.org> Cc: Tomasz Nowicki <t...@semihalf.com> Cc: "Rafael J. Wysocki" <r...@rjwysocki.net> ---

[RFC PATCH v2 05/15] drivers: acpi: iort: add support for named component look-up

2016-06-07 Thread Lorenzo Pieralisi
; this patch fills the gap by adding support for named components IORT node look-ups. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Hanjun Guo <hanjun@linaro.org> Cc: Tomasz Nowicki <t...@semihalf.com> Cc: "Rafael J. Wysocki" <r...@rjwysocki.net

[RFC PATCH v2 02/15] drivers: irqchip: its: fix its_acpi_probe() prototype

2016-06-07 Thread Lorenzo Pieralisi
(); ^ drivers/irqchip/irq-gic-v3-its.c:1749:27: note: declared here static inline void __init its_acpi_probe(struct irq_domain *parent_domain) { } This patch fixes the prototype and the corresponding compilation errors. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Tomasz Nowi

[RFC PATCH v2 14/15] drivers: acpi: iort: add function to retrieve IOMMU platform devices

2016-06-07 Thread Lorenzo Pieralisi
atform devices created out of IORT nodes for SMMUs contains a pointer to the respective IORT node). Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Hanjun Guo <hanjun@linaro.org> Cc: Tomasz Nowicki <t...@semihalf.com> Cc: "Rafael J. Wysocki" <

[RFC PATCH v2 12/15] drivers: acpi: implement acpi_dma_configure

2016-06-07 Thread Lorenzo Pieralisi
case, but since arch_setup_dma_ops() is a NOP on all architectures but ARM/ARM64 this patch does not change the current kernel behaviour on them. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Bjorn Helgaas <bhelg...@google.com> Cc: Robin Murphy <robin.mur...@arm.

[RFC PATCH v2 15/15] drivers: iommu: arm-smmu-v3: allow ACPI based streamid translation

2016-06-07 Thread Lorenzo Pieralisi
() hook to carry out streamid translation for ARM SMMU v3 on ACPI based systems. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Will Deacon <will.dea...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> Cc: Joerg Roedel <j...@8bytes.org> --- drivers/

[RFC PATCH v2 07/15] drivers: acpi: iort: add node match function

2016-06-07 Thread Lorenzo Pieralisi
if a given IORT node type is present or not in the ACPI table, providing an ACPI IORT equivalent for of_find_matching_node(). Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Hanjun Guo <hanjun@linaro.org> Cc: Tomasz Nowicki <t...@semihalf.com> Cc: &quo

[RFC PATCH v2 01/15] drivers: acpi: iort: fix struct pci_dev compiler warnings

2016-06-07 Thread Lorenzo Pieralisi
*iort_pci_get_domain(struct pci_dev *pdev, u32 req_id); This patch fixes the warnings with a struct pci_dev forward declaration in the IORT header file. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Tomasz Nowicki <t...@semihalf.com> --- include/linux/iort.h | 1 + 1 file changed,

[RFC PATCH v2 04/15] drivers: acpi: iort: add support for IOMMU registration

2016-06-07 Thread Lorenzo Pieralisi
operations, along with a hook (ie iommu_xlate()) that is used to translate devices ids to ids usable by the SMMU driver to set-up IOMMU group/domain configuration. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Hanjun Guo <hanjun@linaro.org> Cc: Tomasz Nowicki <t...@s

[RFC PATCH v2 10/15] drivers: iommu: arm-smmu-v3: enable ACPI driver initialization

2016-06-07 Thread Lorenzo Pieralisi
the driver and initialize the bus IOMMU operations accordingly. This patch changes the logic in arm-smmu-v3 init call to allow for it to be probed in ACPI systems. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Will Deacon <will.dea...@arm.com> Cc: Robin Murph

[RFC PATCH v2 13/15] drivers: acpi: iort: introduce iort_iommu_configure

2016-06-07 Thread Lorenzo Pieralisi
the iort based IOMMU configuration for ARM ACPI systems and hook it up in the ACPI kernel layer that implements DMA configuration for a device. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Hanjun Guo <hanjun@linaro.org> Cc: Tomasz Nowicki <t...@semihalf.com

[RFC PATCH v2 03/15] arm64: mm: change IOMMU notifier action to attach DMA ops

2016-06-07 Thread Lorenzo Pieralisi
. This patch changes the notifier action upon which dma_ops are attached to devices and defer it to driver binding time, so that IOMMU devices have a chance to be probed and to register their bus notifiers before the dma_ops attach sequence for a device is actually carried out. Signed-off-by: Lorenzo

[RFC PATCH v2 08/15] drivers: acpi: iort: add support for ARM SMMU platform devices creation

2016-06-07 Thread Lorenzo Pieralisi
to define the platform devices names, init the IOMMUs, count their resources and finally initialize them. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Hanjun Guo <hanjun@linaro.org> Cc: Tomasz Nowicki <t...@semihalf.com> Cc: "Rafael J. Wysocki" <r

[RFC PATCH v2 11/15] drivers: iommu: arm-smmu-v3: add IORT iommu configuration

2016-06-07 Thread Lorenzo Pieralisi
in turn. This patch adds the IORT IOMMU configuration for the ARM SMMU v3 kernel driver. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Will Deacon <will.dea...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> Cc: Joerg Roedel <j...@8bytes.org> --- drivers/i

[RFC PATCH v2 09/15] drivers: iommu: arm-smmu-v3: split probe functions into DT/generic portions

2016-06-07 Thread Lorenzo Pieralisi
portions so that other FW interfaces (ie ACPI) can reuse the HW probing functions and skip the DT portion accordingly. This patch implements no functional change, only code reshuffling. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Will Deacon <will.dea...@arm.com> Cc

Re: [PATCH v5 4/5] arm64: add support for ACPI Low Power Idle(LPI)

2016-06-10 Thread Lorenzo Pieralisi
[+ Daniel, Kevin] On Wed, May 11, 2016 at 04:37:41PM +0100, Sudeep Holla wrote: > This patch adds appropriate callbacks to support ACPI Low Power Idle > (LPI) on ARM64. > > Cc: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > Cc: Mark Rutland <mark.rutl...@arm.

Re: [PATCH V8 5/9] pci, acpi: add acpi hook to assign domain number.

2016-06-10 Thread Lorenzo Pieralisi
On Fri, Jun 10, 2016 at 04:14:58PM +0100, Lorenzo Pieralisi wrote: > Hi Bjorn, Tomasz, > > On Tue, Jun 07, 2016 at 07:15:59PM -0500, Bjorn Helgaas wrote: > > [...] > > > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > > > index eb431b5..2b52178

Re: [PATCH V9 07/11] PCI: Factor DT specific pci_bus_find_domain_nr() code out

2016-06-10 Thread Lorenzo Pieralisi
e is self > contained, paving the way for retrieving domain number in > pci_bus_find_domain_nr() with additional firmware methods (ie ACPI). > > Signed-off-by: Tomasz Nowicki <t...@semihalf.com> > --- > drivers/pci/pci.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletio

Re: [PATCH V9 06/11] PCI: Refactor generic bus domain assignment

2016-06-10 Thread Lorenzo Pieralisi
t; > Signed-off-by: Tomasz Nowicki <t...@semihalf.com> Reviewed-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > --- > drivers/pci/pci.c | 4 ++-- > drivers/pci/probe.c | 4 +++- > include/linux/pci.h | 7 +-- > 3 files changed, 6 insertions(+), 9 deletions(-

Re: [PATCH V9 10/11] ARM64/PCI: Implement ACPI low-level calls to access PCI_Config region from AML

2016-06-10 Thread Lorenzo Pieralisi
; RAW accessors can look-up PCI operations through the struct pci_bus > associated with a PCI bus. > > Signed-off-by: Tomasz Nowicki <t...@semihalf.com> > Signed-off-by: Jayachandran C <jchan...@broadcom.com> Reviewed-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com>

Re: [PATCH V8 7/9] acpi: Add generic MCFG table handling

2016-06-03 Thread Lorenzo Pieralisi
;mcfg_addr = entry->address; Let's hope that no one will ever implement a hotplug bridge with config space starting at physical address 0x0. Nit: You should define what the return value means. For success, once you return the _CBA address, once 0; this should be consistent. Anyway, this

Re: [PATCH 2/2] pci: Add PCIe driver for Rockchip Soc

2016-06-03 Thread Lorenzo Pieralisi
On Fri, May 27, 2016 at 01:25:14PM +0100, Marc Zyngier wrote: [...] > > + } else { > > + bus = pci_scan_root_bus(>dev, 0, > > + _pcie_ops, port, ); > > + } > > + if (!bus) > > + return -ENOMEM; > > + > > + if

Re: [PATCH V8 5/9] pci, acpi: add acpi hook to assign domain number.

2016-06-10 Thread Lorenzo Pieralisi
Hi Bjorn, Tomasz, On Tue, Jun 07, 2016 at 07:15:59PM -0500, Bjorn Helgaas wrote: [...] > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > > index eb431b5..2b52178 100644 > > --- a/drivers/pci/pci.c > > +++ b/drivers/pci/pci.c > > @@ -7,6 +7,7 @@ > > * Copyright 1997 -- 2000 Martin Mares

Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing and consolidation with DT code

2016-06-13 Thread Lorenzo Pieralisi
fined in one single arch callback that can be easily removed > > when code parsing PCI legacy IRQs is consolidated and moved to core > > PCI code. > > > > Signed-off-by: Tomasz Nowicki <t...@semihalf.com> > > Suggested-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.c

Re: [PATCH V9 09/11] ARM64/PCI: ACPI support for legacy IRQs parsing and consolidation with DT code

2016-06-14 Thread Lorenzo Pieralisi
On Mon, Jun 13, 2016 at 01:01:35PM -0700, Duc Dang wrote: > On Mon, Jun 13, 2016 at 3:40 AM, Lorenzo Pieralisi > <lorenzo.pieral...@arm.com> wrote: > > > > On Fri, Jun 10, 2016 at 06:36:12PM -0500, Bjorn Helgaas wrote: > > > On Fri, Jun 10, 2016 at 09:55

Re: [RFC PATCH v2 11/15] drivers: iommu: arm-smmu-v3: add IORT iommu configuration

2016-06-15 Thread Lorenzo Pieralisi
On Tue, Jun 14, 2016 at 07:39:39PM +0100, Will Deacon wrote: > On Tue, Jun 07, 2016 at 02:31:06PM +0100, Lorenzo Pieralisi wrote: > > In ACPI bases systems, in order to be able to create platform > > devices and initialize them for arm-smmu-v3 components, the IORT > > infras

Re: [PATCH V6 1/7] ACPI: I/O Remapping Table (IORT) initial support

2016-06-15 Thread Lorenzo Pieralisi
On Mon, Jun 13, 2016 at 04:41:07PM +0200, Tomasz Nowicki wrote: > IORT shows representation of IO topology for ARM based systems. > It describes how various components are connected together on > parent-child basis e.g. PCI RC -> SMMU -> ITS. Also see IORT spec. > > Initial support allows to: > -

Re: [PATCH V6 1/7] ACPI: I/O Remapping Table (IORT) initial support

2016-06-15 Thread Lorenzo Pieralisi
On Wed, Jun 15, 2016 at 09:19:54AM -0400, Sinan Kaya wrote: > Hi Tomasz, > > > +static acpi_status > > +iort_match_node_callback(struct acpi_iort_node *node, void *context) > > +{ > > + case ACPI_IORT_NODE_PCI_ROOT_COMPLEX: { > > + struct acpi_iort_root_complex *pci_rc; > > +

Re: [PATCH V6 1/7] ACPI: I/O Remapping Table (IORT) initial support

2016-06-15 Thread Lorenzo Pieralisi
On Wed, Jun 15, 2016 at 09:46:29AM -0400, Sinan Kaya wrote: > On 6/15/2016 9:34 AM, Lorenzo Pieralisi wrote: > > On Wed, Jun 15, 2016 at 09:19:54AM -0400, Sinan Kaya wrote: > >> Hi Tomasz, > >> > >>> +static acpi_status > >>> +iort_match_node_

Re: [PATCH] PCI/MSI: pci-xgene-msi: Enable MSI support in ACPI boot for X-Gene v1

2016-05-27 Thread Lorenzo Pieralisi
[+ Rafael] On Thu, May 26, 2016 at 01:49:23PM -0700, Duc Dang wrote: > Hi Lorenzo, > > On Thu, May 26, 2016 at 5:34 AM, Lorenzo Pieralisi > <lorenzo.pieral...@arm.com> wrote: > > Hi Duc, > > > > On Wed, May 25, 2016 at 04:13:35PM -0700, Duc Dang wrote:

Re: [PATCH V8 8/9] arm64, pci, acpi: Provide ACPI-specific prerequisites for PCI bus enumeration.

2016-06-02 Thread Lorenzo Pieralisi
hy this has to be a standalone patch ? It is pretty much useless without patch 9 or I have stared at this series for too long. Reviewed-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c > index 336deef..3663be1 100644 &g

Re: [PATCH V8 1/9] PCI: ecam: move ecam.h to linux/include/pci-ecam.h

2016-06-02 Thread Lorenzo Pieralisi
77 deletions(-) > delete mode 100644 drivers/pci/ecam.h > create mode 100644 include/linux/pci-ecam.h Acked-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > > diff --git a/drivers/pci/ecam.c b/drivers/pci/ecam.c > index f9832ad..820e26b 100644 > --- a/drivers/

Re: [PATCH V8 9/9] pci, acpi: ARM64 support for ACPI based generic PCI host controller

2016-06-02 Thread Lorenzo Pieralisi
; given that I know it is a temporary plaster and no other architecture will have to implement it I reckon it is fine to leave it here, I will make it disappear as fast as I can. We can argue if it is best to move the ACPI bits into a separate file (acpi-pci.c), I am fine with keeping DT/ACPI in one file if t

Re: [PATCH V8 2/9] PCI: ecam: Add parent device field to pci_config_window

2016-06-02 Thread Lorenzo Pieralisi
chan...@broadcom.com> > --- > drivers/pci/ecam.c | 3 ++- > drivers/pci/host/pci-thunder-pem.c | 3 ++- > include/linux/pci-ecam.h | 4 ++-- > 3 files changed, 6 insertions(+), 4 deletions(-) Acked-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > diff --g

Re: [PATCH V8 3/9] pci: Add new function to unmap IO resources.

2016-06-02 Thread Lorenzo Pieralisi
knowledge it does what's required here, (ie clear page table entries and flush tlbs, given that it is used in conjuction with ioremap_page_range() that maps a physical address to a specific preallocated virtual address ie PCI_IOBASE), so: Acked-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com>

Re: [PATCH V8 4/9] acpi, pci: Support IO resources when parsing PCI host bridge resources.

2016-06-02 Thread Lorenzo Pieralisi
ng)-1) > + goto err; > + > + res->start = port; > + res->end = port + length - 1; > + entry->offset = port - pci_addr; > + > + if (pci_remap_iospace(res, cpu_addr) < 0) > + goto err; > + > + pr_info("Remapped I/O %pa to %pR\n

Re: [PATCH] PCI/MSI: pci-xgene-msi: Enable MSI support in ACPI boot for X-Gene v1

2016-05-26 Thread Lorenzo Pieralisi
Hi Duc, On Wed, May 25, 2016 at 04:13:35PM -0700, Duc Dang wrote: > On Thu, Feb 25, 2016 at 9:38 AM, Lorenzo Pieralisi > <lorenzo.pieral...@arm.com> wrote: > > On Wed, Feb 24, 2016 at 02:28:10PM -0800, Duc Dang wrote: > >> On Wed, Feb 24, 2016 at 8:16 AM, Marc Zyngier &

Re: [RFC PATCH v3 2/2] ARM64/PCI: Start using quirks handling for ACPI based PCI host controller

2016-06-21 Thread Lorenzo Pieralisi
On Mon, Jun 20, 2016 at 12:12:24PM -0700, Duc Dang wrote: > On Mon, Jun 20, 2016 at 10:17 AM, Christopher Covington > <c...@codeaurora.org> wrote: > > Hi Duc, > > > > On 06/20/2016 05:42 AM, Lorenzo Pieralisi wrote: > >> On Fri, Jun 17, 2016 at 02:37:02PM -

Re: [PATCH V7 1/8] ACPI: I/O Remapping Table (IORT) initial support

2016-06-21 Thread Lorenzo Pieralisi
On Mon, Jun 20, 2016 at 01:02:14PM +0200, Tomasz Nowicki wrote: > IORT shows representation of IO topology for ARM based systems. > It describes how various components are connected together on > parent-child basis e.g. PCI RC -> SMMU -> ITS. Also see IORT spec. Add the spec link if you want a

Re: [PATCH v6 4/5] arm64: add support for ACPI Low Power Idle(LPI)

2016-06-22 Thread Lorenzo Pieralisi
ACPI processor idle driver, we can > unify it and move to cpuidle-arm.h header. > > Cc: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > Cc: Mark Rutland <mark.rutl...@arm.com> > Cc: Daniel Lezcano <daniel.lezc...@linaro.org> > Cc: "Rafael J. Wysocki" &l

Re: [PATCH v6 3/5] arm64: cpuidle: drop __init section marker to arm_cpuidle_init

2016-06-22 Thread Lorenzo Pieralisi
__init > annotation or the annotation of arm_cpuidle_init is wrong. > > Cc: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > Cc: Mark Rutland <mark.rutl...@arm.com> > Cc: linux-arm-ker...@lists.infradead.org > Signed-off-by: Sudeep Holla <sudeep.ho...@arm.com> Dependi

Re: [RFC PATCH v2 00/15] ACPI IORT ARM SMMU v3 support

2016-06-21 Thread Lorenzo Pieralisi
Hi Hanjun, On Tue, Jun 21, 2016 at 06:37:17PM +0800, Hanjun Guo wrote: > Hi Lorenzo, > > On 2016/6/7 21:30, Lorenzo Pieralisi wrote: > >This RFC patch series is v2 of a previous posting: > > > >https://lkml.org/lkml/2016/4/14/702 > > > >v1 -> v2: >

Re: [RFC PATCH v2 03/15] arm64: mm: change IOMMU notifier action to attach DMA ops

2016-06-21 Thread Lorenzo Pieralisi
w version along with Robin's suggestions. Thanks, Lorenzo > > > Best regards > Marek Szyprowski, PhD > Samsung R Institute Poland > > > > >On 07/06/16 14:30, Lorenzo Pieralisi wrote: > >>Current bus notifier in ARM64 (__iommu_attach_notifier) > >>attempts to

Re: [PATCH V7 1/8] ACPI: I/O Remapping Table (IORT) initial support

2016-06-21 Thread Lorenzo Pieralisi
Hi Rafael, On Mon, Jun 20, 2016 at 01:02:14PM +0200, Tomasz Nowicki wrote: > IORT shows representation of IO topology for ARM based systems. > It describes how various components are connected together on > parent-child basis e.g. PCI RC -> SMMU -> ITS. Also see IORT spec. > > Initial support

Re: [RFC PATCH v3 1/2] ACPI/PCI: Check platform specific ECAM quirks

2016-06-20 Thread Lorenzo Pieralisi
[+ Ard, Arnd] On Wed, Jun 15, 2016 at 11:34:10AM -0400, Christopher Covington wrote: > From: Tomasz Nowicki > > Some platforms may not be fully compliant with the generic PCI config > operations. For these cases we implement a way to use custom map and > accessor functions.

Re: [PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-20 Thread Lorenzo Pieralisi
On Mon, Jun 20, 2016 at 09:56:45AM -0700, Tyler Baker wrote: > Hi Bjorn, > > On 6 June 2016 at 16:06, Bjorn Helgaas wrote: > > Previously we allocated the PCI resource list in > > gen_pci_parse_request_of_pci_ranges(), but if we had an error, we freed it > > on error in

Re: [RFC PATCH v3 2/2] ARM64/PCI: Start using quirks handling for ACPI based PCI host controller

2016-06-20 Thread Lorenzo Pieralisi
On Fri, Jun 17, 2016 at 02:37:02PM -0700, Duc Dang wrote: > On Thu, Jun 16, 2016 at 10:48 AM, Lorenzo Pieralisi > <lorenzo.pieral...@arm.com> wrote: > > On Wed, Jun 15, 2016 at 11:34:11AM -0400, Christopher Covington wrote: > >> From: Tomasz

Re: [RFC PATCH v3 2/2] ARM64/PCI: Start using quirks handling for ACPI based PCI host controller

2016-06-16 Thread Lorenzo Pieralisi
On Wed, Jun 15, 2016 at 11:34:11AM -0400, Christopher Covington wrote: > From: Tomasz Nowicki > > pci_generic_ecam_ops is used by default. Since there are platforms > which have non-compliant ECAM space we need to overwrite these > accessors prior to PCI buses enumeration. In

Re: [RFC PATCH v3 1/2] ACPI/PCI: Check platform specific ECAM quirks

2016-06-16 Thread Lorenzo Pieralisi
On Wed, Jun 15, 2016 at 11:34:10AM -0400, Christopher Covington wrote: > From: Tomasz Nowicki > > Some platforms may not be fully compliant with the generic PCI config > operations. For these cases we implement a way to use custom map and > accessor functions. The algorithm

Re: [RFC PATCH v2 03/15] arm64: mm: change IOMMU notifier action to attach DMA ops

2016-06-17 Thread Lorenzo Pieralisi
ek; I'm curious as to whether this could make the workaround in > 722ec35f7 obsolete as well, or are all the drivers also bound > super-early in the setup you had there? > > On 07/06/16 14:30, Lorenzo Pieralisi wrote: > >Current bus notifier in ARM64 (__iommu_attach_notifier) > >

Re: [PATCH V4 15/23] acpi, mcfg: Implement two calls that might be used to inject/remove MCFG region.

2016-02-10 Thread Lorenzo Pieralisi
On Thu, Feb 04, 2016 at 06:28:53PM +0100, Tomasz Nowicki wrote: > Lets abstract two calls which allow to inject and remove MCFG regions > which may come from DSDT table. These calls will be used for x86 and ARM64 > PCI host bridge driver in the later patches. > > Signed-off-by: Tomasz Nowicki

Re: [PATCH] PCI: ACPI: IA64: fix IO port generic range check

2016-02-09 Thread Lorenzo Pieralisi
Hi, On Mon, Feb 01, 2016 at 07:36:57PM +0800, Hanjun Guo wrote: > On 2016/2/1 18:25, Lorenzo Pieralisi wrote: > >The [0 - 64k] ACPI PCI IO port resource boundary check in: > > > >acpi_dev_ioresource_flags() > > > >is currently applied blindly in the ACPI resourc

Re: [PATCH V4 12/23] x86, ia64, pci: Remove ACPI companion device from platform specific data.

2016-02-09 Thread Lorenzo Pieralisi
es the parent to the pci_create_root_bus() call so, without this patch applied, the companion initialization would fail). Other than that: Reviewed-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c > inde

Re: [PATCH] PCI: ACPI: IA64: fix IO port generic range check

2016-02-09 Thread Lorenzo Pieralisi
Hi Bjorn, On Tue, Feb 09, 2016 at 11:00:06AM -0600, Bjorn Helgaas wrote: > Hi Lorenzo, > > On Mon, Feb 01, 2016 at 10:25:57AM +, Lorenzo Pieralisi wrote: > > The [0 - 64k] ACPI PCI IO port resource boundary check in: > > > > acpi_dev_ioresource_flags() > >

Re: [PATCH V4 11/23] pci, acpi: Move ACPI host bridge device companion assignment to core code.

2016-02-09 Thread Lorenzo Pieralisi
> and using ACPI_COMPANION_SET in core code for ACPI boot method. > ACPI_COMPANION_SET is safe to run for all cases DT, ACPI and DT > > Suggested-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > Signed-off-by: Tomasz Nowicki <t...@semihalf.com> > Tested-by: D

Re: [PATCH V4 22/23] arm64, pci, acpi: Assign legacy IRQs once device is enable.

2016-02-11 Thread Lorenzo Pieralisi
On Thu, Feb 04, 2016 at 06:29:00PM +0100, Tomasz Nowicki wrote: > This is the last step before enabling generic ACPI PCI host controller > for ARM64. We need to take care of legacy IRQ mapping for non-MSI(X) > PCI devices. pcibios_enable_device() boot order is not sensitive to > ACPI device

Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code.

2016-01-27 Thread Lorenzo Pieralisi
On Wed, Jan 20, 2016 at 03:41:56PM +0100, Tomasz Nowicki wrote: > On 20.01.2016 15:22, Lorenzo Pieralisi wrote: > >On Wed, Jan 20, 2016 at 02:40:08PM +0100, Tomasz Nowicki wrote: > > > >[...] > > > >>>>>>+ /* Root br

[PATCH] PCI: ACPI: IA64: fix IO port generic range check

2016-02-01 Thread Lorenzo Pieralisi
] check to x86 arch code code that validates the PCI host bridge resources. Fixes: 3772aea7d6f3 ("ia64/PCI/ACPI: Use common ACPI resource parsing interface for host bridge") Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Bjorn Helgaas <bhelg...@google.com>

Re: [PATCH] PCI: ACPI: IA64: fix IO port generic range check

2016-02-01 Thread Lorenzo Pieralisi
On Mon, Feb 01, 2016 at 07:36:57PM +0800, Hanjun Guo wrote: [...] > >diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c > >index 3cd6983..e20dbe5 100644 > >--- a/arch/x86/pci/acpi.c > >+++ b/arch/x86/pci/acpi.c > >@@ -275,11 +275,14 @@ static void pci_acpi_root_release_info(struct >

Re: [PATCH v3 05/12] arm64, acpi, numa: NUMA support based on SRAT and SLIT

2016-02-02 Thread Lorenzo Pieralisi
On Tue, Feb 02, 2016 at 07:30:12PM +0800, Hanjun Guo wrote: [...] > >How about the following (similar to x86)? > > > > > > if (!numa_off) { > >#ifdef CONFIG_ACPI_NUMA > > if (!numa_init(acpi_numa_init)) > > return 0; > >#endif > >#ifdef CONFIG_OF_NUMA > >

Re: [PATCH V2 3/5] PCI: xilinx: Modifying AXI PCIe Host Bridge driver to work on both Zynq and Microblaze

2016-01-28 Thread Lorenzo Pieralisi
On Thu, Jan 28, 2016 at 03:23:37PM +0100, Arnd Bergmann wrote: > On Thursday 28 January 2016 14:18:15 Bharat Kumar Gogada wrote: > > > > > > I see. In the upstream code you seem to do it in > > > pcibios_setup_bus_devices(), while arm64 and powerpc do it in > > > pcibios_add_device(). > > > > >

Re: [PATCH] PCI/MSI: pci-xgene-msi: Enable MSI support in ACPI boot for X-Gene v1

2016-02-25 Thread Lorenzo Pieralisi
On Wed, Feb 24, 2016 at 02:28:10PM -0800, Duc Dang wrote: > On Wed, Feb 24, 2016 at 8:16 AM, Marc Zyngier wrote: > > On 24/02/16 16:09, Mark Salter wrote: > >> On Tue, 2016-02-09 at 17:56 -0800, Duc Dang wrote: > >>> This patch makes pci-xgene-msi driver ACPI-aware and

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

2016-02-25 Thread Lorenzo Pieralisi
On Thu, Feb 25, 2016 at 03:01:19AM +, Gabriele Paoloni wrote: [...] > > I think the relevant spec is the PCI Firmware Spec, r3.0, sec 4.1.2. > > Note 2 in that section says the address range of an MMCFG region > > must be reserved by declaring a motherboard resource, i.e., included > > in

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

2016-02-29 Thread Lorenzo Pieralisi
> > > > > I think the relevant spec is the PCI Firmware Spec, r3.0, sec > > 4.1.2. > > > > > Note 2 in that section says the address range of an MMCFG region > > > > > must be reserved by declaring a motherboard resource, i.e., > > included > > > > > in the _CRS of a PNP0C02 or similar device. > >

Re: [PATCH V3 13/21] pci, acpi: Provide generic way to assign bus domain number.

2016-01-21 Thread Lorenzo Pieralisi
Hi Tomasz, On Wed, Jan 13, 2016 at 02:20:59PM +0100, Tomasz Nowicki wrote: [...] > @@ -4796,14 +4797,34 @@ void pci_bus_assign_domain_nr(struct pci_bus *bus, > struct device *parent) >* API and update the use_dt_domains value to keep track of method we >* are using to assign

Re: [PATCH V3 13/21] pci, acpi: Provide generic way to assign bus domain number.

2016-01-22 Thread Lorenzo Pieralisi
On Thu, Jan 21, 2016 at 07:38:51PM +0100, Tomasz Nowicki wrote: [...] > >I think you can reshuffle a bit the code to make it easier to follow. > > > >How about this ? (on top of mainline, I just compiled it do not > >take it verbatim): > > > >-- >8 -- > >diff --git a/drivers/pci/pci.c

Re: [PATCH V3 18/21] ACPI, PCI: Refine the way to handle translation_offset for ACPI resources

2016-01-25 Thread Lorenzo Pieralisi
On Tue, Jan 19, 2016 at 12:20:26PM +, Lorenzo Pieralisi wrote: > Gerry, > > On Wed, Jan 13, 2016 at 02:21:04PM +0100, Tomasz Nowicki wrote: > > From: Liu Jiang <jiang@linux.intel.com> > > > > Some architectures, such as IA64 and ARM64, have no instructi

Re: [PATCH V5 01/15] ACPI: MCFG: Move mmcfg_list management to drivers/acpi

2016-02-17 Thread Lorenzo Pieralisi
ess manner, it is basically a code move with weak functions to cater for X86 specific legacy bits which are otherwise pretty complex to untangle, so (apart from a few nits below): Reviewed-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> [...] > diff --git a/drivers/acpi/pci_mcfg.c b/dri

Re: [PATCH V5 02/15] acpi, pci, mcfg: Provide default RAW ACPI PCI config space accessors.

2016-02-17 Thread Lorenzo Pieralisi
an be generalized if common functionality is found among arches) allowing arches where PCI_Config regions are currently required to override it (eg x86) as needed and providing at the same time default stubs for arches that do not require them". ? > Suggested-by: Lorenzo Pieralisi <lorenzo

Re: [PATCH V5 07/15] pci, acpi: Provide generic way to assign bus domain number.

2016-02-17 Thread Lorenzo Pieralisi
Guys, On Wed, Feb 17, 2016 at 04:35:30PM +0100, Tomasz Nowicki wrote: [...] > >In my patchset, I had a slightly different and I think better approach > >for > >this without calling the _SEG method again. Please see > >http://www.spinics.net/lists/arm-kernel/msg478167.html >

Re: [PATCH V5 14/15] arm64, pci, acpi: Assign legacy IRQs once device is enable.

2016-02-17 Thread Lorenzo Pieralisi
y removed when code parsing PCI legacy IRQs is consolidated and moved to core PCI code". ? > Signed-off-by: Tomasz Nowicki <t...@semihalf.com> > Suggested-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> > --- > arch/arm64/kernel/pci.c | 11 --- > 1 file

Re: [PATCH V5 09/15] acpi, mcfg: Add default PCI config accessors implementation and initial support for related quirks.

2016-02-17 Thread Lorenzo Pieralisi
nt offset); > +#else > +static inline struct pci_ops *pci_mcfg_get_ops(struct acpi_pci_root *root) > +{ return NULL; } > +static inline void __iomem *pci_mcfg_dev_base(struct pci_bus *bus, > + unsigned int devfn, int offset) > +{ return NULL; } > +#endif > + > #else/* CONFIG_ACPI */ > static inline void acpi_pci_add_bus(struct pci_bus *bus) { } > static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } I think it can even be squashed, anyway: Reviewed-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com>

Re: [PATCH V5 04/15] pci, acpi, ecam: Add flag to indicate whether ECAM region was hot added or not.

2016-02-18 Thread Lorenzo Pieralisi
codeaurora.org> > --- > drivers/acpi/pci_mcfg.c | 4 +++- > include/linux/pci-acpi.h | 1 + > 2 files changed, 4 insertions(+), 1 deletion(-) It would be great if x86 people can have a look, we no longer associate a MCFG region to a bridge structure, the end result should be equival

Re: [PATCH V5 00/15] MMCONFIG refactoring and support for ARM64 PCI hostbridge init based on ACPI

2016-02-18 Thread Lorenzo Pieralisi
ixed IO resource handling > - introduced PCI config accessors quirks matching > - moved ACPI_COMPANION_SET to generic code > > v1 - https://lkml.org/lkml/2015/10/27/504 > v2 - https://lkml.org/lkml/2015/12/16/246 > v3 - http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04308.h

Re: [Linaro-acpi] [PATCH V5 01/15] ACPI: MCFG: Move mmcfg_list management to drivers/acpi

2016-02-18 Thread Lorenzo Pieralisi
On Thu, Feb 18, 2016 at 08:25:35PM +0800, liudongdong (C) wrote: [...] > >+/* > >+ * Map a pci_mmcfg_region, can be overrriden by arch > >+ */ > >+int __weak pci_mmconfig_map_resource(struct device *dev, > >+struct pci_mmcfg_region *mcfg) > >+{ > >+struct resource *tmp; > >+void

Re: [PATCH] arm64: kasan: clear stale stack poison

2016-02-19 Thread Lorenzo Pieralisi
On Thu, Feb 18, 2016 at 06:13:57PM +, Catalin Marinas wrote: > On Thu, Feb 18, 2016 at 06:03:54PM +, Will Deacon wrote: > > On Thu, Feb 18, 2016 at 05:54:47PM +, Catalin Marinas wrote: > > > On Thu, Feb 18, 2016 at 05:27:38PM +, Mark Rutland wrote: > > > > @@ -145,6 +146,7 @@

Re: [PATCH V4 22/23] arm64, pci, acpi: Assign legacy IRQs once device is enable.

2016-02-11 Thread Lorenzo Pieralisi
On Thu, Feb 11, 2016 at 11:58:53AM +, Lorenzo Pieralisi wrote: > On Thu, Feb 04, 2016 at 06:29:00PM +0100, Tomasz Nowicki wrote: > > This is the last step before enabling generic ACPI PCI host controller > > for ARM64. We need to take care of legacy IRQ mapping for non-MSI(X)

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

2016-03-01 Thread Lorenzo Pieralisi
Hi Bjorn, On Thu, Feb 25, 2016 at 01:59:12PM -0600, Bjorn Helgaas wrote: > On Thu, Feb 25, 2016 at 12:07:50PM +0000, Lorenzo Pieralisi wrote: > > On Thu, Feb 25, 2016 at 03:01:19AM +, Gabriele Paoloni wrote: [...] > > I do not understand how PNP0c02 works, curren

Re: [PATCH v2 2/4] PCI: Provide common functions for ECAM mapping

2016-04-12 Thread Lorenzo Pieralisi
On Tue, Apr 12, 2016 at 12:26:25AM -0400, Jon Masters wrote: [...] > Quoting Bjorn's original reply to the previous series: > > > Some of the code that moved to drivers/acpi/pci_mcfg.c is not > > really ACPI-specific, and could potentially be used for non-ACPI > > bridges that support ECAM.

Re: [RFC PATCH 0/4] Add ACPI support for pinctrl configuration

2016-04-06 Thread Lorenzo Pieralisi
On Tue, Apr 05, 2016 at 10:37:14PM +0300, Octavian Purdila wrote: > On Tue, Apr 5, 2016 at 7:59 PM, Mark Brown wrote: [...] > Lets look at this from a different perspective. The proposal is not > about importing the DT model into ACPI but importing the Linux pinctrl > model

Re: [PATCH v6 5/5] x86, acpi, cpu-hotplug: Set persistent cpuid <-> nodeid mapping when booting.

2016-04-06 Thread Lorenzo Pieralisi
[+Dennis since he reported ARM64 build breakage] On Thu, Mar 17, 2016 at 09:32:40AM +0800, Zhu Guihua wrote: > From: Gu Zheng > > The whole patch-set aims at making cpuid <-> nodeid mapping persistent. So > that, > when node online/offline happens, cache based on cpuid

<    1   2   3   4   5   6   7   8   9   10   >