Re: [PATCH v8 13/30] powerpc: Add a probe_user_read_inst() function

2020-05-13 Thread Christophe Leroy
Le 06/05/2020 à 05:40, Jordan Niethe a écrit : Introduce a probe_user_read_inst() function to use in cases where probe_user_read() is used for getting an instruction. This will be more useful for prefixed instructions. Reviewed-by: Alistair Popple Signed-off-by: Jordan Niethe --- v6: - New

Re: [PATCH v8 00/30] Initial Prefixed Instruction support

2020-05-13 Thread Christophe Leroy
Le 06/05/2020 à 05:40, Jordan Niethe a écrit : A future revision of the ISA will introduce prefixed instructions. A prefixed instruction is composed of a 4-byte prefix followed by a 4-byte suffix. All prefixes have the major opcode 1. A prefix will never be a valid word instruction. A suffix

Re: [PATCH 06/11] powerpc/xmon: constify sysrq_key_op

2020-05-13 Thread Michael Ellerman
Emil Velikov writes: > With earlier commits, the API no longer discards the const-ness of the > sysrq_key_op. As such we can add the notation. > > Cc: Greg Kroah-Hartman > Cc: Jiri Slaby > Cc: linux-ker...@vger.kernel.org > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul

Re: [PATCH v8 16/30] powerpc: Define and use __get_user_instr{, inatomic}()

2020-05-13 Thread Jordan Niethe
Hi mpe, could you please take this. arch/powerpc/include/asm/uaccess.h | 3 +++ arch/powerpc/kernel/vecemu.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h ---

Re: [PATCH v8 23/30] powerpc: Add prefixed instructions to instruction data type

2020-05-13 Thread Jordan Niethe
Hi mpe, Relating to your message on [PATCH v8 16/30] powerpc: Define and use __get_user_instr{,inatomic}() - could you please take this. diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h --- a/arch/powerpc/include/asm/uaccess.h +++

