Re: [PATCH] cpufreq: powernv: Replacing pstate_id with frequency table index

2016-06-27 Thread Akshay Adiga
Hi viresh, My apologies. I realize that i have messed it up a quite a few places. Surely with the checkpatch as well. I will send a v2 with corrections. On 06/27/2016 12:00 PM, Viresh Kumar wrote: Hi Akshay, Did you try running checkpatch for this? On 24-06-16, 19:33, Akshay Adiga wrote: d

RE: [PATCH v2] cpuidle: Fix last_residency division

2016-06-27 Thread David Laight
From: Arnd Bergmann > Sent: 24 June 2016 20:43 > On Friday, June 24, 2016 9:31:35 PM CEST Shreyas B Prabhu wrote: > > > If those functions are called less often than cpuidle_enter_state(), > > > we could just move the division there. Since the divisor is constant, > > > do_div() can convert it into

Re: arch/powerpc/platforms/512x/clock-commonclk.c:824: wrong % specifier ?

2016-06-27 Thread Anatolij Gustschin
On Mon, 27 Jun 2016 08:59:42 +0100 David Binderman linuxdev.baldr...@gmail.com wrote: ... >linux-4.7-rc5/arch/powerpc/platforms/512x/clock-commonclk.c:824]: >(warning) %d in format string (no. 1) requires 'int' but the argument >type is 'size_t {aka unsigned long}'. mpc512x is 32-bit arch, size_t

Re: powerpc/fadump: trivial fix of spelling mistake, clean up message

2016-06-27 Thread Colin Ian King
On 26/06/16 05:19, Michael Ellerman wrote: > On Fri, 2016-24-06 at 17:43:00 UTC, Colin King wrote: >> From: Colin Ian King >> >> trivial fix to spelling mistake "rgistration" and minor clean up >> of the printk error message > > Can you also: > - use pr_err() > - unsplit the message, ie. keep t

Re: powerpc/fadump: trivial fix of spelling mistake, clean up message

2016-06-27 Thread Joe Perches
On Mon, 2016-06-27 at 11:38 +0100, Colin Ian King wrote: > On 26/06/16 05:19, Michael Ellerman wrote: > > On Fri, 2016-24-06 at 17:43:00 UTC, Colin King wrote: [] > > > trivial fix to spelling mistake "rgistration" and minor clean up > > > of the printk error message > > Can you also: > >  - use pr

[PATCH][V2] powerpc/fadump: trivial fix of spelling mistake, clean up message

2016-06-27 Thread Colin King
From: Colin Ian King Fix trivial spelling mistake "rgistration". Also use pr_err instead of printk and unsplit the string to keep it all on one line. Signed-off-by: Colin Ian King --- arch/powerpc/kernel/fadump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/po

Re: powerpc/fadump: trivial fix of spelling mistake, clean up message

2016-06-27 Thread Michael Ellerman
On Mon, 2016-06-27 at 03:51 -0700, Joe Perches wrote: > On Mon, 2016-06-27 at 11:38 +0100, Colin Ian King wrote: > > On 26/06/16 05:19, Michael Ellerman wrote: > > > On Fri, 2016-24-06 at 17:43:00 UTC, Colin King wrote: > > > > trivial fix to spelling mistake "rgistration" and minor clean up > > >

