Re: [PATCH v8 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-03-24 Thread Daniel Axtens
On Tue, 2015-03-24 at 11:34 +0800, Yijing Wang wrote: Now we could use pci_scan_host_bridge() to scan pci buses, provide powerpc specific pci_host_bridge_ops. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: Benjamin Herrenschmidt b...@kernel.crashing.org CC:

[PATCH 01/27] powerpc: move find_and_init_phbs() to pSeries specific code

2015-03-24 Thread Daniel Axtens
/ Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/ppc-pci.h | 3 --- arch/powerpc/kernel/rtas_pci.c | 47 -- arch/powerpc/platforms/pseries/setup.c | 47 ++ 3 files changed, 47 insertions(+), 50

[PATCH 02/27] powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c

2015-03-24 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powermac/pci.c | 17 + arch/powerpc/platforms/powermac/pmac.h | 4 arch/powerpc/platforms/powermac/setup.c | 18 -- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git

[PATCH 04/27] powerpc/fsl_pci: Don't change ppc_swiotlb_enable after swiotlb_subsys_init

2015-03-24 Thread Daniel Axtens
The only function that checks ppc_swiotlb_enable is swiotlb_subsys_init. The code in fsl_pci.c is called well after that, so don't bother changing it. (ppc_swiotlb is usually set in swiotlb_detect_4g, which is called by a number of arch initcalls.) Signed-off-by: Daniel Axtens d...@axtens.net

[PATCH 05/27] powerpc: pcibios_enable_device_hook: return bool rather than int

2015-03-24 Thread Daniel Axtens
pcibios_enable_device_hook returned an int. Every implementation returned either -EINVAL or 0. The return value wasn't propagated by the caller: any non-zero return value caused pcibios_enable_device to return -EINVAL itself. Therefore, make the hook return a bool. Signed-off-by: Daniel Axtens d

[PATCH 11/27] powerpc: ppc_md.pcibios_window_alignment - pci_controller_ops.window_alignment

2015-03-24 Thread Daniel Axtens
Name the shim pci_window_alignment (rather than window_alignment) to avoid clashing with window_alignment in drivers/pci/setup-bus.c Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 21 + arch/powerpc/kernel/pci-common.c | 10

[PATCH 22/27] powerpc: Remove shim for pci_controller_ops.reset_secondary_bus

2015-03-25 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/machdep.h| 3 --- arch/powerpc/include/asm/pci-bridge.h | 16 arch/powerpc/kernel/pci-common.c | 9 - 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/include

[PATCH 00/27] Refactor PCI controller operations

2015-03-24 Thread Daniel Axtens
13 - 20: Platform specific migrations Patches 21 - 26: Remove shims Patch27: Final cleanup Daniel Axtens (27): powerpc: move find_and_init_phbs() to pSeries specific code powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c powerpc/swiotlb: give init call a less misleading

[PATCH 08/27] powerpc: ppc_md.pci_dma_bus_setup - pci_controller_ops.dma_bus_setup

2015-03-24 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 11 +++ arch/powerpc/kernel/pci-common.c | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h

[PATCH 13/27] powerpc: dart_iommu: optionally populate controller_ops on init

2015-03-24 Thread Daniel Axtens
of making this optional is that it means we don't have to change dart, Maple and Power Mac over to the controller_ops system in one fell swoop. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/iommu.h| 3 ++- arch/powerpc/platforms/maple/setup.c| 2 +- arch

[PATCH 12/27] powerpc: ppc_md.pcibios_reset_secondary_bus - pci_controller_ops.reset_secondary_bus

2015-03-24 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 17 + arch/powerpc/kernel/pci-common.c | 7 +-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci

[PATCH 24/27] powerpc: Remove shim for pci_controller_ops.probe_mode

2015-03-25 Thread Daniel Axtens
This also moves back the defines, as explained in the commit that created the shim. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/machdep.h| 1 - arch/powerpc/include/asm/pci-bridge.h | 16 arch/powerpc/include/asm/pci.h| 5 + arch

[PATCH 23/27] powerpc: Remove shim for pci_controller_ops.enable_device_hook

2015-03-25 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/machdep.h| 4 arch/powerpc/include/asm/pci-bridge.h | 11 --- arch/powerpc/kernel/pci-common.c | 7 +-- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/include/asm

[PATCH 27/27] powerpc: dart_iommu: Remove check for controller_ops == NULL case

2015-03-25 Thread Daniel Axtens
Now that we have ported the calls to iommu_init_early_dart to always supply a pci_controller_ops struct, we can safely drop the check. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/sysdev/dart_iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH 09/27] powerpc: ppc_md.pci_probe_mode - pci_controller_ops.probe_mode

