[PATCH] cxl: replace loop with for_each_child_of_node(), remove unneeded of_node_put()

2016-07-28 Thread Andrew Donnellan
Rewrite the cxl_guest_init_afu() loop in cxl_of_probe() to use for_each_child_of_node() rather than a hand-coded for loop. Remove the useless of_node_put(afu_np) call after the loop, where it's guaranteed that afu_np == NULL. Reported-by: SF Markus Elfring

[PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-07-28 Thread Andrey Smirnov
Convert fsl_rstcr_restart into a function to be registered with register_reset_handler(). Signed-off-by: Andrey Smirnov --- Changes since v1: - fsl_rstcr_restart is registered as a reset handler in setup_rstcr, replacing per-board arch_initcall

[PATCH v2 2/3] powerpc: Call chained reset handlers during reset

2016-07-28 Thread Andrey Smirnov
Call out to all restart handlers that were added via register_restart_handler() API when restarting the machine. Signed-off-by: Andrey Smirnov --- No changes compared to v1 arch/powerpc/kernel/setup-common.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v2 1/3] powerpc: Factor out common code in setup-common.c

2016-07-28 Thread Andrey Smirnov
Factor out a small bit of common code in machine_restart(), machine_power_off() and machine_halt(). Signed-off-by: Andrey Smirnov --- No changes compared to v1. arch/powerpc/kernel/setup-common.c | 23 ++- 1 file changed, 14 insertions(+), 9

Re: [PATCH V2 4/8] pseries/hotplug init: Convert new DRC memory property for hotplug runtime

2016-07-28 Thread Nathan Fontenot
On 07/27/2016 09:23 AM, Michael Bringmann wrote: > hotplug_init: Simplify the code needed for runtime memory hotplug and > maintenance with a conversion routine that transforms the compressed > property "ibm,dynamic-memory-v2" to the form of "ibm,dynamic-memory" > within the

Re: [PATCH V2 3/8] powerpc/memory: Parse new memory property to initialize structures.

2016-07-28 Thread Nathan Fontenot
On 07/27/2016 09:23 AM, Michael Bringmann wrote: > powerpc/memory: Add parallel routines to parse the new property > "ibm,dynamic-memory-v2" property when it is present, and then to > finish initialization of the relevant memory structures with the > operating system. This code is shared between

Re: [PATCH V2 2/8] powerpc/memory: Parse new memory property to register blocks.

2016-07-28 Thread Nathan Fontenot
On 07/27/2016 09:23 AM, Michael Bringmann wrote: > powerpc/memory: Add parallel routines to parse the new property > "ibm,dynamic-memory-v2" property when it is present, and then to > register the relevant memory blocks with the operating system. > This property format is intended to provide a

Re: [PATCH v3 1/2] powerpc/pseries: Implement indexed-count hotplug memory add

2016-07-28 Thread Nathan Fontenot
On 07/25/2016 12:40 PM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory

Re: [RFC PATCH 1/9] Add #defs for paca->soft_enabled flags

2016-07-28 Thread Nicholas Piggin
On Tue, 26 Jul 2016 11:35:16 +0530 Madhavan Srinivasan wrote: > On Tuesday 26 July 2016 10:57 AM, Nicholas Piggin wrote: > > On Mon, 25 Jul 2016 20:22:14 +0530 > > Madhavan Srinivasan wrote: > > > >> Two #defs LAZY_INTERRUPT_ENABLED and > >>

Re: [PATCH v3 12/21] powerpc/mm: Convert early cpu/mmu feature check to use the new helpers

2016-07-28 Thread Michael Ellerman
Nicholas Piggin writes: > On Thu, 28 Jul 2016 00:18:08 +1000 > Michael Ellerman wrote: > >> From: "Aneesh Kumar K.V" >> >> This switches early feature checks to use the non static key variant >> of the function. In later

[PATCH v4] powerpc/mm: Do hash device tree scanning earlier

2016-07-28 Thread Michael Ellerman
Currently MMU initialisation (early_init_mmu()) consists of a mixture of scanning the device tree, setting MMU feature bits, and then also doing actual initialisation of MMU data structures. We'd like to decouple the setting of the MMU features from the actual setup. So split out the device tree

