Re: [PATCH v3 1/3] powerpc: Remove MSR_PR check in interrupt_exit_{user/kernel}_prepare()

2021-08-24 Thread Michael Ellerman
Christophe Leroy writes: > Le 25/08/2021 à 07:27, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> In those hot functions that are called at every interrupt, any saved >>> cycle is worth it. >>> >>> interrupt_exit_user_prepare() and interrupt_exit_kernel_prepare() are >>> called from th

[PATCH linux-next] power:pkeys: fix bugon.cocci warnings

2021-08-24 Thread CGEL
From: Jing Yangyang Use BUG_ON instead of a if condition followed by BUG. ./arch/powerpc/include/asm/book3s/64/pkeys.h:21:2-5:WARNING Use BUG_ON instead of if condition followed by BUG. ./arch/powerpc/include/asm/book3s/64/pkeys.h:14:2-5:WARNING Use BUG_ON instead of if condition followed by BUG

Re: [PATCH linux-next] powerpc:security: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-08-24 Thread Christophe Leroy
Hi, Le 25/08/2021 à 08:40, CGEL a écrit : From: Jing Yangyang Fix the following coccicheck warning: ./arch/powerpc/kernel/security.c:807:0-23: WARNING: fops_entry_flush should be defined with DEFINE_DEBUGFS_ATTRIBUTE ./arch/powerpc/kernel/security.c:781:0-23:WARNING: fops_rfi_flush should be

[PATCH linux-next] powerpc:security: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-08-24 Thread CGEL
From: Jing Yangyang Fix the following coccicheck warning: ./arch/powerpc/kernel/security.c:807:0-23: WARNING: fops_entry_flush should be defined with DEFINE_DEBUGFS_ATTRIBUTE ./arch/powerpc/kernel/security.c:781:0-23:WARNING: fops_rfi_flush should be defined with DEFINE_DEBUGFS_ATTRIBUTE ./arch/

Re: [PATCH v3 3/3] powerpc: Define and use MSR_RI only on non booke/40x

2021-08-24 Thread Christophe Leroy
Le 25/08/2021 à 06:54, Michael Ellerman a écrit : Christophe Leroy writes: 40x and BOOKE don't have MSR_RI. Define MSR_RI only for platforms where it exists. For the other ones, defines it as BUILD_BUG for C and do not define it for ASM. Signed-off-by: Christophe Leroy --- v3: Fixes kvm_e

[PATCH linux-next] drivers:smu: fix warning comparing pointer to 0

2021-08-24 Thread CGEL
From: Jing Yangyang Fix the following coccicheck warning: ./drivers/macintosh/smu.c:1089: 11-12: WARNING comparing pointer to 0, suggest !E ./drivers/macintosh/smu.c:1256:11-12: WARNING comparing pointer to 0 Reported-by: Zeal Robot Signed-off-by: Jing Yangyang --- drivers/macintosh/smu.c |

Re: [PATCH v3 1/3] powerpc: Remove MSR_PR check in interrupt_exit_{user/kernel}_prepare()

2021-08-24 Thread Christophe Leroy
Le 25/08/2021 à 07:27, Michael Ellerman a écrit : Christophe Leroy writes: In those hot functions that are called at every interrupt, any saved cycle is worth it. interrupt_exit_user_prepare() and interrupt_exit_kernel_prepare() are called from three places: - From entry_32.S - From interru

Re: [PATCH v3 1/3] powerpc: Remove MSR_PR check in interrupt_exit_{user/kernel}_prepare()

2021-08-24 Thread Michael Ellerman
Christophe Leroy writes: > In those hot functions that are called at every interrupt, any saved > cycle is worth it. > > interrupt_exit_user_prepare() and interrupt_exit_kernel_prepare() are > called from three places: > - From entry_32.S > - From interrupt_64.S > - From interrupt_exit_user_restar

Re: [PATCH v3 3/3] powerpc: Define and use MSR_RI only on non booke/40x