2015-03-24 Thread Daniel Axtens
before pci-bridge.h. This occurs in some drivers. So, move the definitons now, and move them back when we remove the shim. Anything that wants the defines would have had to include pci.h, and since pci.h includes pci-bridge.h, nothing will lose access to the defines. Signed-off-by: Daniel Axtens d

[PATCH 15/27] powerpc/pseries: Move controller ops from ppc_md to controller_ops

2015-03-25 Thread Daniel Axtens
This moves the pSeries platform to use the pci_controller_ops structure, rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/pseries/iommu.c | 9 + arch/powerpc/platforms/pseries/pseries.h | 2 ++ arch/powerpc

[PATCH 19/27] powerpc: fsl_pci, swiotlb: Move controller ops from ppc_md to controller_ops

2015-03-25 Thread Daniel Axtens
This moves the setup out of swiotlb's subsys init call, and into an fsl_pci.c is the only thing that checks the ppc_swiotlb_enable global, so we can be confident that patching it will cover all the PCI implementations affected by the changes to dma-swiotlb.c. Signed-off-by: Daniel Axtens d

[PATCH 18/27] powerpc/maple: Move controller ops from ppc_md to controller_ops

2015-03-25 Thread Daniel Axtens
This moves the Maple platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/maple/maple.h | 2 ++ arch/powerpc/platforms/maple/pci.c | 4 arch/powerpc/platforms/maple

[PATCH 25/27] powerpc: Remove shim for pci_controller_ops.dma_dev_setup

2015-03-25 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/machdep.h| 1 - arch/powerpc/include/asm/pci-bridge.h | 9 - arch/powerpc/kernel/pci-common.c | 5 - arch/powerpc/sysdev/dart_iommu.c | 2 -- 4 files changed, 4 insertions(+), 13 deletions(-) diff

[PATCH 20/27] powerpc/cell: Move controller ops from ppc_md to controller_ops

2015-03-25 Thread Daniel Axtens
This moves the Cell platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. This depends on the patch to drop celleb support: http://patchwork.ozlabs.org/patch/451730/ Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/cell/cell.h

[PATCH 03/27] powerpc/swiotlb: give init call a less misleading name

2015-03-24 Thread Daniel Axtens
swiotlb_late_init sets up platform specific hooks. It's not actually a late initcall, but a subsys initcall, called much earlier. Ideally we'd call it swiotlb_init, but that's taken. Call it swiotlb_subsys_init for now. (It will be refactored and renamed later.) Signed-off-by: Daniel Axtens d

[PATCH 07/27] powerpc: ppc_md.pci_dma_dev_setup - pci_controller_ops.dma_dev_setup

2015-03-24 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 14 ++ arch/powerpc/kernel/pci-common.c | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci

[PATCH 06/27] powerpc: Create the pci_controller_ops struct.

2015-03-24 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 546d036..3ab8a2d 100644 --- a/arch/powerpc/include/asm/pci

[PATCH 10/27] powerpc: ppc_md.pcibios_enable_device_hook - pci_controller_ops.enable_device_hook

2015-03-24 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 15 +++ arch/powerpc/kernel/pci-common.c | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci

[PATCH 14/27] powerpc/powermac: Move controller ops from ppc_md to controller_ops

2015-03-25 Thread Daniel Axtens
This moves the Power Mac platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powermac/pci.c | 17 +++-- arch/powerpc/platforms/powermac/pmac.h | 5 + arch

[PATCH 17/27] powerpc/pasemi: Move controller ops from ppc_md to controller_ops

2015-03-25 Thread Daniel Axtens
This moves the PaSemi platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/pasemi/iommu.c | 6 -- arch/powerpc/platforms/pasemi/pasemi.h | 1 + arch/powerpc/platforms/pasemi

[PATCH 16/27] powerpc/powernv: Move controller ops from ppc_md to controller_ops

2015-03-25 Thread Daniel Axtens
This moves the PowerNV platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powernv/pci-ioda.c | 7 --- arch/powerpc/platforms/powernv/pci-p5ioc2.c | 1 + arch/powerpc

[PATCH 21/27] powerpc: Remove shim for pci_controller_ops.window_alignment

2015-03-25 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/machdep.h| 3 --- arch/powerpc/include/asm/pci-bridge.h | 18 -- arch/powerpc/kernel/pci-common.c | 12 +++- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/arch/powerpc

[PATCH 26/27] powerpc: Remove shim for pci_controller_ops.dma_bus_setup

