Re: [PATCH 2/2] tty/hvc: Use opal irqchip interface if available

2016-06-27 Thread Benjamin Herrenschmidt
On Tue, 2016-06-28 at 13:11 +1000, Samuel Mendoza-Jonas wrote: > Update the hvc driver to use the OPAL irqchip if made available by the > running firmware. If it is not present, the driver falls back to the > existing OPAL event number. One thing that worries me a bit with the original transition

Re: [PATCH 29/38] powerpc: Move 32-bit probe() machine to later in the boot process

2016-06-27 Thread Benjamin Herrenschmidt
On Mon, 2016-06-27 at 22:42 +0200, Gerhard Pircher wrote: > This patch series reminds me of a long-standing issue with the > AmigaOne platform code, which would have to clear the coherence > (M) flag for every memory mapping to avoid lockups (especially > on G4 CPUs) - as you can read in the

Re: [PATCH v2] powerpc/boot: Add OPAL console to epapr wrappers

2016-06-27 Thread Benjamin Herrenschmidt
On Mon, 2016-06-27 at 16:51 +1000, oliver wrote: > None of this is useful to us since we get most of this information > from skiboot, but I'm not sure that's true for other platforms. The > kernel boot log is fairly noisy as-is so we don't gain much from > trimming. At the very least the other

[PATCH 33/38] powerpc/64: Move the content of setup_system() to setup_arch()

2016-06-27 Thread Benjamin Herrenschmidt
And kill setup_system() Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/head_64.S | 5 +- arch/powerpc/kernel/setup_64.c | 137 +++-- 2 files changed, 64 insertions(+), 78 deletions(-) diff --git a/arch/p

[PATCH 14/38] powerpc/pmac: Remove early allocation of the SMU command buffer

2016-06-27 Thread Benjamin Herrenschmidt
. So move the allocation to the SMU driver itself. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/smu.h | 7 --- arch/powerpc/platforms/powermac/setup.c | 16 drivers/macintosh/smu.c | 9 ++

[PATCH 09/38] powerpc: Update obsolete comments in setup_32.c about entry conditions

2016-06-27 Thread Benjamin Herrenschmidt
form of bolted TLB on others). Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_32.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 34e61d68..3

[PATCH 32/38] powerpc/64: Move setting of {i, d}cache_bsize to initialize_cache_info()

2016-06-27 Thread Benjamin Herrenschmidt
Also remove the completely osbolete comment. We *do* look in the device-tree. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_64.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/setup_

[PATCH 26/38] powerpc/85xx/ge_imp3a: Don't use the flat device-tree after boot

2016-06-27 Thread Benjamin Herrenschmidt
ge_imp3a_pic_init() is called way beyond the unflattening of the tree, it shouldn't be using of_flat_dt_* Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/85xx/ge_imp3a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/p

[PATCH 25/38] powerpc/cell: Don't use flat device-tree after boot

2016-06-27 Thread Benjamin Herrenschmidt
Some bit of SPU code was using the FDT rather than the expanded device-tree. Fix it. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/cell/spu_manage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platform

[PATCH 17/17] powerpc/pnv/pci: Fix incorrect PE reservation attempt on some 64-bit BARs

2016-06-27 Thread Benjamin Herrenschmidt
and leads to insane PE numbers. Instead, compare the addresses to figure it out. CC: sta...@vger.kernel.org Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/powernv/pci-ioda.c | 27 +-- 1 file changed, 17 insertions(+), 10 del

[PATCH 16/17] powerpc/pci: Reduce log level of PCI I/O space warning

2016-06-27 Thread Benjamin Herrenschmidt
If a PHB has no I/O space, there's no need to make it look like something bad happened, a pr_debug() is plenty enough since this is the case of all our modern POWER chips. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/pci-common.c | 6 +++---

[PATCH 15/17] powerpc/pci: Don't try to allocate resources that will be reassigned

2016-06-27 Thread Benjamin Herrenschmidt
When we know we will reassign all resources, trying (and failing) to allocate them initially is fairly pointless and leads to a lot of scary messages in the kernel log Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/pci-common.c | 6 -- 1 file c

[PATCH 14/17] powerpc/powernv/pci: Check status of a PHB before using it

2016-06-27 Thread Benjamin Herrenschmidt
If the firmware encounters an error (internal or HW) during initialization of a PHB, it might leave the device-node in the tree but mark it disabled using the "status" property. We should check it. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/p

[PATCH 12/17] powerpc/powernv: set power_save func after the idle states are initialized

