Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

2017-05-11 Thread Christophe LEROY
Le 12/05/2017 à 02:47, Nicholas Piggin a écrit : On Thu, 11 May 2017 20:52:56 +0200 christophe leroy wrote: Le 11/05/2017 à 19:14, christophe leroy a écrit : Le 11/05/2017 à 17:15, Nicholas Piggin a écrit : Cc: Scott Wood Cc: Christophe Leroy

[PATCH] powerpc/configs: Turn CONFIG_RELOCATABLE on by default

2017-05-11 Thread Balbir Singh
On powernv/pseries and ppc64 defconfigs Most distros will want it on by default and I've missed turning it on during developer testing. Having it on ensures we are testing our patches with the config enabled. Signed-off-by: Balbir Singh ---

Re: [PATCH v8 02/10] powerpc/powernv: Autoload IMC device driver module

2017-05-11 Thread Madhavan Srinivasan
On Thursday 11 May 2017 01:19 PM, Stewart Smith wrote: Anju T Sudhakar writes: This patch does three things : - Enables "opal.c" to create a platform device for the IMC interface according to the appropriate compatibility string. - Find the reserved-memory

[PATCH] powerpc: Tweak copy selection parameter in __copy_tofrom_user_power7()

2017-05-11 Thread Andrew Jeffery
Experiments with the netperf benchmark indicated that the size selecting VMX-based copies in __copy_tofrom_user_power7() was suboptimal on POWER8. Measurements showed that parity was in the neighbourhood of 3328 bytes, rather than greater than 4096. The change gives a 1.5-2.0% improvement in

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-11 Thread Madhavan Srinivasan
On Friday 12 May 2017 09:03 AM, Michael Ellerman wrote: Stewart Smith writes: Madhavan Srinivasan writes: * in patch 9 should opal_imc_counters_init return something other than OPAL_SUCCESS in the case on invalid

Re: [PATCH] powerpc/64s: dt_cpu_ftrs boot time setup option