2015-03-25 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/machdep.h| 2 -- arch/powerpc/include/asm/pci-bridge.h | 14 -- arch/powerpc/kernel/pci-common.c | 5 - arch/powerpc/sysdev/dart_iommu.c | 3 --- 4 files changed, 4 insertions(+), 20

Re: [PATCH v8 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-03-25 Thread Daniel Axtens
Hi Yijing, I wasn't quite sure I understood your comments, so I was trying to apply your patch series and test it, but patch 3 doesn't apply cleanly to 4.0-rc5 or master. Can you respin the series? Thanks, Daniel Hi Daniel, thanks for your review and comments. We want to make a generic

Re: [PATCH 02/27] powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c

2015-03-30 Thread Daniel Axtens
On Mon, 2015-03-30 at 23:32 +1100, Michael Ellerman wrote: On Wed, 2015-25-03 at 05:35:36 UTC, Daniel Axtens wrote: Why did we move it? Just for cleanliness? I move it because in (what is currently) patch 14, I want to hook it into the PCI controller ops structure, which I define in pci.c

Re: [PATCH 04/27] powerpc/fsl_pci: Don't change ppc_swiotlb_enable after swiotlb_subsys_init

2015-03-30 Thread Daniel Axtens
Hmm, I think we got this wrong. I don't remember exactly but it was probably me who told you it could be removed, but I probably hadn't had a coffee yet :} I see setup_pci_atmu() called by fsl_pci_syscore_do_resume(), ie. at runtime == late. So ignore that. But also fsl_add_bridge(),

[PATCH v2 04/19] powerpc: Create pci_controller_ops.dma_dev_setup and shim

2015-03-30 Thread Daniel Axtens
Introduces the pci_controller_ops structure. Add pci_controller_ops.dma_dev_setup, shadowing ppc_md.pci_dma_dev_setup. Add a shim, and change the callsites to use the shim. Signed-off-by: Daniel Axtens d...@axtens.net --- v1 -- v2: - Better commit message - Use phb in favour of hose - Make

[PATCH v2 18/19] powerpc: Remove shims for pci_controller_ops operations

2015-03-30 Thread Daniel Axtens
Remove shims, patch callsites to use pci_controller_ops versions instead. Also move back the probe mode defines, as explained in the patch for pci_probe_mode. Signed-off-by: Daniel Axtens d...@axtens.net --- v1 -- v2: - Squash all the shim removal. - Prefer phb to hose. --- arch/powerpc

[PATCH v2 02/19] powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c

2015-03-30 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powermac/pci.c | 17 + arch/powerpc/platforms/powermac/pmac.h | 4 arch/powerpc/platforms/powermac/setup.c | 18 -- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git

[PATCH v2 06/19] powerpc: Create pci_controller_ops.probe_mode and shim

2015-03-30 Thread Daniel Axtens
to include pci.h, and since pci.h includes pci-bridge.h, nothing will lose access to the defines. Signed-off-by: Daniel Axtens d...@axtens.net --- v1 -- v2: - Better commit message - Use phb in favour of hose - Make shim name match ppc_md name, not pci_controller_ops name. --- arch/powerpc

[PATCH v2 07/19] powerpc: Create pci_controller_ops.enable_device_hook and shim

2015-03-30 Thread Daniel Axtens
Add pci_controller_ops.enable_device_hook, shadowing ppc_md.pcibios_enable_device_hook. Add a shim, and changes the callsites to use the shim. Signed-off-by: Daniel Axtens d...@axtens.net --- v1 -- v2: - Better commit message - Use phb in favour of hose - Make shim name match ppc_md name

[PATCH v2 11/19] powerpc/powermac: Move controller ops from ppc_md to controller_ops

2015-03-30 Thread Daniel Axtens
This moves the Power Mac platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powermac/pci.c | 17 +++-- arch/powerpc/platforms/powermac/pmac.h | 5 + arch

[PATCH v2 14/19] powerpc/pasemi: Move controller ops from ppc_md to controller_ops

2015-03-30 Thread Daniel Axtens
This moves the PaSemi platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/pasemi/iommu.c | 6 -- arch/powerpc/platforms/pasemi/pasemi.h | 1 + arch/powerpc/platforms/pasemi

[PATCH v2 15/19] powerpc/maple: Move controller ops from ppc_md to controller_ops

2015-03-30 Thread Daniel Axtens
This moves the Maple platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/maple/maple.h | 2 ++ arch/powerpc/platforms/maple/pci.c | 4 arch/powerpc/platforms/maple