Re: [PATCH v3 04/21] powerpc/mm: Do radix device tree scanning earlier

2016-07-28 Thread Balbir Singh
On Thu, Jul 28, 2016 at 06:11:18PM +1000, Michael Ellerman wrote: > Balbir Singh writes: > > > On 28/07/16 00:18, Michael Ellerman wrote: > >> diff --git a/arch/powerpc/mm/pgtable-radix.c > >> b/arch/powerpc/mm/pgtable-radix.c > >> index 003ff48a11b6..f34ccdbe0fbd 100644

Re: [PATCH v3 12/21] powerpc/mm: Convert early cpu/mmu feature check to use the new helpers

2016-07-28 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Thu, 2016-07-28 at 00:18 +1000, Michael Ellerman wrote: >> >> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h >> b/arch/powerpc/include/asm/book3s/64/mmu.h >> index 70c995870297..6deda6ecc4f7 100644 >> ---

Re: [PATCH] cxl: fix NULL dereference in cxl_context_init() on PowerVM guests

2016-07-28 Thread Frederic Barrat
Le 28/07/2016 à 07:39, Andrew Donnellan a écrit : Commit f67a6722d650 ("cxl: Workaround PE=0 hardware limitation in Mellanox CX4") added a "min_pe" field to struct cxl_service_layer_ops, to allow us to work around a Mellanox CX-4 hardware limitation. When allocating the PE number in

Re: [PATCH v3 04/21] powerpc/mm: Do radix device tree scanning earlier

2016-07-28 Thread Michael Ellerman
Balbir Singh writes: > On 28/07/16 00:18, Michael Ellerman wrote: >> diff --git a/arch/powerpc/mm/pgtable-radix.c >> b/arch/powerpc/mm/pgtable-radix.c >> index 003ff48a11b6..f34ccdbe0fbd 100644 >> --- a/arch/powerpc/mm/pgtable-radix.c >> +++

Re: [PATCH v3 21/21] powerpc/jump_label: Annotate jump label assembly

2016-07-28 Thread Nicholas Piggin
On Thu, 28 Jul 2016 00:18:17 +1000 Michael Ellerman wrote: > Add a comment to the generated assembler for jump labels. This makes > it easier to identify them in asm listings (generated with $ make > foo.s). The series looks in much better shape now. As a disclaimer I did

Re: [PATCH v3 19/21] powerpc: Add option to use jump label for mmu_has_feature()

2016-07-28 Thread Nicholas Piggin
On Thu, 28 Jul 2016 00:18:15 +1000 Michael Ellerman wrote: > From: Kevin Hao > > As we just did for CPU features. > > Signed-off-by: Kevin Hao > Signed-off-by: Aneesh Kumar K.V > Signed-off-by:

Re: [PATCH v3 18/21] powerpc: Add option to use jump label for cpu_has_feature()

2016-07-28 Thread Nicholas Piggin
On Thu, 28 Jul 2016 00:18:14 +1000 Michael Ellerman wrote: > From: Kevin Hao > > We do binary patching of asm code using CPU features, which is a > one-time operation, done during early boot. However checks of CPU > features in C code are currently done

Re: [PATCH v3 12/21] powerpc/mm: Convert early cpu/mmu feature check to use the new helpers

2016-07-28 Thread Nicholas Piggin
On Thu, 28 Jul 2016 00:18:08 +1000 Michael Ellerman wrote: > From: "Aneesh Kumar K.V" > > This switches early feature checks to use the non static key variant > of the function. In later patches we will be switching > cpu_has_feature() and

Re: [PATCH v3 10/21] powerpc/mm: Define radix_enabled() in one place & use static inline

2016-07-28 Thread Nicholas Piggin
On Thu, 28 Jul 2016 00:18:06 +1000 Michael Ellerman wrote: > Currently we have radix_enabled() three times, twice in > asm/book3s/64/mmu.h and then a fallback in asm/mmu.h. > > Consolidate them in asm/mmu.h. While we're at it convert them to be > static inlines, and change