2016-06-27 Thread Benjamin Herrenschmidt
@linux.vnet.ibm.com> Signed-off-by: Shreyas B. Prabhu <shre...@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/powernv/idle.c | 3 +++ arch/powerpc/platforms/powernv/setup.c | 2 +- 2 files changed, 4 insertions(+), 1 dele

[PATCH 13/17] powerpc/powernv/pci: Use the device-tree to get available range of M64's

2016-06-27 Thread Benjamin Herrenschmidt
newer OPALs will provide a property we can use to know what range of windows is available. The property is named so that it can eventually support multiple ranges but we only use the first one for now. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/pla

[PATCH 11/17] powerpc/powernv/pci: Fallback to OPAL for TCE invalidations

2016-06-27 Thread Benjamin Herrenschmidt
If we don't find registers for the PHB or don't know the model specific invalidation method, use OPAL calls instead. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/powernv/pci-ioda.c | 33 +++ 1 file changed, 29 inse

[PATCH 10/17] powerpc/powernv/pci: Rework accessing the TCE invalidate register

2016-06-27 Thread Benjamin Herrenschmidt
It's architected, always in a known place, so there is no need to keep a separate pointer to it, we use the existing "regs", and we complement it with a real mode variant. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/powernv

[PATCH 09/17] powerpc/powernv/pci: Remove SWINV constants and obsolete TCE code

2016-06-27 Thread Benjamin Herrenschmidt
We have some obsolete code in pnv_pci_p7ioc_tce_invalidate() to handle some internal lab tools that have stopped being useful a long time ago. Remove that along with the definition and test for the TCE_PCI_SWINV_* flags whose value is basically always the same. Signed-off-by: Benjamin

[PATCH 07/17] powerpc/opal: Add real mode call wrappers

2016-06-27 Thread Benjamin Herrenschmidt
Replace the old generic opal_call_realmode() with proper per-call wrappers similar to the normal ones and convert callers. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/opal-api.h| 10 +++- arch/powerpc/include/asm/

[PATCH 08/17] powerpc/powernv/pci: Rename TCE invalidation calls

2016-06-27 Thread Benjamin Herrenschmidt
relationship between an IODA version and a PHB implementation. There exist another variant of IODA1 (Torrent) but we never supported in with OPAL and never will. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/powernv/npu-dma.c | 8 arch/p

[PATCH 06/17] powerpc/pseries/pci: Remove obsolete SW invalidate

2016-06-27 Thread Benjamin Herrenschmidt
That was used by some old IBM internal bringup tools and is no longer relevant. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/pseries/iommu.c | 53 +- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git

[PATCH 05/17] powerpc/powernv: Add IODA3 PHB type

2016-06-27 Thread Benjamin Herrenschmidt
For now, mostly treat it as IODA2 Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/powernv/pci-ioda.c | 15 +++ arch/powerpc/platforms/powernv/pci.c | 4 arch/powerpc/platforms/powernv/pci.h | 2 ++ 3 files chang

[PATCH 04/17] powerpc/xics: Add ICP OPAL backend

2016-06-27 Thread Benjamin Herrenschmidt
This adds a new XICS backend that uses OPAL calls, which can be used when we don't have native support for the platform interrupt controller. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/xics.h| 8 +- arch/powerpc/sysdev/xics/Ma

[PATCH 03/17] powerpc/irq: Add mechanism to force a replay of interrupts

2016-06-27 Thread Benjamin Herrenschmidt
since the hardware won't issue another HW interrupt in that case. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/hw_irq.h | 2 ++ arch/powerpc/kernel/irq.c | 14 ++ 2 files changed, 16 insertions(+) diff --git a/arch/powerpc/i

[PATCH 02/17] powerpc/irq: Add support for HV virtualization interrupts

2016-06-27 Thread Benjamin Herrenschmidt
This will be delivering external interrupts from the XIVE to the Hypervisor. We treat it as a normal external interrupt for the lazy irq disable code (so it will be replayed as a 0x500) and route it to do_IRQ. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/p

[PATCH 01/17] powerpc/powernv: Add XICS emulation APIs

2016-06-27 Thread Benjamin Herrenschmidt
OPAL provides an emulated XICS interrupt controller to use as a fallback on newer processors that don't have a XICS. It's meant as a way to provide backward compatibility with future processors. Add the corresponding interfaces. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.

[PATCH 00/17] Initial POWER9 XIVE and PHB4 support

