Re: [PATCH v2 1/3] powerpc/powernv: handle the platform error reboot in ppc_md.restart

2017-07-19 Thread Mahesh Jagannath Salgaonkar
On 07/19/2017 12:29 PM, Nicholas Piggin wrote: > Unrecovered MCE and HMI errors are sent through a special restart OPAL > call to log the platform error. The downside is that they don't go > through normal Linux crash paths, so they don't give much information > to the Linux console. > > Change

Re: [RFC v6 01/62] powerpc: Free up four 64K PTE bits in 4K backed HPTE pages

2017-07-19 Thread Aneesh Kumar K.V
. > /* > @@ -116,8 +104,8 @@ int __hash_page_4K(unsigned long ea, unsigned long > access, unsigned long vsid, >* On hash insert failure we use old pte value and we don't >* want slot information there if we have a insert failure. >*/ > -

Re: [RFC v6 02/62] powerpc: Free up four 64K PTE bits in 64K backed HPTE pages

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > Rearrange 64K PTE bits to free up bits 3, 4, 5 and 6 > in the 64K backed HPTE pages. This along with the earlier > patch will entirely free up the four bits from 64K PTE. > The bit numbers are big-endian as defined in the ISA3.0 > > This patch

Re: [RFC v6 05/62] powerpc: capture the PTE format changes in the dump pte report

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > The H_PAGE_F_SECOND,H_PAGE_F_GIX are not in the 64K main-PTE. > capture these changes in the dump pte report. > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Ram Pai > --- >

Re: [RFC v6 03/62] powerpc: introduce pte_set_hash_slot() helper

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > Introduce pte_set_hash_slot().It sets the (H_PAGE_F_SECOND|H_PAGE_F_GIX) > bits at the appropriate location in the PTE of 4K PTE. For > 64K PTE, it sets the bits in the second part of the PTE. Though > the implementation for the

Re: [PATCH] powerpc: Convert to using %pOF instead of full_name

2017-07-19 Thread Rob Herring
On Wed, Jul 19, 2017 at 7:03 AM, Michael Ellerman wrote: > Rob Herring writes: > >> Now that we have a custom printf format specifier, convert users of >> full_name to use %pOF instead. This is preparation to remove storing >> of the full path string for

RE: [PATCH 2/3] soc/fsl/qe: only apply QE_General4 workaround on affected SoCs

2017-07-19 Thread Qiang Zhao
Hi Valentin, This patch you added make the compiling issue on armv8. Could you send another patch to resolve it? CC drivers/soc/samsung/pm_domains.o CC drivers/soc/sunxi/sunxi_sram.o CC drivers/soc/renesas/rcar-rst.o CC drivers/soc/fsl/qe/qe_io.o

[PATCH v2 0/3] machine check handling improvements

2017-07-19 Thread Nicholas Piggin
This is a few patches to improve machine check reporting and recovery. Since last time: - improved patch 1 according to review comments: https://patchwork.ozlabs.org/patch/785240/ - In patch 3 be a bit smarter about when to use die() and when to go straight to firmware reboot. Nicholas

[PATCH v2 3/3] powerpc: machine check interrupt is a non-maskable interrupt

2017-07-19 Thread Nicholas Piggin
Use nmi_enter similarly to system reset interrupts. This uses NMI printk NMI buffers and turns off various debugging facilities that helps avoid tripping on ourselves or other CPUs. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/traps.c | 9 ++--- 1 file changed,

Re: [PATCH] soc: Convert to using %pOF instead of full_name

2017-07-19 Thread Krzysztof Kozlowski
On Tue, Jul 18, 2017 at 04:43:29PM -0500, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc:

Re: [PATCH] i2c: Convert to using %pOF instead of full_name

2017-07-19 Thread Maxime Ripard
On Tue, Jul 18, 2017 at 04:43:06PM -0500, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc:

[PATCH v2 1/3] powerpc/powernv: handle the platform error reboot in ppc_md.restart

2017-07-19 Thread Nicholas Piggin
Unrecovered MCE and HMI errors are sent through a special restart OPAL call to log the platform error. The downside is that they don't go through normal Linux crash paths, so they don't give much information to the Linux console. Change this by providing a special crash function which does some

Re: [PATCH v2 1/3] powerpc/powernv: handle the platform error reboot in ppc_md.restart

2017-07-19 Thread Nicholas Piggin
On Wed, 19 Jul 2017 16:59:10 +1000 Nicholas Piggin wrote: > Change this by providing a special crash function which does some of > the console flushing from the panic() path before calling firmware to > reboot. Oops, I changed the changelog but not the patch subject. Should

Re: [PATCH v2 4/4] arm64: allow non-legacy VGA devices to be default