2017-05-11 Thread Michael Ellerman
Paul Clarke writes: > On 05/11/2017 06:24 AM, Nicholas Piggin wrote: >> Provide a dt_cpu_ftrs= cmdline option to disable the dt_cpu_ftrs CPU >> feature discovery, and fall back to the "cputable" based version. > > This boat has already sailed, I think, but "ftrs"? What you

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-11 Thread Madhavan Srinivasan
On Friday 12 May 2017 07:48 AM, Stewart Smith wrote: Madhavan Srinivasan writes: * in patch 9 should opal_imc_counters_init return something other than OPAL_SUCCESS in the case on invalid arguments? Maybe OPAL_PARAMETER? (I think you fix this

Re: [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly

2017-05-11 Thread Michael Ellerman
Nicholas Piggin writes: > The single-operand form of tlbie used to be accepted as the second > operand (L) being implicitly 0. Newer binutils reject this. > > Change remaining single-op tlbie instructions to have explicit 0 > second argument. Do old(er) binutils accept the

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-11 Thread Michael Ellerman
Stewart Smith writes: > Madhavan Srinivasan writes: >>> * in patch 9 should opal_imc_counters_init return something other >>>than OPAL_SUCCESS in the case on invalid arguments? Maybe >>>OPAL_PARAMETER? (I think you fix

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-11 Thread Stewart Smith
Madhavan Srinivasan writes: >> * in patch 9 should opal_imc_counters_init return something other >>than OPAL_SUCCESS in the case on invalid arguments? Maybe >>OPAL_PARAMETER? (I think you fix this in a later patch anyway?) > > So, init call will

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

2017-05-11 Thread Nicholas Piggin
On Thu, 11 May 2017 20:52:56 +0200 christophe leroy wrote: > Le 11/05/2017 à 19:14, christophe leroy a écrit : > > > > > > Le 11/05/2017 à 17:15, Nicholas Piggin a écrit : > >> Cc: Scott Wood > >> Cc: Christophe Leroy > >>

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-11 Thread Pasha Tatashin
We should either keep memset() only for deferred struct pages as what I have in my patches. Another option is to add a new function struct_page_clear() which would default to memset() and to something else on platforms that decide to optimize it. On SPARC it would call STBIs, and we would

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-11 Thread Pasha Tatashin
Have you measured that? I do not think it would be super hard to measure. I would be quite surprised if this added much if anything at all as the whole struct page should be in the cache line already. We do set reference count and other struct members. Almost nobody should be looking at our page

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

2017-05-11 Thread Nicholas Piggin
On Thu, 11 May 2017 20:52:56 +0200 christophe leroy wrote: > Le 11/05/2017 à 19:14, christophe leroy a écrit : > > > > > > Le 11/05/2017 à 17:15, Nicholas Piggin a écrit : > >> Cc: Scott Wood > >> Cc: Christophe Leroy > >>

Re: [PATCH] spin loop primitives for busy waiting

2017-05-11 Thread Nicholas Piggin
On Thu, 11 May 2017 11:47:47 -0700 Linus Torvalds wrote: > On Thu, May 11, 2017 at 9:57 AM, Nicholas Piggin wrote: > > > > If you find this acceptable, I'd like to start wiring in the powerpc > > and adding the annotations to some important core

[PATCH v2 3/3] powerpc/fadump: provide a helpful error message

2017-05-11 Thread Hari Bathini
fadump fails to register when there are holes in boot memory area. Provide a helpful error message to the user in such case. Signed-off-by: Hari Bathini --- Changes since v1: * Introducing this patch to provide better error message on failure.

[PATCH v2 2/3] powerpc/fadump: avoid holes in boot memory area when fadump is registered

2017-05-11 Thread Hari Bathini
To register fadump, boot memory area - the size of low memory chunk that is required for a kernel to boot successfully when booted with restricted memory, is assumed to have no holes. But this memory area is currently not protected from hot-remove operations. So, fadump could fail to re-register

[PATCH v2 1/3] powerpc/fadump: avoid duplicates in crash memory ranges

2017-05-11 Thread Hari Bathini
fadump sets up crash memory ranges to be used for creating PT_LOAD program headers in elfcore header. Memory chunk RMA_START through boot memory area size is added as the first memory range because firmware, at the time of crash, moves this memory chunk to different location specified during

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

2017-05-11 Thread christophe leroy
Le 11/05/2017 à 19:14, christophe leroy a écrit : Le 11/05/2017 à 17:15, Nicholas Piggin a écrit : Cc: Scott Wood Cc: Christophe Leroy Signed-off-by: Nicholas Piggin --- arch/powerpc/xmon/xmon.c | 5 - 1 file changed, 4

Re: [PATCH] spin loop primitives for busy waiting

2017-05-11 Thread Linus Torvalds
On Thu, May 11, 2017 at 9:57 AM, Nicholas Piggin wrote: > > If you find this acceptable, I'd like to start wiring in the powerpc > and adding the annotations to some important core spin loops (there's > not too many really). I'm hoping if you take this patch during this > merge

[PATCH 3/3] powerpc: link warning for orphan sections

2017-05-11 Thread Nicholas Piggin
Add --orphan-handling=warn to final link flags. This ensures we can handle all sections explicitly. This would have caught subtle breakage such as 7de3b27bac47da9de08409df1d69664acbb72197 at build-time. Also bring existing orphan sections into the fold: - .text.hot and .text.unlikely are compiler

[PATCH 2/3] powerpc/64: tool to check head sections location sanity

2017-05-11 Thread Nicholas Piggin
Use a tool to check the location of "fixed sections" is where we expected them, which catches cases the linker script can't (stubs being added to start of .text section), and which ends up being neater. Sample output: ERROR: start_text address is c0008100, should be c0008000

[PATCH 1/3] powerpc/64s: tool to flag direct branches from unrelocated interrupt vectors

2017-05-11 Thread Nicholas Piggin
Direct banches from code below __end_interrupts to code above __end_interrupts when built with CONFIG_RELOCATABLE are disallowed because they will break when the kernel is not located at 0. Sample output: WARNING: Unrelocated relative branches c118 bl-> 0xc0038fb8

[PATCH 0/3] more build time checks

2017-05-11 Thread Nicholas Piggin
Nicholas Piggin (3): powerpc/64s: tool to flag direct branches from unrelocated interrupt vectors powerpc/64: tool to check head sections location sanity powerpc: link warning for orphan sections arch/powerpc/Makefile| 1 + arch/powerpc/Makefile.postlink

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

2017-05-11 Thread christophe leroy
Le 11/05/2017 à 17:15, Nicholas Piggin a écrit : Cc: Scott Wood Cc: Christophe Leroy Signed-off-by: Nicholas Piggin --- arch/powerpc/xmon/xmon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH] spin loop primitives for busy waiting

2017-05-11 Thread Nicholas Piggin
Current busy-wait loops are implemented by repeatedly calling cpu_relax() to give an arch option for a low-latency option to improve power and/or SMT resource contention. This poses some difficulties for powerpc, which has SMT priority setting instructions (priorities determine how ifetch cycles

[PATCH 5/5] powerpc/64: Linker on-demand sfpr functions for modules

2017-05-11 Thread Nicholas Piggin
For final link, the powerpc64 linker generates fpr save/restore functions on-demand, placing them in the .sfpr section. Starting with binutils 2.25, these can be provided for non-final links with --save-restore-funcs. Use that where possible for module links. This saves about 200 bytes per module

[PATCH 4/5] powerpc/64: do not create new section for save/restore functions

2017-05-11 Thread Nicholas Piggin
There is no need to create a new section for these. Consolidate with 32-bit and just use .text. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/crtsavres.S | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/lib/crtsavres.S

[PATCH 3/5] powerpc/64: do not link crtsaveres.o in boot

2017-05-11 Thread Nicholas Piggin
crtsaveres.S is empty with 64-bit builds already, so just don't build and link it to match the vmlinux build. Signed-off-by: Nicholas Piggin --- arch/powerpc/boot/Makefile| 3 ++- arch/powerpc/boot/crtsavres.S | 8 2 files changed, 6 insertions(+), 5 deletions(-)

[PATCH 2/5] powerpc/64: do not link crtsavres.o in vmlinux

2017-05-11 Thread Nicholas Piggin
The 64-bit linker creates save/restore functions on demand with final links, so vmlinux does not require crtsavres.o. Make crtsavres.o extra-y on 64-bit (it is still required by modules). Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/Makefile | 8 ++-- 1 file

[PATCH 1/5] powerpc/64: place sfpr section explicitly with the linker script

2017-05-11 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/vmlinux.lds.S | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 2f793be3d2b1..bcfda21c3179 100644 ---

[PATCH 0/5] Register save/restore function build improvements

2017-05-11 Thread Nicholas Piggin
These are some minor improvements I came up when investigating "orphan" sections (.sfpr currently is). For 4.13. Nicholas Piggin (5): powerpc/64: place sfpr section explicitly with the linker script powerpc/64: do not link crtsavres.o in vmlinux powerpc/64: do not link crtsaveres.o in boot

[PATCH 3/3] powerpc/8xx: xmon compile fix

2017-05-11 Thread Nicholas Piggin
Cc: Scott Wood Cc: Christophe Leroy Signed-off-by: Nicholas Piggin --- arch/powerpc/xmon/xmon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index

[PATCH 2/3] powerpc/32: tlbie provide L operand explicitly

2017-05-11 Thread Nicholas Piggin
The single-operand form of tlbie used to be accepted as the second operand (L) being implicitly 0. Newer binutils reject this. Change remaining single-op tlbie instructions to have explicit 0 second argument. Cc: Scott Wood Cc: Christophe Leroy

[PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error

2017-05-11 Thread Nicholas Piggin
Fixes: a7cd88da97 ("powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c") Cc: Gautham R. Shenoy Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/idle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH v5 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-05-11 Thread Michal Suchánek
On Thu, 11 May 2017 02:00:11 +0530 Hari Bathini wrote: > Hello Michal, > > On Wednesday 10 May 2017 09:31 PM, Michal Suchánek wrote: > > Hello, > > > > On Wed, 03 May 2017 23:52:52 +0530 > > Hari Bathini wrote: > > > >> With the

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-11 Thread David Miller
From: Michal Hocko Date: Thu, 11 May 2017 10:05:38 +0200 > Anyway, do you agree that doing the struct page initialization along > with other writes to it shouldn't add a measurable overhead comparing > to pre-zeroing of larger block of struct pages? We already have an >

Re: [PATCH] Freescale mpc8315 interrupt chip

2017-05-11 Thread Oliver O'Halloran
On Thu, May 11, 2017 at 10:34 PM, Juergen Schindele wrote: > Next try to submit two patches for Freescale mpc8315. > > first one > --- > powerpc/ipic: Configure "EDGE" capabilities for IRQ0 too

Re: [PATCH] powerpc/64s: dt_cpu_ftrs boot time setup option

2017-05-11 Thread Paul Clarke
On 05/11/2017 06:24 AM, Nicholas Piggin wrote: > Provide a dt_cpu_ftrs= cmdline option to disable the dt_cpu_ftrs CPU > feature discovery, and fall back to the "cputable" based version. This boat has already sailed, I think, but "ftrs"? Was it too difficult to type "features"? This seems like

Re: [PATCH v5 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-05-11 Thread Michal Suchánek
On Thu, 11 May 2017 02:00:11 +0530 Hari Bathini wrote: > Hello Michal, > > On Wednesday 10 May 2017 09:31 PM, Michal Suchánek wrote: > > Hello, > > > > On Wed, 03 May 2017 23:52:52 +0530 > > Hari Bathini wrote: > > > >> With the

[PATCH] Freescale mpc8315 interrupt chip

2017-05-11 Thread Juergen Schindele
Next try to submit two patches for Freescale mpc8315. first one --- powerpc/ipic: Configure "EDGE" capabilities for IRQ0 too (like IRQ1-7) Signed-off-by: Jurgen Schindele The external IRQ0 has

[PATCH] powerpc/64s: dt_cpu_ftrs boot time setup option

2017-05-11 Thread Nicholas Piggin
Provide a dt_cpu_ftrs= cmdline option to disable the dt_cpu_ftrs CPU feature discovery, and fall back to the "cputable" based version. Also allow control of advertising unknown features to userspace and with this parameter, and remove the clunky CONFIG option. Signed-off-by: Nicholas Piggin

Re: powerpc/kconfig: Turn CONFIG_RELOCATABLE on

2017-05-11 Thread Michael Ellerman
On Wed, 2017-05-04 at 08:32:38 UTC, Balbir Singh wrote: > Most distros will want it on by default and I've missed > turning it on during developer testing. Having it on ensures > we are testing our patches with the config enabled. I agree, but I think we should do it in the defconfigs instead.

[PATCH v10 3/3] KVM: PPC: Exit guest upon MCE when FWNMI capability is enabled

2017-05-11 Thread Mahesh J Salgaonkar
From: Aravinda Prasad Enhance KVM to cause a guest exit with KVM_EXIT_NMI exit reason upon a machine check exception (MCE) in the guest address space if the KVM_CAP_PPC_FWNMI capability is enabled (instead of delivering a 0x200 interrupt to guest). This enables QEMU

[PATCH v10 2/3] powerpc/book3s: EXPORT_SYMBOL_GPL machine_check_print_event_info

2017-05-11 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar It will be used in arch/powerpc/kvm/book3s_hv.c KVM module. Signed-off-by: Mahesh Salgaonkar Acked-by: Michael Ellerman --- arch/powerpc/kernel/mce.c |1 + 1 file changed, 1 insertion(+)

[PATCH v10 1/3] KVM: PPC: Add new capability to control MCE behaviour

2017-05-11 Thread Mahesh J Salgaonkar
From: Aravinda Prasad This patch introduces a new KVM capability to control how KVM behaves on machine check exception (MCE). Without this capability, KVM redirects machine check exceptions to guest's 0x200 vector, if the address in error belongs to the guest. With

[PATCH v10 0/3] KVM: PPC: Add FWNMI support for KVM guests on POWER

2017-05-11 Thread Mahesh J Salgaonkar
From: Aravinda Prasad This series of patches add FWNMI support for KVM guests on POWER. Memory errors such as bit flips that cannot be corrected by hardware is passed on to the kernel for handling by raising machine check exception (an NMI). Upon such machine check

Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500

2017-05-11 Thread Abdul Haleem
On Wed, 2017-05-10 at 19:55 +0200, Christoph Hellwig wrote: > Hi Abdul, > > can you test the patch below? I'll try to create a way to inject > short WRITE SAME commands using qemu next, but I thought I'd give > you a chance to try it as well. No warnings with the patch. Thanks for all your

[PATCH] powerpc/64s: dt_cpu_ftrs use tlbiel-sets mmu property

2017-05-11 Thread Nicholas Piggin
Remove the open-coding of radix set sizes for loops. Populate the cputable with the correct values for old firmware, but dt_cpu_ftrs will use a property under its mmu feature nodes. Not-yet-Signed-off-by: Nicholas Piggin --- Hi, This is a proposal for a different approach

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-11 Thread Thomas Gleixner
On Thu, 11 May 2017, Stephen Rothwell wrote: > Hi, > > On Wed, 10 May 2017 14:09:53 +0200 (CEST) Thomas Gleixner > wrote: > > > > > +static void nest_change_cpu_context(int old_cpu, int new_cpu) > > > +{ > > > + int i; > > > + > > > + for (i = 0; > > > +

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-11 Thread Michal Hocko
On Wed 10-05-17 11:19:43, David S. Miller wrote: > From: Michal Hocko > Date: Wed, 10 May 2017 16:57:26 +0200 > > > Have you measured that? I do not think it would be super hard to > > measure. I would be quite surprised if this added much if anything at > > all as the whole

Re: [PATCH v8 02/10] powerpc/powernv: Autoload IMC device driver module

2017-05-11 Thread Stewart Smith
Anju T Sudhakar writes: > This patch does three things : > - Enables "opal.c" to create a platform device for the IMC interface >according to the appropriate compatibility string. > - Find the reserved-memory region details from the system device tree >and get

Re: [PATCH v9 2/3] powerpc/book3s: EXPORT_SYMBOL machine_check_print_event_info

2017-05-11 Thread Christoph Hellwig
EXPORT_SYMBOL_GPL for random non-coherent exports for single users, please.

[PATCH v9 3/3] KVM: PPC: Exit guest upon MCE when FWNMI capability is enabled

2017-05-11 Thread Mahesh J Salgaonkar
From: Aravinda Prasad Enhance KVM to cause a guest exit with KVM_EXIT_NMI exit reason upon a machine check exception (MCE) in the guest address space if the KVM_CAP_PPC_FWNMI capability is enabled (instead of delivering a 0x200 interrupt to guest). This enables QEMU

[PATCH v9 2/3] powerpc/book3s: EXPORT_SYMBOL machine_check_print_event_info

2017-05-11 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar It will be used in arch/powerpc/kvm/book3s_hv.c KVM module. Signed-off-by: Mahesh Salgaonkar Acked-by: Michael Ellerman --- arch/powerpc/kernel/mce.c |1 + 1 file changed, 1 insertion(+)

[PATCH v9 1/3] KVM: PPC: Add new capability to control MCE behaviour

2017-05-11 Thread Mahesh J Salgaonkar
From: Aravinda Prasad This patch introduces a new KVM capability to control how KVM behaves on machine check exception (MCE). Without this capability, KVM redirects machine check exceptions to guest's 0x200 vector, if the address in error belongs to the guest. With

[PATCH v9 0/3] KVM: PPC: Add FWNMI support for KVM guests on POWER

2017-05-11 Thread Mahesh J Salgaonkar
From: Aravinda Prasad This series of patches add FWNMI support for KVM guests on POWER. Memory errors such as bit flips that cannot be corrected by hardware is passed on to the kernel for handling by raising machine check exception (an NMI). Upon such machine check