2016-06-27 Thread Benjamin Herrenschmidt
This provides an initial base support for the XIVE interrupt controller and the new IODA3 compliant PHB4, both found on POWER9. The series is interleaved with a bug fix or two as I found problems in sim. The new OPAL APIs haven't been committed yet so are still subject to change, thus the patches

[PATCH 38/38] powerpc: Merge 32-bit and 64-bit setup_arch()

2016-06-27 Thread Benjamin Herrenschmidt
There is little enough differences now. Use a few __weak stubs for functions that may not be around in order to avoid too many ifdefs. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/setup.h | 4 + arch/powerpc/kernel/setup-common.c

[PATCH 37/38] powerpc/64: Make a few boot functions __init

2016-06-27 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index b41756e..9ca2df9 100644 --- a/arch/powerpc/

[PATCH 36/38] powerpc: Re-order setup_panic()

2016-06-27 Thread Benjamin Herrenschmidt
Do it right after probe_machine() since it's about testing ppc_md, and put the test in the common code. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup-common.c | 2 ++ arch/powerpc/kernel/setup_32.c | 5 ++--- arch/powerpc/kernel/setu

[PATCH 34/38] powerpc/32: Move cache info inits to a separate function

2016-06-27 Thread Benjamin Herrenschmidt
Matches 64-bit. Also move the call to the same spot as ppc64 Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_32.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/setup_32.c

[PATCH 35/38] powerpc: Re-order the call to smp_setup_cpu_maps()

2016-06-27 Thread Benjamin Herrenschmidt
It makes more sense to do it before intializing xmon() as xmon might use the info in there. We do want to register the console early though in case we want some functioning printk's in the cpu map setup. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/

[PATCH 31/38] powerpc/64: Move the boot time info banner to a separate function

2016-06-27 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_64.c | 66 ++ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index a

[PATCH 29/38] powerpc: Move 32-bit probe() machine to later in the boot process

2016-06-27 Thread Benjamin Herrenschmidt
though it's a bigger patch. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_32.c| 35 +++- arch/powerpc/platforms/40x/ep405.c| 4 +-- arch/powerpc/platforms/40x/ppc40x_simple.c| 2 +-

[PATCH 30/38] powerpc: Get rid of ppc_md.init_early()

2016-06-27 Thread Benjamin Herrenschmidt
It is now called right after platform probe, so the probe function can just do the job. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/machdep.h| 1 - arch/powerpc/kernel/setup_32.c| 3 --- arch/powerpc/kernel/se

[PATCH 28/38] powerpc/85xx/mpc85xx_rdb: Don't use the flat device-tree after boot

2016-06-27 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index 3f4dad1..761e504

[PATCH 27/38] powerpc/85xx/mpc85xx_ds: Don't use the flat device-tree after boot

2016-06-27 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index f858306..64a7e8c

[PATCH 24/38] powerpc: Move 64-bit probe_machine() to later in the boot process

2016-06-27 Thread Benjamin Herrenschmidt
We no long need the machine type that early, so we can move probe_machine() to after the device-tree has been expanded. This will allow further consolidation. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_64.c | 6 +++--- arch/p

[PATCH 23/38] powerpc: Ensure that ppc_md is empty before probing for machine type

2016-06-27 Thread Benjamin Herrenschmidt
Anything in there will be overwritten, so it helps catching nasty bugs if we check that it's indeed full of NULL's before we do so. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup-common.c | 11 +++ 1 file changed, 11 insertions(+)

[PATCH 22/38] powerpc/mm: Move hash table ops to a separate structure

2016-06-27 Thread Benjamin Herrenschmidt
quite fix is update_partition_table since this is not specific to hash, so I moved it to a standalone variable for now. We can revisit later if needed. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 39

[PATCH 21/38] powerpc/pmac: Remove spurrious machine type test

2016-06-27 Thread Benjamin Herrenschmidt
pmac_declare_of_platform_devices() is already a machine initcall, thus it won't be called on a non-powermac machine. Testing for chrp there is pointless. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/powermac/setup.c | 3 --- 1 file chan

[PATCH 20/38] powerpc/mm/hash64: Don't test for machine type to detect HEA special case

2016-06-27 Thread Benjamin Herrenschmidt
Instead, check for FW_FEATURE_SPLPAR. This should be roughtly equivalent as all pseries machiens that can have an HEA also support SPLPAR and no other machine type does. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/mm/hash_utils_64.c | 5 +++-- 1 file c

[PATCH 19/38] powerpc: Don't test for machine type in smp_setup_cpu_maps()

2016-06-27 Thread Benjamin Herrenschmidt
The subsequent test for RTAS along with the LPAR test are sufficient Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/p

