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

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

[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/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

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 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-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

[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

[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

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 : > >

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-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

[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

[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 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 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 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 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

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 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

[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/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 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] 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 |