[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 g

[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 --- drivers/of/base.c | 22 ++ include/

[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 --- 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 deletions(-) diff --git a/drivers/gpu/

[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 --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/pro

[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 --- arch/powerpc/include/asm/setup.h | 4 1 file changed, 4 insertions(+) diff --git a/arc

[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 --- arch/powerpc/include/asm/feature-fixups.h | 4 arch/powerpc/include/asm/synch.h | 1 - arch/powerpc/kernel/s

[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 --- arc

[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 --- arch/powerpc/kernel/setup_64.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-)

[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 --- arch/powerpc/kernel/prom.c | 2 +

[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 --- arch/powerpc/kernel/setup_6

[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 --- arch/powerpc/include/asm/ps3.h | 2 ++ arch/powerpc/kernel/prom.c | 7 +++ arch/powerpc/mm/h

[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 --- arch/powerpc/include/asm/firmware.h | 4 +++ arch/powerpc/kernel/prom.c| 6 + arch/po

[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 --- arch/powerpc/include/asm/opal.h| 1 + arch/powerpc/kernel/setup_64.c | 6

[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 --- arch/powerpc/platforms/pasemi/iommu.c | 15 +-- arch/powerpc/platforms/pasemi/pasemi.h | 1 - arch/powerpc/platforms/pasemi/setup.c | 2 -- 3 files

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

2016-06-27 Thread Benjamin Herrenschmidt
Instead of punching a hole in the linear mapping, just use normal cachable memory, and apply the flush sequence documented in the CPC625 (aka U3) user manual. This allows us to remove quite a bit of code related to the early allocation of the DART and the hole in the linear mapping. We can also ge

[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 --- arch/powerpc/mm/hash_utils_64.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerp

[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 --- arch/powerpc/kernel/rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rt

[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 --- 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/powerpc/kernel/setup-common.c index 8ca

[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 --- arch/powerpc/mm/hash_utils_64.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deleti

[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 --- arch/powerpc/platforms/powermac/setup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/p

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

2016-06-27 Thread Benjamin Herrenschmidt
Moving probe_machine() to after mmu init will cause the ppc_md fields relative to the hash table management to be overwritten. Since we have essentially disconnected the machine type from the hash backend ops, finish the job by moving them to a different structure. The only callback that didn't q

[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 --- arch/powerpc/kernel/setup-common.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/powerpc/kernel/se

[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 --- arch/powerpc/kernel/setup_64.c | 6 +++--- arch/powerpc/platforms/cell/setup.c | 6

[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 --- 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 100644 --- a/arch/powerpc/platforms

[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 --- 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 100644 --- a/arch/powerpc/platfor

[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 --- arch/powerpc/include/asm/machdep.h| 1 - arch/powerpc/kernel/setup_32.c| 3 --- arch/powerpc/kernel/setup_64.c| 8 -

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

2016-06-27 Thread Benjamin Herrenschmidt
This converts all the 32-bit platforms to use the expanded device-tree which is a pretty mechanical change. Unlike 64-bit, the 32-bit kernel didn't rely on platform initializations to setup the MMU since it sets it up entirely before probe_machine() so the move has comparatively less consequences t

[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 --- 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 afb22a6..8c8f440 100644 --- a/arch/powerp

[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 --- arch/powerpc/kernel/setup_32.c | 4 ++-- arch/powe

[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 --- arch/powerpc/kernel/setup_32.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c

[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 --- arch/powerpc/kernel/setup-common.c | 2 ++ arch/powerpc/kernel/setup_32.c | 5 ++--- arch/powerpc/kernel/setup_64.c | 5 ++--- 3 files changed

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

2016-06-27 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- 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/kernel/setup_64.c +++ b/arch/powerpc/

[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 --- arch/powerpc/include/asm/setup.h | 4 + arch/powerpc/kernel/setup-common.c | 202 ++

Re: powerpc/fadump: trivial fix of spelling mistake, clean up message

2016-06-27 Thread Joe Perches
On Mon, 2016-06-27 at 21:20 +1000, Michael Ellerman wrote: > On Mon, 2016-06-27 at 03:51 -0700, Joe Perches wrote: > > > > On Mon, 2016-06-27 at 11:38 +0100, Colin Ian King wrote: > > > > > > On 26/06/16 05:19, Michael Ellerman wrote: > > > > > > > > On Fri, 2016-24-06 at 17:43:00 UTC, Colin Kin

Re: powerpc/fadump: trivial fix of spelling mistake, clean up message

2016-06-27 Thread Colin Ian King
On 27/06/16 12:20, Michael Ellerman wrote: > On Mon, 2016-06-27 at 03:51 -0700, Joe Perches wrote: >> On Mon, 2016-06-27 at 11:38 +0100, Colin Ian King wrote: >>> On 26/06/16 05:19, Michael Ellerman wrote: On Fri, 2016-24-06 at 17:43:00 UTC, Colin King wrote: > trivial fix to spelling mist

[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 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 --- arch/powerpc/include/asm/

[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 --- arch/powerpc/include/asm/exception-64s.h |

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

2016-06-27 Thread Benjamin Herrenschmidt
Calling this function with interrupts soft-disabled will cause a replay of the external interrupt vector when they are re-enabled. This will be used by the OPAL XICS backend (and latter by the native XIVE code) to handle EOI signaling that there are more interrupts to fetch from the hardware since

[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 --- arch/powerpc/include/asm/xics.h| 8 +- arch/powerpc/sysdev/xics/Makefile | 2 +- arch/powerpc/s

[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 --- arch/powerpc/platforms/powernv/pci-ioda.c | 15 +++ arch/powerpc/platforms/powernv/pci.c | 4 arch/powerpc/platforms/powernv/pci.h | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) d

[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 --- arch/powerpc/platforms/pseries/iommu.c | 53 +- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/arch/powerpc/platforms/pseries/i

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

2016-06-27 Thread Benjamin Herrenschmidt
The TCE invalidation functions are fairly implementation specific, and while the IODA specs more/less describe the register, in practice various implementation workarounds may be required. So name the functions after the target PHB. Note today and for the foreseeable future, there's a 1:1 relation

[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 --- arch/powerpc/include/asm/opal-api.h| 10 +++- arch/powerpc/include/asm/opal.h| 6 +++ arch/powerpc/ker

[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 Herrenschmid

[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 --- arch/powerpc/platforms/powernv/pci-ioda.c | 68 --- ar

[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 --- arch/powerpc/platforms/powernv/pci-ioda.c | 33 +++ 1 file changed, 29 insertions(+), 4 deletions(-) diff --

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

2016-06-27 Thread Benjamin Herrenschmidt
M64's are the configurable 64-bit windows that cover the 64-bit MMIO space. We used to hard code 16 windows. Newer chips might have a variable number and might need to reserve some as well (for example on PHB4/POWER9, M32 and M64 are actually unified and we use M64#0 to map the 32-bit space). So n

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

2016-06-27 Thread Benjamin Herrenschmidt
From: "Shreyas B. Prabhu" pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu Signed-off-by: Benjam

[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 --- arch/powerpc/platforms/powernv/pci-ioda.c | 3 +++ 1 fil

[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 --- arch/powerpc/kernel/pci-common.c | 6 -- 1 file changed, 4 insertions(+), 2 deleti

[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 --- arch/powerpc/kernel/pci-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 de

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

2016-06-27 Thread Benjamin Herrenschmidt
The generic allocation code may sometimes decide to assign a prefetchable 64-bit BAR to the M32 window. In fact it may also decide to allocate a 64-bit non-prefetchable BAR to the M64 one ! So using the resource flags as a test to decide which window was used for PE allocation is just wrong and lea

Greetings From Mrs.Fali Islapha

2016-06-27 Thread Fali Islapha
Greetings From Mrs.Fali Islapha Greetings of peace to you, I am Mrs.Fali Islapha a devoted Christian and now ageing widow suffering from long time illness. I have a blood cancer and right now I am admitted in a hospital here at Abidjan Cote Divoire. I have some inherited fund from my lat

HELLO

2016-06-27 Thread Sue Peters
I am Sue Peters, currently undergoing medical treatment for cancer Chronic Myelogenous Leukemia (CML). I was married to Late Dr. Collins Peters who worked with Woodside Petroleum Limited (Australia) for 23 years before he died in the year 2011. Before my Husband died, we both made a deposit of

HELLO

2016-06-27 Thread Sue Peters
I am Sue Peters, currently undergoing medical treatment for cancer Chronic Myelogenous Leukemia (CML). I was married to Late Dr. Collins Peters who worked with Woodside Petroleum Limited (Australia) for 23 years before he died in the year 2011. Before my Husband died, we both made a deposit of

arch/powerpc/platforms/512x/clock-commonclk.c:824: wrong % specifier ?

2016-06-27 Thread David Binderman
Hello there, linux-4.7-rc5/arch/powerpc/platforms/512x/clock-commonclk.c:824]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'size_t {aka unsigned long}'. Source code is snprintf(name, sizeof(name), "psc%d", mclk_idx); Regards David Binderman __

arch/powerpc/xmon/dis-asm.h: 2 * wrong specifiers ?

2016-06-27 Thread David Binderman
Hello there, linux-4.7-rc5/arch/powerpc/xmon/dis-asm.h:20]: (warning) %x in format string (no. 1) requires 'unsigned int' but the argument type is 'unsigned long'. [linux-4.7-rc5/arch/powerpc/xmon/dis-asm.h:26]: (warning) %x in format string (no. 1) requires 'unsigned int' but the argument type is

[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 --- arch/powerpc/platforms/cell/spu_manage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/p

[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 --- arch/powerpc/platforms/85xx/ge_imp3a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/ge_imp3a.c

[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 --- arch/powerpc/kernel/setup_64.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c

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

2016-06-27 Thread Benjamin Herrenschmidt
early_init() is called in-place before kernel relocation and using whatever MMU setup exists at the point the kernel is entered. machine_init() is called after relocation and after some initial mapping of PAGE_OFFSET has been established (typically using BATs on 6xx/7xx/7xxx processors or some for

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

2016-06-27 Thread Benjamin Herrenschmidt
The SMU command buffer needs to be allocated below 2G using memblock. In the past, this had to be done very early from the arch code as memblock wasn't available past that point. That is no longer the case though, smu_init() is called from setup_arch() when memblock is still functional these days.

[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 --- 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/powerpc/kernel/head_64.S b/arch/powerpc

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 mess

[PATCH v2] ibmvnic: fix to use list_for_each_safe() when delete items

2016-06-27 Thread weiyj_lk
From: Wei Yongjun Since we will remove items off the list using list_del() we need to use a safe version of the list_for_each() macro aptly named list_for_each_safe(). Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 14 +++--- 1 file changed, 7 insertions(+), 7 dele

[PATCH 1/3] kernel/sched: introduce vcpu preempted check interface

2016-06-27 Thread Pan Xinhui
this supports to fix lock holder preempted issue which run as a guest for kernel users, we could use bool vcpu_is_preempted(int cpu) to detech if one vcpu is preempted or not. The default implementation is a macrodefined by false. So compiler can wrap it out if arch dose not support such vcpu pte

[PATCH 2/3] powerpc/spinlock: support vcpu preempted check

2016-06-27 Thread Pan Xinhui
This is to fix some holder preemption issues. Spinning at one vcpu which is preempted is meaningless. Kernel need such interfaces, So lets support it. We also should suooprt both the shared and dedicated mode. So add lppaca_dedicated_proc macro in lppaca.h Suggested-by: Boqun Feng Signed-off-by

[PATCH 3/3] locking/osq: Drop the overload of osq_lock()

2016-06-27 Thread Pan Xinhui
An over-committed guest with more vCPUs than pCPUs has a heavy overload in osq_lock(). This is because vCPU A hold the osq lock and yield out, vCPU B wait per_cpu node->locked to be set. IOW, vCPU B wait vCPU A to run and unlock the osq lock. Such spinning is meaningless. So lets use vcpu_is_pree

[PATCH 0/3] implement vcpu preempted check

2016-06-27 Thread Pan Xinhui
This is to fix some bad issues on an over-committed guest. test-caes: perf record -a perf bench sched messaging -g 400 -p && perf report 18.09% sched-messaging [kernel.vmlinux] [k] osq_lock 12.28% sched-messaging [kernel.vmlinux] [k] rwsem_spin_on_owner 5.27% sched-messaging [kernel.vmli

Re: [PATCH 1/3] kernel/sched: introduce vcpu preempted check interface

2016-06-27 Thread Peter Zijlstra
On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote: > +++ b/include/linux/sched.h > @@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct *p, > unsigned int cpu) > > #endif /* CONFIG_SMP */ > > +#ifdef arch_vcpu_is_preempted > +static inline bool vcpu_is_preempted(

Re: [PATCH 1/3] kernel/sched: introduce vcpu preempted check interface

2016-06-27 Thread Boqun Feng
On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote: > this supports to fix lock holder preempted issue which run as a guest > > for kernel users, we could use bool vcpu_is_preempted(int cpu) to detech > if one vcpu is preempted or not. > > The default implementation is a macrodefined by f

Re: [PATCH 1/3] kernel/sched: introduce vcpu preempted check interface

2016-06-27 Thread Peter Zijlstra
On Mon, Jun 27, 2016 at 04:00:43PM +0200, Peter Zijlstra wrote: > On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote: > > +++ b/include/linux/sched.h > > @@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct > > *p, unsigned int cpu) > > > > #endif /* CONFIG_SMP */ >

Re: [PATCH 2/3] powerpc/spinlock: support vcpu preempted check

2016-06-27 Thread Peter Zijlstra
On Mon, Jun 27, 2016 at 01:41:29PM -0400, Pan Xinhui wrote: > diff --git a/arch/powerpc/include/asm/spinlock.h > b/arch/powerpc/include/asm/spinlock.h > index 523673d..ae938ee 100644 > --- a/arch/powerpc/include/asm/spinlock.h > +++ b/arch/powerpc/include/asm/spinlock.h > @@ -52,6 +52,21 @@ > #de

Re: [PATCH 3/3] locking/osq: Drop the overload of osq_lock()

2016-06-27 Thread Peter Zijlstra
On Mon, Jun 27, 2016 at 01:41:30PM -0400, Pan Xinhui wrote: > @@ -118,8 +123,17 @@ bool osq_lock(struct optimistic_spin_queue *lock) > while (!READ_ONCE(node->locked)) { > /* >* If we need to reschedule bail... so we can block. > + * An over-committe

Re: [PATCH] powerpc/pseries: Auto online hotplugged memory

2016-06-27 Thread Nathan Fontenot
On 06/24/2016 12:35 AM, Michael Ellerman wrote: > On Mon, 2016-06-20 at 21:14 -0500, Nathan Fontenot wrote: >> On 06/20/2016 07:57 PM, Michael Ellerman wrote: >>> On Mon, 2016-06-20 at 08:51 -0500, Nathan Fontenot wrote: >>> Auto online hotplugged memory A recent update (commit id 31

Re: [PATCH 2/3] powerpc/spinlock: support vcpu preempted check

2016-06-27 Thread Boqun Feng
Hi Xinhui, On Mon, Jun 27, 2016 at 01:41:29PM -0400, Pan Xinhui wrote: > This is to fix some holder preemption issues. Spinning at one > vcpu which is preempted is meaningless. > > Kernel need such interfaces, So lets support it. > > We also should suooprt both the shared and dedicated mode. > S

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-27 Thread Dave Young
On 06/23/16 at 12:37pm, Thiago Jung Bauermann wrote: > Am Donnerstag, 23 Juni 2016, 01:44:07 schrieb Dave Young: > > Hmm, hold on. For declaring a struct in a header file, comment should be > > just after each fields, like below, your format is for a function instead: > > struct pci_slot { > >

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-27 Thread Thiago Jung Bauermann
Am Dienstag, 28 Juni 2016, 00:19:48 schrieb Dave Young: > On 06/23/16 at 12:37pm, Thiago Jung Bauermann wrote: > > Am Donnerstag, 23 Juni 2016, 01:44:07 schrieb Dave Young: > > What is bad about the description of top_down? > It is not clear enough to me, I personally think the original one in > so

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-27 Thread Thiago Jung Bauermann
Am Montag, 27 Juni 2016, 13:37:58 schrieb Thiago Jung Bauermann: > Should I add a separate top_down argument to kexec_locate_mem_hole to > control if the memory walk should be from top to bottom, and then the > bottom_up member of struct kexec_buf controls where inside each memory > region the memo

Re: [PATCH v20 14/14] Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec

2016-06-27 Thread Thiago Jung Bauermann
Hello, Am Donnerstag, 23 Juni 2016, 17:54:49 schrieb Geoff Levand: > +linux,usable-memory > +--- > + > +This property is set on PowerPC and arm64 by kexec-tools during kdump > +to tell the crash kernel the base address of its reserved area of memory, > and +the size. e.g. > + > +/

[no subject]

2016-06-27 Thread Dave Young
vgo...@redhat.com linux-ker...@vger.kernel.org, Eric Biederman Bcc: ruy...@redhat.com Subject: Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer. Reply-To: In-Reply-To: <5428891.iJNV8CI1We@hactar> On 06/27/16 at 01:37pm, Thiago Jung Bauermann

Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-27 Thread Dave Young
Please ignore previous reply, I mistakenly send a broken mail without subject, sorry about it. Resend the reply here. On 06/27/16 at 01:37pm, Thiago Jung Bauermann wrote: > Am Dienstag, 28 Juni 2016, 00:19:48 schrieb Dave Young: > > On 06/23/16 at 12:37pm, Thiago Jung Bauermann wrote: > > > Am Don

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

2016-06-27 Thread Gerhard Pircher
Am 2016-06-27 um 13:29 schrieb Benjamin Herrenschmidt: > This converts all the 32-bit platforms to use the expanded device-tree > which is a pretty mechanical change. Unlike 64-bit, the 32-bit kernel > didn't rely on platform initializations to setup the MMU since it > sets it up entirely before pr

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 commen

[PATCH] powerpc/tm: Avoid SLB faults in treclaim/trecheckpoint when RI=0

2016-06-27 Thread Michael Neuling
Currently we have 2 segments that are bolted for the kernel linear mapping (ie 0xc000... addresses). This is 0 to 1TB and also the kernel stacks. Anything accessed outside of these regions may need to be faulted in. If a machine has < 2TB of memory we never fault on the kernel linear mapping as t

Re: [PATCH 1/3] kernel/sched: introduce vcpu preempted check interface

2016-06-27 Thread xinhui
On 2016年06月27日 22:02, Peter Zijlstra wrote: On Mon, Jun 27, 2016 at 04:00:43PM +0200, Peter Zijlstra wrote: On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote: +++ b/include/linux/sched.h @@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)

Re: [PATCH 1/3] kernel/sched: introduce vcpu preempted check interface

2016-06-27 Thread xinhui
On 2016年06月27日 22:05, Boqun Feng wrote: On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote: this supports to fix lock holder preempted issue which run as a guest for kernel users, we could use bool vcpu_is_preempted(int cpu) to detech if one vcpu is preempted or not. The default impl

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

2016-06-27 Thread Samuel Mendoza-Jonas
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. Signed-off-by: Samuel Mendoza-Jonas Cc: # 4.1.x- --- drivers/tty/hvc/hvc_opal.c | 12 +++- 1 file changed, 11 insertion

[PATCH 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles

2016-06-27 Thread Samuel Mendoza-Jonas
Commit 2def86a7200c ("hvc: Convert to using interrupts instead of opal events") enabled the use of interrupts in the hvc_driver for OPAL platforms. However on machines with more than one hvc console, any console after the first will fail to register an interrupt handler in notifier_add_irq() since

Re: [PATCH 2/3] powerpc/spinlock: support vcpu preempted check

2016-06-27 Thread xinhui
On 2016年06月27日 22:17, Peter Zijlstra wrote: On Mon, Jun 27, 2016 at 01:41:29PM -0400, Pan Xinhui wrote: diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h index 523673d..ae938ee 100644 --- a/arch/powerpc/include/asm/spinlock.h +++ b/arch/powerpc/include/asm

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 2/3] powerpc/spinlock: support vcpu preempted check

2016-06-27 Thread xinhui
On 2016年06月27日 22:58, Boqun Feng wrote: Hi Xinhui, On Mon, Jun 27, 2016 at 01:41:29PM -0400, Pan Xinhui wrote: This is to fix some holder preemption issues. Spinning at one vcpu which is preempted is meaningless. Kernel need such interfaces, So lets support it. We also should suooprt both t

  1   2   >