Re: [PATCH] cpufreq: powernv: Remove global pstate ramp-down timer in POWER9

2018-04-24 Thread Viresh Kumar
On 25-04-18, 11:44, Shilpasri G Bhat wrote: > POWER9 doesnot support global pstate requests for the chip. So remove > the timer logic which slowly ramps down the global pstate in P9 > platforms. > > Signed-off-by: Shilpasri G Bhat > --- > drivers/cpufreq/powernv-cpufreq.c | 23 ++

[PATCH] cpufreq: powernv: Remove global pstate ramp-down timer in POWER9

2018-04-24 Thread Shilpasri G Bhat
POWER9 doesnot support global pstate requests for the chip. So remove the timer logic which slowly ramps down the global pstate in P9 platforms. Signed-off-by: Shilpasri G Bhat --- drivers/cpufreq/powernv-cpufreq.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) d

[PATCH v2] powerpc: NMI IPI make NMI IPIs fully sychronous

2018-04-24 Thread Nicholas Piggin
There is an asynchronous aspect to smp_send_nmi_ipi. The caller waits for all CPUs to call in to the handler, but it does not wait for completion of the handler. This is a needless complication, so remove it and always wait synchronously. The synchronous wait allows the caller to easily time out a

Re: [PATCH] powerpc: Fix smp_send_stop NMI IPI handling

2018-04-24 Thread Nicholas Piggin
On Wed, 25 Apr 2018 13:15:34 +1000 Michael Ellerman wrote: > Nicholas Piggin writes: > > > The NMI IPI handler for a receiving CPU increments nmi_ipi_busy_count > > over the handler function call, which causes later smp_send_nmi_ipi() > > callers to spin until the call is finished. > > > > The

Re: [PATCH 2/3] powerpc/powernv: Fix OPAL RTC driver OPAL_BUSY loops

2018-04-24 Thread Michael Ellerman
Alexandre Belloni writes: > On 10/04/2018 23:01:36+1000, Nicholas Piggin wrote: >> On Tue, 10 Apr 2018 14:07:28 +0200 >> Alexandre Belloni wrote: >> > > Fixes ("powerpc/powernv: Add RTC and NVRAM support plus RTAS >> > > fallbacks" >> > > Cc: Benjamin Herrenschmidt >> > > Cc: linux-...@vger

Re: [PATCH] powerpc: Fix smp_send_stop NMI IPI handling

2018-04-24 Thread Michael Ellerman
Nicholas Piggin writes: > The NMI IPI handler for a receiving CPU increments nmi_ipi_busy_count > over the handler function call, which causes later smp_send_nmi_ipi() > callers to spin until the call is finished. > > The smp_send_stop function never returns, so the busy count is never > decremet

Re: powerpc/mce: Fix a bug where mce loops on memory UE.

2018-04-24 Thread Michael Ellerman
On Mon, 2018-04-23 at 04:59:27 UTC, Mahesh J Salgaonkar wrote: > From: Mahesh Salgaonkar > > The current code extracts the physical address for UE errors and then > hooks it up into memory failure infrastructure. On successful extraction > of physical address it wrongly sets "handled = 1" which m

[PATCH] powerpc: NMI IPI make NMI IPIs fully sychronous

2018-04-24 Thread Nicholas Piggin
There is an asynchronous aspect to smp_send_nmi_ipi. The caller waits for all CPUs to call in to the handler, but it does not wait for completion of the handler. This is a needless complication, so remove it and always wait synchronously. The synchronous wait allows the caller to easily time out a

[PATCH] powerpc: Fix smp_send_stop NMI IPI handling

2018-04-24 Thread Nicholas Piggin
The NMI IPI handler for a receiving CPU increments nmi_ipi_busy_count over the handler function call, which causes later smp_send_nmi_ipi() callers to spin until the call is finished. The smp_send_stop function never returns, so the busy count is never decremeted, which can cause the system to han

Re: [PATCH v2 3/7] powerpc: use task_pid_nr() for TID allocation

2018-04-24 Thread Sukadev Bhattiprolu
Andrew Donnellan [andrew.donnel...@au1.ibm.com] wrote: > [+ Sukadev, Christophe] > > On 18/04/18 11:08, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > The current implementation of TID allocation, using a global IDR, may > > result in an errant process starving the system of availabl

[PATCH] powerpc/numa: Handle unitialized timer reset

2018-04-24 Thread Michael Bringmann
Some of the code in 'numa.c' may be reused when updating kernel state after an LPAR migration event. One such common function is 'reset_topology_timer' which was being invoked by the '.notifier_call' function within the NUMA module by 'of_property_notify'. If this occurs after a previous call to

Re: [RFC v2 3/3] postmigration/memory: Associativity & ibm,dynamic-memory-v2

2018-04-24 Thread Michael Bringmann
See below. On 04/24/2018 12:17 PM, Nathan Fontenot wrote: > On 02/26/2018 02:53 PM, Michael Bringmann wrote: >> postmigration/memory: Now apply changes to the associativity of memory >> blocks described by the 'ibm,dynamic-memory-v2' property regarding >> the topology of LPARS in Post Migration ev

Re: [RFC v2 2/3] postmigration/memory: Review assoc lookup array changes

2018-04-24 Thread Michael Bringmann
On 04/24/2018 12:01 PM, Nathan Fontenot wrote: >> +}; >> + >> +static int pseries_update_ala_memory_aai(int aa_index, >> +struct property *dmprop) >> + >> +static int pseries_update_ala_memory(struct of_reconfig_data *pr) > The two routines above should be up

