[RESEND][PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-28 Thread Akshay Adiga
commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle states via stop API.") uses stop-api provided by the firmware to restore PSSCR. PSSCR restore is required for handling special wakeup. When special wakeup is completed, the core enters stop state based on restored PSSCR.

Re: [PATCH 1/3] powerpc/64s/idle: POWER9 implement a separate idle stop function for hotplug

2018-02-28 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-11-18 00:08:05]: > Implement a new function to invoke stop, power9_offline_stop, which is > like power9_idle_stop but used by the cpu hotplug code. > > Move KVM secondary state manipulation code to the offline case. > > Signed-off-by: Nicholas Piggin

[PATCH] powerpc/dma: remove unnecessary BUG()

2018-02-28 Thread Christophe Leroy
Direction is already checked in all calling functions in include/linux/dma-mapping.h and also in called function __dma_sync() So really no need to check it once more here. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/dma.c | 2 -- 1 file changed, 2

Re: [PATCH 2/3] powerpc/64s/idle: avoid sync for KVM state when waking from idle

2018-02-28 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-11-18 00:08:06]: > When waking from a CPU idle instruction (e.g., nap or stop), the sync > for ordering the KVM secondary thread state can be avoided if there > wakeup is coming from a kernel context rather than KVM context. > > This improves

Re: [PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-28 Thread Akshay Adiga
On Mon, Feb 26, 2018 at 03:47:12PM +1100, Stewart Smith wrote: > Akshay Adiga writes: > > commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle > > states via stop API.") uses stop-api provided by the firmware to restore > > PSSCR. PSSCR restore

Re: [PATCH 3/3] powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead

2018-02-28 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-11-18 00:08:07]: > When stop is executed with EC=ESL=0, it appears to execute like a > normal instruction (resuming from NIP when woken by interrupt). So all > the save/restore handling can be avoided completely. In particular NV > GPRs do not have to

[PATCH] powerpc: Keep const vars out of writable .sdata

2018-02-28 Thread Kees Cook
From: Segher Boessenkool Newer gcc will support "-mno-readonly-in-sdata"[1], which makes sure that the optimization on PPC32 for variables getting moved into the .sdata section will not apply to const variables (which must be in .rodata). This was originally noticed

Re: [PATCH] powerpc: Use generic pci_mmap_resource_range()

2018-02-28 Thread Bjorn Helgaas
On Mon, Feb 19, 2018 at 12:59:51PM +, David Woodhouse wrote: > Commit f719582435 ("PCI: Add pci_mmap_resource_range() and use it for > ARM64") added this generic function with the intent of using it > everywhere and ultimately killing the old arch-specific implementations. > > Let's get on

[PATCH] powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'

2018-02-28 Thread Rob Herring
'linux,stdout-path' has been deprecated for some time in favor of 'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'. Search and replace all the of occurrences with 'stdout-path'. Signed-off-by: Rob Herring Cc: Mark Rutland Cc: Benjamin

Re: [RESEND][PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-28 Thread Benjamin Herrenschmidt
On Thu, 2018-03-01 at 01:03 +0530, Akshay Adiga wrote: > commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle > states via stop API.") uses stop-api provided by the firmware to restore > PSSCR. PSSCR restore is required for handling special wakeup. When special > wakeup is

Re: [PATCH v4] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-28 Thread Florian Fainelli
On 02/28/2018 07:01 AM, Marcus Folkesson wrote: > - Add SPDX identifier > - Remove boiler plate license text > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate > license > > Signed-off-by: Marcus Folkesson > Acked-by: Adam Thomson

Re: [PATCH V2 4/4] powerpc/mm/hash64: Increase the VA range

2018-02-28 Thread kbuild test robot
Hi Aneesh, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.16-rc3 next-20180228] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [RFC PATCH 1/6] powerpc: Add security feature flags for Spectre/Meltdown

2018-02-28 Thread Daniel Axtens
Michael Ellerman writes: > This commit adds security feature flags to reflect the settings we > receive from firmware regarding Spectre/Meltdown mitigations. > > The feature names reflect the names we are given by firmware on bare > metal machines. See the hostboot source

