[powerpc:next] BUILD SUCCESS c28c2d4abdf95655001992c4f52dc243ba00cac3

2022-09-07 Thread kernel test robot
randconfig-a016 riscvrandconfig-r042-20220907 hexagon randconfig-r041-20220907 hexagon randconfig-r045-20220907 s390 randconfig-r044-20220907 i386 randconfig-a002 i386 randconfig

Re: [PATCH v5] livepatch: Clear relocation targets on a module removal

2022-09-07 Thread Russell Currey
On Thu, 2022-09-01 at 08:42 -0400, Joe Lawrence wrote: > On Thu, Sep 01, 2022 at 01:39:02PM +1000, Michael Ellerman wrote: > > Joe Lawrence writes: > > > On Thu, Sep 01, 2022 at 08:30:44AM +1000, Michael Ellerman wrote: > > > > Joe Lawrence writes: > > ... > > > > > > Hi Michael, > > > > > >

[powerpc:fixes-test] BUILD SUCCESS 5f22270db76e8f1726b4287f6c0032d2ad1b9c52

2022-09-07 Thread kernel test robot
randconfig-a014 x86_64randconfig-a016 riscvrandconfig-r042-20220907 hexagon randconfig-r041-20220907 hexagon randconfig-r045-20220907 s390 randconfig-r044-20220907 i386 randconfig-a002 i386

