Re: [PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"

2017-10-18 Thread Paul Mackerras
On Thu, Sep 21, 2017 at 12:29:36AM +0200, Thomas Meyer wrote: > Use vma_pages function on vma object instead of explicit computation. > Found by coccinelle spatch "api/vma_pages.cocci" > > Signed-off-by: Thomas Meyer Thanks, applied to my kvm-ppc-next branch, with the headline "KVM: PPC: BookE:

Re: [PATCH 1/10] KVM: PPC: Book3S HV: Use ARRAY_SIZE macro

2017-10-18 Thread Paul Mackerras
On Sun, Sep 03, 2017 at 02:19:31PM +0200, Thomas Meyer wrote: > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > yourself. > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\)

Re: [PATCH] KVM: PPC: Book3S HV: Delete an error message for a failed memory allocation in kvmppc_allocate_hpt()

2017-10-18 Thread Paul Mackerras
On Thu, Oct 05, 2017 at 01:23:30PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 5 Oct 2017 13:16:51 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus El

Re: [PATCH kernel] KVM: PPC: Enable in-kernel TCE handlers for PR KVM

2017-10-18 Thread Paul Mackerras
On Wed, Oct 11, 2017 at 04:01:08PM +1100, Alexey Kardashevskiy wrote: > The handlers support PR KVM from the day one; however the PR KVM's > enable/disable hcalls handler missed these ones. > > Signed-off-by: Alexey Kardashevskiy Thanks, applied to my kvm-ppc-next branch. Paul.

[PATCH] powerpc/64: Free up CPU_FTR_ICSWX

2017-10-18 Thread Michael Ellerman
The last user of CPU_FTR_ICSWX was removed in commit 6ff4d3e96652 ("powerpc: Remove old unused icswx based coprocessor support"), so free the bit up for future use. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/cputable.h | 6 +++--- arch/powerpc/kernel/dt_cpu_ftrs.c | 2 +- 2 f

[PATCH] powerpc/64s: Replace CONFIG_PPC_STD_MMU_64 with CONFIG_PPC_BOOK3S_64

2017-10-18 Thread Michael Ellerman
CONFIG_PPC_STD_MMU_64 indicates support for the "standard" powerpc MMU on 64-bit CPUs. The "standard" MMU refers to the hash page table MMU found in "server" processors, from IBM mainly. Currently CONFIG_PPC_STD_MMU_64 is == CONFIG_PPC_BOOK3S_64. While it's annoying to have two symbols that always

Re: [PATCH 01/25] powerpc: initial pkey plumbing

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 9fc3c0b..a4cd210 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -864,6 +864,22 @@ config SECCOMP > > If unsure, say Y. Only embedded should say N here. > > +config PPC64_MEMORY_PR

Re: selftests/powerpc: context_switch: Fix pthread errors

2017-10-18 Thread Michael Ellerman
On Tue, 2017-07-04 at 01:21:15 UTC, Cyril Bur wrote: > Turns out pthreads returns an errno and doesn't set errno. This doesn't > play well with perror(). > > Signed-off-by: Cyril Bur Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/89aca4753eb451a48f65a12b026403 cheers

Re: [V14,1/4] powerpc/vphn: Update CPU topology when VPHN enabled

2017-10-18 Thread Michael Ellerman
On Fri, 2017-09-08 at 20:47:27 UTC, Michael Bringmann wrote: > powerpc/vphn: On Power systems with shared configurations of CPUs > and memory, there are some issues with the association of additional > CPUs and memory to nodes when hot-adding resources. This patch > corrects the currently broken c

Re: [v4, 1/5] powerpc/mce.c: Remove unused function get_mce_fault_addr()

2017-10-18 Thread Michael Ellerman
On Fri, 2017-09-29 at 04:26:51 UTC, Balbir Singh wrote: > There are no users of get_mce_fault_addr() > > Fixes: b63a0ff ("powerpc/powernv: Machine check exception handling.") > > Signed-off-by: Balbir Singh > Reviewed-by: Nicholas Piggin Series applied to powerpc next, thanks. https://git.ker

Re: cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK

2017-10-18 Thread Michael Ellerman
On Mon, 2017-10-09 at 17:56:27 UTC, Vaibhav Jain wrote: > PSL9 doesn't have a FIR2 register as was the case with PSL8. However > currently the register definitions in 'cxl.h' have a definition for > PSL9_FIR2 that actually points to PSL9_FIR_MASK register in the P1 > area at offset 0x308. > > So t

Re: powerpc/modules: Use WARN_ON() in stub_for_addr()

2017-10-18 Thread Michael Ellerman
On Tue, 2017-10-10 at 14:47:32 UTC, Kamalesh Babulal wrote: > Use WARN_ON(), while running out of stubs in stub_for_addr() > and abort loading of the module instead of BUG_ON(). > > Signed-off-by: Kamalesh Babulal Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1c0437af9fca8de

Re: [v2] cxl: Dump PSL_FIR register on PSL9 error irq