[PATCH 18/38] powerpc/rtas: Don't test for machine type in rtas_initialize()

2016-06-27 Thread Benjamin Herrenschmidt
The test is unnecessary, the FW_FEATURE_LPAR is sufficient as there exist no other LPAR type that has RTAS. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/

[PATCH 17/38] powerpc/mm/hash: Don't use machine_is() early during boot

2016-06-27 Thread Benjamin Herrenschmidt
Use the device-tree instead as we'll be moving probe_machine() out of early_setup Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/mm/hash_utils_64.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/arch/powe

[PATCH 11/38] powerpc/dart: Use a cachable DART

2016-06-27 Thread Benjamin Herrenschmidt
get rid of the copy of the DART for suspend/resume as the original memory can just be saved/restored now, as long as we properly sync the caches. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/iommu.h| 1 - arch/powerpc/mm/hash_util

[PATCH 16/38] powerpc/pasemi: Remove IOBMAP allocation from platform probe()

2016-06-27 Thread Benjamin Herrenschmidt
These days, memblocks is available later, so we can just allocate it as part of iob_init. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/platforms/pasemi/iommu.c | 15 +-- arch/powerpc/platforms/pasemi/pasemi.h | 1 - arch/powerpc/platforms/

[PATCH 13/38] powerpc: Put exception configuration in a common place

2016-06-27 Thread Benjamin Herrenschmidt
The various calls to establish exception endianness and AIL are now done from a single point using already established CPU and FW feature bits to decide what to do. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/opal.h| 1 + arch/p

[PATCH 12/38] powerpc: Move FW feature probing out of pseries probe()

2016-06-27 Thread Benjamin Herrenschmidt
We move the function itself to pseries/firmware.c and call it along with almost all other flat device-tree parsers from early_init_devtree() Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/firmware.h | 4 +++ arch/powerpc/kernel/

[PATCH 15/38] powerpc/64: Move MMU backend selection out of platform code

2016-06-27 Thread Benjamin Herrenschmidt
We move it into early_mmu_init() based on firmware features. For PS3, we have to move the setting of these into early_init_devtree(). Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/ps3.h | 2 ++ arch/powerpc/kernel/prom.c

[PATCH 10/38] powerpc: Add comment explaining the purpose of setup_kdump_trampoline()

2016-06-27 Thread Benjamin Herrenschmidt
Anything in early_setup() needs to be justified to be there, in this case, we need the trampolines before we can take exceptions and thus before we turn on the MMU. Also remove a pretty meaningless and misplaced debug message Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.

[PATCH 08/38] powerpc: Move epapr_paravirt_early_init() to early_init_devtree()

2016-06-27 Thread Benjamin Herrenschmidt
The function is called by both 32-bit and 64-bit early setup right after early_init_devtree(). All it does is run yet another early DT parser which is precisely what early_init_devtree() is about, so move it in there. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> ---

[PATCH 07/38] powerpc: Move 64-bit memory reserves to setup_arch()

2016-06-27 Thread Benjamin Herrenschmidt
There is really no need to do them that early, early_setup() runs before MMU is on, we should do the strict minimum there to get the MMU going. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/setup_64.c | 22 +++--- 1 file chang

[PATCH 06/38] powerpc: Move 64-bit feature fixup earlier

2016-06-27 Thread Benjamin Herrenschmidt
Make it part of early_setup() as we really want the feature fixups to be applied before we turn on the MMU since they can have an impact on the various assembly path related to MMU management and interrupts. This makes 64-bit match what 32-bit does. Signed-off-by: Benjamin Herrenschmidt &l

[PATCH 05/38] powerpc: Factor do_feature_fixup calls

2016-06-27 Thread Benjamin Herrenschmidt
32 and 64-bit do a similar set of calls early on, we move it all to a single common function to make the boot code more readable. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/feature-fixups.h | 4 arch/powerpc/include/asm/s

[PATCH 04/38] powerpc: Make PTRRELOC() 32-bit only

2016-06-27 Thread Benjamin Herrenschmidt
PTRRELOC is only used by 32-bit code since on 32-bit systems, early_init can be run with relocation off and running at an offset. Define it to identity on 64-bit Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/include/asm/setup.h | 4 1 file chan

[PATCH 03/38] powerpc/prom_init: PTRRELOC is not needed

2016-06-27 Thread Benjamin Herrenschmidt
There's one line of code still using PTRRELOC in prom_init, it shouldn't be necessary since that code is relocatable. Take it out. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 02/38] drm: Fix broken use of _PAGE_NO_CACHE on powerpc