[PATCH v2 19/19] powerpc: dart_iommu: Remove check for controller_ops == NULL case

2015-03-30 Thread Daniel Axtens
Now that we have ported the calls to iommu_init_early_dart to always supply a pci_controller_ops struct, we can safely drop the check. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/sysdev/dart_iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH v2 00/19] Refactor PCI controller operations

2015-03-30 Thread Daniel Axtens
Patch18: Remove shims Patch19: Final cleanup Daniel Axtens (19): powerpc: move find_and_init_phbs() to pSeries specific code powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c powerpc: pcibios_enable_device_hook: return bool rather than int powerpc: Create

[PATCH v2 01/19] powerpc: move find_and_init_phbs() to pSeries specific code

2015-03-30 Thread Daniel Axtens
Previously, find_and_init_phbs() was used in both PowerNV and pSeries setup. However, since RTAS support has been dropped from PowerNV, we can move it into a platform-specific file. Signed-off-by: Daniel Axtens d...@axtens.net --- This patch depends on the patch to drop RTAS support from

[PATCH v2 09/19] powerpc: Create pci_controller_ops.reset_secondary_bus and shim

2015-03-30 Thread Daniel Axtens
Add pci_controller_ops.reset_secondary_bus, shadowing ppc_md.pcibios_reset_secondary_bus. Add a shim, and changes the callsites to use the shim. Use pcibios_reset_secondary_bus_shim, as both pcibios_reset_secondary_bus and pci_reset_secondary_bus are already taken. Signed-off-by: Daniel Axtens d

[PATCH v2 10/19] powerpc: dart_iommu: optionally populate controller_ops on init

2015-03-30 Thread Daniel Axtens
of making this optional is that it means we don't have to change dart, Maple and Power Mac over to the controller_ops system in one fell swoop. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/iommu.h| 3 ++- arch/powerpc/platforms/maple/setup.c| 2 +- arch

[PATCH v2 16/19] powerpc: fsl_pci, swiotlb: Move controller ops from ppc_md to controller_ops

2015-03-30 Thread Daniel Axtens
do the changes late in the function, after setup_pci_atmu, because that can change ppc_swiotlb_enable. Signed-off-by: Daniel Axtens d...@axtens.net --- v1 -- v2: - Move the setup call to after setup_pci_atmu(). --- arch/powerpc/kernel/dma-swiotlb.c | 11 --- arch/powerpc/sysdev

[PATCH v2 03/19] powerpc: pcibios_enable_device_hook: return bool rather than int

2015-03-30 Thread Daniel Axtens
pcibios_enable_device_hook returned an int. Every implementation returned either -EINVAL or 0. The return value wasn't propagated by the caller: any non-zero return value caused pcibios_enable_device to return -EINVAL itself. Therefore, make the hook return a bool. Signed-off-by: Daniel Axtens d

[PATCH v2 08/19] powerpc: Create pci_controller_ops.window_alignment and shim

2015-03-30 Thread Daniel Axtens
Add pci_controller_ops.window_alignment, shadowing ppc_md.pcibios_window_alignment. Add a shim, and changes the callsites to use the shim. Here, we use pci_window_alignment, as pcibios_window_alignment is already taken. Signed-off-by: Daniel Axtens d...@axtens.net --- v1 -- v2: - Better

[PATCH v2 13/19] powerpc/powernv: Move controller ops from ppc_md to controller_ops

2015-03-30 Thread Daniel Axtens
This moves the PowerNV platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powernv/pci-ioda.c | 7 --- arch/powerpc/platforms/powernv/pci-p5ioc2.c | 1 + arch/powerpc

[PATCH v2 17/19] powerpc/cell: Move controller ops from ppc_md to controller_ops

2015-03-30 Thread Daniel Axtens
This moves the Cell platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- This depends on the patch to drop celleb support: http://patchwork.ozlabs.org/patch/451730/ --- arch/powerpc/platforms/cell

[PATCH v2 05/19] powerpc: Create pci_controller_ops.dma_bus_setup and shim

2015-03-30 Thread Daniel Axtens
Add pci_controller_ops.dma_bus_setup, shadowing ppc_md.pci_dma_bus_setup. Add a shim, and changes the callsites to use the shim. Signed-off-by: Daniel Axtens d...@axtens.net --- v1 -- v2: - Better commit message - Use phb in favour of hose - Make shim name match ppc_md name

[PATCH v2 12/19] powerpc/pseries: Move controller ops from ppc_md to controller_ops

