From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A103B202C50 for ; Fri, 14 Mar 2025 16:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968498; cv=none; b=sNsXNdsRlAXifzIVIS7QjOUTIwzvpbxKZp7z+4ShaRIDwkB1KOKXPl8iD1BHX3b+onPjZCaLHlgXHDmuDyUdNRH6YaDIF3S/fZQgSgLcaR7iXu6A++VqOwWdFOqZGlA3qwmHI5NQtVSZ29r/XNdgsxBpyhy4TBPG7Be9tGRWh9I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968498; c=relaxed/simple; bh=IbAdTCkreZc14mUqvZLci9hmaZIiHVclNoAzXspEE6o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kg2K5q2eE0h1OMT5wHkRjTU+l6Y9Qjh0yq0pO2ehxPjOnWFFl8dK1/HBSqwNQx4QEMvRCHys84I0cl0P7o3AQW81kI2SGXLcv/SV281EhOsy3m6kOT/136ecIWwT/6ZX4pXDWV5+uGJGRNiCMpMMhdLPaj0lmJ9Yx/fAyOm+fi8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Ys76eKUB; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BnBCiIGr; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Ys76eKUB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BnBCiIGr" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S6E692BOQyouBFZQiMzEua5fqpH9ktmDroi8bOmXbNk=; b=Ys76eKUBSSnqY0lIjJqn/VtEZJFHefuWwYNHRJRvhnfFo3LIlT6TBM4JH+wiurbghru8iB bKTRzmCnsg0IVa09byIM7eld2r4z+2ojXQBHBewqegEmItvgII9BLetvnPHdmbShApWsxS G0MwsP6NI3BYtziqkxixIsDtkt2H51bbPEsS756HvXm6mD18wbvHiAlSEDGbmNxRPY5R6s rKdfcIdpKD6OBiMQymLtN3s78kvfTotxlL8OeuDZBVlEQ9vBSEa33G1B/bpkf/JcW1jYyo imiSrfCG/4YAhnz+D9NHJVoBHf34MTKvQVVa9hY22t28RuxKWl/MWJI+fKj4iw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S6E692BOQyouBFZQiMzEua5fqpH9ktmDroi8bOmXbNk=; b=BnBCiIGrjV6ruheCMnu++OmfttuH9FKaCPEXvPUS9TZBxv/c/G3ToddoTyZr6h+gWFCkIT lJkZ03ZFCi5KwfCw== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior Subject: [PATCH v4 1/9] sched: Add a generic function to return the preemption string. Date: Fri, 14 Mar 2025 17:08:02 +0100 Message-ID: <20250314160810.2373416-2-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The individual architectures often add the preemption model to the begin of the backtrace. This is the case on X86 or ARM64 for the "die" case but not for regular warning. With the addition of DYNAMIC_PREEMPT for PREEMPT_RT we end up with CONFIG_PREEMPT and CONFIG_PREEMPT_RT set simultaneously. That means that everyone who tried to add that piece of information gets it wrong for PREEMPT_RT because PREEMPT is checked first. Provide a generic function which returns the current scheduling model considering LAZY preempt and the current state of PREEMPT_DYNAMIC. The resulting strings are: =E2=94=8F=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=B3=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=B3=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=B3=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=B3=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=93 =E2=94=83 Model =E2=94=83 -RT -DYN =E2=94=83 +RT -DYN =E2= =94=83 -RT +DYN =E2=94=83 +RT +DYN =E2=94=83 =E2=94=A1=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=95=87=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=95=87=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=95=87=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=95=87=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=A9 =E2=94=82NONE =E2=94=82 NONE =E2=94=82 n/a =E2= =94=82 PREEMPT(none) =E2=94=82 n/a =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82VOLUNTARY =E2=94=82 VOLUNTARY =E2=94=82 n/a =E2= =94=82 PREEMPT(voluntary) =E2=94=82 n/a =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82FULL =E2=94=82 PREEMPT =E2=94=82 PREEMPT_RT =E2= =94=82 PREEMPT(full) =E2=94=82 PREEMPT_{RT,full} =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82LAZY =E2=94=82 PREEMPT_LAZY =E2=94=82 PREEMPT_{RT,LAZY} =E2= =94=82 PREEMPT(lazy) =E2=94=82 PREEMPT_{RT,lazy} =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=B4=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=B4=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=B4=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=B4=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 [ The dynamic building of the string can lead to an empty string if the function is invoked simultaneously on two CPUs. ] Co-developed-by: Peter Zijlstra (Intel) Signed-off-by: Peter Zijlstra (Intel) Co-developed-by: Steven Rostedt (Google) Signed-off-by: Steven Rostedt (Google) Reviewed-by: Shrikanth Hegde Signed-off-by: Sebastian Andrzej Siewior --- include/linux/preempt.h | 2 ++ kernel/sched/core.c | 47 +++++++++++++++++++++++++++++++++++++++++ kernel/sched/debug.c | 10 +++++---- kernel/sched/sched.h | 1 + 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/include/linux/preempt.h b/include/linux/preempt.h index ca86235ac15c0..3e9808f2b5491 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -515,6 +515,8 @@ static inline bool preempt_model_rt(void) return IS_ENABLED(CONFIG_PREEMPT_RT); } =20 +extern const char *preempt_model_str(void); + /* * Does the preemption model allow non-cooperative preemption? * diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 67189907214d3..f6fba7da40c78 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7647,10 +7647,57 @@ PREEMPT_MODEL_ACCESSOR(lazy); =20 #else /* !CONFIG_PREEMPT_DYNAMIC: */ =20 +#define preempt_dynamic_mode -1 + static inline void preempt_dynamic_init(void) { } =20 #endif /* CONFIG_PREEMPT_DYNAMIC */ =20 +const char *preempt_modes[] =3D { + "none", "voluntary", "full", "lazy", NULL, +}; + +const char *preempt_model_str(void) +{ + bool brace =3D IS_ENABLED(CONFIG_PREEMPT_RT) && + (IS_ENABLED(CONFIG_PREEMPT_DYNAMIC) || + IS_ENABLED(CONFIG_PREEMPT_LAZY)); + static char buf[128]; + + if (IS_ENABLED(CONFIG_PREEMPT_BUILD)) { + struct seq_buf s; + + seq_buf_init(&s, buf, sizeof(buf)); + seq_buf_puts(&s, "PREEMPT"); + + if (IS_ENABLED(CONFIG_PREEMPT_RT)) + seq_buf_printf(&s, "%sRT%s", + brace ? "_{" : "_", + brace ? "," : ""); + + if (IS_ENABLED(CONFIG_PREEMPT_DYNAMIC)) { + seq_buf_printf(&s, "(%s)%s", + preempt_dynamic_mode > 0 ? + preempt_modes[preempt_dynamic_mode] : "undef", + brace ? "}" : ""); + return seq_buf_str(&s); + } + + if (IS_ENABLED(CONFIG_PREEMPT_LAZY)) { + seq_buf_printf(&s, "LAZY%s", + brace ? "}" : ""); + return seq_buf_str(&s); + } + + return seq_buf_str(&s); + } + + if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY_BUILD)) + return "VOLUNTARY"; + + return "NONE"; +} + int io_schedule_prepare(void) { int old_iowait =3D current->in_iowait; diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index ef047add7f9e6..39be73969d284 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -244,11 +244,13 @@ static ssize_t sched_dynamic_write(struct file *filp,= const char __user *ubuf, =20 static int sched_dynamic_show(struct seq_file *m, void *v) { - static const char * preempt_modes[] =3D { - "none", "voluntary", "full", "lazy", - }; - int j =3D ARRAY_SIZE(preempt_modes) - !IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT= _LAZY); int i =3D IS_ENABLED(CONFIG_PREEMPT_RT) * 2; + int j; + + /* Count entries in NULL terminated preempt_modes */ + for (j =3D 0; preempt_modes[j]; j++) + ; + j -=3D !IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY); =20 for (; i < j; i++) { if (preempt_dynamic_mode =3D=3D i) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index c8512a9fb0229..9c3252fbaee08 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3619,6 +3619,7 @@ extern int preempt_dynamic_mode; extern int sched_dynamic_mode(const char *str); extern void sched_dynamic_update(int mode); #endif +extern const char *preempt_modes[]; =20 #ifdef CONFIG_SCHED_MM_CID =20 --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3E04202C5A for ; Fri, 14 Mar 2025 16:08:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968498; cv=none; b=n2x0BVFVMmezmyjZ4uDgl+OSqWKGSWG9T5ADmTGKhfoGGFGxFgBQfvuLTiuZTeD5FAJuRG/yvBtQlTX2W9hpHbuVcacIzWF3c9G265DesI6AuqN1noNIhk0ZHLSZUz5/NeKsNLZdkjLOJpGgfLBaZrMd5bTU8nGwuHaB8IPhPWM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968498; c=relaxed/simple; bh=UaCvuTQO6zmkgN4mXHVvrSlB8jTKd6GUp5a/4x9Dsvs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FVcLQ2h+90qwCKljmUKJRZk9gSV1a3wVEKInFa8AhlJeZmnYwlKurC6EKbzvE2lm8zCvpHww5tTJVu2EovNzKvXCGW1+nGhsfNu8q8tOh5jHC1iufcKvjrpidFBJkeTRYVh9aNMfXPD47EIqcHfL4lEeGigeE8WSzQC9N6RL3qs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0vwl1ocV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vcHAPrc3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0vwl1ocV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vcHAPrc3" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K3+PdbzXvKDPzf7DVHIuFNry45mZcOhReYq7bCDi1t4=; b=0vwl1ocVzMUPBdnmdzrlUe0+XwPFNfLKRelHK9hpQ9wUHPM1EBONSOb0tkDOeYx2yHsc1X ytQ9cW3CBNKKBxkHVEPTX1FcWpz62J0AWpo0z1/pkNR2dxb2HdRqjiL/uKEGaY5RgzahOB D/4hWSlzVJMkg4TLuXPa9uhFo/abWnhKELvbSH3qqvAXtmEKb0wN2szRXzf5wkdY9iFimK ltsfEIsYSh6qu5MgDIQBNyDJiEBMmO8prR4dIt4DWsFR2K+O2Ek6hrVWV6RwgxJWOoUkqu ChoL/eNStKMXCDyOEpZQaPvHbWWq6wLEsF5zYxSxRphZqXwPIOL9/ShIMcyZhQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K3+PdbzXvKDPzf7DVHIuFNry45mZcOhReYq7bCDi1t4=; b=vcHAPrc3/SIkIQLXBRAC4fngHgKvGvxD8a2OKRvAd6xMg0dZJf3m5CdLESBQRgdFCpd4Xv +SzFvlkBhGz9T7DA== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , Andrew Morton Subject: [PATCH v4 2/9] lib/dump_stack: Use preempt_model_str(). Date: Fri, 14 Mar 2025 17:08:03 +0100 Message-ID: <20250314160810.2373416-3-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use preempt_model_str() to print the current preemption model. Use pr_warn() instead of printk() to pass a loglevel. This makes it part of generic WARN/ BUG traces. Cc: Andrew Morton Signed-off-by: Sebastian Andrzej Siewior --- lib/dump_stack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dump_stack.c b/lib/dump_stack.c index 388da1aea14a5..b3a85fe8b673e 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c @@ -54,7 +54,7 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...) */ void dump_stack_print_info(const char *log_lvl) { - printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s" BUILD_ID_FMT = "\n", + printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s %s " BUILD_ID_= FMT "\n", log_lvl, raw_smp_processor_id(), __kuid_val(current_real_cred()->euid), current->pid, current->comm, @@ -62,7 +62,7 @@ void dump_stack_print_info(const char *log_lvl) print_tainted(), init_utsname()->release, (int)strcspn(init_utsname()->version, " "), - init_utsname()->version, BUILD_ID_VAL); + init_utsname()->version, preempt_model_str(), BUILD_ID_VAL); =20 if (get_taint()) printk("%s%s\n", log_lvl, print_tainted_verbose()); --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 846CE202F80 for ; Fri, 14 Mar 2025 16:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968499; cv=none; b=tj2gkucLJd6TfnlIBdPaJ6R/SbvFTD65xN876oOFKu2MhQS2B4nxkcGpXUe1ItIXL/oSLH1qwSwpS8xiTwFvz46soBWwFIxcmOV0WPlxbidHar/HYc4R+Zy/1OSjyl+2S7HYN9UQtmVHzZCicCtMWWbfhoXg2DBtML6x7eCZNTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968499; c=relaxed/simple; bh=a0AJDJcPWIKouQji85jmkMjuukyKxWnxESN2VAr9aPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jC3BwqfGI6u6xBT7s5RkXNnjVi/2mH6NFzbknQxwLuCq+WUC9g2jWRui+cvtj//3dX+lkp52czMrpzTMbXa3T9R9ls/ZDJFZXHWN4S/uFDCde4/IdAGV38VlaMj/HzQ5Lk5bbLhukDIFzeW+mJ9rgvQTN0sGLEXBdcDofT4a/Fo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aMFZNY90; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=85Z5yYFK; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aMFZNY90"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="85Z5yYFK" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FrwuML1z2twiI5Q1nEGmeclGfRZJCdzNfx8loT/6B/0=; b=aMFZNY90Z0dXVUWrnA1h5MtmXPZonTKvrxZ26VS6PzBDzM3GopweafZyKULHQUFXVJrwm9 BSq6p46jeOijyzXP2X11epJ+bymVgF/Qzr6f8s0GlO9ZZmkRDz9s78Hpf9xTeh2LNe2Mkz qSP20ur7M9+oq/4dhmc9xPHCJG81LFORMD+4IJ5wcjF9JNiHlD65RfGTfoYJycDIvLjvpp HGdO6tu5RrtSb0QJLyAnFFTSFuHKLnSh7jupe8aAoJch12azCn847CU9kU/OKMvQwaGarQ hdsvD8G3BpycSfQr3sftwWQN9NL/AJXp9Xb4HdxM/d26+R2jYYmaJURljyP/HQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FrwuML1z2twiI5Q1nEGmeclGfRZJCdzNfx8loT/6B/0=; b=85Z5yYFKpXEcc7cTMq9arCtQDW4e2BjP5BL83TyQES2bWnCHqGaFuImRqDpM+corO94Gee v07KEql9v+Wd25Bg== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , linux-arm-kernel@lists.infradead.org, "Russell King (Oracle)" Subject: [PATCH v4 3/9] arm: Rely on generic printing of preemption model. Date: Fri, 14 Mar 2025 17:08:04 +0100 Message-ID: <20250314160810.2373416-4-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" __die() invokes later __show_regs() -> show_regs_print_info() which prints the current preemption model. Remove it from the initial line. Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Russell King (Oracle) Signed-off-by: Sebastian Andrzej Siewior --- arch/arm/kernel/traps.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 6ea645939573f..afbd2ebe5c39d 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -258,13 +258,6 @@ void show_stack(struct task_struct *tsk, unsigned long= *sp, const char *loglvl) barrier(); } =20 -#ifdef CONFIG_PREEMPT -#define S_PREEMPT " PREEMPT" -#elif defined(CONFIG_PREEMPT_RT) -#define S_PREEMPT " PREEMPT_RT" -#else -#define S_PREEMPT "" -#endif #ifdef CONFIG_SMP #define S_SMP " SMP" #else @@ -282,8 +275,8 @@ static int __die(const char *str, int err, struct pt_re= gs *regs) static int die_counter; int ret; =20 - pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP S_ISA "\n", - str, err, ++die_counter); + pr_emerg("Internal error: %s: %x [#%d]" S_SMP S_ISA "\n", + str, err, ++die_counter); =20 /* trap and error numbers are mostly meaningless on ARM */ ret =3D notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV= ); --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 827EA202F79 for ; Fri, 14 Mar 2025 16:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968499; cv=none; b=j5a/61B3pSai1QiT/FN8jGjrSuQgBTHnGuoY1LvoZiLp1eE5Chqo8cEVjapj6IGKBGU+eTcDgAuTtlAaedxw4HdQyiUgN32QcYq1psp6nrwO4n/widnOYG0Ne6C2uhYptYIpRNLlk2qDDSkTIRpDqIOqVYssR7frJY9VX+2gEWY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968499; c=relaxed/simple; bh=hMEsLsglNs4AwkHsJbHuF/7QRbxSiICOISHMO54ovQ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=au8B9FJzS41L9YhKHAEiZESd6KHLtZsPQjnDZyoK62dVPFbNy9gyBiDe6q7mcn74ThAXjCgh4tzxoZvBylqcNIhJcAcwR1RlQqaRCwVCRYwn4elLCY/lqVSmdKZ4CZfClalnXMj6S2ue6Q4LxqQZFgOKg1fmo0QJUutGvHKW8ys= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CRDy1lqA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=A/TyYnpx; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CRDy1lqA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="A/TyYnpx" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hUmCwmW08CUlGez91ObC9mBwhMIwUpRmBhCO7ubM414=; b=CRDy1lqAGtDW+JG/zhQo2hI2v/UAgh3ORFOgjKP45KwnFP1rT49KzKY/J3crWLpN4yHLxU BTL5F51HQCU7M1YMo9VuWVy5wyJ72MCnfio7/olA/BBM7p65uJ4IUQHDS8d5maX3ck5JgY iVw49MwhAUb2LGq4x5SSThekSLuCUk6Gkqh0/C5l+3ohrpt5ejZU9X8THoEg+YwBosqnx8 1Yj5ntUWibetqA30qK3Nc3248MmUnBqV+BuoZUg4q4Pw81kMJLMbJHEqTffkWlIM7qwFWX j9R7xLusIUUW0QBYwho1ZhCvAynOc7YEEF2nW2hhMjKbqYC1MFGXVG6fto4l+A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hUmCwmW08CUlGez91ObC9mBwhMIwUpRmBhCO7ubM414=; b=A/TyYnpxt9kTOXU5xGGtNrsvn3uyfHMkD6NKJsuf0LNWc4Kb0oD+2I0R0xphQWcIqym4xU XdUUWguOXGWBp0BQ== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 4/9] arm64: Rely on generic printing of preemption model. Date: Fri, 14 Mar 2025 17:08:05 +0100 Message-ID: <20250314160810.2373416-5-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" __die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model. Remove it from the initial line. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Acked-by: Will Deacon Acked-by: Catalin Marinas Signed-off-by: Sebastian Andrzej Siewior --- arch/arm64/kernel/traps.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 4e26bd356a482..529cff825531c 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -172,14 +172,6 @@ static void dump_kernel_instr(const char *lvl, struct = pt_regs *regs) printk("%sCode: %s\n", lvl, str); } =20 -#ifdef CONFIG_PREEMPT -#define S_PREEMPT " PREEMPT" -#elif defined(CONFIG_PREEMPT_RT) -#define S_PREEMPT " PREEMPT_RT" -#else -#define S_PREEMPT "" -#endif - #define S_SMP " SMP" =20 static int __die(const char *str, long err, struct pt_regs *regs) @@ -187,7 +179,7 @@ static int __die(const char *str, long err, struct pt_r= egs *regs) static int die_counter; int ret; =20 - pr_emerg("Internal error: %s: %016lx [#%d]" S_PREEMPT S_SMP "\n", + pr_emerg("Internal error: %s: %016lx [#%d] " S_SMP "\n", str, err, ++die_counter); =20 /* trap and error numbers are mostly meaningless on ARM */ --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 433FF202F95 for ; Fri, 14 Mar 2025 16:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968500; cv=none; b=V3ORvESDUzKY8zctB90MEJvn7meyPLMeXVLzRHjr4pb+sHDFLqy7Pdots2wgCYh5iJ5IQ643KDNCWLL/x57Uns1sy+NuOLOCvfQn/UCTo06xQpoAgfJaKEOPRE15c/xWuTEn1PrbUBzmewLhik3b0kmcV2deMbEvdH9lECWsfag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968500; c=relaxed/simple; bh=oQzX+7nGoxhkL+yQVBL7r8HDvb37Hr/zFK9BLTl9xrg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gZLILO2bSjkuTgFZwHwYx+YfxcmWKrq1BQR6jjdQ2Jwsrbhl/dxJjZPNIg6g+z3XJn82VOXxVFLksbu47vJAcIsN513f5yOmGLQWOSloE4xysUyhTJuK8rcHKCid4/mE2AwE9bzHkI2ug0FIRna7wun5MVVxcFcq+SrtF+69ePQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=oUvGicU9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BKlii9JD; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="oUvGicU9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BKlii9JD" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3UThOL2xYE+zlzWKKbLr4gFZbbNJ4JtHESm/nz/q22I=; b=oUvGicU9EzvDhQw6mwbX6KaWnwK85wGS1FqPabwF0NiVNPAIGHBx6LELfdu02mi4glujPm eolrnSGgQ7aoFzpdUkQwS/VN7Z25xOGvggToNLYhR4YEbuA79BU1D6PJmqtvGRmQFVIQ4e LKc6i51kdpZoP7fAFIAVgUFuP3VWMPZNe+kYoW+wgNifmq+7kYeS/QrCTEQpoEiilZ+f68 QEW3WPnuOpiZRyh2NDsyzdZkWTyOmlUTXwr6cgEBqNEDeYV80+HVhajnFj4dZJTcZoNqX1 DTsK2A1xouiZfunNcBz5zevTeJ9P3GY+g7sgstTKzqY8P8plPZurQeeQC1Sw9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3UThOL2xYE+zlzWKKbLr4gFZbbNJ4JtHESm/nz/q22I=; b=BKlii9JDzCL1dJehRa3nId7N9nVNEeOzD6QG3T8tFCBuRpP4qdEZBdFXR1kby22VnhG37q NXHPULtxuG4UCeBQ== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 5/9] powerpc: Rely on generic printing of preemption model. Date: Fri, 14 Mar 2025 17:08:06 +0100 Message-ID: <20250314160810.2373416-6-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N Rao Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Christophe Leroy Reviewed-by: Shrikanth Hegde Signed-off-by: Sebastian Andrzej Siewior --- 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); =20 - printk("%s PAGE_SIZE=3D%luK%s%s%s%s%s%s %s\n", + printk("%s PAGE_SIZE=3D%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=3D" __stringify(NR_CPUS)) : "", debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DAAD202F93; Fri, 14 Mar 2025 16:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968500; cv=none; b=iq8bpzvBs4qIvQMRO/+MBLnnZe/NO2qt5gxK24fuZCEY3MFX43cpR1GCXzz2DDO4CMIrfZWqxo10JeEmNfmr0p4I2/yCJQ5je8Mw/qwLp1Ztj7xpx9sCQoqBQm63mYoDrVqBtho4gUMY0geUPk6eXDsfjLtTXvy1TUBdjANDKLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968500; c=relaxed/simple; bh=4e/ZYIqbaPlbrji9W2swzGj5tfRCnq/Rty9Zu4FuQEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jUTXKnIv5GtSSwClT58oABcEFqvl3yJHlpohT8DoBiHygIlbc+8wwOp2nQOTyoZlcitjHC3Zg55t87bPb5YDMEfse0y5YXgFm9BA1sWhYj83Jm1y7q6ZrVAi3MKY7OwiHKbeHxTQqE2jwQdjZQ/QIUqoeLL/DcxMI98/5OK587o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UbKBXtqU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Z9ZCSbYg; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UbKBXtqU"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Z9ZCSbYg" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y+ZKfpmr3pMXsS3E912MhMX/FXEkzo/mSsNGFHgHyLc=; b=UbKBXtqU9pdR+b68bgmKTxa9Hx7qyZPmdOzYhngeIKt51cXbv6/V5dIA1TfZWu+84Wbp9r MfqtaAXiUu+zQF/gx+MzM328NmTmndtPzcvaIjdw9TATcG+m6f9rcyGq8A3u6tyWsTUgBX Luz97fLu1CvW3nfBm2xlki5wrEkThDw/0TfY4Y2ofCXaewWlqbmsca9FtwHY++a+C1o19z 5sDckkg57xTh1/4bDniTMMZzjXcer9V4lGiPVe2R20NBU0Y0tMsqfz4rPARsIM/448KAY6 5qDLOcjce1NheIrZTdV8tw/04ZR348JddIzGdsXIrKribBW3umivGf6cV8Taog== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y+ZKfpmr3pMXsS3E912MhMX/FXEkzo/mSsNGFHgHyLc=; b=Z9ZCSbYgWPSr53UuSaRsAH8OOwQcsZaqwBKzr4qjORVCv7gYqjIkaQzDIof3h3Egag4Bbr TKo7cSDP7OlBQJCg== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , linux-s390@vger.kernel.org Subject: [PATCH v4 6/9] s390: Rely on generic printing of preemption model. Date: Fri, 14 Mar 2025 17:08:07 +0100 Message-ID: <20250314160810.2373416-7-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model. Remove it from the initial line. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: linux-s390@vger.kernel.org Acked-by: Heiko Carstens Signed-off-by: Sebastian Andrzej Siewior --- arch/s390/kernel/dumpstack.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/s390/kernel/dumpstack.c b/arch/s390/kernel/dumpstack.c index 1ecd0580561f6..911b95cd57e58 100644 --- a/arch/s390/kernel/dumpstack.c +++ b/arch/s390/kernel/dumpstack.c @@ -198,13 +198,8 @@ void __noreturn die(struct pt_regs *regs, const char *= str) console_verbose(); spin_lock_irq(&die_lock); bust_spinlocks(1); - printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff, + printk("%s: %04x ilc:%d [#%d]", str, regs->int_code & 0xffff, regs->int_code >> 17, ++die_counter); -#ifdef CONFIG_PREEMPT - pr_cont("PREEMPT "); -#elif defined(CONFIG_PREEMPT_RT) - pr_cont("PREEMPT_RT "); -#endif pr_cont("SMP "); if (debug_pagealloc_enabled()) pr_cont("DEBUG_PAGEALLOC"); --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2121204582 for ; Fri, 14 Mar 2025 16:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968501; cv=none; b=t90J4XtsI0xraoeHziBe8H1NRaR1c13jbN3zSCPTQgA2VLEZlGb/fpzPhHEkYDo2ieP6wmFwClFb7qOw2cqE5Tuh5IFUYs1nfRKgSBoRE+2cp49jmfdRB671ox2mwJx1+FmLne6UtQ+IUxy8A0Cwr1B8F6W4TcZRXqyF4GS0jiM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968501; c=relaxed/simple; bh=gGb/OyT7jhkkZcgfbVXYiOC/FC+mlgfYhs9YSdsU7LI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BPHpEPY7QxCE2JeTvRRfkioC08vsak6tRubwTbwumvnUGLuAjXtT9srhp3X2CR1b7OhJd38rw/ZIvmhPBYB7fn0Iomg4V2s3XD1pJiWbXNAfdNpXM8a2DiIFap2m8TxFgx9ezLEdnaw1t+7HtfQh1ro+br/RZsTAnJ/dSrTcb/k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZvK6hJT5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Yfl8hWwW; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZvK6hJT5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Yfl8hWwW" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dq85oAGLNvsLdfX4aOkNtdAWkEjwBtePNGBdu04muYU=; b=ZvK6hJT5Vs73cBoJp4vzN1mh3DyHGy0kyDXs6pjiIdaU1Vy4IJeuYa5f6pl9M3V22bYu3t hLtm11jH0jJ+KCbTUPfb2wVKvAAwc+AL36AeeCHLbMz2S06WJZV4jqr/XytyeF1ECsY/Lh NxANFpdOqFCouLzQjJhGNL8SsPzt26ZJsp25MZZgsaZZ1jJwzfaWa7Ls1uC27W58DjY0+t RL7xvwSr5Ww06VjDrjjDSFEvBORvRNB/ngrA6l9jQvM9dCYvjaGQviJqsiVrmbXC2OsK/p Elxw+UrN1071rfz8d/yRi4g8iT4dhxIFPx6LTiIlRlQHp4djKiiuDialqaSnGg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dq85oAGLNvsLdfX4aOkNtdAWkEjwBtePNGBdu04muYU=; b=Yfl8hWwW/8QJwKVMTV3xsmihTq97WQohLm+RCs+mhEobWnS86MJbkFCgOp3VG/X10UkPXx gzGGBzgGzoYL8mBQ== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , Josh Poimboeuf , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH v4 7/9] x86: Rely on generic printing of preemption model. Date: Fri, 14 Mar 2025 17:08:08 +0100 Message-ID: <20250314160810.2373416-8-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" After __die_header(), __die_body() is always invoked. There we have show_regs() -> show_regs_print_info() which prints the current preemption model. Remove it from the initial line. Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: H. Peter Anvin Signed-off-by: Sebastian Andrzej Siewior --- arch/x86/kernel/dumpstack.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index a7d562697e50e..91639d1e4ec2c 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -395,18 +395,13 @@ NOKPROBE_SYMBOL(oops_end); =20 static void __die_header(const char *str, struct pt_regs *regs, long err) { - const char *pr =3D ""; - /* Save the regs of the first oops for the executive summary later. */ if (!die_counter) exec_summary_regs =3D *regs; =20 - if (IS_ENABLED(CONFIG_PREEMPTION)) - pr =3D IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT"; - printk(KERN_DEFAULT - "Oops: %s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff, - ++die_counter, pr, + "Oops: %s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff, + ++die_counter, IS_ENABLED(CONFIG_SMP) ? " SMP" : "", debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", IS_ENABLED(CONFIG_KASAN) ? " KASAN" : "", --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C51D204598 for ; Fri, 14 Mar 2025 16:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968501; cv=none; b=i20xnGBrVzlIbPev5BxIJIRrjyaZ4Y+JpEIOCgrd46J7gSPOnupSmGXpoVWt8yuJBAyCCM5UdhmMCGf+Yz7TqDbssYCQM7Xs1QSVbQFK7E7/bWi219DqMXwSqI3ekTaOLqis7+/6o27bhUf5QDJhEbTRE4TMsXBLRA2XoGQhBWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968501; c=relaxed/simple; bh=7JqJh5zD1TYrinJPilLtjUURzbqKPfNMZVxThprtkeY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m/sl5dridXbg1g4uP9Y9HlLKOhhKSkbi2cD40oc0vt50ZmCCoFuEm/7yZrcXJGqG96hebCXuoiXH/Qg/f958F6ZYOl0RCnSgP8+CxHh6Cs4kGfr/bFNPoQfacfIFVF+euvGWStPJwDOv2HudxWsHljsfNK77XkvMncJ7DbV+tx4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Pk+dzClr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qOYYBZu8; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Pk+dzClr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qOYYBZu8" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S38qgxTEFuAeFPS21MPXcaa84mVOzB3Jka/wNMKS3a4=; b=Pk+dzClrzxJE42C28fzXXvDRwNXQPBk5cNcqdk2/t+S5CUEIES5zneJwJnGCA3tq0fNXEh w5WeGXDJNMM9Ri74qbiAY3gHu59A/6tnEdBb0R8DJXH8Kpy8YOTnFHqxSAhUQpHmjy24ZU /PkqUKdbKNEf+P5wVC3kmU1ZLM64ikLJitpIThJv7PEuf9AJnPgJzopapt8peKA+NomY+u Xn5Lg0o85F7nczPXMV0w/BoPDwgOzVSK/gtqKRMXAjoyzobp5cl1pIOo5IyJdzyZRmvayy ZLoHleS5pdPXU7vXAKEZAmvgie5EXgpnoDuE30g9ln+MSMh1fUI+VPoRAkvU7g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S38qgxTEFuAeFPS21MPXcaa84mVOzB3Jka/wNMKS3a4=; b=qOYYBZu8fK50EKYNvfS1kwrWww5/LewRzQf0d2EX9r5V5F3Y1YCWToiuyPfsbMwyOY/BFE NUlsSlfgVNI3+WBA== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , Chris Zankel , Max Filippov Subject: [PATCH v4 8/9] xtensa: Rely on generic printing of preemption model. Date: Fri, 14 Mar 2025 17:08:09 +0100 Message-ID: <20250314160810.2373416-9-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model. Remove it from the initial line. Cc: Chris Zankel Cc: Max Filippov Acked-by: Max Filippov Signed-off-by: Sebastian Andrzej Siewior --- arch/xtensa/kernel/traps.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index 38092d21acf8e..44c07c4e0833a 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -629,15 +629,11 @@ DEFINE_SPINLOCK(die_lock); void __noreturn die(const char * str, struct pt_regs * regs, long err) { static int die_counter; - const char *pr =3D ""; - - if (IS_ENABLED(CONFIG_PREEMPTION)) - pr =3D IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT"; =20 console_verbose(); spin_lock_irq(&die_lock); =20 - pr_info("%s: sig: %ld [#%d]%s\n", str, err, ++die_counter, pr); + pr_info("%s: sig: %ld [#%d]\n", str, err, ++die_counter); show_regs(regs); if (!user_mode(regs)) show_stack(NULL, (unsigned long *)regs->areg[1], KERN_INFO); --=20 2.47.2 From nobody Wed Dec 17 19:04:45 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 730AF2036E8; Fri, 14 Mar 2025 16:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968502; cv=none; b=hhc603QO7LseSH/bPjhu4ouFiphAK9I4gdeUqmldggAPciM12TZOQhK1OST7yyt4hFScXCXH+fJuR/EPYWg6qDWADt1ZsPGxlOgFxh7N0SkwoCsey3EnVPfC1AjTmy1GgXgxF77TBw2DpDz+UyN0sds7t7jVJ6UXDm+uYA7Yi9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741968502; c=relaxed/simple; bh=XqcsY6o6fpXWY2codHVy3UgJNf7GA85mCt53UwBExks=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BbJbBK4vjKOizdbbKy92JwhjUmcpPsvn1H3c4k/+xrDPPRz1XU4zNSsfN618LePQIyooJPv7vx5Cb+ECdLp+SZZA19FJoBFRnHhd7wAxK0hCnWSl+HRi86pOg2CR2MZnjJbst3DOzU7+2S+cV+vniIJu71ArKtnYVbgHya4zHdY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=n6trQHKl; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BShPwRx7; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="n6trQHKl"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BShPwRx7" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741968498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ev8xxyCWrO7UYEFMB8bMIA2a0AaTG/gUghwzI4DhR2o=; b=n6trQHKl78YEElXSiECySNw0hwZCvK/W4LRwxf+jTEO7sU1uPOuzYYNorxddMIA5RHU/P9 eqNvlsGOHryl2J+9/NBSQyfwktE1qGIGSDRzXuajLS771Hti8ufTjJlzTinnrxy5H6qDO1 qunpO0pA5F9khK3+QMuQWhtKt5Lk3zhc9LizbKmQfqvAw8ppEY3/oxhkKfc3NyT+P/WCw8 RjcVR763eJSu0H7v/bHz4EuOuV1rh9V5nIawoflTql41EHmQ3YdCzGIUxLcKtuBqaXfNeR HWa7vQ3IK+1UIbY96biCqzMcI1NXcOaJJ8c8U2PvFx93O27NmPk6iyZ9Sj7ZIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741968498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ev8xxyCWrO7UYEFMB8bMIA2a0AaTG/gUghwzI4DhR2o=; b=BShPwRx7mUK1yn3qgIU25R77XSDnl1aA3xx4c0F0x9M5Uu7Y+K7tz68Vh+2XG/vVwGBUIa /d/GbzmC8jpWR3AA== To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Cc: Ben Segall , Catalin Marinas , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Shrikanth Hegde , Steven Rostedt , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Will Deacon , Sebastian Andrzej Siewior , Masami Hiramatsu , Mathieu Desnoyers , linux-trace-kernel@vger.kernel.org Subject: [PATCH v4 9/9] tracing: Use preempt_model_str(). Date: Fri, 14 Mar 2025 17:08:10 +0100 Message-ID: <20250314160810.2373416-10-bigeasy@linutronix.de> In-Reply-To: <20250314160810.2373416-1-bigeasy@linutronix.de> References: <20250314160810.2373416-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use preempt_model_str() instead of manually conducting the preemption model. Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: linux-trace-kernel@vger.kernel.org Acked-by: Steven Rostedt (Google) Signed-off-by: Sebastian Andrzej Siewior --- kernel/trace/trace.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 0e6d517e74e0f..fd3cb2b2ab829 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4100,12 +4100,7 @@ print_trace_header(struct seq_file *m, struct trace_= iterator *iter) entries, total, buf->cpu, - preempt_model_none() ? "server" : - preempt_model_voluntary() ? "desktop" : - preempt_model_full() ? "preempt" : - preempt_model_lazy() ? "lazy" : - preempt_model_rt() ? "preempt_rt" : - "unknown", + preempt_model_str(), /* These are reserved for later use */ 0, 0, 0, 0); #ifdef CONFIG_SMP --=20 2.47.2