Re: [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang

2022-09-07 Thread Michael Ellerman
Christophe Leroy writes: > Le 21/06/2019 à 10:58, Mathieu Malaterre a écrit : >> When building with clang-8 the frame size limit is hit: >> >>../arch/powerpc/lib/xor_vmx.c:119:6: error: stack frame size of 1200 >> bytes in function '__xor_altivec_5' [-Werror,-Wframe-larger-than=] >> >>

Re: [PATCH v2 0/7] Implement inline static calls on PPC32 - v2

2022-09-07 Thread Benjamin Gray
On Thu, 2022-09-01 at 16:46 +, Christophe Leroy wrote: > Surprisingly, I get worst performance with inline static call than > with > out of line static call: I'm not sure what hackbench is doing, but when microbenchmarking 64 bit out-of-line calls in a loop I saw a similar thing where adding

Re: [v2 PATCH 1/2] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread John Hubbard
On 9/7/22 11:01, Yang Shi wrote: Since general RCU GUP fast was introduced in commit 2667f50e8b81 ("mm: introduce a general RCU get_user_pages_fast()"), a TLB flush is no longer sufficient to handle concurrent GUP-fast in all cases, it only handles traditional IPI-based GUP-fast correctly. On

Re: [PATCH][next] powerpc: Fix fall-through warning for Clang

2022-09-07 Thread Kees Cook
On Tue, Sep 06, 2022 at 10:32:13PM +0100, Gustavo A. R. Silva wrote: > Fix the following fallthrough warning: > > arch/powerpc/platforms/85xx/mpc85xx_cds.c:161:3: warning: unannotated > fall-through between switch labels [-Wimplicit-fallthrough] > > Link:

Re: [PATCH] powerpc/83xx: update kmeter1 defconfig and dts

2022-09-07 Thread Michael Ellerman
Christophe Leroy writes: > Le 16/12/2019 à 10:50, Holger Brunck a écrit : >> From: Matteo Ghidoni >> >> The defconfig is synchronized and the missing >> MTD_PHYSMAP, DEVTMPFS and I2C MUX support are switched on. >> >> Additionally the I2C mux device is added to the DTS with >> its attached

[PATCH] Revert "powerpc/rtas: Implement reentrant rtas call"

2022-09-07 Thread Nathan Lynch
At the time this was submitted by Leonardo, I confirmed -- or thought I had confirmed -- with PowerVM partition firmware development that the following RTAS functions: - ibm,get-xive - ibm,int-off - ibm,int-on - ibm,set-xive were safe to call on multiple CPUs simultaneously, not only with

Re: [PATCH v4 4/4] selftests/hmm-tests: Add test for dirty bits

2022-09-07 Thread John Hubbard
On 9/7/22 04:13, Alistair Popple wrote: + /* +* Attempt to migrate memory to device, which should fail because +* hopefully some pages are backed by swap storage. +*/ + ASSERT_TRUE(hmm_migrate_sys_to_dev(self->fd, buffer, npages)); Are you really sure that

Re: [v2 PATCH 1/2] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread Yang Shi
On Wed, Sep 7, 2022 at 2:22 PM Andrew Morton wrote: > > On Wed, 7 Sep 2022 11:01:43 -0700 Yang Shi wrote: > > > Since general RCU GUP fast was introduced in commit 2667f50e8b81 ("mm: > > introduce a general RCU get_user_pages_fast()"), a TLB flush is no longer > > sufficient to handle

Re: [v2 PATCH 1/2] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread Andrew Morton
On Wed, 7 Sep 2022 11:01:43 -0700 Yang Shi wrote: > Since general RCU GUP fast was introduced in commit 2667f50e8b81 ("mm: > introduce a general RCU get_user_pages_fast()"), a TLB flush is no longer > sufficient to handle concurrent GUP-fast in all cases, it only handles > traditional IPI-based

[powerpc:next 26/63] arch/powerpc/math-emu/math_efp.c:177:5: error: no previous prototype for function 'do_spe_mathemu'

2022-09-07 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next head: c28c2d4abdf95655001992c4f52dc243ba00cac3 commit: 7245fc5bb7a966852d5bd7779d1f5855530b461a [26/63] powerpc/math-emu: Remove -w build flag and fix warnings config: powerpc-tqm8540_defconfig

Re: [v2 PATCH 2/2] powerpc/64s/radix: don't need to broadcast IPI for radix pmd collapse flush

2022-09-07 Thread Peter Xu
On Wed, Sep 07, 2022 at 11:01:44AM -0700, Yang Shi wrote: > The IPI broadcast is used to serialize against fast-GUP, but fast-GUP > will move to use RCU instead of disabling local interrupts in fast-GUP. > Using an IPI is the old-styled way of serializing against fast-GUP > although it still works

Re: [v2 PATCH 2/2] powerpc/64s/radix: don't need to broadcast IPI for radix pmd collapse flush

2022-09-07 Thread David Hildenbrand
On 07.09.22 20:01, Yang Shi wrote: The IPI broadcast is used to serialize against fast-GUP, but fast-GUP will move to use RCU instead of disabling local interrupts in fast-GUP. Using an IPI is the old-styled way of serializing against fast-GUP although it still works as expected now. And

[v2 PATCH 1/2] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread Yang Shi
Since general RCU GUP fast was introduced in commit 2667f50e8b81 ("mm: introduce a general RCU get_user_pages_fast()"), a TLB flush is no longer sufficient to handle concurrent GUP-fast in all cases, it only handles traditional IPI-based GUP-fast correctly. On architectures that send an IPI

[v2 PATCH 2/2] powerpc/64s/radix: don't need to broadcast IPI for radix pmd collapse flush

2022-09-07 Thread Yang Shi
The IPI broadcast is used to serialize against fast-GUP, but fast-GUP will move to use RCU instead of disabling local interrupts in fast-GUP. Using an IPI is the old-styled way of serializing against fast-GUP although it still works as expected now. And fast-GUP now fixed the potential race with

Re: [PATCH] powerpc/83xx: update kmeter1 defconfig and dts

2022-09-07 Thread Christophe Leroy
Le 16/12/2019 à 10:50, Holger Brunck a écrit : > From: Matteo Ghidoni > > The defconfig is synchronized and the missing > MTD_PHYSMAP, DEVTMPFS and I2C MUX support are switched on. > > Additionally the I2C mux device is added to the DTS with > its attached temperature sensors and I2C clock

Re: [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang

2022-09-07 Thread Christophe Leroy
Le 21/06/2019 à 10:58, Mathieu Malaterre a écrit : When building with clang-8 the frame size limit is hit: ../arch/powerpc/lib/xor_vmx.c:119:6: error: stack frame size of 1200 bytes in function '__xor_altivec_5' [-Werror,-Wframe-larger-than=] Follow the same approach as commit

Re: [PATCH v2] powerpc: add compile-time support for lbarx, lharx

2022-09-07 Thread Christophe Leroy
Le 23/06/2021 à 05:28, Nicholas Piggin a écrit : ISA v2.06 (POWER7 and up) as well as e6500 support lbarx and lharx. Add a compile option that allows code to use it, and add support in cmpxchg and xchg 8 and 16 bit values without shifting and masking. Is this this patch still relevant ? If

Re: [PATCH] powerpc/prom: move the device tree to the right space

2022-09-07 Thread Christophe Leroy
Le 03/03/2021 à 06:00, Youlin Song a écrit : > If the device tree has been allocated memory and it will > be in the memblock reserved space.Obviously it is in a > valid memory declaration and will be mapped by the kernel. Could you please provide clearer explanation ? I don't understand what

Re: [PATCH] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread Yang Shi
On Tue, Sep 6, 2022 at 9:51 PM Aneesh Kumar K V wrote: > > On 9/7/22 12:37 AM, Yang Shi wrote: > > On Mon, Sep 5, 2022 at 1:56 AM Aneesh Kumar K.V > > wrote: > >> > >> Yang Shi writes: > >> > >>> > >>> On Fri, Sep 2, 2022 at 9:00 AM Peter Xu wrote: > > On Thu, Sep 01, 2022 at

Re: [RFC PATCH v1] spi: fsl_spi: Convert to transfer_one

2022-09-07 Thread Christophe Leroy
Le 18/08/2022 à 15:38, Christophe Leroy a écrit : > Let the core handle all the chipselect bakery and replace > transfer_one_message() by transfer_one() and prepare_message(). > > At the time being, there is fsl_spi_cs_control() to handle > chipselects. That function handles both GPIO and

Re: [PATCH v3 1/3] dt-bindings: reset: syscon-reboot: Add priority property

2022-09-07 Thread Pali Rohár
On Wednesday 07 September 2022 14:38:42 Krzysztof Kozlowski wrote: > On 31/08/2022 10:17, Pali Rohár wrote: > > This new optional priority property allows to specify custom priority level > > of reset device. Prior this change priority level was hardcoded to 192 and > > not possible to specify or

[RFC PATCH] powerpc/64s: early boot machine check handler

2022-09-07 Thread Nicholas Piggin
This patch re-uses the same trick from the program interrupt in early boot to allow the machine check handler to run before interrupt endian is set up, and branch to an early boot handler (e.g., before ppc_md is set up). MSR[ME] is enabled on the boot CPU earlier, and the machine check stack is

Re: [PATCH] powerpc/pseries: Fix plpks crash on non-pseries

2022-09-07 Thread Nathan Chancellor
On Wed, Sep 07, 2022 at 04:50:38PM +1000, Michael Ellerman wrote: > As reported[1] by Nathan, the recently added plpks driver will crash if > it's built into the kernel and booted on a non-pseries machine, eg > powernv: > > kernel BUG at arch/powerpc/kernel/syscall.c:39! > Oops: Exception in

Re: [PATCH v3 1/3] dt-bindings: reset: syscon-reboot: Add priority property

2022-09-07 Thread Krzysztof Kozlowski
On 31/08/2022 10:17, Pali Rohár wrote: > This new optional priority property allows to specify custom priority level > of reset device. Prior this change priority level was hardcoded to 192 and > not possible to specify or change. Specifying other value is needed for > some boards. Default level

Re: [PATCH 1/3] dt-bindings: reset: syscon-reboot: Add priority property

2022-09-07 Thread Krzysztof Kozlowski
On 02/09/2022 22:37, Rob Herring wrote: >> >> Sorry, I do not understand. > > So just keep sending new versions instead? > > syscon-reboot is not the only binding for a system reset device, right? > So those others reset devices will need 'priority' too. For a given > property, there should

[PATCH 0/2] powerpc/64: more soft-mask improvements

2022-09-07 Thread Nicholas Piggin
These are a couple more improvements while I'm here, I had to rediscover again why disabling softirqs during irq replay is hard, and ran into some bugs trying to find a way to do it. This doesn't solve that, just documents it better and tidies up code a bit. Thanks, Nick Nicholas Piggin (2):

[PATCH 1/2] powerpc/64/interrupt: avoid BUG/WARN recursion in interrupt entry

2022-09-07 Thread Nicholas Piggin
BUG/WARN are handled with a program interrupt which can turn into an infinite recursion when there are bugs in interrupt handler entry (which can be irritated by bugs in other parts of the code). There is one feeble attempt to avoid this recursion, but it misses several cases. Make a tidier macro

[PATCH 2/2] powerpc/64/irq: tidy soft-masked irq replay and improve documentation

2022-09-07 Thread Nicholas Piggin
irq replay is quite complicated because of softirq processing which itself enables and disables irqs. Several considerations need to be accounted for due to this, and they are not clearly documented. Refactor the irq replay code a bit to tidy and deduplicate some common functions. Add comments,

Re: [PATCH] perf: Rewrite core context handling

2022-09-07 Thread Ravi Bangoria
> -static void > -ctx_flexible_sched_in(struct perf_event_context *ctx, > - struct perf_cpu_context *cpuctx) > +/* XXX .busy thingy from Peter's patch */ > +static void ctx_flexible_sched_in(struct perf_event_context *ctx, struct pmu > *pmu) This one turned out to be very easy.

Re: [PATCH v4 4/4] selftests/hmm-tests: Add test for dirty bits

2022-09-07 Thread Alistair Popple
John Hubbard writes: > On 9/1/22 17:35, Alistair Popple wrote: [...] >> +/* >> + * Try and migrate a dirty page that has previously been swapped to disk. >> This >> + * checks that we don't loose dirty bits. > > s/loose/lose/ Thanks. >> + */ >> +TEST_F(hmm, migrate_dirty_page) >> +{ >> +

[PATCH] powerpc: Make PAGE_KERNEL_xxx macros grep-friendly

2022-09-07 Thread Christophe Leroy
Avoid multi-lines to help getting a complete view when using grep. They still remain under the 100 chars limit. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgtable.h | 3 +-- arch/powerpc/include/asm/book3s/64/pgtable.h | 9 +++--

[PATCH] powerpc: Reduce redundancy in pgtable.h

2022-09-07 Thread Christophe Leroy
PAGE_KERNEL_TEXT, PAGE_KERNEL_EXEC and PAGE_AGP are the same for all powerpcs. Remove duplicated definitions. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgtable.h | 19 --- arch/powerpc/include/asm/book3s/64/pgtable.h | 19 ---

Re: [PATCH] powerpc/pseries: Fix plpks crash on non-pseries

2022-09-07 Thread Dan Horák
Hi, I have tested the fix on top of Fedora's kernel-6.0.0-0.rc4.20220906git53e99dcff61e.32.fc38 and systems are booting again. Tested-By: Dan Horák Reviewed-by: Dan Horák With regards, Dan

[PATCH 2/2] powerpc: Rely on generic definition of hugepd_t and is_hugepd when unused

2022-09-07 Thread Christophe Leroy
CONFIG_ARCH_HAS_HUGEPD is used to tell core mm when huge page directories are used. When they are not used, no need to provide hugepd_t or is_hugepd(), just rely on the core mm fallback definition. For that, change core mm behaviour so that CONFIG_ARCH_HAS_HUGEPD is used instead of indirect

[PATCH 1/2] powerpc/nohash: Remove pgd_huge() stub

2022-09-07 Thread Christophe Leroy
linux/hugetlb.h has a fallback pgd_huge() macro for when pgd_huge is not defined. Remove the powerpc redundant definitions. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/pgtable.h | 6 -- arch/powerpc/include/asm/page.h | 1 - 2 files changed, 7 deletions(-)

Re: [PATCH v2 1/3] powerpc/pseries: define driver for Platform KeyStore

2022-09-07 Thread Michael Ellerman
Nathan Chancellor writes: > On Wed, Sep 07, 2022 at 09:23:02AM +1000, Michael Ellerman wrote: >> Nathan Chancellor writes: >> > On Sat, Jul 23, 2022 at 07:30:46AM -0400, Nayna Jain wrote: >> >> PowerVM provides an isolated Platform Keystore(PKS) storage allocation >> >> for each LPAR with

Re: [PATCH] powerpc/mm/book3s/hash: Rename flush_tlb_pmd_range

2022-09-07 Thread Christophe Leroy
Le 07/09/2022 à 10:19, Aneesh Kumar K.V a écrit : > This function does the hash page table update. Hence rename it to > indicate this better to avoid confusion with flush_pmd_tlb_range() > > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 5 ++---

[PATCH] powerpc/mm/book3s/hash: Rename flush_tlb_pmd_range

2022-09-07 Thread Aneesh Kumar K.V
This function does the hash page table update. Hence rename it to indicate this better to avoid confusion with flush_pmd_tlb_range() Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 5 ++--- arch/powerpc/mm/book3s64/hash_pgtable.c| 2 +-

Re: [PATCH linux-next] ocxl: Remove the unneeded result variable

2022-09-07 Thread Andrew Donnellan
On Tue, 2022-09-06 at 07:20 +, cgel@gmail.com wrote: > From: ye xingchen > > Return the value opal_npu_spa_clear_cache() directly instead of > storing > it in another redundant variable. > > Reported-by: Zeal Robot > Signed-off-by: ye xingchen Acked-by: Andrew Donnellan > --- >  

[PATCH] powerpc/pseries: Fix plpks crash on non-pseries

2022-09-07 Thread Michael Ellerman
As reported[1] by Nathan, the recently added plpks driver will crash if it's built into the kernel and booted on a non-pseries machine, eg powernv: kernel BUG at arch/powerpc/kernel/syscall.c:39! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA

[PATCH] powerpc/math-emu: Inhibit W=1 warnings

2022-09-07 Thread Christophe Leroy
When building with W=1 you get: arch/powerpc/math-emu/fre.c:6:5: error: no previous prototype for 'fre' [-Werror=missing-prototypes] arch/powerpc/math-emu/fsqrt.c:11:1: error: no previous prototype for 'fsqrt' [-Werror=missing-prototypes]