[PATCH] powerpc/powernv/pci: Do setup dev PE in pnv_pci_enable_device_hook

2023-11-26 Thread Luming Yu
0.0 pci_enable_device() blocked, no PE assigned. It appears that the pci_dn object is reused with only pe_number clobbered in the case. And a simple call to pnv_ioda_setup_dev_PE should get PE number back and solve the problem. Signed-off-by: Luming Yu --- arch/powerpc/platforms/powernv/pci-ioda.c |

[PATCH v1] powerpc/powernv/pci: fix PE in re-used pci_dn for pnv_pci_enable_device_hook

2023-11-27 Thread Luming Yu
0.0 pci_enable_device() blocked, no PE assigned. It appears that the pci_dn object is reused with only pe_number clobbered in the case. And a simple call to pnv_ioda_setup_dev_PE should get PE number back and solve the problem. Signed-off-by: Luming Yu --- v0 -> v1: -clean up garbage leaked in git format

[PATCH 1/2] powerpc/locking: implement this_cpu_cmpxchg local API

2023-12-03 Thread Luming Yu
ppc appears to have already supported cmpxchg-local atomic semantics that is defined by the kernel convention of the feature. Add this_cpu_cmpxchg ppc local for the performance benefit of arch sepcific implementation than asm-generic c verison of the locking API. Signed-off-by: Luming Yu

[PATCH 2/2] powerpc/locking: enable HAVE_CMPXCHG_LOCAL in kconfig

2023-12-03 Thread Luming Yu
enable arch feature HAVE_CMPXCHG_LOCAL for ppc by default Signed-off-by: Luming Yu --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6f105ee4f3cf..c10229c0243c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc

[PATCH 1/1] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER

2023-12-10 Thread Luming Yu
The support for user return notifier infrastructure is hooked into powerpc architecture. --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/entry-common.h | 16 arch/powerpc/include/asm/thread_info.h | 2 ++ arch/powerpc/kernel/process.c | 2

Re: [PATCH 1/2] powerpc/locking: implement this_cpu_cmpxchg local API

2023-12-15 Thread Luming Yu
On Mon, Dec 11, 2023 at 10:40:38PM +1100, Michael Ellerman wrote: > Hi Luming Yu, > > Luming Yu writes: > > ppc appears to have already supported cmpxchg-local atomic semantics > > that is defined by the kernel convention of the feature. > > Add this_cpu_cmpxchg pp

[PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2023-12-17 Thread Luming Yu
Before we have powerpc to use the generic entry infrastructure, the call to fire user return notifier is made temporarily in powerpc entry code. Signed-off-by: Luming Yu --- arch/powerpc/kernel/interrupt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/interrupt.c b

[PATCH v1 1/2] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER

2023-12-17 Thread Luming Yu
The support for user return notifier infrastructure is manually hooked into powerpc architecture. Signed-off-by: Luming Yu --- v0->v1: add user return notifier arch hook manually. --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/entry-common.h |

[PATCH 1/1] powerpc/io: enable dma-contiguous API

2023-12-17 Thread Luming Yu
enable HAVE_DMA_CONTIGUOUS for general use of CMA on powerpc. Signed-off-by: Luming Yu --- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/setup-common.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b968068cc04a

[PATCH 1/1] powerpc/powernv: fix up kernel compile issues

2023-12-24 Thread Luming Yu
up kernel is quite useful to silicon validation, despite it is rare to be found in server productions. the fixes are obvious. Not like IBM pSeries, it may be not necessary to have powernv SMP forced. It is difficult to compile a up kernel for pSerises as I've tried. Signed-off-by: Lumi

[PATCH v1 1/1] powerpc/powernv: fix up kernel compile issues

2024-01-01 Thread Luming Yu
up kernel is quite useful to silicon validation, despite it is rare to be found in server productions. the fixes are obvious. Not like IBM pSeries, it may be not necessary to have powernv SMP forced. It is difficult to compile a up kernel for pSerises as I've tried. Signed-off-by: Lumi

[PATCH v2 1/1] powerpc/powernv: fix non-SMP kernel compile issues

2024-01-07 Thread Luming Yu
ff-by: Luming Yu --- v1->v2: solve powernv nx-common-powernv.c non-SMP kernel compile issue found by lkp bot. v0->v1: solve powernv vas driver non-SMP kernel compile issue found by lkp bot. --- arch/powerpc/platforms/powernv/Kconfig| 1 - arch/powerpc/platforms/powernv/opal-imc.c | 1 + a

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-08-27 Thread Luming Yu
gt; pr_err("can't stop test_user_return > > kthread for cpu %d", i); > > } > > } > > free_percpu(user_return_test); > > return; > > } > > > > module_init(ini

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-08-29 Thread Luming Yu
On Wed, Aug 28, 2024 at 09:27:23AM +0200, Christophe Leroy wrote: > > > Le 28/08/2024 à 08:50, Luming Yu a écrit : > > On Wed, Aug 28, 2024 at 07:46:52AM +0200, Christophe Leroy wrote: > > > Hi, > > > > > > Le 28/08/2024 à 05:17, 虞陆铭 a écrit : > >

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-09-02 Thread Luming Yu
Wed, Aug 28, 2024 at 09:27:23AM +0200, Christophe Leroy wrote: > > > Le 28/08/2024 à 08:50, Luming Yu a écrit : > > On Wed, Aug 28, 2024 at 07:46:52AM +0200, Christophe Leroy wrote: > > > Hi, > > > > > > Le 28/08/2024 à 05:17, 虞陆铭 a écrit : > >

[PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-12 Thread Luming Yu
From: Yu Luming convert powerpc entry code in syscall and fault to use syscall_work and irqentry_state as well as common calls from generic entry infrastructure. Signed-off-by: Luming Yu --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/hw_irq.h | 5 + arch

[PATCH 2/2] powerpc/entry: entry clean up for common entry

2024-09-12 Thread Luming Yu
From: Yu Luming clean up do_syscall_trace_enter/leave and do_seccomp Signed-off-by: Luming Yu --- arch/powerpc/kernel/interrupt.c | 5 - arch/powerpc/kernel/ptrace/ptrace.c | 141 2 files changed, 146 deletions(-) diff --git a/arch/powerpc/kernel

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-12 Thread Luming Yu
On Thu, Sep 12, 2024 at 12:23:29PM +0200, Christophe Leroy wrote: > > > Le 12/09/2024 à 10:24, Luming Yu a écrit : > > From: Yu Luming > > > > convert powerpc entry code in syscall and fault to use syscall_work > > and irqentry_state as well a

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-13 Thread Luming Yu
On Fri, Sep 13, 2024 at 08:54:12AM +0200, Christophe Leroy wrote: > > > Le 13/09/2024 à 03:40, Luming Yu a écrit : > > On Thu, Sep 12, 2024 at 12:23:29PM +0200, Christophe Leroy wrote: > > > > > > > > > Le 12/09/2024 à 10:24, L

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-13 Thread Luming Yu
On Fri, Sep 13, 2024 at 10:30:56AM +0200, Christophe Leroy wrote: > > > Le 13/09/2024 à 09:38, Luming Yu a écrit : > > On Fri, Sep 13, 2024 at 08:54:12AM +0200, Christophe Leroy wrote: > > > > > > > > > Le 13/09/2024 à 03:40, Luming Yu a écrit : > &

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-13 Thread Luming Yu
On Fri, Sep 13, 2024 at 02:15:40PM +0200, Christophe Leroy wrote: > > > Le 13/09/2024 à 14:02, Luming Yu a écrit : > > > > ... > > > nothing happens after that. > > reproduced with ppc64_defconfig > > [0.818972][T1] Run /init as init process

[PATCH 1/7] powerpc/entry: convert to common and generic entry

2024-10-11 Thread Luming Yu
convert powerpc entry code in syscall and fault to use syscall_work and irqentry_state as well as common calls implemented in generic entry infrastructure. Signed-off-by: Luming Yu --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/hw_irq.h | 5 + arch/powerpc

[PATCH 2/7] powerpc/entry: cleanup syscall entry

2024-10-11 Thread Luming Yu
cleanup do_syscall_trace_enter/leave and do_seccomp. Signed-off-by: Luming Yu --- arch/powerpc/kernel/interrupt.c | 5 - arch/powerpc/kernel/ptrace/ptrace.c | 141 2 files changed, 146 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc

[PATCH 5/7] powerpc/entry: add irqentry_state and generic entry support

2024-10-11 Thread Luming Yu
generic irq entry support via generic irqentry is added for powerpc. There may be duplciate calls and missing callbacks requires further work. Signed-off-by: Luming Yu --- arch/powerpc/include/asm/entry-common.h | 32 arch/powerpc/kernel/interrupt.c | 51

[PATCH 7/7] powerpc/entry: fix 32bit compile issue for common entry

2024-10-11 Thread Luming Yu
fix irqentry in 32bit code path and hw_irq helpers. Signed-off-by: Luming Yu --- arch/powerpc/include/asm/hw_irq.h | 6 ++ arch/powerpc/kernel/interrupt.c | 4 include/linux/entry-common.h | 1 + 3 files changed, 11 insertions(+) diff --git a/arch/powerpc/include/asm/hw_irq.h

[PATCH 6/7] powerpc/entry: factout irqentry-state

2024-10-11 Thread Luming Yu
To have lowlevel paca.h include high level entry-common.h cause include file dependency mess. Split irqentry-state.h to have the irqentry_state.h can be included in low level paca.h Signed-off-by: Luming Yu --- arch/powerpc/include/asm/paca.h | 2 ++ arch/powerpc/kernel/interrupt.c | 2

[PATCH 3/7] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER

2024-10-11 Thread Luming Yu
enable the common entry of user return notifier for powerpc as a debug feature. Signed-off-by Luming Yu --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/entry-common.h | 16 arch/powerpc/include/asm/thread_info.h | 2 ++ arch/powerpc/kernel

[PATCH 4/7] powerpc/debug: hook to user return notifier infrastructure

2024-10-11 Thread Luming Yu
calls back to all registered user return notifier functions. Signed-off-by: Luming Yu --- arch/powerpc/kernel/interrupt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index 8c532cecbc60..609ba48034de 100644 --- a/arch

Re: [PATCH 1/7] powerpc/entry: convert to common and generic entry

2024-10-24 Thread Luming Yu
On Thu, Oct 24, 2024 at 04:43:04PM +0800, Luming Yu wrote: > On Wed, Oct 23, 2024 at 12:53:47PM +1100, Michael Ellerman wrote: > > "虞陆铭" writes: > > >>Le 12/10/2024 à 05:56, Luming Yu a écrit : > > >>> convert powerpc entry code in syscall and fault

Re: [PATCH 1/7] powerpc/entry: convert to common and generic entry

2024-11-04 Thread Luming Yu
On Fri, Oct 25, 2024 at 10:50:05AM +0800, Luming Yu wrote: > On Thu, Oct 24, 2024 at 04:43:04PM +0800, Luming Yu wrote: > > On Wed, Oct 23, 2024 at 12:53:47PM +1100, Michael Ellerman wrote: > > > "虞陆铭" writes: > > > >>Le 12/10/2024 à 05:56, Luming Yu a é

Re: [PATCH 6/7] powerpc/entry: factout irqentry-state

2024-11-10 Thread Luming Yu
On Tue, Oct 15, 2024 at 05:42:45PM +0200, Thomas Gleixner wrote: > On Sat, Oct 12 2024 at 11:56, Luming Yu wrote: > > > To have lowlevel paca.h include high level entry-common.h cause > > include file dependency mess. Split irqentry-state.h to have > > the irqentry_state.

[PATCH v2 5/8] powerpc/entry: add irqentry_state and generic entry support

2024-11-10 Thread Luming Yu
generic irq entry support via generic irqentry is added for powerpc. There may be duplciate calls and missing callbacks requires further work. Signed-off-by: Luming Yu --- arch/powerpc/include/asm/entry-common.h | 32 arch/powerpc/kernel/interrupt.c | 51

[PATCH v2 6/8] powerpc/entry: factout irqentry-state

2024-11-10 Thread Luming Yu
To have lowlevel paca.h include high level entry-common.h cause include file dependency mess. Split irqentry-state.h to have the irqentry_state.h can be included in low level paca.h Signed-off-by: Luming Yu --- arch/powerpc/include/asm/paca.h | 2 ++ arch/powerpc/kernel/interrupt.c | 2

[PATCH v2 8/8] powerpc/entry: fix ppc syscall entry issues for common entry

2024-11-10 Thread Luming Yu
syscall_enter_from_user_mode, without touching common code, we have to do our own inference to recover the reasonable route to return, in order to have correct errno and syscall work behaviors,that are tested in seccomp_bpf 98 test cases. Signed-off-by: Luming Yu --- arch/powerpc/kernel/interrupt.c | 4 arch/powerpc

[PATCH v2 7/8] powerpc/entry: fix 32bit compile issue for common entry

2024-11-10 Thread Luming Yu
fix irqentry in 32bit code path and hw_irq helpers. Signed-off-by: Luming Yu --- arch/powerpc/include/asm/hw_irq.h | 6 ++ arch/powerpc/kernel/interrupt.c | 4 include/linux/entry-common.h | 1 + 3 files changed, 11 insertions(+) diff --git a/arch/powerpc/include/asm/hw_irq.h

[PATCH v2 2/8] powerpc/entry: cleanup syscall entry

2024-11-10 Thread Luming Yu
cleanup do_syscall_trace_enter/leave and do_seccomp. Signed-off-by: Luming Yu --- arch/powerpc/kernel/interrupt.c | 5 - arch/powerpc/kernel/ptrace/ptrace.c | 141 2 files changed, 146 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc

[PATCH v2 1/8] powerpc/entry: convert to common and generic entry

2024-11-10 Thread Luming Yu
convert powerpc entry code in syscall and fault to use syscall_work and irqentry_state as well as common calls implemented in generic entry infrastructure. Signed-off-by: Luming Yu --- v1->v2: fix ppc syscall entry seccomp_bpf test errors for common entry conversion. --- arch/powerpc/Kcon

[PATCH v2 3/8] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER

2024-11-10 Thread Luming Yu
enable the common entry of user return notifier for powerpc as a debug feature. Signed-off-by Luming Yu --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/entry-common.h | 16 arch/powerpc/include/asm/thread_info.h | 2 ++ arch/powerpc/kernel

[PATCH v2 4/8] powerpc/debug: hook to user return notifier infrastructure

2024-11-10 Thread Luming Yu
calls back to all registered user return notifier functions. Signed-off-by: Luming Yu --- arch/powerpc/kernel/interrupt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index 8c532cecbc60..609ba48034de 100644 --- a/arch

Re: [PATCH v2 8/8] powerpc/entry: fix ppc syscall entry issues for common entry

2024-11-13 Thread Luming Yu
On Wed, Nov 13, 2024 at 08:06:04AM +0100, Thomas Gleixner wrote: > On Mon, Nov 11 2024 at 11:19, Luming Yu wrote: > > Due to the common layer and internal calls details are hidden from > > the top level at the call side in ppc arch code, there are some > > difficulties

Re: [PATCH 1/7] powerpc/entry: convert to common and generic entry

2024-11-09 Thread Luming Yu
On Thu, Nov 07, 2024 at 11:40:04AM +0800, Luming Yu wrote: > On Tue, Nov 05, 2024 at 12:47:18PM +0800, Luming Yu wrote: > > On Fri, Oct 25, 2024 at 10:50:05AM +0800, Luming Yu wrote: > > > On Thu, Oct 24, 2024 at 04:43:04PM +0800, Luming Yu wrote: > > > > On Wed, Oc

Re: [RFC PATCH] powerpc/tlb: enable arch want batched unmap tlb flush

2024-09-18 Thread Luming Yu
On Thu, Sep 19, 2024 at 01:22:21PM +1000, Michael Ellerman wrote: > Luming Yu writes: > > From: Yu Luming > > > > ppc always do its own tracking for batch tlb. > > I don't think it does? :) > > I think you're referring to the batch handling in &g

Re: [RFC PATCH] powerpc/tlb: enable arch want batched unmap tlb flush

2024-09-22 Thread Luming Yu
On Sun, Sep 22, 2024 at 04:39:53PM +0530, Ritesh Harjani wrote: > Luming Yu writes: > > > From: Yu Luming > > > > ppc always do its own tracking for batch tlb. By trivially enabling > > the ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH in ppc, ppc arch can re-use > > com

[RFC PATCH] powerpc/tlb: enable arch want batched unmap tlb flush

2024-09-18 Thread Luming Yu
-off-by: Luming Yu --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/tlbbatch.h | 30 + 2 files changed, 31 insertions(+) create mode 100644 arch/powerpc/include/asm/tlbbatch.h diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index

Re: [PATCH 1/7] powerpc/entry: convert to common and generic entry

2024-10-24 Thread Luming Yu
On Wed, Oct 23, 2024 at 12:53:47PM +1100, Michael Ellerman wrote: > "虞陆铭" writes: > >>Le 12/10/2024 à 05:56, Luming Yu a écrit : > >>> convert powerpc entry code in syscall and fault to use syscall_work > >>> and irqentry_state as well as c

Re: [PATCH 1/7] powerpc/entry: convert to common and generic entry

2024-11-06 Thread Luming Yu
On Tue, Nov 05, 2024 at 12:47:18PM +0800, Luming Yu wrote: > On Fri, Oct 25, 2024 at 10:50:05AM +0800, Luming Yu wrote: > > On Thu, Oct 24, 2024 at 04:43:04PM +0800, Luming Yu wrote: > > > On Wed, Oct 23, 2024 at 12:53:47PM +1100, Michael Ellerman wrote: > > > > &qu

Re: [PATCH v2 1/2] powerpc: Add preempt lazy support

2024-12-08 Thread Luming Yu
On Mon, Dec 02, 2024 at 12:58:59AM +0530, Shrikanth Hegde wrote: > > > On 11/26/24 16:23, Christophe Leroy wrote: > > > > > > Le 16/11/2024 à 20:23, Shrikanth Hegde a écrit : > > > Define preempt lazy bit for Powerpc. Use bit 9 which is free and within > > > 16 bit range of NEED_RESCHED, so com