2015-03-30 Thread Daniel Axtens
This moves the pSeries platform to use the pci_controller_ops structure, rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/pseries/iommu.c | 9 + arch/powerpc/platforms/pseries/pseries.h | 2 ++ arch/powerpc

Re: [PATCH v8 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-03-25 Thread Daniel Axtens
On Thu, 2015-03-26 at 09:17 +0800, Yijing Wang wrote: On 2015/3/26 6:13, Daniel Axtens wrote: Hi Yijing, I wasn't quite sure I understood your comments, so I was trying to apply your patch series and test it, but patch 3 doesn't apply cleanly to 4.0-rc5 or master. Can you respin

Re: [PATCH V14 17/21] powerpc/powernv: Shift VF resource with an offset

2015-03-23 Thread Daniel Axtens
On Fri, 2015-03-20 at 11:06 +0800, Wei Yang wrote: On PowerNV platform, resource position in M64 BAR implies the PE# the resource belongs to. In some cases, adjustment of a resource is necessary to locate it to a correct position in M64 BAR . This patch adds pnv_pci_vf_resource_shift() to

[PATCH v3 12/19] powerpc/pseries: Move controller ops from ppc_md to controller_ops

2015-04-01 Thread Daniel Axtens
This moves the pSeries platform to use the pci_controller_ops structure, rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- v2 -- v3: Add a hotplug case in pci_dlpar.c --- arch/powerpc/platforms/pseries/iommu.c | 9 + arch/powerpc

[PATCH] powerpc: Remove PPC32 code from pseries specific find_and_init_phbs()

2015-04-13 Thread Daniel Axtens
: bdc728a849a7 Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/pseries/setup.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 328e318..baefd3e 100644 --- a/arch/powerpc/platforms

[PATCH 00/10] Move MSI related PCI controller ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
). It builds at every point in the series. It has been boot-tested on pseries. It depends on my previous patch series. As such, it is based on today's linux-next. [1] https://lkml.kernel.org/r/1427778057-9505-1-git-send-email-...@axtens.net Daniel Axtens (10): powerpc: Add MSI operations

[PATCH 07/10] powerpc/ppc4xx_hsta_msi: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
Move the ppc4xx hsta msi subsystem to use the pci_controller_ops structure rather than ppc_md for MSI related PCI controller operations. As with fsl_msi, operations are plugged in at the subsys level, after controller creation. Again, we iterate over all controllers and populate them with the MSI

[PATCH 06/10] powerpc/ppc4xx_msi: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
Move the ppc4xx msi subsystem to use the pci_controller_ops structure rather than ppc_md for MSI related PCI controller operations. As with fsl_msi, operations are plugged in at the subsys level, after controller creation. Again, we iterate over all controllers and populate them with the MSI ops.

[PATCH v2 1/3] toshiba: Remove celleb from Kconfig options

2015-04-13 Thread Daniel Axtens
Signed-off-by: Daniel Axtens d...@axtens.net --- v2: get name of ozlab*s*.org right. Sorry all. --- drivers/net/ethernet/toshiba/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/toshiba/Kconfig b/drivers/net/ethernet/toshiba/Kconfig index

[PATCH 05/10] powerpc/fsl_msi: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
/pSeries/Cell, we can't simply populate a platform-level controller ops structure and have it copied into the controllers when they are created. Instead, walk every phb, and attempt to populate it with the MSI ops. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/sysdev/fsl_msi.c | 23

[RFC PATCH 1/2] powerpc: Add pci_controller.generic_ops and move pci_controller.ops in

2015-04-13 Thread Daniel Axtens
with those default ops before passing it to the PCI subsystem. (This goes away later in the series.) 2) Remove the pci_ops pointer from pci_controller in favour of the pci_ops pointer within pci_host_ops. Signed-off-by: Daniel Axtens d...@axtens.net --- I'm not super happy with the name

[RFC PATCH 0/2] First steps to using generic controller ops

2015-04-13 Thread Daniel Axtens
). Daniel Axtens (2): powerpc: Add pci_controller.generic_ops and move pci_controller.ops in powerpc: Migrate pseries to host_bridge_ops, remove pcibios_set_root_bus_speed arch/powerpc/include/asm/machdep.h | 2 -- arch/powerpc/include/asm/pci-bridge.h | 2 +- arch/powerpc

[PATCH v2 2/3] Remove celleb-only SCC PATA drivers

2015-04-13 Thread Daniel Axtens
-...@vger.kernel.org CC: Valentin Rothberg valentinrothb...@gmail.com CC: m...@ellerman.id.au CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Daniel Axtens d...@axtens.net --- v2: get name of ozlab*s*.org right. Sorry all. --- drivers/ata/Kconfig|9 - drivers/ata/Makefile |1 - drivers/ata/pata_scc.c