Re: [RFC v2 1/3] hotplug/mobility: Apply assoc updates for Post Migration Topo

2018-04-24 Thread Michael Bringmann
See comments below: On 04/24/2018 11:56 AM, Nathan Fontenot wrote: > On 02/26/2018 02:52 PM, Michael Bringmann wrote: >> hotplug/mobility: Recognize more changes to the associativity of >> memory blocks described by the 'ibm,dynamic-memory' and 'cpu' >> properties when processing the topology of L

Re: [PATCH v4 03/19] powerpc: Mark variable `l` as unused, remove `path`

2018-04-24 Thread christophe leroy
Le 06/04/2018 à 20:32, Mathieu Malaterre a écrit : On Fri, Apr 6, 2018 at 5:33 PM, LEROY Christophe wrote: Mathieu Malaterre a écrit : Add gcc attribute unused for `l` variable, replace `path` variable directly with prom_scratch. Fix warnings treated as errors with W=1: arch/powerpc/ke

Re: [PATCH v2] xmon: Use __printf markup to silence compiler

2018-04-24 Thread Mathieu Malaterre
No comment so far... Did I miss anything ? On Sun, Mar 25, 2018 at 11:06 AM, Mathieu Malaterre wrote: > Update the other prototype declarations in asm/xmon.h. > > Silence warnings (triggered at W=1) by adding relevant __printf attribute. > Move #define at bottom of the file to prevent conflict wi

Re: [PATCH v2] powerpc/signal32: Use fault_in_pages_readable() to prefault user context

2018-04-24 Thread Mathieu Malaterre
On Tue, Apr 24, 2018 at 6:04 PM, Christophe Leroy wrote: > Use fault_in_pages_readable() to prefault user context > instead of open coding > > Signed-off-by: Christophe Leroy > --- > v2: using sizeof(*ctx) as size of ctx instead of 1 > > arch/powerpc/kernel/signal_32.c | 13 + > 1 f

Re: [PATCH] powerpc: Allow selection of CONFIG_LD_DEAD_CODE_DATA_ELIMINATION

2018-04-24 Thread Mathieu Malaterre
On Wed, Apr 18, 2018 at 5:13 PM, Michael Ellerman wrote: > Mathieu Malaterre writes: >> On Wed, Apr 18, 2018 at 8:34 AM, Christophe LEROY > ... >> >>> Can you also provide a copy of the messages you can see (prom_init ...) when >>> boot is ok ? >> >> Hum. I've always been interested in seeing it

Re: [PATCH 2/3] powerpc/powernv: Fix OPAL RTC driver OPAL_BUSY loops

