[PATCH 9/9] powerpc/64s: Work around llvm-as not recognising pla

2023-04-25 Thread Nicholas Piggin
llvm-as does not recognise the pla mnemonic, which is used for pcrel address generation. Use the equivalent paddi opcode instead. Clang can not build working pcrel kernels yet, but this patch does allow it to build a non-working pcrel kernel with llvm-as. This could be unconditional or use a raw e

[PATCH 8/9] powerpc/64s: Permit d-form memops in asm when building with prefix on clang

2023-04-25 Thread Nicholas Piggin
GCC appears to have a bug where it generates immediate offsets beyond the 16-bit range of d-form memory operations in extended inline asm when prefix instructions are enabled. So simpler fallback asm is implemented for CONFIG_PPC_KERNEL_PREFIXED builds for now. Clang does not have this bug, so thi

[PATCH 7/9] powerpc/build: Remove -pipe from compilation flags

2023-04-25 Thread Nicholas Piggin
x86 removed -pipe in commit 437e88ab8f9e2 ("x86/build: Remove -pipe from KBUILD_CFLAGS") and the newer arm64 and riscv seem to have never used it, so that seems to be the way the world's going. Compile performance building defconfig on a POWER10 PowerNV system was in the noise after 10 builds each

[PATCH 6/9] powerpc/boot: clean up Makefile flags

2023-04-25 Thread Nicholas Piggin
Tidy pass over boot Makefile. Move variables together where possible. Signed-off-by: Nicholas Piggin --- arch/powerpc/boot/Makefile | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 99f56

[PATCH 6/9] powerpc/boot: Clean up Makefile after cflags and asflags separation

2023-04-25 Thread Nicholas Piggin
Tidy pass over boot Makefile. Move variables together where possible. Signed-off-by: Nicholas Piggin --- arch/powerpc/boot/Makefile | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 99f56

[PATCH 5/9] powerpc/boot: Separate BOOTCFLAGS from BOOTASFLAGS

2023-04-25 Thread Nicholas Piggin
BOOTCFLAGS no longer contains anything that BOOTASFLAGS needs (except -pipe). Separate them to avoid fragility with cross-contamination of flags which has caused several build problems. Suggested-by: Linus Torvalds Link: https://lore.kernel.org/lkml/CAHk-=whywudjdeobn1hrwyskqkvzyiq5rbsw5rjjexgnb

[PATCH 4/9] powerpc/boot: Seperate CPP flags from BOOTCFLAGS

2023-04-25 Thread Nicholas Piggin
Add BOOTCPPFLAGS variable for the CPP options required by C and AS. Signed-off-by: Nicholas Piggin --- arch/powerpc/boot/Makefile | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 84a5b630c739..bfeb7a9

[PATCH 3/9] powerpc/boot: Seperate target flags from BOOTCFLAGS

2023-04-25 Thread Nicholas Piggin
Add BOOTTARGETFLAGS variable with target / ABI options common to CFLAGS and AFLAGS. Signed-off-by: Nicholas Piggin --- arch/powerpc/boot/Makefile | 40 -- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc

[PATCH 2/9] powerpc/64s: Disable pcrel code model on Clang

2023-04-25 Thread Nicholas Piggin
Clang has a bug that casues the pcrel code model not to be used when any of -msoft-float, -mno-altivec, or -mno-vsx are set. Leaving these off causes FP/vector instructions to be generated, causing crashes. So disable pcrel for clang for now. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconf

[PATCH 1/9] powerpc: Fix merge conflict between pcrel and copy_thread changes

2023-04-25 Thread Nicholas Piggin
Fix a conflict between commit 4e991e3c16a35 ("powerpc: add CFUNC assembly label annotation") and commit b504b6aade040 ("powerpc: differentiate kthread from user kernel thread start"). Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/interrupt_64.S | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 0/9] powerpc: Build fixes