[PATCH 08/10] powerpc/mpic_pasemi_msi: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
Move the PaSemi MPIC msi subsystem to use the pci_controller_ops structure rather than ppc_md for MSI related PCI controller operations. As with fsl_msi, operations are plugged in at the subsys level, after controller creation. Again, we iterate over all controllers and populate them with the MSI

[PATCH 09/10] powerpc/mpic_u3msi: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
Move the u3 MPIC msi subsystem to use the pci_controller_ops structure rather than ppc_md for MSI related PCI controller operations. As with fsl_msi, operations are plugged in at the subsys level, after controller creation. Again, we iterate over all controllers and populate them with the MSI

[PATCH v2 3/3] tty/hvc: remove celleb-only beat driver

2015-04-13 Thread Daniel Axtens
: linuxppc-dev@lists.ozlabs.org Signed-off-by: Daniel Axtens d...@axtens.net --- v2: get name of ozlab*s*.org right. Sorry all. --- drivers/tty/hvc/Kconfig| 7 --- drivers/tty/hvc/Makefile | 1 - drivers/tty/hvc/hvc_beat.c | 134 - 3 files

[PATCH 10/10] powerpc: Remove MSI-related PCI controller ops from ppc_md

2015-04-13 Thread Daniel Axtens
Remove unneeded ppc_md functions. Patch callsites to use pci_controller_ops functions exclusively. --- arch/powerpc/include/asm/machdep.h | 6 -- arch/powerpc/kernel/msi.c | 15 --- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git

[PATCH 04/10] powerpc/pseries: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
Move the pseries platform to use the pci_controller_ops structure rather than ppc_md for MSI related PCI controller operations --- arch/powerpc/platforms/pseries/msi.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/pseries/msi.c

[PATCH 03/10] powerpc/cell: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
is properly populated. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/cell/axon_msi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 623bd96..d9b8a44 100644

[RFC PATCH 2/2] powerpc: Migrate pseries to host_bridge_ops, remove pcibios_set_root_bus_speed

2015-04-13 Thread Daniel Axtens
them. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/machdep.h | 2 -- arch/powerpc/kernel/pci-common.c | 8 arch/powerpc/platforms/pseries/setup.c | 7 +-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/include/asm

[PATCH 01/10] powerpc: Add MSI operations to pci_controller_ops struct

2015-04-13 Thread Daniel Axtens
Add MSI setup and teardown functions to pci_controller_ops. Patch the callsites (arch_{setup,teardown}_msi_irqs) to prefer the controller ops version if it's available. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 6 ++ arch/powerpc/kernel/msi.c

[PATCH 02/10] powerpc/powernv: Move MSI-related ops to pci_controller_ops

2015-04-13 Thread Daniel Axtens
Move the PowerNV/BML platform to use the pci_controller_ops structure rather than ppc_md for MSI related PCI controller operations. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powernv/pci.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH] powerpc/powernv: Fix early pci_controller_ops loading.

2015-04-26 Thread Daniel Axtens
Load the PowerNV platform pci controller ops into pci controllers after all the operations are loaded into the platform ops struct, not before. Fixes: c88c2a188905cb3077c3c38dc498e7e9f8eebeee Reported-by: Gavin Shan gws...@linux.vnet.ibm.com Signed-off-by: Daniel Axtens d...@axtens.net --- arch

[PATCH 0/3] Add dma_set_mask to pci_controller_ops

2015-04-27 Thread Daniel Axtens
://patchwork.ozlabs.org/patch/464765/ Daniel Axtens (3): powerpc/powernv: Specialise pci_controller_ops for each controller type powerpc/pci: add dma_set_mask to pci_controller_ops powerpc/powernv: Move dma_set_mask from pnv_phb to pci_controller_ops arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch

[PATCH v2] powerpc/powernv: Fix early pci_controller_ops loading.

2015-04-26 Thread Daniel Axtens
-by: Gavin Shan gws...@linux.vnet.ibm.com Signed-off-by: Daniel Axtens d...@axtens.net --- v2: Correcct Fixes: line arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci

Re: [PATCH] powerpc/powernv: Fix early pci_controller_ops loading.

2015-04-26 Thread Daniel Axtens
to controller_ops) Reported-by: Gavin Shan gws...@linux.vnet.ibm.com Signed-off-by: Daniel Axtens d...@axtens.net The changes look good to me. Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com You are right again! I have sent v2 with the correct Fixes: line. Thanks for the review. Daniel

