From nobody Mon Feb 9 08:59:19 2026 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 7E5C720B800 for ; Wed, 12 Feb 2025 13:41:32 +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=1739367694; cv=none; b=oA1dE/6fE8JbO2WDBUuR7UROfCmm9iolRRG3c9a/3xgkl63sc/9Y3nf7QVbPY3lD4mLPZMiAym59MBX0EJ6FJI6HsDLaOFOhNJYcy+W29QjIrTsZCYxYZGQsQyPUUK6zZUGHtK+vgL8Xh1oZBp6GvGyW9rGcn4cgMktDcq7ueLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367694; c=relaxed/simple; bh=1vTepXsDgPbg7RpV1mWk+I/URaGddqEnwvv5aw204cU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aiG0jKONOankiqewQyRnCklwlKSumCBnrIDgVz2U0/N4x0O+zrcRZuQJAV5hupoY2BVyb62eAS0VK94TZ6wUfgcNFWCAiMtIQJtda0870nP0VI18KBunp/bzLzqL3jB61dXogrQqtGyGkOxZYXzOeG926KCs8pnaNrstRnN/kko= 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=gXP/+zPd; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=R+zPX5dx; 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="gXP/+zPd"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="R+zPX5dx" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367690; 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=rB0LMyy4lhnX2Ad9UJO2Kq676OAOc3gcky8txbtHUcE=; b=gXP/+zPdGdjdBiHBwAMAwEfcvbHHaNdh6z1TNoXw+L62sQdRkZDBR66n3SdX0e4V5+907y d7jE4B6gXMegpB2BOm8JIrPrrk6yukK4bojEoHxFWB8nHUMbk9g98hkluAcHyZnAy6AFsf vUaTriv4PO99OkgSEugExyx5qfUWX4S4g6hT4iZzhbmdyIZIvziInq/V9av6KilqDojGaZ /Ym03uyRHjk57kFnbIY61rmI3f3hZbVRXklKkqI/+IA2oSqGpRGKdxly1QTCF4ipE76hSP EKlqL6Im2Vh2j9rJqx0fU/1Gt+WQGf8patrF3Od08/qYQ8Wwup4VtuCJqDjIRA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367690; 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=rB0LMyy4lhnX2Ad9UJO2Kq676OAOc3gcky8txbtHUcE=; b=R+zPX5dxW5XGbJNYlFeZl4RqnUyOnn3vf16CumOd+szz7S1d6lZVHpFwzMFEIMF+R5tNvQ 1SgrsQVbli++m/Cg== 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 v3 1/9] sched: Add a generic function to return the preemption string. Date: Wed, 12 Feb 2025 14:41:07 +0100 Message-ID: <20250212134115.2583667-2-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 165c90ba64ea9..c3d5f38dd0574 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7646,10 +7646,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 38e0e323dda26..fb4486ceb978a 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 Mon Feb 9 08:59:19 2026 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 EA3AE20E6E1 for ; Wed, 12 Feb 2025 13:41:32 +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=1739367694; cv=none; b=cI3aayfJ4NmaC/9d0tNf8sQOPJBauGdUf46fqRQ4LRkv4qDrwDsOIctIBNagik4VohhVuOdeHezQlqDU2sE/fnQ0zBBUZ4YZdMOjBXr/ydPGAKxV5afaH2GsfQbMs4Lmi0w+PXl9YAtNduTHMdmSBlcavG5D9HmptYos6UR+aEk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367694; c=relaxed/simple; bh=UaCvuTQO6zmkgN4mXHVvrSlB8jTKd6GUp5a/4x9Dsvs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tpXuC31OMsSgtXCWgFzHO3QYRP1048B1PdW78I/1PTEjaVDgdkwHqqnM5NnjKpIxVGe9N2OGwqRkcC6a2jklXZYukUKK899/v2UQVOVjYx67euv7lnJOjqgeG3Vml089DClGRuqTC1IcVcYGaHkxFMkE77/XznI+MwqQV1acLbw= 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=K1oGVYiU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jKFd3XMl; 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="K1oGVYiU"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jKFd3XMl" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367691; 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=K1oGVYiUVLV0qMZuLxOGXeHyfBmoB/09twnkoV91yjK/hywLJxrtP3ZQdSQdXTtPqAxA4R rVfUM4kiSL19a/Ug/9mGRNIH3AhmqJbCdtjSDqy7vZho+BlIBOHUcT1Qa+ksPUTqeYaCWa ZH34Yu6B9E4fvrZtBQgZHchrOR9CWrk0T1uiO6ASw1fyy0FS10GVaScsAYnA/sEbJzCj3n JuA2fwqfusoqLCAJmTgBBajzBZoy6zC0RNxZZcXq1CkMShD9bXJtW/IIPtY0EqFW/8rftC V5h+K8kTk/8cuPkheO7omtGW2tDUILdHyWBtZG5fjkt7Kp3FKpeix7DcoGVUVw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367691; 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=jKFd3XMl5UPTIRCXrS8GTAVhipSJ47WWJWdwvStelCuZ+wPJUiCg+OUwpN9EYI4u3GLqtI Z4pBZUqN7b58fSDw== 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 v3 2/9] lib/dump_stack: Use preempt_model_str(). Date: Wed, 12 Feb 2025 14:41:08 +0100 Message-ID: <20250212134115.2583667-3-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 Mon Feb 9 08:59:19 2026 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 9847820E70D for ; Wed, 12 Feb 2025 13:41:33 +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=1739367695; cv=none; b=oOf01PuiTqR/C+CEaUCbaoFAl1uj3xTDMbu0355ZQKdfKYzMlZXI4tzwoMjfq3RYdUCzgG8eo8tlDI6AMzFZ5DJQywULU/otVLAZG1xkMA7JhGiKPS686T2XQ2h3kjK9q66D5XaMoIG4HLvCUaI60wOx1Bg0HMe+3jVajsArNFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367695; c=relaxed/simple; bh=xRnTRBmzJhvaPPYMLpfzIzJIVV0BDTn/beljlE9FBLk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aOrYqOGwq26RzJdR2JCLS73z4h1fI+rASG/PZEDGBC7GhcDHJJfpxYE5IuEaW82Xj7EFd77cYtm+biAQDs3C69+pChI57TOeNvAfEbIxKi9FCyRLue4OQEFcmKhKpMCQLAmJ/dzbQZTwBW0BTvuY42Xc/qvSlpGinIyph3zt3Wk= 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=Rv8r6wmr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MIBZJlex; 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="Rv8r6wmr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MIBZJlex" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367691; 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=NOJ6enYCkPU22iOJZTCJZqAozur0MLmISBOza/iKcGo=; b=Rv8r6wmrUoO/pZer34XKpr1kCCbgu2Rt4MjHLuft/CEk7gDDI32OjCLwKWJkP0WOA0lamu X47YYHP2JLK4lIxLA2666WlybKCGKI61YcwqxLm6SQMtShwy0fFBNi9x9UbeRBh5FeGbJ2 7G93jGhDw43KI7oADe5AwEul+kL09pLyERM9leGY5svdvV6VxG6y0yyIm1iVttf0ubc7zC U6KaWcpyDNfTR4ZKWOoRhU2uip0HcqEXTie6T0edpAw7krwpMtEStbNyFq4yQ6v0l7gAxw muthreaqUu4GuzMAy5ZKOMZxjJuO5swtk8CVkdr0XiK4X2WryVZgEcT8yDnzjQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367691; 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=NOJ6enYCkPU22iOJZTCJZqAozur0MLmISBOza/iKcGo=; b=MIBZJlexFvikmZxiu8No9u3DMBGhsxLAZpuLGCPy1nMydc/U7rwu2B9x0p9wLDdlV1hh0l VvElXthLzczEbhCg== 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 , Russell King , linux-arm-kernel@lists.infradead.org, "Russell King (Oracle)" Subject: [PATCH v3 3/9] arm: Rely on generic printing of preemption model. Date: Wed, 12 Feb 2025 14:41:09 +0100 Message-ID: <20250212134115.2583667-4-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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: Russell King 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 Mon Feb 9 08:59:19 2026 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 D35B720B7F4 for ; Wed, 12 Feb 2025 13:41:33 +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=1739367695; cv=none; b=qjQSEphFOFECP+acncv00k8BeyahbUX/d8Ind0OtVELO6SgRwQHTR5QOz4Ru5ov2LRNaBcfcb6WUTnUIPeyLUl3oNj6gXr4Rt2hoZxLMlz/iT9urh80HYINjDfu+N8tK7EBErdXdF9KZkqICbAZ6qvzJASVuzqLWLrY4abg6CbA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367695; c=relaxed/simple; bh=rKgqegSfIlddpX7SKg5lyaNHI0agR4d2VjHsNaNOYK0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dP0sB112+8/JdQxybhyjNWCtH9FAeeT6NLf71XknCqPUpu56Tjz/Bj5CBZszuvAwGNKxzsOV6ayiMbtZ/d8rAxi0RKWpQ/5VZ7HgbTgJ/rphXdzNiAJAkROEWLSxaiz6ZH+J2SAcQZrFasuC8hc1yOO+gKO028LxEk1zUt0zDko= 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=JNDd8HRV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=id4yU61I; 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="JNDd8HRV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="id4yU61I" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367692; 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=mPAQGfBR+7S/RdiEr4MvqW7U6iju3OPPUWbdJGl/f2c=; b=JNDd8HRVokzNTO33bNqU1bUc/i1QR+DFcOEm3uhqyR48gbfX2iGQGW9FzaSr95pJQceVD2 yzacZMQ1BdLBqJJi+Jza6UXaeQvnJdCZymPHT/39oERnv9ppPlm7OjfFM1P24y2KqYs3Sx IR5sAZeWoZI7Umj3eR5I3ejOcmC0W3SBzeTnBoiGu84WcuVP15sD1Eb3wt15aRLzAjtnmw itjMbYTTZEeebtSCgpC8J4u3gDCUHqYV6t8nj5nIHilxxP2VJ7A4/I2nu/92hjxcg1QwuN LkBjE3v/ZShiJH+We+mUNXGlVfsOIe123PNnxr0qOhkCgzDebGIs1sLBcOPlAw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367692; 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=mPAQGfBR+7S/RdiEr4MvqW7U6iju3OPPUWbdJGl/f2c=; b=id4yU61IgYf/Oi5G8elGNQM8xDxXQjxw46D1/+eX3o02qLQVUBdAHmF5WFkn1lNNRPPbn8 cdCeIaDSso0k4KAg== 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 v3 4/9] arm64: Rely on generic printing of preemption model. Date: Wed, 12 Feb 2025 14:41:10 +0100 Message-ID: <20250212134115.2583667-5-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 Signed-off-by: Sebastian Andrzej Siewior Acked-by: Catalin Marinas --- 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 Mon Feb 9 08:59:19 2026 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 8177D20E71F for ; Wed, 12 Feb 2025 13:41:34 +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=1739367696; cv=none; b=ueITvOp18dYAFImBCnXwO5Y3bd07PswzKYXbr8uJMIs6pvQgxUeTTYK0QBUl/Jw6Dxo8DPkJohI8cJw5Pbjs1HcuqY+WO87f/dZ1V1+b3jfgoKGeyQYmcHoT7Q4mBo+QM0lyOqoIHTVHuNSVWJA8vIlABmPMY6KlHZDOfL8tenw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367696; c=relaxed/simple; bh=oQzX+7nGoxhkL+yQVBL7r8HDvb37Hr/zFK9BLTl9xrg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kMLHYAupn8pF90KgdDqgqn7f9f2SyX9alD00Hr/GDEREDUizTMGt67tqXqPLuoKwqo6sYFp7K2UrGrJnF/u2V06CiF4BZfUGaLNcGa3OtTM9a2ZZze66ZAJ6WAlT+ItVDn6mwiLYxEvA2QJoZhaPn0cB1sXP5LTuGrL9b49BXL4= 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=ClgnAgOZ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SBDRBFY+; 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="ClgnAgOZ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SBDRBFY+" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367692; 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=ClgnAgOZluayAnyB1UFLyha7NkY/8Mup3O1sS5jxHsgEgI+EXcNWVNEFnTW8ipslVJ9V4g sez1j6BHSwZ03MAQ9291zpHbgPOhlY0WLGjHepKEi/H5N5XjPLM9eL7D/fl34VKk6MRYcE IixQeOXYjmcR1aq8AqmDWkpbZIQ4qU7z5/+0TtHHtApqe0CDiEfnliWHiNtuojj+gTMFOZ 84aCeUpDVvs8EJDUEciHgTZNTQtgBznqoVXriqqzNMu8haecIZUyjESCQno5DR6ceVmPzP NEhCd/Dtk5OJk6/VryLR1LemY2WHDUPlVwPCf967NhfY7tMgI2ftWcBXswVUQg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367692; 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=SBDRBFY+144Mej09EoKLZ3XsRcwvkY47/cRyDcOBUWC8W36fRvd+UQGzh6/eCyHkEKe5X0 Py4nbbrIcdpEKgBg== 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 v3 5/9] powerpc: Rely on generic printing of preemption model. Date: Wed, 12 Feb 2025 14:41:11 +0100 Message-ID: <20250212134115.2583667-6-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 Mon Feb 9 08:59:19 2026 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 F2F5320F095; Wed, 12 Feb 2025 13:41:35 +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=1739367698; cv=none; b=WOh27M1eIbfz88xJvxdkHwqEdDAYmo0zLSu9hlvequ5GXwz2gmrJLGy8+CN8gxH6Uu1Vt3v9aech84lh/mDe7Q/T844ow8R3MyluFuVSXsgtmuPIC7byG2hpPlbI4dWBrzkrq5d4Zw/u5c+oFC3USjFN9YvCtwbet5ZMefhFGs8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367698; c=relaxed/simple; bh=4e/ZYIqbaPlbrji9W2swzGj5tfRCnq/Rty9Zu4FuQEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sLiDPCMvQMu8v1QjKwELE66FsVmv+o10Bqx6+nWJTg9iXogKT/8dmrs4Y4WqutIxpLhi7SIT3XPId5UjAYqbdsVrtEp71Eaz/+yDcEflSE+kVUhiyU8cRzZaW5dTOLWQSZZjI9eSDw4NyA2B6COF8fUwFiAvn0OiZpNzJ6VGM2k= 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=dspNOYO0; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=QzPHKOUe; 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="dspNOYO0"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="QzPHKOUe" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367693; 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=dspNOYO0K/D5UQ/G9+0xYJILQLJKiHPSkIWmj84YXZk8CDayDygUef43E6R24K1OS0Xf4k qFgIqSBD4GkfyU2zip9sFdgvAMtypnjiTHN8rX4fmrmR+BOwOWhdopv8jJj208ijM9tasw FTJX0tHeQ+c7YY9LG0IL3Hcg6h+0UnUhbD7JYm/lx7k7+1pL76InMRU6eveBOZzQhHX9Y7 41NO4mL2qDRi6kVqChUQL65DgA84YEiHMTL1OB2oKbr5YaHuCi3wNAi/2Qeuz32BVv3lyE mr4zHijsXfaVEKtNgYveauolcvXiEjMpJrlwbo36oFm/Bha8x95cCAnp3M2e7A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367693; 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=QzPHKOUed5mExwdCUb43cqPscJfujsztACtE5CF67vmd2RTpJgkT4uHYDkgxc7qQzIKEXC 0RK/Hg+LUIiuD6Cg== 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 v3 6/9] s390: Rely on generic printing of preemption model. Date: Wed, 12 Feb 2025 14:41:12 +0100 Message-ID: <20250212134115.2583667-7-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 Mon Feb 9 08:59:19 2026 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 5829620FA84 for ; Wed, 12 Feb 2025 13:41:35 +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=1739367698; cv=none; b=l0vlp2MNvqBruDG38KaOPJn543HJUKNN0rO/sz0J+vK2Zk90AAvj5q6ITiDz4KMWostt2+M34fPAxCgSfRD4ZAMKn1BQaFyy09Q70cvSsv/XKwvrsoG+aziq8N0pMjrKtuzNisqo60hSkfGRpAr+K/0La17sXz57Jhx+YaMQRnc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367698; c=relaxed/simple; bh=hK1A6zIsrNJAovrrv0VlTMANs2MhQLrSeZf+N+Ilra4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MYOB/VgURY3+MOT/a9XUHvgnXlunoA7rpZJZ9Er/JC3zNKOhYq5YStjv4PwXuvp+TdDAHPHFc/UX4+uJR1DlUlhVXm1yqCVAzBr2NnynuYUKzyMxvkv0eijKIMu6u3/gCQCaaQaJrQHY3exTcIVtc/OZHvCIX2rMcIdifiXoGEQ= 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=DpvM/XPK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IqK5X32R; 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="DpvM/XPK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IqK5X32R" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367693; 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=/1nmWywTWzJzDcPVwkzbvEHu1zvcPiY8k6qmYTOWby8=; b=DpvM/XPKgM376rMH3qIs5mYgJyPGTUARGF6ldxacLiujZFxe2fAIqz/txTYdOtDnAzifjo HRFw7j/AUphkFLiKgFW1727fIyD+xxR/QBTpmySZJZRNUBX87n5Rcbfr5EiMkMAwkpLHU0 Djy9XC9upOHKTZn5vDYgkNrr8Us/7HuxpPESnNnm/KzHoweOu7Jtwj5vz2ATYZDQ3QnLZC D0AcCinSO35Q8xcz2VbDQh8uDbjFEvge41a6GR0hAtpq21FCP9RiIcG3sOgsRyQsn7Px57 Dhw2mamu82G94XMludoK8qktpofO//0tsU+crWcEjwFJUIDTRC5UEnRCTHmpag== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367693; 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=/1nmWywTWzJzDcPVwkzbvEHu1zvcPiY8k6qmYTOWby8=; b=IqK5X32R2VC2aXTgncFrHDnROztJKexL1DvhN635Kz2aoQU7rlgJDoFRS9Q4dUhvHIhCmq +QfvwPA8tqSW0GBw== 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 v3 7/9] x86: Rely on generic printing of preemption model. Date: Wed, 12 Feb 2025 14:41:13 +0100 Message-ID: <20250212134115.2583667-8-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 Mon Feb 9 08:59:19 2026 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 46BAE20F09C for ; Wed, 12 Feb 2025 13:41:36 +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=1739367698; cv=none; b=QjKVNvlOvmZTlk1nqgq0G3T3g4TUsAm0Za/rUpJ9EW9e0C07sHH0y+wNKDMQYP+sKEdytWlGbaDC2fzadV8D5vibKa5v/mzT5nZWKeIdEHBddYFORlAiv6TGfFif6uO2K7L7SqFBcReqhTzzet5GvieaYX1G1UxhtDpQwJbC7so= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367698; c=relaxed/simple; bh=7JqJh5zD1TYrinJPilLtjUURzbqKPfNMZVxThprtkeY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=unNM6lhSW3uYrxd1O+tq0aqvfbBEfSkl75wNMvubUAorTWS6F5hCz5o0JXFx4nvMQtnqOZxFdTqRhGG4CHtlRb0beGC/gNhyihOeYi4lrnAmlU3O+CClhrWDc1bsh0SRhESL35kICTn3miI4Zmd2RlhnigPi4tjlwxaeisPu+28= 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=FJDxL7JE; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=R1mw6wC4; 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="FJDxL7JE"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="R1mw6wC4" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367694; 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=FJDxL7JEnc+q63QfPdVqtv0OF43NE7u7RBaLcKJ6osUmMkDGXfkWXdtXBWepYRYp32/isU RwbdvWs88yEtaXD9CX5IpltuckNIx5kgIWK+FGLWK+M/TiwoaY8BqrDWvbz32BWZEJPdKd 3ofT7MCJ7OVegA3XBEzQYjcZO8nWrfOC3auyWC2NGYpJWed/cshTYoKGnCYfOc8DY3zMZa 2VuFCALCyfUrHwNaVO7EiWD2OZM/k5r3yi+049iPiRivZ6QAG92fOShkN2YR8hReF4Iq9V BDpIu3/bprXB4tfRtJqAwgjN4Qg76tlZK4u8b9mMZMPEnH9dCGiFsL8ku++85Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367694; 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=R1mw6wC4PRz171NZlryUCrlTL3AGEGfnvMW1JEy8CMJbmSXlgZJzk9/tAniQrV14uNPnr8 MQ/qqfUpgLHotHBA== 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 v3 8/9] xtensa: Rely on generic printing of preemption model. Date: Wed, 12 Feb 2025 14:41:14 +0100 Message-ID: <20250212134115.2583667-9-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 Mon Feb 9 08:59:19 2026 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 6254220FA8B; Wed, 12 Feb 2025 13:41:36 +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=1739367698; cv=none; b=N5ouzn6b1VJpbenzAHw74njiOhcAYsxYDGqJXJnlvFgkwY7fPCISgwBlSLpaMA0W/VBixETEes4zBiGEQC10G3PzHDvx3N+aamq+ULgkAao7e1FUU6omkGI5Q8MvqylJ1/OreWGIoVLRFOsFavmMPAtprsudQHdJ3QCdXiimq04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739367698; c=relaxed/simple; bh=b109fr8xLKB6Xr42RnvTRVQiYkpAsCIXfKaB+vPm0+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V6jrJZ/45RNS4tUWaBeUbwa2dlf/xvA1ju+hgMXmRy7N9EPJ5n3lHrHMxh4sgwfv5p0MF1zb3OZ1qaqI9YZmEns9tu4b1lKPflyOcex76tJ2Y63jjk90Y+XAfKpEy6iFLW/hSY9H3k9D4nqGkUdYvW4CMqlbE0pr3uWEDlkgjIE= 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=LQgPZVRm; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DPkb9BXP; 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="LQgPZVRm"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DPkb9BXP" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1739367694; 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=4hP9MIj/xfZayutuHmqVzRbNPdN0j7i3yHMFRYnK4OA=; b=LQgPZVRmuBn4LNzN1KHxssrOrPp+EErK7odNx4tZUbsC9iGkQg72pFuDrpZH6Fp7QUGQfu tGamFD122GTVysn8sSD+eH1OimyOB7YcVriz53Gy08/GuwqFrbs2JzSlrKOIl0EmqOk1c0 aYJZgC12UYXPaszdBUt+RO+KrkNbGFIOKR5pY3Yv4wPVjGmRYcJG3R76ukvFHyzyM9+kdJ cRoY4hF7wCODJE/2hvI4REFJUFiF7d32QW+pa2PgiZBbsAzt4lbtB0Y1jIDtwXI5d9WPUM ZjYJF7kGkKNv/+mxAij4EcN8ct5s+mo//hFdRpUDR3fv9U5Aaqo16zdLc7UUyg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1739367694; 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=4hP9MIj/xfZayutuHmqVzRbNPdN0j7i3yHMFRYnK4OA=; b=DPkb9BXPbKtqItzIRd/gIqcbCfHgIwnyyDgWf5WSnMk65ld7bQmVtDTeRVB9X91Nf6cF15 4E8kIHF+3+5B+pBw== 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 v3 9/9] tracing: Use preempt_model_str(). Date: Wed, 12 Feb 2025 14:41:15 +0100 Message-ID: <20250212134115.2583667-10-bigeasy@linutronix.de> In-Reply-To: <20250212134115.2583667-1-bigeasy@linutronix.de> References: <20250212134115.2583667-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 1496a5ac33ae1..77271faab20e9 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