Re: [PATCH v3 5/9] powerpc: Use preempt_model_str().

From: Shrikanth Hegde
Date: Mon Feb 10 2025 - 12:33:20 EST




On 2/10/25 19:53, Sebastian Andrzej Siewior wrote:
On 2025-02-10 11:59:50 [+0100], To Shrikanth Hegde wrote:
Thank you for noticing. I did remove it on other architectures, I
somehow missed it here. Will remove it from from the arch code.

This is what I have for powerpc now. I'm going to repost the series,
currently waiting for arm/x86.

-------->8-----------

Subject: [PATCH] powerpc: Rely on generic printing of preemption model.

After the first printk in __die() there is show_regs() ->
show_regs_print_info() which prints the current
preemption model.

Remove the preempion model from the arch code.

Cc: Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Nicholas Piggin <npiggin@xxxxxxxxx>
Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Cc: Naveen N Rao <naveen@xxxxxxxxxx>
Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
Reviewed-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
arch/powerpc/kernel/traps.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index edf5cabe5dfdb..cb8e9357383e9 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -263,10 +263,9 @@ static int __die(const char *str, struct pt_regs *regs, long err)
{
printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
- printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n",
+ printk("%s PAGE_SIZE=%luK%s %s%s%s%s %s\n",
IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
PAGE_SIZE / 1024, get_mmu_str(),
- IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",

Looks good to me.

Reviewed-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>