2016-06-27 Thread Benjamin Herrenschmidt
That constant no longer exist. Use the proper accessor instead Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- drivers/gpu/drm/drm_memory.c | 2 +- drivers/gpu/drm/drm_scatter.c | 2 +- drivers/gpu/drm/drm_vm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 del

[PATCH 01/38] dt: Add of_device_compatible_match()

2016-06-27 Thread Benjamin Herrenschmidt
This provides an equivalent of of_fdt_match() for non-flat trees. This is more practical than matching an array of of_device_id structs when converting a bunch of existing users of of_fdt_match(). Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- drivers/of/base.c

[PATCH 00/38] Reorganize setup code and merge 32 and 64-bit setup_arch()

2016-06-27 Thread Benjamin Herrenschmidt
This series reorganizes the setup code, moving probe_machine() later than when it's currently done, and sync'ing 32-bit and 64-bit enough to merge their implementations of setup_arch(). We get rid of ppc64 setup_system() which is subsumed by the new setup_arch(). Note: The first 2 patches should

Re: Proposed: Patch to fix boot on PA6T

2016-06-26 Thread Benjamin Herrenschmidt
On Sun, 2016-06-26 at 18:42 +0100, Darren Stevens wrote: > >     commit d6a9996e84ac4beb7713e9485f4563e100a9b03e >     powerpc/mm: vmalloc abstraction in preparation for radix > >     This commit introduced variables for some linux kernel addresses that had > before been constants, unfortunately

Re: [PATCH] powerpc/boot: Add OPAL console to epapr wrappers

2016-06-24 Thread Benjamin Herrenschmidt
r limitation of this is that only the "raw" type of > OPAL console is supported, however machines that provide a hvsi > console > also provide a raw console so this is not an issue in practice. You forgot to git-add the new files ? Cheers, Ben. > Actually-written-by: Benjamin H

[PATCH/RFC] powerpc/pci: Don't try to allocate resources that will be reassigned

2016-06-24 Thread Benjamin Herrenschmidt
When we know we will reassign all resources, trying (and failing) to allocate them initially is fairly pointless and leads to a lot of scary messages in the kernel log Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/pci-common.c | 6 -- 1 file c

Re: [RFC/PATCH] powerpc/pci: Don't try to allocate resources that will be reassigned

2016-06-24 Thread Benjamin Herrenschmidt
On Wed, 2016-06-22 at 17:24 +1000, Benjamin Herrenschmidt wrote: > When we know we will reassign all resources, trying (and failing) > to allocate them initially is fairly pointless and leads to a lot > of scary messages in the kernel log > > Signed-off-by: Benjamin H

Re: [PATCH 3/3] powerpc/pnv/pci: Fix incorrect PE reservation attempt on some 64-bit BARs

2016-06-22 Thread Benjamin Herrenschmidt
On Wed, 2016-06-22 at 20:32 +1000, Gavin Shan wrote: > In pci_read_bridge_mmio_pref(), no prefetchable window (64bits+pref) > is populated if bit PCI_PREF_RANGE_TYPE_64 (0x1) isn't set on PCI > config register (PCI_PREF_MEMORY_BASE, 0x24). During the resource > resizing and assigning stage in PCI

[PATCH 3/3] powerpc/pnv/pci: Fix incorrect PE reservation attempt on some 64-bit BARs

2016-06-22 Thread Benjamin Herrenschmidt
and leads to insane PE numbers. Instead, compare the addresses to figure it out. CC: sta...@vger.kernel.org Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- This is a pretty nasty bug, I'd like to have Gavin ack it first but then we should push it back to distros. I don't kn

[RFC/PATCH] powerpc/pci: Don't try to allocate resources that will be reassigned

2016-06-22 Thread Benjamin Herrenschmidt
When we know we will reassign all resources, trying (and failing) to allocate them initially is fairly pointless and leads to a lot of scary messages in the kernel log Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> -- This one probably needs testing on a few platforms

[PATCH] powerpc/pci: Reduce log level of PCI I/O space warning

2016-06-22 Thread Benjamin Herrenschmidt
If a PHB has no I/O space, there's no need to make it look like something bad happened, a pr_debug() is plenty enough since this is the case of all our modern POWER chips. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- arch/powerpc/kernel/pci-common.c | 6 +++---

Re: [PATCH v6 07/11] powerpc/powernv: set power_save func after the idle states are initialized