2017-10-18 Thread Michael Ellerman
On Wed, 2017-10-11 at 06:14:41 UTC, Vaibhav Jain wrote: > For PSL9 currently we aren't dumping the PSL FIR register when a > PSL error interrupt is triggered. Contents of this register are useful > in debugging AFU issues. > > This patch fixes issue by adding a new service_layer_ops callback > cxl

Re: [PATCH 1/7] powerpc: introduce pte_set_hash_slot() helper

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h > b/arch/powerpc/include/asm/book3s/64/hash-64k.h > index 9732837..6652669 100644 > --- a/arch/powerpc/include/asm/book3s/64/hash-64k.h > +++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h > @@ -74,6 +74,31 @@ static in

Re: [PATCH] powerpc/xmon: Always enable xmon sysrq trigger

2017-10-18 Thread Michael Ellerman
"Guilherme G. Piccoli" writes: > Distros vary the way they enable SysRq by default - mostly they seem > to enable some mask and then majority of the SysRq functions are > disabled. For instance, xmon does not even have a mask, and unsless > SysRq are completely enabled ( == 1), xmon trigger keeps

Re: [PATCH] powerpc: ipic - fix status get and status clear

2017-10-18 Thread Michael Ellerman
Christophe Leroy writes: > IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR > which is the mask register. This seems like it would be a bad bug. But I guess it hasn't mattered for some reason? cheers > diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c > i

Re: [RFC v7 15/25] powerpc: Program HPTE key protection bits

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > On Wed, Oct 18, 2017 at 06:15:40PM +0200, Laurent Dufour wrote: >> On 31/07/2017 02:12, Ram Pai wrote: >> > diff --git a/arch/powerpc/include/asm/pkeys.h >> > b/arch/powerpc/include/asm/pkeys.h >> > index 1ded6df..4b7e3f4 100644 >> > --- a/arch/powerpc/include/asm/pkeys.h >> > +

Re: [RFC v7 16/25] powerpc: helper to validate key-access permissions of a pte

2017-10-18 Thread Michael Ellerman
Ram Pai writes: > On Wed, Oct 18, 2017 at 06:08:34PM +0200, Laurent Dufour wrote: >> On 31/07/2017 02:12, Ram Pai wrote: >> > diff --git a/arch/powerpc/include/asm/pkeys.h >> > b/arch/powerpc/include/asm/pkeys.h >> > index 4b7e3f4..ba7bff6 100644 >> > --- a/arch/powerpc/include/asm/pkeys.h >> > +

Re: [PATCH] powerpc: ipic - fix status get and status clear

2017-10-18 Thread Christophe LEROY
Le 19/10/2017 à 07:06, Michael Ellerman a écrit : Christophe Leroy writes: IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR which is the mask register. This seems like it would be a bad bug. But I guess it hasn't mattered for some reason? As far as I can see, this fun

Re: [PATCHv3 6/7] symbol lookup: use new kernel and module dereference functions

2017-10-18 Thread Sergey Senozhatsky
Sorry for the delay and thanks for taking a look. I'll try to re-spin the patch set by the end of this week/early next week. On (10/04/17 13:53), Petr Mladek wrote: [..] > Note that kallsyms_lookup() and module_address_lookup() is used > in many other situations. we dereference only things that

Re: [PATCHv3 5/7] parisc64: Add .opd based function descriptor dereference

2017-10-18 Thread Sergey Senozhatsky
On (10/04/17 12:40), Petr Mladek wrote: > > +unsigned long dereference_module_function_descriptor(struct module *mod, > > +unsigned long addr) > > +{ > > + unsigned long start_opd = (Elf64_Addr)mod->core_layout.base + > > +

Re: [PATCHv3 4/7] powerpc64: Add .opd based function descriptor dereference

2017-10-18 Thread Sergey Senozhatsky
On (10/04/17 11:21), Petr Mladek wrote: [..] > > +#ifdef PPC64_ELF_ABI_v1 > > +unsigned long dereference_module_function_descriptor(struct module *mod, > > +unsigned long addr) > > +{ > > + if (addr < mod->arch.start_opd || addr >= mod->arch.end_opd

Re: [PATCHv3 2/7] sections: split dereference_function_descriptor()

2017-10-18 Thread Sergey Senozhatsky
On (10/04/17 11:00), Petr Mladek wrote: [..] > > /* random extra sections (if any). Override > > diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h > > index 4d0cb9bba93e..172904e9cded 100644 > > --- a/include/linux/moduleloader.h > > +++ b/include/linux/moduleloader.h > > @

Re: [PATCHv3 1/7] switch dereference_function_descriptor() to `unsigned long'

2017-10-18 Thread Sergey Senozhatsky
On (10/04/17 10:24), Petr Mladek wrote: [..] > To make it clear. All these comments are not a big deal and I do > not want to invalidate all the acked-by and tested-by just because > of them. > > But please, consider removing this change if we need to do > another iteration of this patchset. IMHO,

<    1   2