[PATCH 1/3] powerpc/powernv: Specialise pci_controller_ops for each controller type

2015-04-27 Thread Daniel Axtens
to controller_ops) Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powernv/pci-ioda.c | 18 ++ arch/powerpc/platforms/powernv/pci-p5ioc2.c | 12 +++- arch/powerpc/platforms/powernv/pci.c| 13 +++-- arch/powerpc/platforms/powernv/pci.h

[PATCH 2/3] powerpc/pci: add dma_set_mask to pci_controller_ops

2015-04-27 Thread Daniel Axtens
Some systems only need to deal with DMA masks for PCI devices. For these systems, we can avoid the need for a platform hook and instead use a pci controller based hook. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/kernel/dma.c

[PATCH 3/3] powerpc/powernv: Move dma_set_mask from pnv_phb to pci_controller_ops

2015-04-27 Thread Daniel Axtens
__set_dma_mask. Now, dma_set_mask finds no ppc_md call or pci_controller_ops call, so it calls __set_dma_mask. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/platforms/powernv/pci-ioda.c | 7 --- arch/powerpc/platforms/powernv/pci.c | 10 -- arch/powerpc/platforms

[PATCH] powerpc/mce: fix off by one errors in mce event handling

2015-05-10 Thread Daniel Axtens
: Mahesh Salgaonkar mah...@linux.vnet.ibm.com Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/kernel/mce.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c index 15c99b6..f774b64 100644 --- a/arch/powerpc

[PATCH v2] powerpc/mce: fix off by one errors in mce event handling

2015-05-11 Thread Daniel Axtens
...@vger.kernel.org CC: Mahesh Salgaonkar mah...@linux.vnet.ibm.com CC: Christoph Lameter c...@linux.com Signed-off-by: Daniel Axtens d...@axtens.net --- The code is still super racy, but this at least unbreaks the common, non-reentrant case for now until we figure out how to fix it properly. The proper fix

Re: [PATCH 2/2] powerpc/cell: Fix iommu breakage caused by controller_ops change

2015-04-14 Thread Daniel Axtens
their ops set correctly. Fixes: 9c1368fc50e7 (powerpc/cell: Move controller ops from ppc_md to controller_ops) Signed-off-by: Michael Ellerman m...@ellerman.id.au Thanks for that. Acked-by: Daniel Axtens d...@axtens.net Regards, Daniel signature.asc Description: This is a digitally signed

Re: [PATCH v9 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-04-06 Thread Daniel Axtens
our arch-specific complexity. We'll need to do some more work on our side to reap the full benefits. I tested this entire series on a PowerNV machine, including doing EEH injection to trigger PCI hotplug: Tested-by: Daniel Axtens d...@axtens.net For completeness, it would be good to test

Re: [PATCH v2 04/19] powerpc: Create pci_controller_ops.dma_dev_setup and shim

2015-04-06 Thread Daniel Axtens
Please see https://patchwork.ozlabs.org/patch/431333/ for related work. I'm familiar with that patch series - I've been helping Yijing get it up to speed on PowerPC. I think it would be better not to introduce another architecture-specific pci host bridge operations structure, but instead

Re: [PATCH v1 5/9]powerpc/powernv: nest pmu feature detection support

2015-06-02 Thread Daniel Axtens
the Nest PMU feature + */ + if (nest_ima_detect_parse()) + return 0; + return 0; } Zero is returned regardless of the output of nest_ima_detect_parse. Is that intentional? If so, do you need the 'if'? device_initcall(nest_pmu_init); Regards, Daniel Axtens

Re: [PATCH v1 8/9] powerpc/powernv: Add OPAL support for Nest PMU

2015-06-02 Thread Daniel Axtens
+int64_t opal_nest_ima_control(uint32_t value); If I'm understanding things correctly, you call this function in patch 3. Quoting from that patch: +static void nest_init(void *dummy) +{ + opal_nest_ima_control(P8_NEST_ENGINE_START); +} Does this patch need to be moved earlier in the

Re: [PATCH v1 3/9]powerpc/powernv: Add cpu hotplug support

2015-06-02 Thread Daniel Axtens
properly serialised or is this going to race and end up with either multiple cpus trying to do PMU or no cpus? Regards, Daniel Axtens signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev

Re: [PATCH v1 7/9]powerpc/powernv: Event attr creation and PMU registration

2015-06-02 Thread Daniel Axtens
On Tue, 2015-06-02 at 21:29 +0530, Madhavan Srinivasan wrote: Patch adds common event attribute function and Nest pmu registration call. Cc: Michael Ellerman m...@ellerman.id.au Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: Sukadev Bhattiprolu