2016-06-21 Thread Benjamin Herrenschmidt
am R. Shenoy <e...@linux.vnet.ibm.com> > Signed-off-by: Shreyas B. Prabhu <shre...@linux.vnet.ibm.com> Acked-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Please merge that one as-is now, no need to wait for the rest, as otherwise pwoer9 crashes at boot. It doesn't need to wait

Re: [PATCH V2] powerpc/mm: Don't do debug print before we do feature fixup

2016-06-18 Thread Benjamin Herrenschmidt
On Sat, 2016-06-18 at 23:57 +0530, Aneesh Kumar K.V wrote: > We use feature fixup in segment and page fault path and hence we should > not call any function that can cause either of these before we finish > feature fixup. > > Calling into early debug routine can result in segment fault as updated

Re: [PATCH] tracing: Expose CPU physical addresses (resource values) for PCI devices

2016-06-17 Thread Benjamin Herrenschmidt
On Fri, 2016-06-17 at 17:59 -0400, Steven Rostedt wrote: > Sorry for the late reply, this patch got pushed down in my INBOX. > > Could I get someone from PPC to review this patch, just to be safe? The patch makes sense, I can try getting somebody onto porting mmiotrace one of these days.

Re: unrecoverable exception on G5 with CONFIG_PPC_EARLY_DEBUG enabled

2016-06-16 Thread Benjamin Herrenschmidt
On Thu, 2016-06-16 at 22:49 +0300, Denis Kirjanov wrote: > - > +BEGIN_MMU_FTR_SECTION > +   b   2f > +END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX) >     andi.   r10,r12,MSR_RI  /* check for unrecoverable exception > */ >     beq-    2f Are we taking an SLB miss before we do the fixup

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Benjamin Herrenschmidt
On Thu, 2016-06-16 at 20:01 +0530, Aneesh Kumar K.V wrote: > The pHyp part of the comment was added by you in  > 3c726f8dee6f55e96475574e9f645327e461884c ([PATCH] ppc64: support 64k > page) really an old commit. I also remember we having the discussion and > concluding that it should be safe to

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Benjamin Herrenschmidt
<1466054627.5400.5.ca...@ellerman.id.au> <20160616055746.gc22...@birch.djwong.org> <8737oda1lt@skywalker.in.ibm.com> <87ziql8l93@skywalker.in.ibm.com> <87wplp8kxh@skywalker.in.ibm.com> Organization: IBM

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Benjamin Herrenschmidt
<1465404871-5406-11-git-send-email-shre...@linux.vnet.ibm.com> <1465854492.3022.30.ca...@au1.ibm.com> <575fe64c.9080...@linux.vnet.ibm.com> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.3 (3.20.3-1.fc24)

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Benjamin Herrenschmidt
On Tue, 2016-06-14 at 16:17 +0530, Shreyas B Prabhu wrote: > > I ignored adding this check because this is part of initcall and we are > unlikely to run out of memory at this state. But I'll add the check in > next version. Why do you malloc the u64 array and not the string pointer array ?

Re: Rational for having CONFIG_FB_RADEON=m

2016-06-14 Thread Benjamin Herrenschmidt
On Tue, 2016-06-14 at 13:26 +1000, Michael Ellerman wrote: > On Mon, 2016-06-13 at 17:46 +0200, Mathieu Malaterre wrote: > > > 2. Try to fix `radeonfb` so that it is able to kick offb out of the > > way. Eg: https://lists.freedesktop.org/archives/dri-devel/2010-Augu > > st/002907.html > > > >

Re: [PATCH] powerpc: convert 'iommu_alloc failed' messages to dynamic debug

2016-06-13 Thread Benjamin Herrenschmidt
On Mon, 2016-06-13 at 18:43 -0300, Mauricio Faria de Oliveira wrote: > Hi Ben, > > On 06/13/2016 06:26 PM, Benjamin Herrenschmidt wrote: > > I've been thinking about this a bit... it might be worthwhile adding > > a dma_* call to query the approximate size of the IOMMU

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-13 Thread Benjamin Herrenschmidt
On Wed, 2016-06-08 at 11:54 -0500, Shreyas B. Prabhu wrote: > >  /* >   * States for dedicated partition case. >   */ > @@ -167,6 +183,8 @@ static int powernv_add_idle_states(void) >   int nr_idle_states = 1; /* Snooze */ >   int dt_idle_states; >   u32 *latency_ns, *residency_ns,

Re: [PATCH] powerpc: convert 'iommu_alloc failed' messages to dynamic debug

