Re: ppc64le reliable stack unwinder and scheduled tasks

2019-01-13 Thread Nicolai Stange
Joe Lawrence writes: > On Fri, Jan 11, 2019 at 08:51:54AM +0100, Nicolai Stange wrote: >> Joe Lawrence writes: >> >> > On Fri, Jan 11, 2019 at 01:00:38AM +0100, Nicolai Stange wrote: > > [ ... snip ... ] > >> >> For testing, could you try whether clearing the word at STACK_FRAME_MARKER >> >>

Re: [PATCH] mm: Introduce GFP_PGTABLE

2019-01-13 Thread Michal Hocko
On Mon 14-01-19 09:30:55, Anshuman Khandual wrote: > > > On 01/13/2019 11:05 PM, Michal Hocko wrote: > > On Sat 12-01-19 15:56:38, Anshuman Khandual wrote: > >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | > >> __GFP_ZERO) and using it for allocating page table

[PATCH] soc: fsl: dpio: fix cpu range check

2019-01-13 Thread Bharat Bhushan
cpu_possible(cpu) will always return true when cpu parameter is from cpumask_next(). Check for nr_cpu_ids rather than !cpu_possible(cpu). Signed-off-by: Bharat Bhushan --- drivers/soc/fsl/dpio/dpio-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] mm: Introduce GFP_PGTABLE

2019-01-13 Thread Anshuman Khandual
On 01/12/2019 09:19 PM, Matthew Wilcox wrote: > On Sat, Jan 12, 2019 at 02:49:29PM +0100, Christophe Leroy wrote: >> As far as I can see, >> >> #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) >> >> So what's the difference between: >> >> (GFP_KERNEL_ACCOUNT | __GFP_ZERO) &

Re: [PATCH] mm: Introduce GFP_PGTABLE

2019-01-13 Thread Anshuman Khandual
On 01/12/2019 10:18 PM, Shakeel Butt wrote: >> --- a/arch/x86/kernel/espfix_64.c >> +++ b/arch/x86/kernel/espfix_64.c >> @@ -57,8 +57,6 @@ >> # error "Need more virtual address space for the ESPFIX hack" >> #endif >> >> -#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO) >> - >> /* This contains

[PATCH] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-13 Thread Ravi Bangoria
Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load event and, perf_mem_events by default includes ldlat=30 which is causing failure on powerpc. Refactor code to support perf mem/c2c on powerpc. This patch depends on kernel side changes done my Madhavan:

Re: ppc64le reliable stack unwinder and scheduled tasks

2019-01-13 Thread Joe Lawrence
On Fri, Jan 11, 2019 at 08:51:54AM +0100, Nicolai Stange wrote: > Joe Lawrence writes: > > > On Fri, Jan 11, 2019 at 01:00:38AM +0100, Nicolai Stange wrote: [ ... snip ... ] > >> For testing, could you try whether clearing the word at STACK_FRAME_MARKER > >> from _switch() helps? > >> > >>

Re: [PATCH] mm: Introduce GFP_PGTABLE

2019-01-13 Thread Anshuman Khandual
On 01/13/2019 11:05 PM, Michal Hocko wrote: > On Sat 12-01-19 15:56:38, Anshuman Khandual wrote: >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >> __GFP_ZERO) and using it for allocating page table pages. This causes some >> code duplication which can be easily

Re: [PATCH 14/15] arch: add split IPC system calls where needed

2019-01-13 Thread Michael Ellerman
Hi Arnd, Arnd Bergmann writes: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that set it implicitly. > > For the

Re: [PATCH 14/15] arch: add split IPC system calls where needed

2019-01-13 Thread Michael Ellerman
Hi Arnd, Arnd Bergmann writes: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that set it implicitly. > > For the

[PATCH kernel 2/2] powerpc/powernv/npu: Move platform shared code to sysdev

2019-01-13 Thread Alexey Kardashevskiy
Initially NPU support was introduced for the powernv platform only, and later it was extended to pseries so we ended up in a situation when pseries code calls into arch/powerpc/platforms/powernv which is ugly. This moves parts of npu-dma.c required for both powernv and pseries platforms to

[PATCH kernel 0/2] powerpc/powernv/npu: Move platform shared code to sysdev