[PATCH v3 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-13 Thread Leonardo Bras
Implement rtas_call_reentrant() for reentrant rtas-calls: "ibm,int-on", "ibm,int-off",ibm,get-xive" and "ibm,set-xive". On LoPAPR Version 1.1 (March 24, 2016), from 7.3.10.1 to 7.3.10.4, items 2 and 3 say: 2 - For the PowerPC External Interrupt option: The * call must be reentrant to the number

[PATCH v3 1/2] powerpc/rtas: Move type/struct definitions from rtas.h into rtas-types.h

2020-05-13 Thread Leonardo Bras
In order to get any rtas* struct into other headers, including rtas.h may cause a lot of errors, regarding include dependency needed for inline functions. Create rtas-types.h and move there all type/struct definitions from rtas.h, then include rtas-types.h into rtas.h. Also, as suggested by

[PATCH v3 0/2] Implement reentrant rtas call

2020-05-13 Thread Leonardo Bras
Patch 2 implement rtas_call_reentrant() for reentrant rtas-calls: "ibm,int-on", "ibm,int-off",ibm,get-xive" and "ibm,set-xive", according to LoPAPR Version 1.1 (March 24, 2016). For that, it's necessary that every call uses a different rtas buffer (rtas_args). Paul Mackerras suggested using the

Re: [PATCH v8 16/30] powerpc: Define and use __get_user_instr{, inatomic}()

2020-05-13 Thread Jordan Niethe
On Thu, May 14, 2020 at 12:17 AM Michael Ellerman wrote: > > Jordan Niethe writes: > > Define specific __get_user_instr() and __get_user_instr_inatomic() > > macros for reading instructions from user space. > > At least for fix_alignment() we could be coming from the kernel, not > sure about the

Re: [PATCH v8 13/30] powerpc: Add a probe_user_read_inst() function

2020-05-13 Thread Jordan Niethe
On Wed, May 13, 2020 at 10:52 PM Michael Ellerman wrote: > > Jordan Niethe writes: > > diff --git a/arch/powerpc/lib/inst.c b/arch/powerpc/lib/inst.c > > new file mode 100644 > > index ..eaf786afad2b > > --- /dev/null > > +++ b/arch/powerpc/lib/inst.c > > @@ -0,0 +1,18 @@ > > +//

Re: [PATCH v2 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-13 Thread kbuild test robot
to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Leonardo-Bras/powerpc-rtas-Move-type-struct-definitions-from-rtas-h-into-rtas-types-h/20200513-134244 base: https://git.kernel.org/pub/scm/linux/kernel

Re: remove a few uses of ->queuedata

2020-05-13 Thread Dan Williams
On Tue, May 12, 2020 at 1:08 AM Christoph Hellwig wrote: > > On Sat, May 09, 2020 at 08:07:14AM -0700, Dan Williams wrote: > > > which are all used in the I/O submission path (generic_make_request / > > > generic_make_request_checks). This is mostly a prep cleanup patch to > > > also remove the

Re: powerpc/mpc85xx: Add Cyrus P5040 device tree source

2020-05-13 Thread Darren Stevens
Hello Scott On 08/05/2020, Scott Wood wrote: > On Thu, 2020-05-07 at 22:30 +0100, Darren Stevens wrote: >> >> +/include/ "p5040si-pre.dtsi" >> + >> +/ { >> +model = "varisys,CYRUS5040"; >> +compatible = "varisys,CYRUS"; > > Is this board 100% compatible with the Cyrus P5020 board, down

[PATCH 06/11] powerpc/xmon: constify sysrq_key_op

2020-05-13 Thread Emil Velikov
With earlier commits, the API no longer discards the const-ness of the sysrq_key_op. As such we can add the notation. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-ker...@vger.kernel.org Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org

Re: [PATCH 12/15] md: stop using ->queuedata

2020-05-13 Thread Song Liu
On Wed, May 13, 2020 at 11:33 AM Christoph Hellwig wrote: > > On Wed, May 13, 2020 at 11:29:17AM -0700, Song Liu wrote: > > On Fri, May 8, 2020 at 9:17 AM Christoph Hellwig wrote: > > > > > > Signed-off-by: Christoph Hellwig > > > > Thanks for the cleanup. IIUC, you want this go through md

Re: [PATCH 12/15] md: stop using ->queuedata

2020-05-13 Thread Song Liu
On Fri, May 8, 2020 at 9:17 AM Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig Thanks for the cleanup. IIUC, you want this go through md tree? Otherwise, Acked-by: Song Liu > --- > drivers/md/md.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git

Re: [RFC PATCH 2/2] powerpc/64s: system call support for scv/rfscv instructions

2020-05-13 Thread Matheus Castanho
Hi Nicholas, Small comment below: On 4/30/20 1:02 AM, Nicholas Piggin wrote: > Add support for the scv instruction on POWER9 and later CPUs. > > For now this implements the zeroth scv vector 'scv 0', as identical > to 'sc' system calls, with the exception that lr is not preserved, and > it is

[PATCH v6 0/2] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2020-05-13 Thread Bhupesh Sharma
Apologies for the delayed update. Its been quite some time since I posted the last version (v5), but I have been really caught up in some other critical issues. Changes since v5: - v5 can be viewed here: http://lists.infradead.org/pipermail/kexec/2019-November/024055.html -

[PATCH v6 1/2] crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo

2020-05-13 Thread Bhupesh Sharma
Right now user-space tools like 'makedumpfile' and 'crash' need to rely on a best-guess method of determining value of 'MAX_PHYSMEM_BITS' supported by underlying kernel. This value is used in user-space code to calculate the bit-space required to store a section for SPARESMEM (similar to the

[powerpc:fixes-test] BUILD SUCCESS 249c9b0cd193d983c3a0b00f3fd3b92333bfeebe

2020-05-13 Thread kbuild test robot
-20200513 x86_64 randconfig-a003-20200513 x86_64 randconfig-a006-20200513 x86_64 randconfig-a004-20200513 x86_64 randconfig-a001-20200513 x86_64 randconfig-a002-20200513 i386 randconfig-a006-20200513 i386

[powerpc:next-test] BUILD SUCCESS 9aaaca63114c41ad857bb9889732c0827a1689af

2020-05-13 Thread kbuild test robot
allmodconfig powerpc allnoconfig x86_64 randconfig-a005-20200513 x86_64 randconfig-a003-20200513 x86_64 randconfig-a006-20200513 x86_64 randconfig-a004-20200513 x86_64 randconfig-a001-20200513 x86_64

[powerpc:merge] BUILD SUCCESS 93369d50dc0f266ee67adcc6053c96700236d8be

2020-05-13 Thread kbuild test robot
allmodconfig powerpc allnoconfig x86_64 randconfig-a005-20200513 x86_64 randconfig-a003-20200513 x86_64 randconfig-a006-20200513 x86_64 randconfig-a004-20200513 x86_64 randconfig

Re: [PATCH 12/15] md: stop using ->queuedata

2020-05-13 Thread Christoph Hellwig
On Wed, May 13, 2020 at 11:29:17AM -0700, Song Liu wrote: > On Fri, May 8, 2020 at 9:17 AM Christoph Hellwig wrote: > > > > Signed-off-by: Christoph Hellwig > > Thanks for the cleanup. IIUC, you want this go through md tree? Yes, please pick it up though the md tree.

Re: [PATCH v2 3/5] libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier

2020-05-13 Thread Dan Williams
On Tue, May 12, 2020 at 8:47 PM Aneesh Kumar K.V wrote: > > Architectures like ppc64 provide persistent memory specific barriers > that will ensure that all stores for which the modifications are > written to persistent storage by preceding dcbfps and dcbstps > instructions have updated

Re: [PATCH v8 16/30] powerpc: Define and use __get_user_instr{, inatomic}()

2020-05-13 Thread Michael Ellerman
Jordan Niethe writes: > Define specific __get_user_instr() and __get_user_instr_inatomic() > macros for reading instructions from user space. At least for fix_alignment() we could be coming from the kernel, not sure about the other cases. I can tweak the change log. > diff --git

[PATCH] powerpc/xive: silence kmemleak false positives

2020-05-13 Thread Qian Cai
opal_xive_donate_page() will reference the newly allocated memory using __pa(). Since kmemleak is unable to track the physical memory resulting in false positives, silence those by using kmemleak_ignore(). unreferenced object 0xc000201b53e9 (size 65536): comm "qemu-kvm", pid 124557, jiffies

[PATCH] powerpc/kvm/radix: ignore kmemleak false positives

2020-05-13 Thread Qian Cai
kvmppc_pmd_alloc() and kvmppc_pte_alloc() allocate some memory but then pud_populate() and pmd_populate() will use __pa() to reference the newly allocated memory. Since kmemleak is unable to track the physical memory resulting in false positives, silence those by using kmemleak_ignore().

Re: [PATCH v8 13/30] powerpc: Add a probe_user_read_inst() function

2020-05-13 Thread Michael Ellerman
Jordan Niethe writes: > diff --git a/arch/powerpc/lib/inst.c b/arch/powerpc/lib/inst.c > new file mode 100644 > index ..eaf786afad2b > --- /dev/null > +++ b/arch/powerpc/lib/inst.c > @@ -0,0 +1,18 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * Copyright 2020, IBM

Re: [PATCH v3] powerpc/uaccess: evaluate macro arguments once, before user access is allowed

2020-05-13 Thread Michael Ellerman
On Tue, 7 Apr 2020 14:12:45 +1000, Nicholas Piggin wrote: > get/put_user can be called with nontrivial arguments. fs/proc/page.c > has a good example: > > if (put_user(stable_page_flags(ppage), out)) { > > stable_page_flags is quite a lot of code, including spin locks in the > page

Re: [PATCH 0/6] assorted kuap fixes

2020-05-13 Thread Michael Ellerman
On Wed, 29 Apr 2020 16:26:00 +1000, Nicholas Piggin wrote: > Here's a bunch of fixes I collected, and some that Aneesh needs for > his kuap on hash series. > > Nicholas Piggin (6): > powerpc/64/kuap: move kuap checks out of MSR[RI]=0 regions of exit > code > missing isync >

Re: [PATCH v2] powerpc/ima: fix secure boot rules in ima arch policy

2020-05-13 Thread Michael Ellerman
On Fri, 1 May 2020 10:16:52 -0400, Nayna Jain wrote: > To prevent verifying the kernel module appended signature twice > (finit_module), once by the module_sig_check() and again by IMA, powerpc > secure boot rules define an IMA architecture specific policy rule > only if CONFIG_MODULE_SIG_FORCE is

Re: [PATCH] powerpc/64s: Fix unrecoverable SLB crashes due to preemption check

2020-05-13 Thread Michael Ellerman
On Sun, 3 May 2020 00:33:16 +1000, Michael Ellerman wrote: > Hugh reported that his trusty G5 crashed after a few hours under load > with an "Unrecoverable exception 380". > > The crash is in interrupt_return() where we check lazy_irq_pending(), > which calls get_paca() and with

Re: [PATCH fixes] powerpc/vdso32: Fallback on getres syscall when clock is unknown

2020-05-13 Thread Michael Ellerman
On Sat, 9 May 2020 09:42:14 + (UTC), Christophe Leroy wrote: > There are other clocks than the standard ones, for instance > per process clocks. Therefore, being above the last standard clock > doesn't mean it is a bad clock. So, fallback to syscall instead > of returning -EINVAL

Re: [PATCH fixes] powerpc/40x: Make more space for system call exception

2020-05-13 Thread Michael Ellerman
On Sat, 9 May 2020 17:05:11 + (UTC), Christophe Leroy wrote: > When CONFIG_VIRT_CPU_ACCOUNTING is selected, system call exception > handler doesn't fit below 0xd00 and build fails. > > As exception 0xd00 doesn't exist and is never generated by 40x, > comment it out in order to get more space

Re: [PATCH] powerpc/32s: Fix build failure with CONFIG_PPC_KUAP_DEBUG

2020-05-13 Thread Michael Ellerman
On Mon, 20 Apr 2020 07:47:05 + (UTC), Christophe Leroy wrote: > gpr2 is not a parametre of kuap_check(), it doesn't exist. > > Use gpr instead. Applied to powerpc/fixes. [1/1] powerpc/32s: Fix build failure with CONFIG_PPC_KUAP_DEBUG

Re: [PATCH 06/12] m68k/mm: move {cache,nocahe}_page() definitions close to their user

2020-05-13 Thread Greg Ungerer
Hi Mike, On 13/5/20 4:44 am, Mike Rapoport wrote: From: Mike Rapoport The cache_page() and nocache_page() functions are only used by the morotola

Re: [PATCH v4 01/22] powerpc/pkeys: Avoid using lockless page table walk

2020-05-13 Thread Michael Ellerman
On Tue, 2020-05-05 at 07:17:08 UTC, "Aneesh Kumar K.V" wrote: > Fetch pkey from vma instead of linux page table. Also document the fact that > in > some cases the pkey returned in siginfo won't be the same as the one we took > keyfault on. Even with linux page table walk, we can end up in a

Re: [PATCH v4 3/3] mm/page_alloc: Keep memoryless cpuless node 0 offline

2020-05-13 Thread Srikar Dronamraju
* Christopher Lameter [2020-05-12 16:31:26]: > On Tue, 12 May 2020, Srikar Dronamraju wrote: > > > +#ifdef CONFIG_NUMA > > + [N_ONLINE] = NODE_MASK_NONE, > > Again. Same issue as before. If you do this then you do a global change > for all architectures. You need to put something in the

Re: powerpc/pci: [PATCH 1/1]: PCIE PHB reset

2020-05-13 Thread Sam Bobroff
On Thu, May 07, 2020 at 08:10:37AM -0500, wenxi...@linux.vnet.ibm.com wrote: > From: Wen Xiong > > Several device drivers hit EEH(Extended Error handling) when triggering > kdump on Pseries PowerVM. This patch implemented a reset of the PHBs > in pci general code. PHB reset stop all PCI

Re: [PATCH] tty: hvc: Fix data abort due to race in hvc_open

2020-05-13 Thread Greg KH
On Tue, May 12, 2020 at 02:39:50PM -0700, rana...@codeaurora.org wrote: > On 2020-05-12 01:25, Greg KH wrote: > > On Tue, May 12, 2020 at 09:22:15AM +0200, Jiri Slaby wrote: > > > On 11. 05. 20, 9:39, Greg KH wrote: > > > > On Mon, May 11, 2020 at 12:23:58AM -0700, rana...@codeaurora.org wrote: >

Re: [PATCH v2 4/5] powerpc/pmem/of_pmem: Update of_pmem to use the new barrier instruction.

2020-05-13 Thread kbuild test robot
also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Aneesh-Kumar-K-V/powerpc-pmem-Add-new-instructions-for-persistent-storage-and-sync/20200513-133938 base:

Re: [PATCH] powerpc/kvm: silence kmemleak false positives

2020-05-13 Thread Qian Cai
> On May 13, 2020, at 12:04 AM, Michael Ellerman wrote: > > This should probably also have an include of ? No, asm/book3s/64/pgalloc.h has already had it and since this is book3s_64_mmu_radix.c, it will include it eventually from, asm/pgalloc.h asm/book3s/pgalloc.h

Re: [PATCH 19/31] riscv: use asm-generic/cacheflush.h

2020-05-13 Thread Christoph Hellwig
On Tue, May 12, 2020 at 04:00:26PM -0700, Palmer Dabbelt wrote: > Reviewed-by: Palmer Dabbelt > Acked-by: Palmer Dabbelt > > Were you trying to get these all in at once, or do you want me to take it into > my tree? Except for the small fixups at the beginning of the series this needs to go in

Re: [PATCH v8 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-05-13 Thread kajoljain
On 5/12/20 1:10 AM, Nathan Lynch wrote: > Hello, > > Kajol Jain writes: >> Function 'read_sys_info_pseries()' is added to get system parameter >> values like number of sockets and chips per socket. >> and it gets these details via rtas_call with token >> "PROCESSOR_MODULE_INFO". >> >> Incase