2017-07-19 Thread Will Deacon
On Wed, Jul 19, 2017 at 12:15:16PM +1000, Daniel Axtens wrote: > The VGA arbiter only marks a device as default if it can decode > legacy I/O and memory ranges. This is often not the case on arm64, > which doesn't use the legacy ranges. > > Enable the VGA arbiter to mark the first enabled VGA

Re: [PATCH 0/4] Allow non-legacy cards to be vgaarb default

2017-07-19 Thread Ard Biesheuvel
(+ Laszlo) On 19 July 2017 at 02:28, Daniel Axtens wrote: > Hi all, > > Previously I posted a patch that provided a quirk for a hibmc card > behind a particular Huawei bridge that allowed it to be marked as the > default device in the VGA arbiter.[0] This lead to some

Re: [v2 PATCH 2/2] powernv/powerpc: Clear PECE1 in LPCR via stop-api only on Hotplug

2017-07-19 Thread Nicholas Piggin
On Wed, 19 Jul 2017 13:48:50 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > Currently we use the stop-api provided by the firmware to program the > SLW engine to restore the values of hypervisor resources that get lost > on

Re: [PATCH] cpufreq: Convert to using %pOF instead of full_name

2017-07-19 Thread Patrice CHOTARD
On 07/18/2017 11:42 PM, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc: "Rafael J.

[v2 PATCH 2/2] powernv/powerpc: Clear PECE1 in LPCR via stop-api only on Hotplug

2017-07-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently we use the stop-api provided by the firmware to program the SLW engine to restore the values of hypervisor resources that get lost on deeper idle states (such as winkle). Since the deep states were only used for CPU-Hotplug on POWER8