2019-01-13 Thread Alexey Kardashevskiy
This is to avoid pseries calling into powernv code. The first patch changes data structure a bit, the second is cut-n-paste without changing logic or data structures. This is not changing symbol names as the NVIDIA UVM driver calls some of them (pnv_npu2_init_context, pnv_npu2_destroy_context,

[PATCH kernel 1/2] powerpc/powernv/npu: Move compound PEs to powernv

2019-01-13 Thread Alexey Kardashevskiy
We are going to move NPU code shared among pseries and powernv into sysdev. This prepares the move by moving compound PEs from the npu struct (which is going to move to sysdev) to powernv's phb struct as pseries does not need this. This makes npucomp a pointer instead of embedding it to the

Re: [PATCH v5 1/2] powerpc/32: add stack protector support

2019-01-13 Thread Michael Ellerman
Samuel Holland writes: > Hello all, > > On 09/27/18 02:05, Christophe Leroy wrote: > [..snip..] >> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >> index 07d9dce7eda6..45b8eb4d8fe7 100644 >> --- a/arch/powerpc/Makefile >> +++ b/arch/powerpc/Makefile >> @@ -112,6 +112,9 @@

[PATCH kernel] powerpc/powernv/npu: Remove obsolete comment about TCE_KILL_INVAL_ALL

2019-01-13 Thread Alexey Kardashevskiy
TCE_KILL_INVAL_ALL has moved long ago but the comment was forgotted so finish the move and remove the comment. Fixes: 0bbcdb437da0c4a "powerpc/powernv/npu: TCE Kill helpers cleanup" Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/platforms/powernv/npu-dma.c | 4 1 file changed, 4

[PATCH kernel] powerpc/powernv: Remove never used pnv_power9_force_smt4

2019-01-13 Thread Alexey Kardashevskiy
This removes never used symbol - pnv_power9_force_smt4. Note that we might still want to add stubs for: void pnv_power9_force_smt4_catch(void); void pnv_power9_force_smt4_release(void); Fixes: 7672691a08c88 "powerpc/powernv: Provide a way to force a core into SMT4 mode"

[PATCH kernel] KVM: PPC: Fix compile when CONFIG_PPC_RADIX_MMU is not defined

2019-01-13 Thread Alexey Kardashevskiy
This adds some stubs for hash only configs. Signed-off-by: Alexey Kardashevskiy --- .../include/asm/book3s/64/tlbflush-radix.h| 30 +++ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h

[PATCH] powerpc/4xx/ocm: Fix fix for phys_addr_t printf warnings

2019-01-13 Thread Michael Ellerman
My recent commit to fix the printf warnings in ocm.c got the format specifier wrong, because I copied it from the documentation without realising the square brackets are not meant as literals. This results in the address being suffixed with a literal "[p]". Actually tested this time: # cat

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-13 Thread Jonathan Neuschäfer
On Sun, Jan 13, 2019 at 08:43:07PM +0100, Christophe Leroy wrote: > Le 13/01/2019 à 19:16, Jonathan Neuschäfer a écrit : > > I just tested the whole series on my Wii (I didn't test any intermediate > > steps). Without CONFIG_STRICT_KERNEL_RWX, it seems to work fine, but > > with it, I get the

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-13 Thread Christophe Leroy
Le 13/01/2019 à 19:16, Jonathan Neuschäfer a écrit : On Thu, Jan 10, 2019 at 03:11:38PM +, Christophe Leroy wrote: The purpose of this serie is to: - use BATs with STRICT_KERNEL_RWX on book3s (See patch 12 for details.) - use LTLBs with STRICT_KERNEL_RWX on 8xx (See patch 14 for a few

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-13 Thread Jonathan Neuschäfer
On Thu, Jan 10, 2019 at 03:11:38PM +, Christophe Leroy wrote: > The purpose of this serie is to: > - use BATs with STRICT_KERNEL_RWX on book3s (See patch 12 for details.) > - use LTLBs with STRICT_KERNEL_RWX on 8xx (See patch 14 for a few details.) Hi, I just tested the whole series on my

Re: [PATCH] mm: Introduce GFP_PGTABLE

2019-01-13 Thread Michal Hocko
On Sat 12-01-19 15:56:38, Anshuman Khandual wrote: > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | > __GFP_ZERO) and using it for allocating page table pages. This causes some > code duplication which can be easily avoided. GFP_KERNEL allocated and > cleared out pages

Re: ppc64le reliable stack unwinder and scheduled tasks

2019-01-13 Thread Torsten Duwe
On Sun, 13 Jan 2019 23:33:56 +1100 Balbir Singh wrote: > On Sat, Jan 12, 2019 at 02:45:41AM -0600, Segher Boessenkool wrote: > > On Sat, Jan 12, 2019 at 12:09:14PM +1100, Balbir Singh wrote: > > > Could you please define interesting frame on top a bit more? > > > Usually the topmost return

Re: ppc64le reliable stack unwinder and scheduled tasks

2019-01-13 Thread Balbir Singh
On Sat, Jan 12, 2019 at 02:45:41AM -0600, Segher Boessenkool wrote: > On Sat, Jan 12, 2019 at 12:09:14PM +1100, Balbir Singh wrote: > > Could you please define interesting frame on top a bit more? Usually > > the topmost return address is in LR > > There is no reliable way (other than DWARF