2021-08-24 Thread Michael Ellerman
Christophe Leroy writes: > 40x and BOOKE don't have MSR_RI. > > Define MSR_RI only for platforms where it exists. For the other ones, > defines it as BUILD_BUG for C and do not define it for ASM. > > Signed-off-by: Christophe Leroy > --- > v3: Fixes kvm_emul.S and include in > --- > arch/power

Re: [PATCH 2/3] trace: refactor TRACE_IRQFLAGS_SUPPORT in Kconfig

2021-08-24 Thread Palmer Dabbelt
On Fri, 30 Jul 2021 22:22:32 PDT (-0700), masahi...@kernel.org wrote: Make architectures select TRACE_IRQFLAGS_SUPPORT instead of having many defines. Signed-off-by: Masahiro Yamada --- arch/riscv/Kconfig| 4 +--- Acked-by: Palmer Dabbelt Thanks!

[PATCH] powerpc/doc: Fix htmldocs errors

2021-08-24 Thread Aneesh Kumar K.V
Fix make htmldocs related errors with the newly added associativity.rst doc file. Reported-by: Stephen Rothwell Signed-off-by: Aneesh Kumar K.V --- Documentation/powerpc/associativity.rst | 29 + Documentation/powerpc/index.rst | 1 + 2 files changed, 16 inserti

Re: [PATCH] arch: vdso: remove if-conditionals of $(c-gettimeofday-y)

2021-08-24 Thread Palmer Dabbelt
On Fri, 30 Jul 2021 22:57:33 PDT (-0700), masahi...@kernel.org wrote: arm, arm64, mips, powerpc always select GENERIC_GETTIMEOFDAY, hence $(gettimeofday-y) never becomes empty. riscv conditionally selects GENERIC_GETTIMEOFDAY when MMU=y && 64BIT=y, but arch/riscv/kernel/vdso/vgettimeofday.o is b

Re: [PATCH v2 RESEND] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-24 Thread Paul Moore
On Tue, Aug 24, 2021 at 1:11 PM Christophe Leroy wrote: > Le 24/08/2021 à 16:47, Paul Moore a écrit : > > On Tue, Aug 24, 2021 at 9:36 AM Christophe Leroy > > wrote: > >> > >> Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal > >> targets") added generic support for AUDIT but that

Re: [PATCH v2 1/3] powerpc/pseries: Parse control memory access error

2021-08-24 Thread Segher Boessenkool
On Tue, Aug 24, 2021 at 04:39:57PM +1000, Michael Ellerman wrote: > > + case MC_ERROR_CTRL_MEM_ACCESS_PTABLE_WALK: > > + mce_err.u.ra_error_type = > > + MCE_RA_ERROR_PAGE_TABLE_WALK_LOAD_STORE_FOREIGN; > > That name is ridiculously long, but I

[GIT PULL] retire legacy WR sbc8548 and sbc8641 platforms

2021-08-24 Thread Paul Gortmaker
This is unchanged from the original wr_sbc-delete branch sent in January, other than to add the Acks from Scott in July, and update the baseline. Built with ppc64 defconfig and mpc85xx_cds_defconfig and mpc86xx_defconfig just to make sure I didn't fat finger anything in the baseline update. Origi

Re: [PATCH v3] powerpc/booke: Avoid link stack corruption in several places

2021-08-24 Thread Segher Boessenkool
Hi! On Tue, Aug 24, 2021 at 07:56:26AM +, Christophe Leroy wrote: > Use bcl 20,31,+4 instead of bl in order to preserve link stack. You use $+4 actually, which is clearer than .+4 or just +4 (and I am surprised that the latter even works btw, I never knew :-) -- either way it looks like a typ

Re: [PATCH v2 RESEND] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-24 Thread Christophe Leroy
Le 24/08/2021 à 16:47, Paul Moore a écrit : On Tue, Aug 24, 2021 at 9:36 AM Christophe Leroy wrote: Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal targets") added generic support for AUDIT but that didn't include support for bi-arch like powerpc. Commit 4b58841149dc ("au