Re: [PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-28 Thread Michael Ellerman
Akshay Adiga writes: > On Mon, Feb 26, 2018 at 03:47:12PM +1100, Stewart Smith wrote: >> Akshay Adiga writes: >> > commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle >> > states via stop API.") uses stop-api

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-28 Thread Michael Ellerman
Mathieu Malaterre writes: > When neither CONFIG_ALTIVEC, nor CONFIG_VSX or CONFIG_PPC64 is defined, the > array feature_properties is defined as an empty array, which in turn > triggers the following warning (treated as error on W=1): > > CC arch/powerpc/kernel/prom.o >

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-28 Thread Mathieu Malaterre
On Thu, Mar 1, 2018 at 3:55 AM, Michael Ellerman wrote: > Mathieu Malaterre writes: > >> When neither CONFIG_ALTIVEC, nor CONFIG_VSX or CONFIG_PPC64 is defined, the >> array feature_properties is defined as an empty array, which in turn >> triggers the

Re: [PATCH v2] powerpc/npu-dma.c: Fix deadlock in mmio_invalidate

2018-02-28 Thread Alistair Popple
> > diff --git a/arch/powerpc/platforms/powernv/npu-dma.c > > b/arch/powerpc/platforms/powernv/npu-dma.c > > index 0a253b64ac5f..2fed4b116e19 100644 > > --- a/arch/powerpc/platforms/powernv/npu-dma.c > > +++ b/arch/powerpc/platforms/powernv/npu-dma.c > > @@ -726,7 +749,7 @@ struct npu_context

Re: [PATCH] powerpc: dts: replace 'linux, stdout-path' with 'stdout-path'

2018-02-28 Thread Michael Ellerman
Rob Herring writes: > 'linux,stdout-path' has been deprecated for some time in favor of > 'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'. > Search and replace all the of occurrences with 'stdout-path'. This patch looks OK. But please remember that not

Re: [RFC REBASED 5/5] powerpc/mm/slice: use the dynamic high slice size to limit bitmap operations

2018-02-28 Thread Christophe LEROY
Le 28/02/2018 à 07:53, Nicholas Piggin a écrit : On Tue, 27 Feb 2018 18:11:07 +0530 "Aneesh Kumar K.V" wrote: Nicholas Piggin writes: On Tue, 27 Feb 2018 14:31:07 +0530 "Aneesh Kumar K.V" wrote:

Re: [PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-28 Thread Michael Ellerman
Stewart Smith writes: > Akshay Adiga writes: >> commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle >> states via stop API.") uses stop-api provided by the firmware to restore >> PSSCR. PSSCR restore is required for

Re: [PATCH] xmon: Setup xmon debugger hooks when first break-point is set

2018-02-28 Thread Michael Ellerman
Vaibhav Jain writes: > Presently sysrq key for xmon('x') is registered during kernel init > irrespective of the value of kernel param 'xmon'. Thus xmon is enabled > even if 'xmon=off' is passed on the kernel command line. However this > doesn't enable the kernel

Re: [PATCH v4] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-28 Thread Marcus Folkesson
Florian, On Wed, Feb 28, 2018 at 03:45:43PM -0800, Florian Fainelli wrote: > On 02/28/2018 07:01 AM, Marcus Folkesson wrote: > > - Add SPDX identifier > > - Remove boiler plate license text > > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate > > license > > > >

Re: [PATCH] selftests/vm: Update max va test to check for high address return.

2018-02-28 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > mmap(-1,..) is expected to search from max supported VA top down. It should > find > an address above ADDR_SWITCH_HINT. Explicitly check for this. > > Also derefer the address even if we failed the addr check. > > Signed-off-by:

Re: Build regressions/improvements in v4.16-rc3

2018-02-28 Thread Christian Zigotzky
Hi Geert, The following patch should be in the commit 'kvm-ppc-next-4.16-2' [1]: Fixes: accb757d798c ("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run") Reported-by: Christian Zigotzky Signed-off-by: Paul Mackerras ---

[RFC PATCH 1/6] powerpc: Add security feature flags for Spectre/Meltdown

2018-02-28 Thread Michael Ellerman
This commit adds security feature flags to reflect the settings we receive from firmware regarding Spectre/Meltdown mitigations. The feature names reflect the names we are given by firmware on bare metal machines. See the hostboot source for details. Arguably these could be firmware features,

[PATCH v4] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-28 Thread Marcus Folkesson
- Add SPDX identifier - Remove boiler plate license text - If MODULE_LICENSE and boiler plate does not match, go for boiler plate license Signed-off-by: Marcus Folkesson Acked-by: Adam Thomson Acked-by: Baruch Siach

[RFC PATCH 3/6] powerpc/pseries: Set or clear security feature flags

2018-02-28 Thread Michael Ellerman
Now that we have feature flags for security related things, set or clear them based on what we receive from the hypercall. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/setup.c | 43 ++ 1 file changed, 43 insertions(+)

[RFC PATCH 6/6] powerpc/64s: Enhance the information in cpu_show_meltdown()

2018-02-28 Thread Michael Ellerman
Now that we have the security feature flags we can make the information displayed in the "meltdown" file more informative. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/security_features.h | 1 + arch/powerpc/kernel/security.c | 30

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-28 Thread Andy Shevchenko
On Tue, Feb 27, 2018 at 10:42 PM, Segher Boessenkool wrote: > On Tue, Feb 27, 2018 at 05:52:06PM +0200, Andy Shevchenko wrote: >> On Tue, Feb 27, 2018 at 9:44 AM, Mathieu Malaterre wrote: >> > On Tue, Feb 27, 2018 at 8:33 AM, Christophe LEROY >> >

[RFC PATCH 2/6] powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags

2018-02-28 Thread Michael Ellerman
Add some additional values which have been defined for the H_GET_CPU_CHARACTERISTICS hypercall. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/hvcall.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/hvcall.h

[RFC PATCH 4/6] powerpc/powernv: Set or clear security feature flags

2018-02-28 Thread Michael Ellerman
Now that we have feature flags for security related things, set or clear them based on what we see in the device tree provided by firmware. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/powernv/setup.c | 56 ++ 1 file changed, 56

[RFC PATCH 5/6] powerpc/64s: Move cpu_show_meltdown()

2018-02-28 Thread Michael Ellerman
This landed in setup_64.c for no good reason other than we had nowhere else to put it. Now that we have a security-related file, that is a better place for it so move it. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/security.c | 12

Re: [RFC PATCH 1/6] powerpc: Add security feature flags for Spectre/Meltdown

2018-02-28 Thread Segher Boessenkool
Hi! On Thu, Mar 01, 2018 at 01:53:11AM +1100, Michael Ellerman wrote: > +// A speculation barrier should be used for bounds checks (Spectre variant > 1ull s/1ull/1)/ ? Segher

Re: powerpc/powernv/mce: Don't silently restart the machine

2018-02-28 Thread Michael Ellerman
Balbir Singh writes: > On MCE the current code will restart the machine with > ppc_md.restart(). This case was extremely unlikely since > prior to that a skiboot call is made and that resulted in > a checkstop for analysis. > > With newer skiboots, on P9 we don't checkstop

[PATCH] selftests/powerpc: Fix missing clean of pmu/lib.o

2018-02-28 Thread Michael Ellerman
The tm-resched-dscr test links against pmu/lib.o, but we don't have a rule to clean pmu/lib.o. This can lead to a build break if you build for big endian and then little, or vice versa. Fix it by making tm-resched-dscr depend on pmu/lib.c, causing the code to be built directly in, meaning no .o

Re: [PATCH V2] powerpc: Don't do runtime futex_cmpxchg test

2018-02-28 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > futex_detect_cmpxchg() does a cmpxchg_futex_value_locked on a NULL user addr > to > runtime detect whether architecture implements atomic cmpxchg for futex. POWER > do implement the feature and hence we can enable the config instead

Re: powerpc/powernv/mce: Don't silently restart the machine

2018-02-28 Thread Balbir Singh
On Wed, Feb 28, 2018 at 8:49 PM, Michael Ellerman wrote: > Balbir Singh writes: > >> On MCE the current code will restart the machine with >> ppc_md.restart(). This case was extremely unlikely since >> prior to that a skiboot call is made and that

Re: [PATCH v2] powerpc/npu: Cleanup MMIO ATSD flushing

2018-02-28 Thread Balbir Singh
On Wed, Feb 28, 2018 at 9:50 PM, Michael Ellerman wrote: > Alistair Popple writes: > >>> @aneesh can you please look at this? @mpe can we pick this up if there >>> are no objections? >> >> @mpe any objections to picking this up for this release? Or do

Re: [PATCH v2] powerpc/npu-dma.c: Fix deadlock in mmio_invalidate

2018-02-28 Thread Michael Ellerman
Alistair Popple writes: > When sending TLB invalidates to the NPU we need to send extra flushes due > to a hardware issue. The original implementation would lock the all the > ATSD MMIO registers sequentially before unlocking and relocking each of > them sequentially to do

Re: [PATCH 15/27] cpufreq: powerenv: Don't validate the frequency table twice

2018-02-28 Thread Michael Ellerman
Viresh Kumar writes: > On 26-02-18, 22:53, Michael Ellerman wrote: >> Viresh Kumar writes: >> > Subject: Re: [PATCH 15/27] cpufreq: powerenv: Don't validate the frequency >> > table twice >>^ >>

Re: [PATCH v2] powerpc/npu: Cleanup MMIO ATSD flushing

2018-02-28 Thread Michael Ellerman
Alistair Popple writes: >> @aneesh can you please look at this? @mpe can we pick this up if there >> are no objections? > > @mpe any objections to picking this up for this release? Or do you want to > wait > for the next one? (there are likely more bugfixes coming for ATS

Re: [PATCH] selftests/vm: Update max va test to check for high address return.

2018-02-28 Thread Kirill A. Shutemov
On Wed, Feb 28, 2018 at 09:28:30AM +0530, Aneesh Kumar K.V wrote: > mmap(-1,..) is expected to search from max supported VA top down. It should > find > an address above ADDR_SWITCH_HINT. Explicitly check for this. Hm. I don't think this correct. -1 means the application supports any address,

Re: Build regressions/improvements in v4.16-rc3

2018-02-28 Thread Geert Uytterhoeven
On Wed, Feb 28, 2018 at 12:27 PM, Geert Uytterhoeven wrote: > JFYI, when comparing v4.16-rc3[1] to v4.16-rc2[3], the summaries are: > - build errors: +1/-16 + /home/kisskb/slave/src/arch/powerpc/kvm/powerpc.c: error: label 'out' defined but not used