[v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle

2017-07-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The stop4 idle state on POWER9 is a deep idle state which loses hypervisor resources, but whose latency is low enough that it can be exposed via cpuidle. Until now, the deep idle states which lose hypervisor resources (eg: winkle) were only

Re: [PATCH] soc: Convert to using %pOF instead of full_name

2017-07-19 Thread Geert Uytterhoeven
On Tue, Jul 18, 2017 at 11:43 PM, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring

[v2 PATCH 0/2] powerpc: powernv: Enable stop4 via cpuidle

2017-07-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the second iteration of the patchset to enable exploitation of stop4 idle state on POWER9 via cpuidle. The earlier version can be found here : https://lkml.org/lkml/2017/7/18/691 The change from the first version is to the second

Re: [v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle

2017-07-19 Thread Nicholas Piggin
On Wed, 19 Jul 2017 13:48:49 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > The stop4 idle state on POWER9 is a deep idle state which loses > hypervisor resources, but whose latency is low enough that it can be > exposed via

Re: [PATCH] cpufreq: Convert to using %pOF instead of full_name

2017-07-19 Thread Viresh Kumar
On 18-07-17, 16:42, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc: "Rafael J. Wysocki"

[PATCH v2 2/3] powerpc/powernv: machine check use kernel crash path

2017-07-19 Thread Nicholas Piggin
There are quite a few machine check exceptions that can be caused by kernel bugs. To make debugging easier, use the kernel crash path in cases of synchronous machine checks that occur in kernel mode, if that would not result in the machine going straight to panic or crash dump. There is a

Re: [PATCH] powerpc: Convert to using %pOF instead of full_name

2017-07-19 Thread Michael Ellerman
Rob Herring writes: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc: Benjamin Herrenschmidt

RE: [PATCH v2 0/4] Allow non-legacy cards to be vgaarb default

2017-07-19 Thread Gabriele Paoloni
Hi Daniel many thanks for your patch > -Original Message- > From: Daniel Axtens [mailto:d...@axtens.net] > Sent: 19 July 2017 03:15 > To: linux-...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux- > arm-ker...@lists.infradead.org > Cc: b...@kernel.crashing.org; Liuxinliang (Matthew

Re: [v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle

2017-07-19 Thread Michael Ellerman
Nicholas Piggin writes: > On Wed, 19 Jul 2017 13:48:49 +0530 > "Gautham R. Shenoy" wrote: > >> From: "Gautham R. Shenoy" >> >> The stop4 idle state on POWER9 is a deep idle state which loses >> hypervisor resources, but

Re: [PATCH] ptrace: Add compat PTRACE_{G,S}ETSIGMASK handlers

2017-07-19 Thread Michael Ellerman
James Morse writes: > Hi Michael, > > On 17/07/17 11:17, Michael Ellerman wrote: >> James Morse writes: >>> compat_ptrace_request() lacks handlers for PTRACE_{G,S}ETSIGMASK, >>> instead using those in ptrace_request(). The compat variant should >>> read

Re: [v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle

2017-07-19 Thread Gautham R Shenoy
Hi Nicholas, Michael, On Wed, Jul 19, 2017 at 10:07:05PM +1000, Michael Ellerman wrote: > Nicholas Piggin writes: > >> diff --git a/arch/powerpc/kernel/asm-offsets.c > >> b/arch/powerpc/kernel/asm-offsets.c > >> index a7b5af3..0262283 100644 > >> ---

[PATCH V7 0/3] powernv : Add support for OPAL-OCC command/response interface

2017-07-19 Thread Shilpasri G Bhat
In P9, OCC (On-Chip-Controller) supports shared memory based commad-response interface. Within the shared memory there is an OPAL command buffer and OCC response buffer that can be used to send inband commands to OCC. The following commands are supported: 1) Set system powercap 2) Set CPU-GPU

KVM guests freeze under upstream kernel

2017-07-19 Thread joserz
Hello! We're not able to boot any KVM guest using upstream kernel (cb8c65ccff7f77d0285f1b126c72d37b2572c865 - 4.13.0-rc1+). After reaching the SLOF initial counting, the guest simply freezes: SLOF ** QEMU Starting Build Date =

[PATCH V7 1/3] powernv: powercap: Add support for powercap framework

2017-07-19 Thread Shilpasri G Bhat
Adds a generic powercap framework to change the system powercap inband through OPAL-OCC command/response interface. Signed-off-by: Shilpasri G Bhat --- arch/powerpc/include/asm/opal-api.h| 5 +- arch/powerpc/include/asm/opal.h| 4 +

[PATCH V7 3/3] powernv : Add support to clear sensor groups data

2017-07-19 Thread Shilpasri G Bhat
Adds support for clearing different sensor groups. OCC inband sensor groups like CSM, Profiler, Job Scheduler can be cleared using this driver. The min/max of all sensors belonging to these sensor groups will be cleared. Signed-off-by: Shilpasri G Bhat --- Changes

Re: [PATCH] powerpc: Convert to using %pOF instead of full_name

2017-07-19 Thread Tyrel Datwyler
On 07/18/2017 02:42 PM, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc: Benjamin

[PATCH V7 2/3] powernv: Add support to set power-shifting-ratio

2017-07-19 Thread Shilpasri G Bhat
This patch adds support to set power-shifting-ratio for CPU-GPU which is used by OCC power capping algorithm. Signed-off-by: Shilpasri G Bhat --- arch/powerpc/include/asm/opal-api.h| 4 +- arch/powerpc/include/asm/opal.h| 3 +

[PATCH v3] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-19 Thread Benjamin Herrenschmidt
There's a somewhat architectural issue with Radix MMU and KVM. When coming out of a guest with AIL (ie, MMU enabled), we start executing hypervisor code with the PID register still containing whatever the guest has been using. The problem is that the CPU can (and will) then start prefetching or

[PATCH V3 0/9] cpufreq: transition-latency cleanups

2017-07-19 Thread Viresh Kumar
Hi Rafael, This series tries to cleanup the code around transition-latency and its users. Some of the old legacy code, which may not make much sense now, is dropped as well. And some code consolidation is also done across governors. Based of: v4.13-rc1 Tested on: ARM64 Hikey board. I have

Re: [PATCH] soc: Convert to using %pOF instead of full_name

2017-07-19 Thread Matthias Brugger
On 07/18/2017 11:43 PM, Rob Herring wrote: Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Scott Wood

[PATCH V3 8/9] cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag

2017-07-19 Thread Viresh Kumar
The policy->transition_latency field is used for multiple purposes today and its not straight forward at all. This is how it is used: A. Set the correct transition_latency value. B. Set it to CPUFREQ_ETERNAL because: 1. We don't want automatic dynamic switching (with

Re: [PATCH V3 0/9] cpufreq: transition-latency cleanups

2017-07-19 Thread Rafael J. Wysocki
On Wednesday, July 19, 2017 03:42:40 PM Viresh Kumar wrote: > Hi Rafael, > > This series tries to cleanup the code around transition-latency and its > users. Some of the old legacy code, which may not make much sense now, > is dropped as well. And some code consolidation is also done across >

Re: 440EP NOR Flash Mapping with DTS

2017-07-19 Thread Thomas Besemer
On Sun, Jul 16, 2017 at 5:58 PM, Segher Boessenkool wrote: > On Sun, Jul 16, 2017 at 05:31:05PM -0700, Thomas Besemer wrote: >> I'm trying to map some NOR flash in via DTS on a Yosemite >> style 440EP board. I've tried a few different things, below >> showing my latest

Re: [PATCH V3 8/9] cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag

2017-07-19 Thread Dominik Brodowski
On Wed, Jul 19, 2017 at 03:42:48PM +0530, Viresh Kumar wrote: > The policy->transition_latency field is used for multiple purposes > today and its not straight forward at all. This is how it is used: > > A. Set the correct transition_latency value. > > B. Set it to CPUFREQ_ETERNAL because: >

[PATCH] POWER9 PMU stops after idle workaround

2017-07-19 Thread Nicholas Piggin
POWER9 DD2 PMU can stop after a state-loss idle in some conditions. A solution is to set then clear MMCRA[60] after wake from state-loss idle. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/idle_book3s.S | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-)

Re: [PATCH v2 3/4] powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range

2017-07-19 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > We do that because it's used by THP pmd collapsing, so use > instead a dedicated flush function. Reviewed-by: Aneesh Kumar K.V > > Signed-off-by: Benjamin Herrenschmidt > ---

Re: [PATCH v2 2/4] powerpc/mm/radix: Improve TLB/PWC flushes

2017-07-19 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > At the moment we have to rather sub-optimal flushing behaviours: > > - flush_tlb_mm() will flush the PWC which is unnecessary (for example >when doing a fork) > > - A large unmap will call flush_tlb_pwc() multiple times causing us

Re: [PATCH v2 1/4] powerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes

2017-07-19 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > The PWC flush only needs a single set call, just like the > full (RIC=2) flush. > > This will allow us to get rid of the dedicated _tlbiel_pwc() Reviewed-by: Aneesh Kumar K.V > > Signed-off-by: Benjamin

Re: KVM guests freeze under upstream kernel

2017-07-19 Thread joserz
On Thu, Jul 20, 2017 at 09:42:50AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2017-07-19 at 16:46 -0300, jos...@linux.vnet.ibm.com wrote: > > Hello! > > > > We're not able to boot any KVM guest using upstream kernel > > (cb8c65ccff7f77d0285f1b126c72d37b2572c865 - 4.13.0-rc1+). > > After

Re: [PATCH] powerpc: Convert to using %pOF instead of full_name

2017-07-19 Thread Michael Ellerman
Rob Herring writes: > On Wed, Jul 19, 2017 at 7:03 AM, Michael Ellerman wrote: >> Rob Herring writes: >> >>> Now that we have a custom printf format specifier, convert users of >>> full_name to use %pOF instead. This is preparation to

Re: KVM guests freeze under upstream kernel

2017-07-19 Thread Michael Ellerman
Thanks for the report. My Jenkins does a test boot of a KVM guest, so there must be something different in our setups. Can you tell us all the details of your setup, eg. Hardware, host kernel, qemu, guest kernel etc. Thanks. cheers On 20 July 2017 05:46:34 GMT+10:00, jos...@linux.vnet.ibm.com

Re: KVM guests freeze under upstream kernel

2017-07-19 Thread Benjamin Herrenschmidt
On Wed, 2017-07-19 at 16:46 -0300, jos...@linux.vnet.ibm.com wrote: > Hello! > > We're not able to boot any KVM guest using upstream kernel > (cb8c65ccff7f77d0285f1b126c72d37b2572c865 - 4.13.0-rc1+). > After reaching the SLOF initial counting, the guest simply freezes: Can you send our .config

Re: [PATCH] POWER9 PMU stops after idle workaround

2017-07-19 Thread Madhavan Srinivasan
On Thursday 20 July 2017 07:23 AM, Nicholas Piggin wrote: POWER9 DD2 PMU can stop after a state-loss idle in some conditions. A solution is to set then clear MMCRA[60] after wake from state-loss idle. Acked-by: Madhavan Srinivasan Signed-off-by: Nicholas Piggin

Re: [PATCH v3] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-19 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > There's a somewhat architectural issue with Radix MMU and KVM. > > When coming out of a guest with AIL (ie, MMU enabled), we start > executing hypervisor code with the PID register still containing > whatever the guest has been using. >

[RESEND PATCH] powerpc: defconfig: Cleanup from old Kconfig options

2017-07-19 Thread Krzysztof Kozlowski
Remove old, dead Kconfig option USB_LED. It is gone since commit a335aaf3125c ("usb: misc: remove outdated USB LED driver"). Signed-off-by: Krzysztof Kozlowski --- arch/powerpc/configs/c2k_defconfig| 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - 2 files changed, 2

Re: [PATCH] POWER9 PMU stops after idle workaround

2017-07-19 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-07-20 11:53:22]: > POWER9 DD2 PMU can stop after a state-loss idle in some conditions. > > A solution is to set then clear MMCRA[60] after wake from state-loss > idle. > > Signed-off-by: Nicholas Piggin Reviewed-by: Vaidyanathan

Re: KVM guests freeze under upstream kernel

2017-07-19 Thread Paul Mackerras
On Thu, Jul 20, 2017 at 12:02:23AM -0300, jos...@linux.vnet.ibm.com wrote: > On Thu, Jul 20, 2017 at 09:42:50AM +1000, Benjamin Herrenschmidt wrote: > > On Wed, 2017-07-19 at 16:46 -0300, jos...@linux.vnet.ibm.com wrote: > > > Hello! > > > > > > We're not able to boot any KVM guest using upstream