Re: [PATCH linux-next] selftests/powerpc: remove duplicate include

2021-08-24 Thread Shuah Khan
On 8/24/21 10:35 AM, Christophe Leroy wrote: Le 24/08/2021 à 16:41, Shuah Khan a écrit : On 8/23/21 9:05 PM, CGEL wrote: From: Changcheng Deng Clean up the following includecheck warning: ./tools/testing/selftests/powerpc/tm/tm-poison.c: inttypes.h is included more than once. No functiona

Re: [PATCH linux-next] selftests/powerpc: remove duplicate include

2021-08-24 Thread Christophe Leroy
Le 24/08/2021 à 16:41, Shuah Khan a écrit : On 8/23/21 9:05 PM, CGEL wrote: From: Changcheng Deng Clean up the following includecheck warning: ./tools/testing/selftests/powerpc/tm/tm-poison.c: inttypes.h is included more than once. No functional change. Reported-by: Zeal Robot Signed-of

Re: [PATCH linux-next] powerpc/tm: remove duplicate include in tm-poison.c

2021-08-24 Thread Christophe Leroy
Le 24/08/2021 à 16:40, Shuah Khan a écrit : On 8/5/21 12:52 AM, cgel@gmail.com wrote: From: yong yiran 'inttypes.h' included in 'tm-poison.c' is duplicated. Remove all but the first include of inttypes.h from tm-poison.c. Reported-by: Zeal Robot Signed-off-by: yong yiran ---   tools/

Re: [PATCH] powerpc/32: Don't use lmw/stmw for saving/restoring non volatile regs

2021-08-24 Thread Segher Boessenkool
On Tue, Aug 24, 2021 at 08:16:00AM -0500, Segher Boessenkool wrote: > On Tue, Aug 24, 2021 at 07:54:22AM +0200, Christophe Leroy wrote: > > >On mpccore both lmw and stmw are only N+1 btw. But the serialization > > >might cost another cycle here? > > > > That coherent on MPC8xx, that's only 2 cycl

Re: [PATCH v2 RESEND] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-24 Thread Paul Moore
On Tue, Aug 24, 2021 at 9:36 AM Christophe Leroy wrote: > > Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal > targets") added generic support for AUDIT but that didn't include > support for bi-arch like powerpc. > > Commit 4b58841149dc ("audit: Add generic compat syscall support"

Re: [PATCH linux-next] selftests/powerpc: remove duplicate include

2021-08-24 Thread Shuah Khan
On 8/23/21 9:05 PM, CGEL wrote: From: Changcheng Deng Clean up the following includecheck warning: ./tools/testing/selftests/powerpc/tm/tm-poison.c: inttypes.h is included more than once. No functional change. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- tools/testing/selft

Re: [PATCH linux-next] powerpc/tm: remove duplicate include in tm-poison.c

2021-08-24 Thread Shuah Khan
On 8/5/21 12:52 AM, cgel@gmail.com wrote: From: yong yiran 'inttypes.h' included in 'tm-poison.c' is duplicated. Remove all but the first include of inttypes.h from tm-poison.c. Reported-by: Zeal Robot Signed-off-by: yong yiran --- tools/testing/selftests/powerpc/tm/tm-poison.c | 1 -

Re: [PATCH v15 10/12] swiotlb: Add restricted DMA pool initialization

2021-08-24 Thread Guenter Roeck
Hi Claire, On Thu, Jun 24, 2021 at 11:55:24PM +0800, Claire Chang wrote: > Add the initialization function to create restricted DMA pools from > matching reserved-memory nodes. > > Regardless of swiotlb setting, the restricted DMA pool is preferred if > available. > > The restricted DMA pools pr

Re: linux-next: build warning after merge of the powerpc tree

2021-08-24 Thread Jonathan Corbet
"Aneesh Kumar K.V" writes: > Thanks for looking into this. I guess we also need to format the below table? > > | 08 40 > --| > | > 0 | 10 20 80 > | > 8 | 20 10 160 > | > 40| 80 160 10 > > > I don't know how to represent that in the documentation file. A table i

