Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp575810pxb; Tue, 5 Apr 2022 14:37:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCyw+tFM0TP7McGVC3N9qjPoKYHiXZdWCKVw/bA9tkuARTeUQi1LjXEWV/lHnZ8sOFIfkO X-Received: by 2002:a17:90b:1b10:b0:1c9:cf93:c57 with SMTP id nu16-20020a17090b1b1000b001c9cf930c57mr6222884pjb.154.1649194673242; Tue, 05 Apr 2022 14:37:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649194673; cv=none; d=google.com; s=arc-20160816; b=k1/jn3dv2D6JUsqXqgLo9nQFmvnMoMRHSLHe55LnmqhOjqU1HM88/BgmhmBrH/EGwv hD0mGSlwBvPjv+alicuVZe8TBJh9XW27fIxyonpFDlE8YmP9ZAoe1jdgyJIkYLFJPG1S Lj4za7hKYk8O9XCLzgAfn6Aonvdh+ie+bpxGDMAUo6z+9rZEYWbRW98iSZV10uCO0DUM bZtaf0iK41N9Q0Zu4SaC7MdS2nwEUAh8wk8oBk+IMSf+MyfMeywW9+Hms2BrnWCfjiwv 3KXokn0JpirJCn5lFREgG1BKUhmp/u/zKwyGN8pplb/ODa6P5Xple4iOycQGqngRSGV+ BQug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=wLAn9GLraFUF0+Wziqpwl6DlJuaDd5JyMsXt0a6TOUU=; b=RuS9S2/oUOal7PcWP2JLA35+72L3IM9AsLfRCg9yo0Ko1VopEhA7Rd2Nd8V0cH6rVH dn15QqmoaSfhRd+50mhdwckKw0QZdT6gaGwpQOEm6uyWe2PmFb4/zOWZw8qXIbOgCmUh lH1YlWYMqgl8vqP8NXPW+Paq9nF/tKQPPUarJv43ig/MlEkDZtNHI8bOiiccJrhRA701 oP3UK7hJFEUnCSdktZNh4bSgVqtQGfPysTuaLATL25RkpasUVTuxakEwxxi+VlbsY++a czhF1KeR4DdoK5v14RxJp4WL+fDPlWdBYAwspcFFsYhuFrt2H2xoYvYqe3/EPB6hTnbI SgfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cguKSRAZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=4tV93tld; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mh14-20020a17090b4ace00b001bf6715212dsi3587977pjb.104.2022.04.05.14.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 14:37:53 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cguKSRAZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=4tV93tld; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E95FD1CB30; Tue, 5 Apr 2022 14:27:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241153AbiDEKTE (ORCPT + 99 others); Tue, 5 Apr 2022 06:19:04 -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: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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/5693fa74f98afed5421ac0165e9e9291bde7d9e1 Author: Valentin Schneider AuthorDate: Fri, 12 Nov 2021 18:52:02 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 *= 2; - if (!IS_ENABLED(CONFIG_PREEMPT) || !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) { + 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 = IS_ENABLED(CONFIG_PREEMPT_NONE) ? 2 : 0; + const long min_unused_cpus = preempt_model_none() ? 2 : 0; const long min_required_cpus = 2 + min_unused_cpus; if (num_online_cpus() < min_required_cpus) {