From nobody Fri Jun 19 09:50:03 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3B1CC433EF for ; Tue, 5 Apr 2022 10:27:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241158AbiDEKTF (ORCPT ); Tue, 5 Apr 2022 06:19:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241201AbiDEIcy (ORCPT ); Tue, 5 Apr 2022 04:32:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5153E11A3C; Tue, 5 Apr 2022 01:29:23 -0700 (PDT) Date: Tue, 05 Apr 2022 08:29:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649147361; h=from:from:sender:sender:reply-to: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=wLAn9GLraFUF0+Wziqpwl6DlJuaDd5JyMsXt0a6TOUU=; b=cguKSRAZKUVMmNDefWb3wIu0S8SqVj6IPTjWPL1RZRwkm2FKbXGK0SbqKxb/9EeTPSlgQr ZmywhMLSyvzN8X9lIxfNDTkITUkJGZpvfue/FcvWw0K5RsNTqrp7bAhaIPHt1eo8NHV8LE QHxkIQmclPIoHd6fQNLxLDQxeCP22d9M2KaFFsUL4EegR/BFnZ2/60kI78zw/XKPx4/zeX sfJSTg6BBlZ130Qo8Z71M1+dzzHVUGAD7HDeiUXCchZbLg0XpXzyKryn1R92UadEGZuFYU NLaiK6+HZ6rXJdGXwDLQOwLxLHcdnYaHTl3ik6BepTkRQJrIVc/rx51y+4Dw5w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649147361; h=from:from:sender:sender:reply-to: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=wLAn9GLraFUF0+Wziqpwl6DlJuaDd5JyMsXt0a6TOUU=; b=4tV93tldwGS7gzj0I8Fa7BR+euyu+G5yX6w4jH9kw0wuFW/bG0ubsYMEdNsqnJDkChO1gz nJXUaBugRbOI50AA== From: "tip-bot2 for Valentin Schneider" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] kcsan: Use preemption model accessors Cc: Valentin Schneider , "Peter Zijlstra (Intel)" , Marco Elver , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20211112185203.280040-4-valentin.schneider@arm.com> References: <20211112185203.280040-4-valentin.schneider@arm.com> MIME-Version: 1.0 Message-ID: <164914736082.389.472482358413646316.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 5693fa74f98afed5421ac0165e9e9291bde7d9e1 Gitweb: https://git.kernel.org/tip/5693fa74f98afed5421ac0165e9e9291b= de7d9e1 Author: Valentin Schneider AuthorDate: Fri, 12 Nov 2021 18:52:02=20 Committer: Peter Zijlstra CommitterDate: Tue, 05 Apr 2022 10:24:42 +02:00 kcsan: Use preemption model accessors Per PREEMPT_DYNAMIC, checking CONFIG_PREEMPT doesn't tell you the actual preemption model of the live kernel. Use the newly-introduced accessors instead. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Marco Elver Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20211112185203.280040-4-valentin.schneider@= arm.com --- kernel/kcsan/kcsan_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c index a36fca0..767dfac 100644 --- a/kernel/kcsan/kcsan_test.c +++ b/kernel/kcsan/kcsan_test.c @@ -1380,13 +1380,14 @@ static const void *nthreads_gen_params(const void *= prev, char *desc) else nthreads *=3D 2; =20 - if (!IS_ENABLED(CONFIG_PREEMPT) || !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WAT= CHER)) { + if (!preempt_model_preemptible() || + !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) { /* * Without any preemption, keep 2 CPUs free for other tasks, one * of which is the main test case function checking for * completion or failure. */ - const long min_unused_cpus =3D IS_ENABLED(CONFIG_PREEMPT_NONE) ? 2 : 0; + const long min_unused_cpus =3D preempt_model_none() ? 2 : 0; const long min_required_cpus =3D 2 + min_unused_cpus; =20 if (num_online_cpus() < min_required_cpus) {