2023-04-25 Thread Nicholas Piggin
This series is against powerpc next. The first two patches are independent build fixes for recent patches. Patches 3-5 separate boot Makefile BOOTCFLAGS and BOOTASFLAGS and stops passing some C code generation flags to the assembler which causes some warnings for llvm. Patches 6-9 are not fixes but

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Wed, Apr 26, 2023 at 10:15 AM Joel Fernandes wrote: > > Hi Zhouyi, > > On Wed, Apr 26, 2023 at 09:31:17AM +0800, Zhouyi Zhou wrote: > [..] > > Joel makes the learning process easier for me, indeed! > > I know that feeling being a learner myself ;-) > > > One question I have tried very hard to u

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
Hi Zhouyi, On Wed, Apr 26, 2023 at 09:31:17AM +0800, Zhouyi Zhou wrote: [..] > Joel makes the learning process easier for me, indeed! I know that feeling being a learner myself ;-) > One question I have tried very hard to understand, but still confused. > for now, I know > r13 is fixed, but r1 i

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Wed, Apr 26, 2023 at 8:33 AM Joel Fernandes wrote: > > On Tue, Apr 25, 2023 at 9:50 AM Zhouyi Zhou wrote: > > > > Hi > > > > On Tue, Apr 25, 2023 at 9:40 PM Christophe Leroy > > wrote: > > > > > > > > > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > > > On Tue, Apr 25, 2023 at 6:58

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 9:40 AM Christophe Leroy wrote: > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > >> > >> hi > >> > >> On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra > >> wrote: > >>> > >>> On Mon, Apr 24, 2023 at 02:55:11PM

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 9:50 AM Zhouyi Zhou wrote: > > Hi > > On Tue, Apr 25, 2023 at 9:40 PM Christophe Leroy > wrote: > > > > > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > > >> > > >> hi > > >> > > >> On Tue, Apr 25, 2023 at

