Re: [PATCH v4 1/5] powerpc/smp: Enable Asym packing for cores on shared processor

2023-11-14 Thread Aneesh Kumar K.V
Srikar Dronamraju writes: > If there are shared processor LPARs, underlying Hypervisor can have more > virtual cores to handle than actual physical cores. > > Starting with Power 9, a big core (aka SMT8 core) has 2 nearly > independent thread groups. On a shared processors LPARs, it helps to >

Re: [PATCH v4 0/5] powerpc/smp: Topology and shared processor optimizations

2023-11-14 Thread Srikar Dronamraju
* Aneesh Kumar K.V [2023-11-15 11:24:59]: > Srikar Dronamraju writes: > > > PowerVM systems configured in shared processors mode have some unique > > challenges. Some device-tree properties will be missing on a shared > > processor. Hence some sched domains may not make sense for shared

Re: [PATCH v4 0/5] powerpc/smp: Topology and shared processor optimizations

2023-11-14 Thread Aneesh Kumar K.V
Srikar Dronamraju writes: > PowerVM systems configured in shared processors mode have some unique > challenges. Some device-tree properties will be missing on a shared > processor. Hence some sched domains may not make sense for shared processor > systems. > > Most shared processor systems are

Re: [PATCH v4 1/5] powerpc/smp: Enable Asym packing for cores on shared processor

2023-11-14 Thread Srikar Dronamraju
* Aneesh Kumar K.V [2023-11-15 10:57:08]: > Srikar Dronamraju writes: > > > If there are shared processor LPARs, underlying Hypervisor can have more > > virtual cores to handle than actual physical cores. > > > > Starting with Power 9, a big core (aka SMT8 core) has 2 nearly > > independent

Re: [PATCH v4 1/5] powerpc/smp: Enable Asym packing for cores on shared processor

2023-11-14 Thread Aneesh Kumar K.V
Srikar Dronamraju writes: > If there are shared processor LPARs, underlying Hypervisor can have more > virtual cores to handle than actual physical cores. > > Starting with Power 9, a big core (aka SMT8 core) has 2 nearly > independent thread groups. On a shared processors LPARs, it helps to >

Re: [PATCH v5 1/3] powerpc: make fadump resilient with memory add/remove events

2023-11-14 Thread Aneesh Kumar K.V
Sourabh Jain writes: > diff --git a/arch/powerpc/include/asm/fadump-internal.h > b/arch/powerpc/include/asm/fadump-internal.h > index 27f9e11eda28..7be3d8894520 100644 > --- a/arch/powerpc/include/asm/fadump-internal.h > +++ b/arch/powerpc/include/asm/fadump-internal.h > @@ -42,7 +42,25

Re: [PATCH] lazy tlb: consolidate lazy tlb mm switching fix

2023-11-14 Thread Nicholas Piggin
On Fri Oct 13, 2023 at 11:12 PM AEST, Christophe Leroy wrote: > > > Le 07/06/2023 à 02:56, Nicholas Piggin a écrit : > > Fix an upstream powerpc bug that was discovered with a WARN_ON added in > > "lazy tlb: consolidate lazy tlb mm switching": > > > > Switching mm and tinkering with

Re: [PATCH] powerpc: Fix data corruption on IPI