2018-04-24 Thread Alexandre Belloni
On 10/04/2018 23:01:36+1000, Nicholas Piggin wrote: > On Tue, 10 Apr 2018 14:07:28 +0200 > Alexandre Belloni wrote: > > > Fixes ("powerpc/powernv: Add RTC and NVRAM support plus RTAS > > > fallbacks" > > > Cc: Benjamin Herrenschmidt > > > Cc: linux-...@vger.kernel.org > > > Signed-off-by: N

Re: [RFC v2 3/3] postmigration/memory: Associativity & ibm,dynamic-memory-v2

2018-04-24 Thread Nathan Fontenot
On 02/26/2018 02:53 PM, Michael Bringmann wrote: > postmigration/memory: Now apply changes to the associativity of memory > blocks described by the 'ibm,dynamic-memory-v2' property regarding > the topology of LPARS in Post Migration events. > > * Extend the previous work done for the 'ibm,associat

Re: [RFC v2 2/3] postmigration/memory: Review assoc lookup array changes

2018-04-24 Thread Nathan Fontenot
On 02/26/2018 02:53 PM, Michael Bringmann wrote: > postmigration/memory: In an LPAR migration scenario, the property > "ibm,associativity-lookup-arrays" may change. In the event that a > row of the array differs, locate all assigned memory blocks with that > 'aa_index' and 're-add' them to the s

Re: [RFC v2 1/3] hotplug/mobility: Apply assoc updates for Post Migration Topo

2018-04-24 Thread Nathan Fontenot
On 02/26/2018 02:52 PM, Michael Bringmann wrote: > hotplug/mobility: Recognize more changes to the associativity of > memory blocks described by the 'ibm,dynamic-memory' and 'cpu' > properties when processing the topology of LPARS in Post Migration > events. Previous efforts only recognized whethe

[PATCH 3/3] powerpc/nohash: use IS_ENABLED() to simplify __set_pte_at()

2018-04-24 Thread Christophe Leroy
By using IS_ENABLED() we can simplify __set_pte_at() by removing redundant *ptep = pte Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/pgtable.h | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/pgtabl

[PATCH 2/3] powerpc/nohash: remove _PAGE_BUSY

2018-04-24 Thread Christophe Leroy
_PAGE_BUSY is always 0, remove it Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/64/pgtable.h | 10 +++--- arch/powerpc/include/asm/nohash/pte-book3e.h | 5 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.

[PATCH 1/3] powerpc/nohash: remove hash related code from nohash headers.

2018-04-24 Thread Christophe Leroy
When nohash and book3s header were split, some hash related stuff remained in the nohash header. This patch removes them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 29 +++-- arch/powerpc/include/asm/nohash/64/pgtable.h | 16 ++-- a

Re: [PATCH] powerpc/signal32: Use fault_in_pages_readable() to prefault user context

2018-04-24 Thread Christophe LEROY
Le 24/04/2018 à 16:50, Mathieu Malaterre a écrit : On Tue, Apr 24, 2018 at 4:45 PM, Mathieu Malaterre wrote: On Tue, Apr 24, 2018 at 4:17 PM, Christophe Leroy wrote: Use fault_in_pages_readable() to prefault user context instead of open coding Signed-off-by: Christophe Leroy --- arch/po

[PATCH v2] powerpc/signal32: Use fault_in_pages_readable() to prefault user context

2018-04-24 Thread Christophe Leroy
Use fault_in_pages_readable() to prefault user context instead of open coding Signed-off-by: Christophe Leroy --- v2: using sizeof(*ctx) as size of ctx instead of 1 arch/powerpc/kernel/signal_32.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/ke

Re: [PATCH v1 1/1] misc: IBM Virtual Management Channel Driver

2018-04-24 Thread Randy Dunlap
On 04/24/2018 07:29 AM, Greg KH wrote: > On Mon, Apr 23, 2018 at 02:17:28PM -0700, Randy Dunlap wrote: >> On 04/23/18 12:53, Greg KH wrote: >>> On Mon, Apr 23, 2018 at 11:38:18AM -0700, Randy Dunlap wrote: On 04/23/18 07:46, Bryant G. Ly wrote: > This driver is a logical device which provi

Re: [PATCH] powerpc/signal32: Use fault_in_pages_readable() to prefault user context

2018-04-24 Thread Mathieu Malaterre
On Tue, Apr 24, 2018 at 4:45 PM, Mathieu Malaterre wrote: > On Tue, Apr 24, 2018 at 4:17 PM, Christophe Leroy > wrote: >> Use fault_in_pages_readable() to prefault user context >> instead of open coding >> >> Signed-off-by: Christophe Leroy >> --- >> arch/powerpc/kernel/signal_32.c | 13 +--

Re: [PATCH] powerpc/signal32: Use fault_in_pages_readable() to prefault user context

2018-04-24 Thread Mathieu Malaterre
On Tue, Apr 24, 2018 at 4:17 PM, Christophe Leroy wrote: > Use fault_in_pages_readable() to prefault user context > instead of open coding > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/signal_32.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --

Re: [PATCH v1 1/1] misc: IBM Virtual Management Channel Driver

2018-04-24 Thread Greg KH
On Mon, Apr 23, 2018 at 02:17:28PM -0700, Randy Dunlap wrote: > On 04/23/18 12:53, Greg KH wrote: > > On Mon, Apr 23, 2018 at 11:38:18AM -0700, Randy Dunlap wrote: > >> On 04/23/18 07:46, Bryant G. Ly wrote: > >>> This driver is a logical device which provides an > >>> interface between the hypervi

[PATCH] powerpc/signal32: Use fault_in_pages_readable() to prefault user context

2018-04-24 Thread Christophe Leroy
Use fault_in_pages_readable() to prefault user context instead of open coding Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/signal_32.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c in

Re: [PATCH v3 01/19] powerpc/powermac: Mark variable x as unused

2018-04-24 Thread Christophe LEROY
Le 04/04/2018 à 22:07, Mathieu Malaterre a écrit : Since the value of x is never intended to be read, declare it with gcc attribute as unused. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: variable ‘x’ set but not used [-Werror=unused-bu

Re: [PATCH RFC 1/1] KVM: PPC: Book3S HV: pack VCORE IDs to access full VCPU ID space

2018-04-24 Thread Cédric Le Goater
On 04/24/2018 05:19 AM, Sam Bobroff wrote: > On Mon, Apr 23, 2018 at 11:06:35AM +0200, Cédric Le Goater wrote: >> On 04/16/2018 06:09 AM, David Gibson wrote: >>> On Thu, Apr 12, 2018 at 05:02:06PM +1000, Sam Bobroff wrote: It is not currently possible to create the full number of possible

Re: [PATCH] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-24 Thread Shilpasri G Bhat
On 04/24/2018 01:01 PM, Nicholas Piggin wrote: > On Tue, 24 Apr 2018 12:47:32 +0530 > Shilpasri G Bhat wrote: > >> Hi, >> >> On 04/24/2018 11:30 AM, Nicholas Piggin wrote: >>> On Tue, 24 Apr 2018 10:11:46 +0530 >>> Shilpasri G Bhat wrote: >>> gpstate_timer_handler() uses synchronous sm

Re: [PATCH] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-24 Thread Nicholas Piggin
On Tue, 24 Apr 2018 12:47:32 +0530 Shilpasri G Bhat wrote: > Hi, > > On 04/24/2018 11:30 AM, Nicholas Piggin wrote: > > On Tue, 24 Apr 2018 10:11:46 +0530 > > Shilpasri G Bhat wrote: > > > >> gpstate_timer_handler() uses synchronous smp_call to set the pstate > >> on the requested core. This

Re: [PATCH] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-24 Thread Shilpasri G Bhat
Hi, On 04/24/2018 11:30 AM, Nicholas Piggin wrote: > On Tue, 24 Apr 2018 10:11:46 +0530 > Shilpasri G Bhat wrote: > >> gpstate_timer_handler() uses synchronous smp_call to set the pstate >> on the requested core. This causes the below hard lockup: >> >> [c03fe566b320] [c01d5340] smp_