[PATCH v2 RESEND] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-24 Thread Christophe Leroy
Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal targets") added generic support for AUDIT but that didn't include support for bi-arch like powerpc. Commit 4b58841149dc ("audit: Add generic compat syscall support") added generic support for bi-arch. Convert powerpc to that bi-arc

Re: [PATCH v2] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-24 Thread Christophe Leroy
Le 24/08/2021 à 15:24, Michael Ellerman a écrit : Christophe Leroy writes: Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal targets") added generic support for AUDIT but that didn't include support for bi-arch like powerpc. Commit 4b58841149dc ("audit: Add generic compat sy

Re: [PATCH v2] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-24 Thread Michael Ellerman
Christophe Leroy writes: > Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal > targets") added generic support for AUDIT but that didn't include > support for bi-arch like powerpc. > > Commit 4b58841149dc ("audit: Add generic compat syscall support") > added generic support for bi-

Re: [PATCH] powerpc/32: Don't use lmw/stmw for saving/restoring non volatile regs

2021-08-24 Thread Segher Boessenkool
Hi! On Tue, Aug 24, 2021 at 07:54:22AM +0200, Christophe Leroy wrote: > Le 23/08/2021 à 20:46, Segher Boessenkool a écrit : > >On Mon, Aug 23, 2021 at 03:29:12PM +, Christophe Leroy wrote: > >>Instructions lmw/stmw are interesting for functions that are rarely > >>used and not in the cache, be

Re: [PATCH v2 2/3] selftests/powerpc: Add test for real address error handling

2021-08-24 Thread Michael Ellerman
Ganesh Goudar writes: > Add test for real address or control memory address access > error handling, using NX-GZIP engine. > > The error is injected by accessing the control memory address > using illegal instruction, on successful handling the process > attempting to access control memory address

Re: [PATCH 3/3] powerpc/smp: Enable CACHE domain for shared processor

2021-08-24 Thread Gautham R Shenoy
Hello Srikar, On Sat, Aug 21, 2021 at 02:54:19PM +0530, Srikar Dronamraju wrote: [..snip..] The patch looks good to me. Reviewed-by: Gautham R. Shenoy > --- > arch/powerpc/kernel/smp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/smp.c b/arch/p

Re: [PATCH kernel] KVM: PPC: Book3S HV: Make unique debugfs nodename

2021-08-24 Thread Alexey Kardashevskiy
On 18/08/2021 08:20, Fabiano Rosas wrote: Alexey Kardashevskiy writes: On 07/07/2021 14:13, Alexey Kardashevskiy wrote: alternatively move this debugfs stuff under the platform-independent directory, how about that? That's a good idea. I only now realized we have two separate directori

[PATCH v2] powerpc: Avoid link stack corruption in misc asm functions

2021-08-24 Thread Christophe Leroy
bl;mflr is used at several places to get code position. Use bcl 20,31,+4 instead of bl in order to preserve link stack. See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption in __get_datapage()") for details. Signed-off-by: Christophe Leroy --- v2: Use $+4 instead of label ; squas

[PATCH v3] powerpc/booke: Avoid link stack corruption in several places

2021-08-24 Thread Christophe Leroy
Use bcl 20,31,+4 instead of bl in order to preserve link stack. See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption in __get_datapage()") for details. Signed-off-by: Christophe Leroy --- v3: Use $+4 as destination instead of label v2: Added missing ; in LOAD_REG_ADDR_PIC() --- a

Re: [PATCH v2 03/12] x86/sev: Add an x86 version of prot_guest_has()

2021-08-24 Thread Christoph Hellwig
On Thu, Aug 19, 2021 at 01:33:09PM -0500, Tom Lendacky wrote: > I did it as inline originally because the presence of the function will be > decided based on the ARCH_HAS_PROTECTED_GUEST config. For now, that is > only selected by the AMD memory encryption support, so if I went out of > line I coul