2023-11-14 Thread Nicholas Piggin
(Sorry I didn't see that Michael already made the same comment, ignore my previous.) On Wed Nov 15, 2023 at 7:32 AM AEST, Timothy Pearson wrote: > > > - Original Message - > > From: "Michael Ellerman" > > To: "Timothy Pearson" , "linuxppc-dev" > > > > Cc: "Jens Axboe" > > Sent:

Re: [PATCH 1/7] kexec_file: add kexec_file flag to control debug printing

2023-11-14 Thread Baoquan He
On 11/14/23 at 08:03am, Joe Perches wrote: > On Tue, 2023-11-14 at 23:32 +0800, Baoquan He wrote: > > When specifying 'kexec -c -d', kexec_load interface will print loading > > information, e.g the regions where kernel/initrd/purgatory/cmdline > > are put, the memmap passed to 2nd kernel taken as

Re: [PATCH 1/2] resource: add walk_system_ram_res_rev()

2023-11-14 Thread Baoquan He
On 11/14/23 at 03:17pm, Andrew Morton wrote: > On Tue, 14 Nov 2023 17:16:57 +0800 Baoquan He wrote: > > > This function, being a variant of walk_system_ram_res() introduced in > > commit 8c86e70acead ("resource: provide new functions to walk through > > resources"), walks through a list of all

Re: [PATCH 1/2] resource: add walk_system_ram_res_rev()

2023-11-14 Thread Andrew Morton
On Tue, 14 Nov 2023 17:16:57 +0800 Baoquan He wrote: > This function, being a variant of walk_system_ram_res() introduced in > commit 8c86e70acead ("resource: provide new functions to walk through > resources"), walks through a list of all the resources of System RAM > in reversed order, i.e.,

Re: [PATCH] powerpc: Fix data corruption on IPI

2023-11-14 Thread Timothy Pearson
- Original Message - > From: "Michael Ellerman" > To: "Timothy Pearson" , "linuxppc-dev" > > Cc: "Jens Axboe" > Sent: Tuesday, November 14, 2023 6:14:37 AM > Subject: Re: [PATCH] powerpc: Fix data corruption on IPI > Hi Timothy, > > Thanks for debugging this, but I'm unclear why

[PATCH v2 2/5] powerpc/rtas: Remove unused rtas_service_present()

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch rtas_service_present() has no more users. rtas_function_implemented() is now the appropriate API for determining whether a given RTAS function is available to call. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - arch/powerpc/kernel/rtas.c | 5

[PATCH v2 5/5] powerpc/rtas: Remove 'extern' from function declarations in rtas.h

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch This header occasionally gains new function declarations without the leading extern in accordance with current style rules. Leaving the legacy externs in place is making the header more difficult to read over time because of the inconsistency. Remove them, fixing up checkpatch

[PATCH v2 3/5] powerpc/rtas: Move post_mobility_fixup() declaration to pseries

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch This is a pseries-specific function declaration that doesn't belong in rtas.h. Move it to the pseries platform code and adjust pseries/suspend.c accordingly. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 -

[PATCH v2 0/5] powerpc/rtas: Trivial and coding style fixes

2023-11-14 Thread Nathan Lynch via B4 Relay
* Make minor coding style adjustments for readability. * Remove rtas_service_present() and an old call_rtas() declaration. * Move a pseries-specific function prototype to pseries code. --- Changes in v2: - Address various checkpatch issues missed in v1. - Drop kernel-doc fixes already applied. -

[PATCH v2 1/5] powerpc/rtas: Drop declaration of undefined call_rtas() function

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch The call_rtas() function has never been a part of arch/powerpc, and its implementation was removed from arch/ppc by commit 0a26b1364f14 ("ppc: Remove CHRP, POWER3 and POWER4 support from arch/ppc"). Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 2 -- 1

[PATCH v2 4/5] powerpc/rtas: Remove trailing space

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Use scripts/cleanfile to remove instances of trailing space in the core RTAS code and header. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 6 +++--- arch/powerpc/kernel/rtas.c | 18 +- 2 files changed, 12 insertions(+), 12

[PATCH 0/3] powerpc/pseries/memhp: Fix minor bugs and improve error logging

2023-11-14 Thread Nathan Lynch via B4 Relay
: Log more error conditions in add path arch/powerpc/platforms/pseries/hotplug-memory.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) --- base-commit: 707df298cbde200b939c70be2577b20775fe3345 change-id: 20231114-pseries-memhp-fixes-185988dde2a0 Best regards, -- Nathan

[PATCH 3/3] powerpc/pseries/memhp: Log more error conditions in add path

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch When an add operation for multiple LMBs fails, there is currently little indication from the kernel of what went wrong. Be a little more verbose about error conditions in the add paths. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/hotplug-memory.c | 7

[PATCH 1/3] powerpc/pseries/memhp: Fix access beyond end of drmem array

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch dlpar_memory_remove_by_index() may access beyond the bounds of the drmem lmb array when the LMB lookup fails to match an entry with the given DRC index. When the search fails, the cursor is left pointing to _info->lmbs[drmem_info->n_lmbs], which is one element past the last

[PATCH 2/3] powerpc/pseries/memhp: Remove unbalanced dlpar_release_drc() call

2023-11-14 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Callers of dlpar_add_lmb() are responsible for first acquiring the DRC and releasing it if dlpar_add_lmb() fails. However, dlpar_add_lmb() performs a dlpar_release_drc() in one error branch. There is no corresponding dlpar_acquire_drc() in the function, nor is there any

Re: [PATCH 1/7] kexec_file: add kexec_file flag to control debug printing

2023-11-14 Thread Joe Perches
On Tue, 2023-11-14 at 23:32 +0800, Baoquan He wrote: > When specifying 'kexec -c -d', kexec_load interface will print loading > information, e.g the regions where kernel/initrd/purgatory/cmdline > are put, the memmap passed to 2nd kernel taken as system RAM ranges, > and printing all contents of