Re: [PATCH v1 4/9]powerpc/powernv: Add generic nest pmu ops

2015-06-02 Thread Daniel Axtens
. But if the event is being deleted anyway, why not just do nothing here? +} + Regards, Daniel Axtens signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo

Re: [PATCH v1 6/9]powerpc/powernv: dt parser function for nest pmu and its events

2015-06-02 Thread Daniel Axtens
+static int nest_pmu_create(struct device_node *dev, int pmu_index) +{ + struct ppc64_nest_ima_events **p8_events_arr; + struct ppc64_nest_ima_events *p8_events; + struct property *pp; + char *buf; + const __be32 *lval; + u32 val; + int len, idx = 0; +

Re: [PATCH v1 1/9]powerpc/powernv: Data structure and macros definition

2015-06-02 Thread Daniel Axtens
; + const struct attribute_group *attr_groups[4]; +}; + Regards, Daniel Axtens signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc

Re: [PATCH v1 2/9]powerpc/powernv: nest pmu init function with cpumask attr

2015-06-02 Thread Daniel Axtens
it clearer that you're trying to get a list of possible failure conditions. - Is there really no better way to check if a CPU is a power 8 than an string comparison? +device_initcall(nest_pmu_init); Regards, Daniel Axtens signature.asc Description: This is a digitally signed message part

Re: [PATCH V8 06/10] powerpc, lib: Add new branch analysis support functions

2015-06-09 Thread Daniel Axtens
+static int instr_is_branch_xlform(unsigned int instr) +{ + return branch_opcode(instr) == 19; +} Why do these not return bool? The functions below do. + +static int is_xlform_lr(unsigned int instr) +{ + return (instr XL_FORM_LR) == XL_FORM_LR; +} + +static int

Re: [PATCH V8 08/10] powerpc, perf: Change POWER8 PMU configuration to work with SW filters

2015-06-09 Thread Daniel Axtens
On Mon, 2015-06-08 at 17:08 +0530, Anshuman Khandual wrote: The kernel now supports SW based branch filters for book3s systems with some specific requirements while dealing with HW supported branch filters in order to achieve overall OR semantics prevailing in perf branch stack sampling

Re: [PATCH V8 01/10] powerpc, perf: Drop the branch sample when 'from' cannot be fetched

2015-06-09 Thread Daniel Axtens
Hi Anshuman, Was there a cover letter for this series that I missed? On Mon, 2015-06-08 at 17:08 +0530, Anshuman Khandual wrote: BHRB is a rolling buffer. Hence we might end up in a situation where Could you spell out what BHRB stands for? we have read one target address but when we try to

Re: [PATCH V8 04/10] powerpc, perf: Re organize PMU based branch filter processing in POWER8

2015-06-09 Thread Daniel Axtens
/* Every thing else is unsupported */ return -1; You're returning -1 as a unsigned 64bit number. Other code that reads this value tests for -1 and I think it works everywhere just because it wraps around consistently. But I would still rather not do this and I'm surprised it doesn't

Re: [PATCH V8 02/10] powerpc, perf: Restore privillege level filter support for BHRB

2015-06-09 Thread Daniel Axtens
In the subject line, privilege should only have 1 l, and I think it should probably start with powerpc/perf: rather than powerpc, perf:. On Mon, 2015-06-08 at 17:08 +0530, Anshuman Khandual wrote: From: khand...@linux.vnet.ibm.com khand...@linux.vnet.ibm.com 'commit 9de5cb0f6df8

Re: [PATCH V8 03/10] powerpc, perf: Re organize BHRB processing

2015-06-09 Thread Daniel Axtens
+void update_branch_entry(struct cpu_hw_events *cpuhw, + int index, u64 from, u64 to, int pred) +{ + cpuhw-bhrb_entries[index].from = from; + cpuhw-bhrb_entries[index].to = to; + cpuhw-bhrb_entries[index].mispred = pred; +

Re: [PATCH] powerpc: Set the correct kernel taint on machine check errors.

2015-06-23 Thread Daniel Axtens
On Wed, 2015-06-24 at 15:00 +1000, Michael Ellerman wrote: On Mon, 2015-06-15 at 13:25 +1000, Daniel Axtens wrote: This means the 'M' flag will work properly when the kernel prints a backtrace. Signed-off-by: Daniel Axtens d...@axtens.net --- arch/powerpc/kernel/traps.c | 2 ++ 1

  1   2   3   4   5   6   7   8   9   10   >