From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Shrikanth Hegde <sshegde@linux.ibm.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
Ben Segall <bsegall@google.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>, Mel Gorman <mgorman@suse.de>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Valentin Schneider <vschneid@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Will Deacon <will@kernel.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Naveen N Rao <naveen@kernel.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v3 5/9] powerpc: Use preempt_model_str().
Date: Sat, 8 Feb 2025 18:55:54 +0100 [thread overview]
Message-ID: <0f05c020-47e4-444d-90ab-9eb8414f4ef8@csgroup.eu> (raw)
In-Reply-To: <936f0451-a4ee-4e14-9ce9-9cd9613fc55c@linux.ibm.com>
Le 08/02/2025 à 14:42, Shrikanth Hegde a écrit :
>
>
> On 2/8/25 18:25, Christophe Leroy wrote:
>>
>>
>> Le 08/02/2025 à 08:35, Shrikanth Hegde a écrit :
>>>
>>>
>>> On 2/4/25 13:52, Sebastian Andrzej Siewior wrote:
>>>> Use preempt_model_str() instead of manually conducting the preemption
>>>> model. Use pr_emerg() instead of printk() to pass a loglevel.
>>>
>>> even on powerpc, i see __die ends up calling show_regs_print_info().
>>> Why print it twice?
>>
>> I don't understand what you mean, what is printed twice ?
>>
>> I can't see show_regs_print_info() printing the preemption model, am I
>> missing something ?
>>
>
> Patch 2/9 add preemption string in dump_stack_print_info.
>
> __die -> show_regs() _> show_regs_print_info() ->
> dump_stack_print_info() -> init_utsname()->version, preempt_model_str(),
> BUILD_ID_VAL);
>
> Wont we end up in this path?
Indeed I missed that. You are right, we now get the information twice:
[ 440.068216] BUG: Unable to handle kernel data access on write at
0xc09036fc
[ 440.075051] Faulting instruction address: 0xc045ddf8
[ 440.080032] Oops: Kernel access of bad area, sig: 11 [#1]
[ 440.085438] BE PAGE_SIZE=16K PREEMPT CMPC885
[ 440.089872] SAF3000 DIE NOTIFICATION
[ 440.093391] CPU: 0 UID: 0 PID: 472 Comm: sh Not tainted
6.13.0-s3k-dev-01384-g54680e2fbfb0 #1379 PREEMPT
[ 440.102977] Hardware name: MIAE 8xx 0x500000 CMPC885
[ 440.107951] NIP: c045ddf8 LR: c045dde8 CTR: 00000000
[ 440.113015] REGS: c9bf3d60 TRAP: 0300 Not tainted
(6.13.0-s3k-dev-01384-g54680e2fbfb0)
[ 440.121215] MSR: 00009032 <EE,ME,IR,DR,RI> CR: 35009393 XER: 80003100
[ 440.128198] DAR: c09036fc DSISR: 82000000
[ 440.128198] GPR00: c045c59c c9bf3e20 c27e7700 0000002e c108575c
00000001 c1085850 00009032
[ 440.128198] GPR08: 00000027 0198b861 00000001 3ffff000 55009393
100d815e 7fcf5e20 100d0000
[ 440.128198] GPR16: 100d0000 00000000 113e447c 113e4480 00000000
00000001 00000000 00000000
[ 440.128198] GPR24: 113e4464 00000000 c1828000 c9bf3ef8 c1136eac
c9bf3ef8 c2888000 c0900000
[ 440.168081] NIP [c045ddf8] lkdtm_WRITE_RO+0x34/0x50
[ 440.172969] LR [c045dde8] lkdtm_WRITE_RO+0x24/0x50
[ 440.177771] Call Trace:
Christophe
>
>> Christophe
>>
>>>
>>>>
>>>> Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
>>>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>>>> Cc: Nicholas Piggin <npiggin@gmail.com>
>>>> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
>>>> Cc: Naveen N Rao <naveen@kernel.org>
>>>> Cc: linuxppc-dev@lists.ozlabs.org
>>>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>>>> ---
>>>> v2…v3:
>>>> - Use printk() instead of pr_emerg() to remain consistent with the
>>>> other invocations in terms of printing context.
>>>>
>>>> arch/powerpc/kernel/traps.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
>>>> index edf5cabe5dfdb..d6d77d92b3358 100644
>>>> --- a/arch/powerpc/kernel/traps.c
>>>> +++ b/arch/powerpc/kernel/traps.c
>>>> @@ -263,10 +263,10 @@ 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 %s\n",
>>>> IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
>>>> PAGE_SIZE / 1024, get_mmu_str(),
>>>> - IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
>>>> + preempt_model_str(),
>>>> IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
>>>> IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS="
>>>> __stringify(NR_CPUS)) : "",
>>>> debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
>>>
>>
>
next prev parent reply other threads:[~2025-02-08 18:20 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 14:16 [PATCH v2 0/9] preempt: Add a generic function to return the preemption string Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 1/9] sched: " Sebastian Andrzej Siewior
2025-02-08 8:01 ` Shrikanth Hegde
2025-02-10 10:52 ` Sebastian Andrzej Siewior
2025-02-10 14:21 ` Shrikanth Hegde
2025-02-10 14:25 ` Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 2/9] lib/dump_stack: Use preempt_model_str() Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 3/9] arm: Rely on generic printing of preemption model Sebastian Andrzej Siewior
2025-02-10 12:04 ` Sebastian Andrzej Siewior
2025-02-10 15:16 ` Russell King (Oracle)
2025-02-10 15:39 ` Sebastian Andrzej Siewior
2025-02-10 16:26 ` Russell King (Oracle)
2025-02-11 14:52 ` Sebastian Andrzej Siewior
2025-02-11 15:05 ` Russell King (Oracle)
2025-02-11 15:21 ` Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 4/9] arm64: " Sebastian Andrzej Siewior
2025-02-10 12:05 ` Sebastian Andrzej Siewior
2025-02-10 15:03 ` Will Deacon
2025-02-03 14:16 ` [PATCH v2 5/9] powerpc: Use preempt_model_str() Sebastian Andrzej Siewior
2025-02-03 15:19 ` Christophe Leroy
2025-02-03 16:01 ` Sebastian Andrzej Siewior
2025-02-03 16:37 ` Christophe Leroy
2025-02-04 8:22 ` [PATCH v3 " Sebastian Andrzej Siewior
2025-02-05 6:48 ` Christophe Leroy
2025-02-08 7:35 ` Shrikanth Hegde
2025-02-08 12:55 ` Christophe Leroy
2025-02-08 13:42 ` Shrikanth Hegde
2025-02-08 17:55 ` Christophe Leroy [this message]
2025-02-09 14:38 ` Shrikanth Hegde
2025-02-09 18:42 ` Christophe Leroy
2025-02-10 10:59 ` Sebastian Andrzej Siewior
2025-02-10 14:23 ` Sebastian Andrzej Siewior
2025-02-10 17:32 ` Shrikanth Hegde
2025-02-03 14:16 ` [PATCH v2 6/9] s390: Rely on generic printing of preemption model Sebastian Andrzej Siewior
2025-02-03 14:28 ` Heiko Carstens
2025-02-03 14:16 ` [PATCH v2 7/9] x86: " Sebastian Andrzej Siewior
2025-02-10 12:06 ` Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 8/9] xtensa: Use preempt_model_str() Sebastian Andrzej Siewior
2025-02-03 17:55 ` Max Filippov
2025-02-03 14:16 ` [PATCH v2 9/9] tracing: " Sebastian Andrzej Siewior
2025-02-03 17:20 ` Steven Rostedt
2025-02-03 14:25 ` [PATCH v2 0/9] preempt: Add a generic function to return the preemption string Peter Zijlstra
2025-02-03 14:39 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f05c020-47e4-444d-90ab-9eb8414f4ef8@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=bigeasy@linutronix.de \
--cc=bsegall@google.com \
--cc=catalin.marinas@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®