Re: [PATCH] powerpc/sched: Cleanup vcpu_is_preempted()

2023-11-14 Thread Srikar Dronamraju
* Aneesh Kumar K V [2023-11-14 15:45:35]: > On 11/14/23 3:16 PM, Srikar Dronamraju wrote: > > * Aneesh Kumar K.V [2023-11-14 12:42:19]: > > > >> No functional change in this patch. A helper is added to find if > >> vcpu is dispatched by hypervisor. Use that instead of opencoding. > >> Also

[PATCH 7/7] kexec_file, parisc: print out debugging message if required

2023-11-14 Thread Baoquan He
Replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Signed-off-by: Baoquan He --- arch/parisc/kernel/kexec_file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/parisc/kernel/kexec_file.c b/arch/parisc/kernel/kexec_file.c

[PATCH 4/7] kexec_file, arm64: print out debugging message if required

2023-11-14 Thread Baoquan He
Replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also remove the kimage->segment[] printing because the generic code has done the printing. Signed-off-by: Baoquan He --- arch/arm64/kernel/kexec_image.c| 2 +-

[PATCH 6/7] kexec_file, power: print out debugging message if required

2023-11-14 Thread Baoquan He
Replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Signed-off-by: Baoquan He --- arch/powerpc/kexec/elf_64.c | 8 arch/powerpc/kexec/file_load_64.c | 14 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH 3/7] kexec_file, x86: print out debugging message if required

2023-11-14 Thread Baoquan He
Replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also print out e820 memmap passed to 2nd kernel just as kexec_load interface has been doing. Signed-off-by: Baoquan He --- arch/x86/kernel/crash.c | 2 +-

[PATCH 5/7] kexec_file, ricv: print out debugging message if required

2023-11-14 Thread Baoquan He
Replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also remove kexec_image_info() because the content has been printed out in generic code. Signed-off-by: Baoquan He --- arch/riscv/kernel/elf_kexec.c | 9 +

[PATCH 1/7] kexec_file: add kexec_file flag to control debug printing

2023-11-14 Thread Baoquan He
When specifying 'kexec -c -d', kexec_load interface will print loading information, e.g the regions where kernel/initrd/purgatory/cmdline are put, the memmap passed to 2nd kernel taken as system RAM ranges, and printing all contents of struct kexec_segment, etc. These are very helpful for

[PATCH 0/7] kexec_file: print out debugging message if required

2023-11-14 Thread Baoquan He
Currently, specifying '-d' will print a lot of debugging information about kexec/kdump loading with kexec_load interface. However, kexec_file_load prints nothing even though '-d' is specified. It's very inconvenient to debug or analyze the kexec/kdump loading when something wrong happened with

[PATCH 2/7] kexec_file: print out debugging message if required

2023-11-14 Thread Baoquan He
Replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also print out type/start/head of kimage and flags to help debug. Signed-off-by: Baoquan He --- kernel/crash_core.c| 3 ++- kernel/kexec_file.c| 7 ++-