2016-06-13 Thread Benjamin Herrenschmidt
On Mon, 2016-06-13 at 10:27 -0300, Mauricio Faria de Oliveira wrote: > Hi Ben, > > On 06/11/2016 08:02 PM, Benjamin Herrenschmidt wrote: > > I'm not fan of this. This is a very useful message to diagnose why, > > for example, your network adapter is not working properly. >

Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE

2016-06-13 Thread Benjamin Herrenschmidt
On Mon, 2016-06-13 at 09:14 +0100, Christian Zigotzky wrote: > Can I disable the new PowerPC features with > > Radix MMU Support (PPC_RADIX_MMU) [Y/n/?] (NEW) -> n > > ? > > I can't compile the RC3 without the PowerPC commits. Our kernel lost > the mainline kernel support. Revert of the

Re: case sensitivity for devicetree node names

2016-06-12 Thread Benjamin Herrenschmidt
On Sun, 2016-06-12 at 11:39 -0700, Frank Rowand wrote: > > Is there a kernel config option (or a small set of config options) > that would identify the affected machines?  It would be ok if > the option(s) also included some non-affected machines.  That > way we could use the case insensitive

Re: [PATCH] powerpc: convert 'iommu_alloc failed' messages to dynamic debug

2016-06-11 Thread Benjamin Herrenschmidt
On Fri, 2016-06-10 at 10:03 -0300, Mauricio Faria de Oliveira wrote: > This prevents flooding the logs with 'iommu_alloc failed' messages > while I/O is performed (normally) to very fast devices (e.g. NVMe). > > That error is not necessarily a problem; device drivers can retry > later /

Re: case sensitivity for devicetree node names