Re: [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes

2023-04-25 Thread Sean Anderson
On 4/25/23 15:50, Vladimir Oltean wrote: > Hello, > > On Thu, 13 Apr 2023 12:05:52 -0400, Sean Anderson wrote: >> This series is ready for review by the phy maintainers. I have addressed >> all known feedback and there are no outstanding issues. >> >> Major reconfiguration of baud rate (e.g. 1G->

Re: [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes

2023-04-25 Thread Vladimir Oltean
Hello, On Thu, 13 Apr 2023 12:05:52 -0400, Sean Anderson wrote: > This series is ready for review by the phy maintainers. I have addressed > all known feedback and there are no outstanding issues. > > Major reconfiguration of baud rate (e.g. 1G->10G) does not work. > > There are several stand-al

Re: [PATCH v3 02/14] arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER

2023-04-25 Thread Justin Forbes
On Tue, Apr 18, 2023 at 5:22 PM Andrew Morton wrote: > > On Wed, 12 Apr 2023 18:27:08 +0100 Catalin Marinas > wrote: > > > > It sounds nice in theory. In practice. EXPERT hides too much. When you > > > flip expert, you expose over a 175ish new config options which are > > > hidden behind EXPERT.

Re: [PATCH v2] powerpc/bpf: populate extable entries only during the last pass

2023-04-25 Thread Naveen N. Rao
Hari Bathini wrote: Since commit 85e031154c7c ("powerpc/bpf: Perform complete extra passes to update addresses"), two additional passes are performed to avoid space and CPU time wastage on powerpc. But these extra passes led to WARN_ON_ONCE() hits in bpf_add_extable_entry() as extable entries are

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
Hi On Tue, Apr 25, 2023 at 9:40 PM Christophe Leroy wrote: > > > > Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > >> > >> hi > >> > >> On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra > >> wrote: > >>> > >>> On Mon, Apr 24, 2023 at 02:55:

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Christophe Leroy
Le 25/04/2023 à 13:06, Joel Fernandes a écrit : > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: >> >> hi >> >> On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: >>> >>> On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: This is amazing debugging Boqun, like a boss! On

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Christophe Leroy
Le 25/04/2023 à 13:53, Peter Zijlstra a écrit : > On Tue, Apr 25, 2023 at 06:59:29AM -0400, Joel Fernandes wrote: >>> I'm a little confused; the way I understand the whole stack protector >>> thing to work is that we push a canary on the stack at call and on >>> return check it is still valid. Si

Re: [PATCH 1/5] An optimized Chacha20 implementation with 8-way unrolling for ppc64le.

2023-04-25 Thread Danny Tsen
Hi Michael, It's in IBM repo. Thanks. -Danny On 4/25/23 7:02 AM, Michael Ellerman wrote: Danny Tsen writes: This is recommended template to use for IBM copyright. According to who? The documentation I've seen specifies "IBM Corp." or "IBM Corporation". cheers

Re: [PATCH 5/5] Update Kconfig and Makefile.

2023-04-25 Thread Danny Tsen
I was not sure at the time when I use IS_REACHABLE.  Will fix it in init code. Thanks. -Danny On 4/25/23 12:46 AM, Herbert Xu wrote: On Mon, Apr 24, 2023 at 02:47:26PM -0400, Danny Tsen wrote: +config CRYPTO_CHACHA20_P10 + tristate "Ciphers: ChaCha20, XChacha20, XChacha12 (P10 or later

Re: [PATCH 1/5] An optimized Chacha20 implementation with 8-way unrolling for ppc64le.

2023-04-25 Thread Michael Ellerman
Danny Tsen writes: > This is recommended template to use for IBM copyright. According to who? The documentation I've seen specifies "IBM Corp." or "IBM Corporation". cheers

Re: [PATCH 4/5] Glue code for optmized Poly1305 implementation for ppc64le.

2023-04-25 Thread Danny Tsen
Did not notice that.  Will do fix it. Thanks. -Danny On 4/25/23 12:44 AM, Herbert Xu wrote: On Mon, Apr 24, 2023 at 02:47:25PM -0400, Danny Tsen wrote: + if (likely(srclen >= POLY1305_BLOCK_SIZE)) { + bytes = round_down(srclen, POLY1305_BLOCK_SIZE); + used =

Re: [PATCH 2/5] Glue code for optmized Chacha20 implementation for ppc64le.

2023-04-25 Thread Danny Tsen
Got it.  Will fix it. Thanks. -Danny On 4/25/23 12:41 AM, Herbert Xu wrote: On Mon, Apr 24, 2023 at 02:47:23PM -0400, Danny Tsen wrote: +static int chacha_p10_stream_xor(struct skcipher_request *req, +const struct chacha_ctx *ctx, const u8 *iv) +{ + stru

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2023 at 06:59:29AM -0400, Joel Fernandes wrote: > > I'm a little confused; the way I understand the whole stack protector > > thing to work is that we push a canary on the stack at call and on > > return check it is still valid. Since in general tasks randomly migrate, > > the per-c

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Tue, Apr 25, 2023 at 7:06 PM Joel Fernandes wrote: > > On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > > > > hi > > > > On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: > > > > > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > > > This is amazing debugging Boqu

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 6:58 AM Zhouyi Zhou wrote: > > hi > > On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: > > > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > > This is amazing debugging Boqun, like a boss! One comment below: > > > > > > > > > Or something simple

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Joel Fernandes
On Tue, Apr 25, 2023 at 6:13 AM Peter Zijlstra wrote: > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > This is amazing debugging Boqun, like a boss! One comment below: > > > > > > > Or something simple I haven't thought of? :) > > > > > > > > At what points can r13 change?

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
hi On Tue, Apr 25, 2023 at 6:13 PM Peter Zijlstra wrote: > > On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > > This is amazing debugging Boqun, like a boss! One comment below: > > > > > > > Or something simple I haven't thought of? :) > > > > > > > > At what points can r13 chang

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Peter Zijlstra
On Mon, Apr 24, 2023 at 02:55:11PM -0400, Joel Fernandes wrote: > This is amazing debugging Boqun, like a boss! One comment below: > > > > > Or something simple I haven't thought of? :) > > > > > > At what points can r13 change? Only when some particular functions are > > > called? > > > > > > >

Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail

2023-04-25 Thread Zhouyi Zhou
On Tue, Apr 25, 2023 at 2:01 PM Zhouyi Zhou wrote: > > hi > > On Tue, Apr 25, 2023 at 6:07 AM Michael Ellerman wrote: > > > > Zhouyi Zhou writes: > > > Dear PowerPC and RCU developers: > > > During the RCU torture test on mainline (on the VM of Opensource Lab > > > of Oregon State University), S

Re: [PATCH] powerpc/bpf: populate extable entries only during the last pass

2023-04-25 Thread Hari Bathini
Hi Naveen, On 24/04/23 5:25 pm, Naveen N. Rao wrote: Hari Bathini wrote: Hello Christophe, Thanks for the review. On 07/04/23 11:31 am, Christophe Leroy wrote: Le 06/04/2023 à 09:35, Hari Bathini a écrit : Since commit 85e031154c7c ("powerpc/bpf: Perform complete extra passes to update ad

[PATCH v2] powerpc/bpf: populate extable entries only during the last pass

2023-04-25 Thread Hari Bathini
Since commit 85e031154c7c ("powerpc/bpf: Perform complete extra passes to update addresses"), two additional passes are performed to avoid space and CPU time wastage on powerpc. But these extra passes led to WARN_ON_ONCE() hits in bpf_add_extable_entry() as extable entries are populated again, duri