Re: [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions

2023-11-14 Thread Frederic Barrat
On 13/11/2023 02:45, Li zeming wrote: The link pointer does not need to cast the type. Signed-off-by: Li zeming --- Acked-by: Frederic Barrat Fred drivers/misc/ocxl/link.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

Re: [PATCH] misc: ocxl: afu_irq: Remove unnecessary (void*) conversions

2023-11-14 Thread Frederic Barrat
On 13/11/2023 02:22, Li zeming wrote: The irq pointer does not need to cast the type. Signed-off-by: Li zeming --- Acked-by: Frederic Barrat Fred drivers/misc/ocxl/afu_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/afu_irq.c

Re: [PATCH] misc: ocxl: context: Remove unnecessary (void*) conversions

2023-11-14 Thread Frederic Barrat
On 13/11/2023 02:15, Li zeming wrote: The ctx pointer does not need to cast the type. Signed-off-by: Li zeming --- Indeed, it's useless. Acked-by: Frederic Barrat drivers/misc/ocxl/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] powerpc: Fix data corruption on IPI

2023-11-14 Thread Michael Ellerman
Hi Timothy, Thanks for debugging this, but I'm unclear why this is helping because we should already have a full barrier (hwsync) on both the sending and receiving side. More below. Timothy Pearson writes: > From 0b2678b7cdada1a3d9aec8626f31a988d81373fa Mon Sep 17 00:00:00 2001 > From: Timothy

Re: Fbdev issue after the drm updates 'drm-next-2023-10-31-1'

2023-11-14 Thread Christian Zigotzky
On 13 November 2023 at 01:48 pm, Geert Uytterhoeven wrote: Thanks for your report! I can confirm there is no graphics output with m68k/virt, and bisected this to my own commit 6ae2ff23aa43a0c4 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()"), ouch... It turns out the old

Re: [PATCH] powerpc/sched: Cleanup vcpu_is_preempted()

2023-11-14 Thread Aneesh Kumar K V
On 11/14/23 3:16 PM, Srikar Dronamraju wrote: > * Aneesh Kumar K.V [2023-11-14 12:42:19]: > >> No functional change in this patch. A helper is added to find if >> vcpu is dispatched by hypervisor. Use that instead of opencoding. >> Also clarify some of the comments. >> >> Signed-off-by: Aneesh

Re: [PATCH] powerpc/sched: Cleanup vcpu_is_preempted()

2023-11-14 Thread Srikar Dronamraju
* Aneesh Kumar K.V [2023-11-14 12:42:19]: > No functional change in this patch. A helper is added to find if > vcpu is dispatched by hypervisor. Use that instead of opencoding. > Also clarify some of the comments. > > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/paravirt.h

Re: [PATCH] powerpc/sched: Cleanup vcpu_is_preempted()

2023-11-14 Thread Aneesh Kumar K V
On 11/14/23 2:53 PM, Shrikanth Hegde wrote: > > > On 11/14/23 12:42 PM, Aneesh Kumar K.V wrote: >> No functional change in this patch. A helper is added to find if >> vcpu is dispatched by hypervisor. Use that instead of opencoding. >> Also clarify some of the comments. >> >> Signed-off-by:

Re: [PATCH] powerpc/sched: Cleanup vcpu_is_preempted()

2023-11-14 Thread Shrikanth Hegde
On 11/14/23 12:42 PM, Aneesh Kumar K.V wrote: > No functional change in this patch. A helper is added to find if > vcpu is dispatched by hypervisor. Use that instead of opencoding. > Also clarify some of the comments. > > Signed-off-by: Aneesh Kumar K.V > --- >

[PATCH 2/2] kexec_file: Load kernel at top of system RAM if required

2023-11-14 Thread Baoquan He
Kexec_load interface has been doing top down searching and loading kernel/initrd/purgtory etc to prepare for kexec reboot. In that way, the benefits are that it avoids to consume and fragment limited low memory which satisfy DMA buffer allocation and big chunk of continuous memory during system

[PATCH 1/2] resource: add walk_system_ram_res_rev()

2023-11-14 Thread Baoquan He
This function, being a variant of walk_system_ram_res() introduced in commit 8c86e70acead ("resource: provide new functions to walk through resources"), walks through a list of all the resources of System RAM in reversed order, i.e., from higher to lower. It will be used in kexec_file code to

[PATCH 0/2] kexec_file: Load kernel at top of system RAM if required

2023-11-14 Thread Baoquan He
Justification: == Kexec_load interface has been doing top down searching and loading kernel/initrd/purgtory etc to prepare for kexec reboot. In that way, the benefits are that it avoids to consume and fragment limited low memory which satisfy DMA buffer allocation and big chunk of

[PATCH] powerpc: Restrict ARCH_HIBERNATION_POSSIBLE to supported configurations

2023-11-14 Thread Vishal Chourasia
This patch modifies the ARCH_HIBERNATION_POSSIBLE option to ensure that it correctly depends on these PowerPC configurations being enabled. As a result, it prevents the HOTPLUG_CPU from being selected when the required dependencies are not satisfied. This change aligns the dependency tree with

[PATCH] powerpc: Fix data corruption on IPI

2023-11-14 Thread Timothy Pearson
>From 0b2678b7cdada1a3d9aec8626f31a988d81373fa Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 13 Nov 2023 22:42:58 -0600 Subject: [PATCH] powerpc: Fix data corruption on IPI On multithreaded SMP workloads such as those using io_uring, it is possible for multiple threads to hold an

Re: [PATCH] powerpc: Fix data corruption on IPI

2023-11-14 Thread Timothy Pearson
- Original Message - > From: "Salvatore Bonaccorso" > To: "Timothy Pearson" > Cc: "Linuxppc-dev" > , "Jens > Axboe" > , "regressions" , "Michael > Ellerman" , "npiggin" > , "christophe leroy" > Sent: Tuesday, November 14, 2023 1:59:14 AM > Subject: Re: [PATCH] powerpc: Fix data