2016-06-11 Thread Benjamin Herrenschmidt
On Sat, 2016-06-11 at 12:38 -0700, Frank Rowand wrote: > I chased through the history and found a 2.6.0-test5 announcement > which noted the patch from you which adds: > >   of_find_node_by_path() >   of_find_node_by_name() >   of_find_node_by_type() >   of_find_compatible_node() > > (And the

Re: [PATCH] powerpc/mm: Use jump label to speed up radix_enabled check

2016-06-09 Thread Benjamin Herrenschmidt
On Fri, 2016-06-10 at 14:16 +1000, Michael Ellerman wrote: > > It depends what that function does. It might work now, but it could break > later > when someone changes the jump label code, and it might work on some platforms > but not others. > > That is *really* early. We haven't looked at the

Re: [PATCH v10 09/18] powerpc/powernv: Extend PCI bridge resources

2016-06-09 Thread Benjamin Herrenschmidt
On Fri, 2016-06-10 at 15:28 +1000, Alexey Kardashevskiy wrote: > > Actually, it's likely caused by hardware defect > > - we can't set 2GB (0x8000 - 0x) to RC's memory window. > > Otherwise, it *seems* the window is disabled. I tried updating the > > window with (0x8000 -

Re: [PATCH] powerpc/mm: Use jump label to speed up radix_enabled check

2016-06-08 Thread Benjamin Herrenschmidt
On Wed, 2016-04-27 at 12:30 +0530, Aneesh Kumar K.V wrote: > Benjamin Herrenschmidt <b...@kernel.crashing.org> writes: > > > > > On Wed, 2016-04-27 at 11:00 +1000, Balbir Singh wrote: > > > > > > Just basic testing across CPUs with various mm feature

[PATCH] powerpc: Fix IBM_ARCH_VEC_NRCORES_OFFSET value

2016-06-07 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index ccd2037..6ee4b72 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -719,7 +719,7 @@ unsigned char ibm_

Re: [PATCH v5 1/6] qspinlock: powerpc support qspinlock

2016-06-06 Thread Benjamin Herrenschmidt
On Mon, 2016-06-06 at 17:59 +0200, Peter Zijlstra wrote: > On Fri, Jun 03, 2016 at 02:33:47PM +1000, Benjamin Herrenschmidt wrote: > > > >  - For the above, can you show (or describe) where the qspinlock > >    improves things compared to our current locks. > So cu

Re: [PATCH] powerpc/mm: use _raw variant of page table accessors

2016-06-05 Thread Benjamin Herrenschmidt
On Fri, 2016-06-03 at 15:34 +1000, Balbir Singh wrote: > > Can we just save the cpu_to_be64(_PAGE_PTE) as _BE64_PAGE_PTE constant > in big-endian (pgtable-be-types.h) and similar for other things. I know its > not the best option, but we don't really expect these bits to change often or >

Re: [PATCH v5 08/11] powerpc/powernv: Add platform support for stop instruction

2016-06-05 Thread Benjamin Herrenschmidt
On Thu, 2016-06-02 at 07:38 -0500, Shreyas B. Prabhu wrote: > @@ -61,8 +72,13 @@ save_sprs_to_stack: > * Note all register i.e per-core, per-subcore or per-thread is saved > * here since any thread in the core might wake up first > */ > +BEGIN_FTR_SECTION > +   mfspr 

Re: [PATCH v5 1/6] qspinlock: powerpc support qspinlock

2016-06-02 Thread Benjamin Herrenschmidt
On Fri, 2016-06-03 at 12:10 +0800, xinhui wrote: > On 2016年06月03日 09:32, Benjamin Herrenschmidt wrote: > > On Fri, 2016-06-03 at 11:32 +1000, Benjamin Herrenschmidt wrote: > >> On Thu, 2016-06-02 at 17:22 +0800, Pan Xinhui wrote: > >>> > >>> Base code to e

Re: [PATCH 3/3] powerpc/mm/radix: Flush page walk cache when freeing page table

2016-06-02 Thread Benjamin Herrenschmidt
On Thu, 2016-06-02 at 15:16 +0530, Aneesh Kumar K.V wrote: > > > +/* > + * flush the page walk cache for the address > + */ > +void flush_tlb_pgtable(struct mmu_gather *tlb, unsigned long address) > +{ > +   struct mm_struct *mm = tlb->mm; > +   /* > +    * flush the page table walk

Re: [PATCH] powerpc/mm/radix: Update LPCR HR bit as per ISA

2016-06-02 Thread Benjamin Herrenschmidt
On Thu, 2016-06-02 at 15:10 +0530, Aneesh Kumar K.V wrote: > We need to se HR bit LPCR for radix partitions. Again (:-) please a better changeset description. In fact this one is actually incorrect, this is not a partition. Something like "The processor requires the MMU mode (radix vs.

Re: [PATCH 2/2] KVM: PPC: hypervisor large decrementer support

2016-06-02 Thread Benjamin Herrenschmidt
On Wed, 2016-06-01 at 16:23 +1000, Michael Neuling wrote: > FWIW you can use: >         andis. reg,reg,(LPCR_LD)@ha @h in that case. Probably the same result but technically @ha is for arithmetic operations. Cheers, Ben. ___ Linuxppc-dev mailing list

Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries

2016-05-30 Thread Benjamin Herrenschmidt
On Tue, 2016-05-31 at 15:04 +1000, Michael Ellerman wrote: > I haven't heard of this "XIVE" thing but anyway .. > > I would hope we can come up with a better abstraction than this for XICS/XIVE, > so I'm inclined to merge this anyway. Worst case we end up putting some of it > back. Just merge

Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries

2016-05-30 Thread Benjamin Herrenschmidt
On Tue, 2016-05-31 at 12:48 +1000, Rashmica wrote: > > Oliver just informed me that it is only replacing XICS for p9. Should > I leave this for the person adding in the XIVE code? That would be me ;-) It will cost you a beer ! Cheers, Ben. ___

Re: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries

2016-05-30 Thread Benjamin Herrenschmidt
On Tue, 2016-05-31 at 11:34 +1000, Rashmica wrote: > > On 30/05/16 17:32, Benjamin Herrenschmidt wrote: > > > > On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote: > > > > > > MPIC was only used by Power3 which is now unsupported, so drop support

Re: [PATCH] powerpc/mm/hash: Fix the reference bit update when handling hash fault

2016-05-30 Thread Benjamin Herrenschmidt
On Mon, 2016-05-30 at 09:39 -0700, Hugh Dickins wrote: > I don't mean to be churlish, and subtract from your triumph in tracking > this down (assuming you have), but that commit log... okay, it's intended > for powerpc mmu experts, not me, but if it hasn't already gone into git, > then a rewrite

Re: [PATCH V2 04/68] powerpc/mm: Use big endian page table for book3s 64

2016-05-30 Thread Benjamin Herrenschmidt
On Mon, 2016-05-30 at 14:12 +0530, Aneesh Kumar K.V wrote: >  /* Encode and de-code a swap entry */ > @@ -516,10 +533,12 @@ static inline pte_t pte_swp_mksoft_dirty(pte_t > pte) >  { > return __pte(pte_val(pte) | _PAGE_SWP_SOFT_DIRTY); >  } These kind of setters (and mkspecial etc...)

<    6   7   8   9   10   11   12   13   14   15   >