Re: [PATCH v3 1/1] powerpc: Enable dynamic preemption

2025-01-30 Thread Shrikanth Hegde
On 1/31/25 11:39, Christophe Leroy wrote: Le 30/01/2025 à 21:26, Sebastian Andrzej Siewior a écrit : On 2025-01-30 22:27:07 [+0530], Shrikanth Hegde wrote: | #DEFINE need_irq_preemption() \ | (static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) | | if (need_irq_p

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Geert Uytterhoeven
Hi Liam, On Thu, 30 Jan 2025 at 16:17, Liam R. Howlett wrote: > * Geert Uytterhoeven [250130 09:25]: > > On Thu, 30 Jan 2025 at 15:06, Liam R. Howlett > > wrote: > > > > > it is to get m68k to build, you should probably know how to read a > > > > > makefile. > > > > > > > > Like all other kern

Re: [PATCH 5/5] powerpc/microwatt: Add SMP support

2025-01-30 Thread Paul Mackerras
On Wed, Jan 29, 2025 at 11:50:44PM +1100, Michael Ellerman wrote: > Paul Mackerras writes: > There's macros that would make these a little nicer, ie. PPC_RAW_MFSPR() > and PPC_RAW_BRANCH(). Thanks, I'll use them. > > /* enable the other CPUs, they start at location 0 */ > > writel((1ul

Re: [PATCH 5/5] powerpc/microwatt: Add SMP support

2025-01-30 Thread Paul Mackerras
On Wed, Jan 29, 2025 at 06:12:55PM +1000, Nicholas Piggin wrote: > On Wed Jan 29, 2025 at 4:57 PM AEST, Paul Mackerras wrote: > > void __init microwatt_init_smp(void) > > { > > volatile unsigned char __iomem *syscon; > > int ncpus; > > int timeout; > > > > syscon = early_ioremap(SY

Re: [PATCH v3 1/1] powerpc: Enable dynamic preemption

2025-01-30 Thread Sebastian Andrzej Siewior
On 2025-01-30 22:27:07 [+0530], Shrikanth Hegde wrote: > > | #DEFINE need_irq_preemption() \ > > | (static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) > > | > > | if (need_irq_preemption()) { > > > > be a bit smaller/ quicker? This could be a fast path ;) > > I am okay wit

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Andrew Morton
On Wed, 29 Jan 2025 16:28:32 -0500 Tamir Duberstein wrote: > > How are grammar corrections going to the right person (but not the > > mailing list) while an entire conversion to kunit is not [1]? > > Very simple: the tests are not properly included in MAINTAINERS. I > sent > https://lore.kernel

Re: [PATCH v3 1/1] powerpc: Enable dynamic preemption

2025-01-30 Thread Christophe Leroy
Le 30/01/2025 à 21:26, Sebastian Andrzej Siewior a écrit : On 2025-01-30 22:27:07 [+0530], Shrikanth Hegde wrote: | #DEFINE need_irq_preemption() \ | (static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) | | if (need_irq_preemption()) { be a bit smaller/ quicker? Th

[PATCH v2 5/5] powerpc/microwatt: Add SMP support

2025-01-30 Thread Paul Mackerras
This adds support for Microwatt systems with more than one core, and updates the device tree for a 2-core version. The secondary CPUs are started and sent to spin in __secondary_hold very early on, in the platform probe function. The reason for doing this is so that they are there when smp_releas

[PATCH v2 0/5] Microwatt updates

2025-01-30 Thread Paul Mackerras
This patch series updates the kernel support for the Microwatt soft-core and its implementation on FPGA systems, particularly the Digilent Arty A7-100 FPGA development board. Microwatt now supports almost all of the features of the SFFS (Scalar Fixed-point and Floating-point Subset) compliancy sub

[PATCH v2 3/5] powerpc/microwatt: Define an idle power-save function

2025-01-30 Thread Paul Mackerras
This uses the 'wait' instruction to pause instruction execution when idle until an interrupt occurs. Signed-off-by: Paul Mackerras --- v2: Use prep_irq_for_idle_irqsoff() arch/powerpc/platforms/microwatt/setup.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/platforms

[PATCH v2 2/5] powerpc/microwatt: Device-tree updates

2025-01-30 Thread Paul Mackerras
Microwatt now implements ISA v3.1 (SFFS compliancy subset), including prefixed instructions, scv/rfscv, and the FSCR, HFSCR, TAR, and CTRL registers. The privileged mode of operation is now hypervisor mode and there is no privileged non-hypervisor mode; the MSR[HV] bit is forced to 1. Besides upd

[PATCH v2 1/5] powerpc/microwatt: Select COMMON_CLK in order to get the clock framework

2025-01-30 Thread Paul Mackerras
This is to allow us to select Litex MMC host controller driver, which drives the litesdcard gateware. Signed-off-by: Paul Mackerras Acked-by: Nicholas Piggin --- arch/powerpc/platforms/microwatt/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/microwatt/Kconfig

[PATCH v2 4/5] powerpc: Define config option for processors with broadcast TLBIE

2025-01-30 Thread Paul Mackerras
Power ISA v3.0 (and later) implementations in the Linux Compliancy Subset and lower are not required to implement broadcast TLBIE, and in fact Microwatt doesn't. To avoid the need to specify "disable_tlbie" on the kernel command line on SMP Microwatt systems, this defines a config option that asse

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Liam R. Howlett
* Geert Uytterhoeven [250130 08:26]: > Hi Liam, > > On Thu, 30 Jan 2025 at 13:52, Liam R. Howlett wrote: > > * Geert Uytterhoeven [250130 03:21]: > > > On Wed, 29 Jan 2025 at 23:26, Liam R. Howlett > > > wrote: > > > > I've never used the kunit testing of xarray and have used the userspace >

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Lorenzo Stoakes
On Thu, Jan 30, 2025 at 03:38:36PM +0100, Geert Uytterhoeven wrote: > Hi Lorenzo, > > On Thu, 30 Jan 2025 at 15:09, Lorenzo Stoakes > wrote: > > Having written a ton of test code, I've unfortunately encountered a lot of > > this sort of push-back and it's HUGELY off-putting. Writing test code > >

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Liam R. Howlett
* Geert Uytterhoeven [250130 09:25]: > Hi Liam, Hi Geert, I'd like to say sorry for getting upset about this. > > On Thu, 30 Jan 2025 at 15:06, Liam R. Howlett wrote: > > > > I'll await your patch to link all this together. Please Cc the authors. > > I gave it a try for kselftests a few yea

Re: [PATCH v3 1/1] powerpc: Enable dynamic preemption

2025-01-30 Thread Christophe Leroy
Le 30/01/2025 à 15:54, Sebastian Andrzej Siewior a écrit : On 2025-01-06 10:49:19 [+0530], Shrikanth Hegde wrote: --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c @@ -25,6 +25,10 @@ unsigned long global_dbcr0[NR_CPUS]; #endif +#if defined(CONFIG_PREEMPT_DYNAM

Re: [PATCH v3 1/1] powerpc: Enable dynamic preemption

2025-01-30 Thread Sebastian Andrzej Siewior
On 2025-01-30 16:03:09 [+0100], Christophe Leroy wrote: > Le 30/01/2025 à 15:54, Sebastian Andrzej Siewior a écrit : > > On 2025-01-06 10:49:19 [+0530], Shrikanth Hegde wrote: > > > --- a/arch/powerpc/kernel/interrupt.c > > > +++ b/arch/powerpc/kernel/interrupt.c > > > @@ -25,6 +25,10 @@ > > > un

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Matthew Wilcox
On Thu, Jan 30, 2025 at 09:21:12AM +0100, Geert Uytterhoeven wrote: > The long and obscure command line is a red herring: a simple > "modprobe test_xarray" is all it takes... That's all I've ever done. I'm confused/annoyed by all this "let's wrap everything up in some complex and obscure new thin

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Geert Uytterhoeven
Hi Liam, On Thu, 30 Jan 2025 at 15:06, Liam R. Howlett wrote: > * Geert Uytterhoeven [250130 08:26]: > > On Thu, 30 Jan 2025 at 13:52, Liam R. Howlett > > wrote: > > > * Geert Uytterhoeven [250130 03:21]: > > > > On Wed, 29 Jan 2025 at 23:26, Liam R. Howlett > > > > wrote: > > > > > I've ne

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Liam R. Howlett
* Geert Uytterhoeven [250130 03:21]: > Hi Liam, > > On Wed, 29 Jan 2025 at 23:26, Liam R. Howlett wrote: > > I've never used the kunit testing of xarray and have used the userspace > > testing instead, so I can't speak to the obscure invocation as both > > commands seem insanely long and obscure

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Lorenzo Stoakes
Geert, Having written a ton of test code, I've unfortunately encountered a lot of this sort of push-back and it's HUGELY off-putting. Writing test code should be ENCOURAGED not litigated against. The truth is far too little kernel code is tested to any degree, and this is part of why. On kunit c

Re: [PATCH v3 2/6] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-30 Thread Dmitry V. Levin
On Thu, Jan 30, 2025 at 09:33:03AM +0100, Sven Schnelle wrote: > "Dmitry V. Levin" writes: > > > These functions are going to be needed on all HAVE_ARCH_TRACEHOOK > > architectures to implement PTRACE_SET_SYSCALL_INFO API. > > > > This partially reverts commit 7962c2eddbfe ("arch: remove unused >

Re: [PATCH v3 2/6] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-30 Thread Sven Schnelle
"Dmitry V. Levin" writes: > On Thu, Jan 30, 2025 at 09:33:03AM +0100, Sven Schnelle wrote: >> "Dmitry V. Levin" writes: >> >> > These functions are going to be needed on all HAVE_ARCH_TRACEHOOK >> > architectures to implement PTRACE_SET_SYSCALL_INFO API. >> > >> > This partially reverts commit

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Geert Uytterhoeven
Hi Liam, On Thu, 30 Jan 2025 at 13:52, Liam R. Howlett wrote: > * Geert Uytterhoeven [250130 03:21]: > > On Wed, 29 Jan 2025 at 23:26, Liam R. Howlett > > wrote: > > > I've never used the kunit testing of xarray and have used the userspace > > > testing instead, so I can't speak to the obscure

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Geert Uytterhoeven
Hi Lorenzo, On Thu, 30 Jan 2025 at 15:09, Lorenzo Stoakes wrote: > Having written a ton of test code, I've unfortunately encountered a lot of > this sort of push-back and it's HUGELY off-putting. Writing test code > should be ENCOURAGED not litigated against. I am not discouraging nor pushing ba

Re: [PATCH v3 1/1] powerpc: Enable dynamic preemption

2025-01-30 Thread Sebastian Andrzej Siewior
On 2025-01-06 10:49:19 [+0530], Shrikanth Hegde wrote: > --- a/arch/powerpc/kernel/interrupt.c > +++ b/arch/powerpc/kernel/interrupt.c > @@ -25,6 +25,10 @@ > unsigned long global_dbcr0[NR_CPUS]; > #endif > > +#if defined(CONFIG_PREEMPT_DYNAMIC) && > defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) > +

Re: [PATCH v3 1/1] powerpc: Enable dynamic preemption

2025-01-30 Thread Shrikanth Hegde
On 1/30/25 20:24, Sebastian Andrzej Siewior wrote: On 2025-01-06 10:49:19 [+0530], Shrikanth Hegde wrote: --- a/arch/powerpc/kernel/interrupt.c Thanks for taking a look. + #ifdef CONFIG_PPC_BOOK3S_64 DEFINE_STATIC_KEY_FALSE(interrupt_exit_not_reentrant); static inline bool exit_

[PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-01-30 Thread Gaurav Batra
iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM and not for persistent memory (pmemory). For DMA buffers in pmemory, TCEs are dyna

Re: [PATCH v3 2/6] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-30 Thread Sven Schnelle
"Dmitry V. Levin" writes: > These functions are going to be needed on all HAVE_ARCH_TRACEHOOK > architectures to implement PTRACE_SET_SYSCALL_INFO API. > > This partially reverts commit 7962c2eddbfe ("arch: remove unused > function syscall_set_arguments()") by reusing some of old > syscall_set_ar

Re: [PATCH] xarray: port tests to kunit

2025-01-30 Thread Geert Uytterhoeven
Hi Liam, On Wed, 29 Jan 2025 at 23:26, Liam R. Howlett wrote: > I've never used the kunit testing of xarray and have used the userspace > testing instead, so I can't speak to the obscure invocation as both > commands seem insanely long and obscure to me. The long and obscure command line is a re