Message ID | 20240528005648.182376-5-yury.norov@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88270C25B74 for <linux-mm@archiver.kernel.org>; Tue, 28 May 2024 00:57:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2E566B008A; Mon, 27 May 2024 20:56:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9DEE56B008C; Mon, 27 May 2024 20:56:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 87E426B0092; Mon, 27 May 2024 20:56:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 6D6096B008A for <linux-mm@kvack.org>; Mon, 27 May 2024 20:56:58 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3296D12168E for <linux-mm@kvack.org>; Tue, 28 May 2024 00:56:58 +0000 (UTC) X-FDA: 82165990116.01.13C3B71 Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by imf22.hostedemail.com (Postfix) with ESMTP id 6ECCFC0002 for <linux-mm@kvack.org>; Tue, 28 May 2024 00:56:56 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OzWmmd0q; spf=pass (imf22.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.128.179 as permitted sender) smtp.mailfrom=yury.norov@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716857816; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=XKPhButNX8xjaR4Wjw1GyI4VB8TnS9vBdoFs31kcATQ=; b=8XKzMysp1SZxX8JCDE1KrbGp7MwkNqzn7XpUT017orfSlBdbKAfAakP0vRJStgDYOr67SQ Igc5VUbU+pyHU/3qT8CYJagXNU+nJXXP3fVtPXt6/qiicb5GxNS3O9t6zAJ7NkyH9Ih3Fm Md8mImO+CANYzX0uAItPPXQnG/SZdDs= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OzWmmd0q; spf=pass (imf22.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.128.179 as permitted sender) smtp.mailfrom=yury.norov@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716857816; a=rsa-sha256; cv=none; b=qdgeswnCs+AWf5UyHq0IhU8P4jZvk7dLnJJgqcHp1JsWfr37wAsi5yO8wxwqrzPZvavUbS 6NY+lXVcRPy79KoJfRWu+lF9a+yPXsiYmLVaq86wHZeHwKBtXhRdoqPM5JFIz+oT1Tkc0g Fqd139j+TlbvHMpoMXtcGNikWHyiSHY= Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-62a08b1a81bso2672907b3.3 for <linux-mm@kvack.org>; Mon, 27 May 2024 17:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716857815; x=1717462615; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XKPhButNX8xjaR4Wjw1GyI4VB8TnS9vBdoFs31kcATQ=; b=OzWmmd0q0cbnw8NEYCV/nOHWu8Z15CHMIssIpNqE6VKI0G5pLAGOB4IwqSxsZCukKR +tRuJUH/oSVtdFWdao995IrsUXj4uLYEJXfVsroMO1ydmWVeo4lZitrnViWzclVqvB1C bij4cvRRKDaQTvMItn4LUR7Kc5Dng+ZhCN9BtLhaNTqtk9p9GNV1xVKJ/gkuAK+VAcpX m3FJCFFMCvb8CbTM8iQD47HMeXwp4l+1Ou5H4pU7cZMX2il5/YzxVZLQzdGAtjHIHfY4 xOkrflww/7ahbKRP4oQCZjgX6yrXsuKwqYvdIiyeq1ppTM/cQMebHKCYd30KDDWBjkPt yGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716857815; x=1717462615; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XKPhButNX8xjaR4Wjw1GyI4VB8TnS9vBdoFs31kcATQ=; b=EYGXG7SzjCPbzemYbms9dg8Se/dYYRjPgQ04KreNBbxfEtfnf6vAUlkzIhKzBhYt9P FoQn6qW9WuW8zfjpqDR8LjUFOoOAAiXyn0Cm0w6BPQVPSE2ab2MgxyLL3YLm0/Pgdq61 jwSSy9Tn4WjPmFA07XiyyU682sWl2btOYLvWibd6KxagvkqbVPIs73CzhkYstfUvhgSr LXUuRq/NG8lbpgzqpaJtqDls5We6uSLrJ+ArsB7vtH8q+HXssL+eat0qSJe1dox4WMsJ o7W8im1GdgxSAz3snXBVfF1l+iYRRwmTsVLcsWy5vccaBbCosIl4xh8uCpCgTTNnUIF8 UWSA== X-Forwarded-Encrypted: i=1; AJvYcCVYAq5zYkihSLZzdFbJAGJshkwvCVF1oyR6gJJQX2Gp1Nhj/d+kkYFfIpwW3Twr+JVsam28ieIHYJiW6vO2jgrQX88= X-Gm-Message-State: AOJu0Yx8otxi7HS5+iyQ2m+8JW3u3EW8pVfkE57gRtpP+bvk34YSZu+n loasIuHfWdww9mYqJvrfvKhSNdqg7GS+CizJOdhE3cYDfiHY8fDP X-Google-Smtp-Source: AGHT+IFe5hc0HMbIYKV8GGca2K7UFivtrv6cj+FsXeO4rccoRk4EjlKGQ1bt+Bu1VPRdc4g49tpZhw== X-Received: by 2002:a0d:dfc9:0:b0:61b:3346:83ce with SMTP id 00721157ae682-62a08d83a1bmr114507497b3.15.1716857815579; Mon, 27 May 2024 17:56:55 -0700 (PDT) Received: from localhost ([2601:344:8301:57f0:35f3:16c3:302:8fdb]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a534cf7sm18415697b3.115.2024.05.27.17.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 17:56:55 -0700 (PDT) From: Yury Norov <yury.norov@gmail.com> To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Yury Norov <yury.norov@gmail.com>, "Paul E. McKenney" <paulmck@kernel.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Amit Daniel Kachhap <amit.kachhap@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, Anna-Maria Behnsen <anna-maria@linutronix.de>, Christoph Lameter <cl@linux.com>, Daniel Lezcano <daniel.lezcano@linaro.org>, Dennis Zhou <dennis@kernel.org>, Frederic Weisbecker <frederic@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>, Juri Lelli <juri.lelli@redhat.com>, Kees Cook <keescook@chromium.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Peter Zijlstra <peterz@infradead.org>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Tejun Heo <tj@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Ulf Hansson <ulf.hansson@linaro.org>, Vincent Guittot <vincent.guittot@linaro.org>, Viresh Kumar <viresh.kumar@linaro.org>, Zefan Li <lizefan.x@bytedance.com> Subject: [PATCH 4/6] sched: drop sched.h dependency on cpumask Date: Mon, 27 May 2024 17:56:46 -0700 Message-Id: <20240528005648.182376-5-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240528005648.182376-1-yury.norov@gmail.com> References: <20240528005648.182376-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: xe4bkipm8jojc9hzuysprqkqsrgcukh9 X-Rspamd-Queue-Id: 6ECCFC0002 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1716857816-748968 X-HE-Meta: U2FsdGVkX1/qUtYYjv3/Cl2XLQr3l1xdJDbD7zsCabDAfg0o70iPiSvwFPHqvLXjRr0EYhi4IWQWYhwGzHjMOyN8caQ+w9YhwO+QpsnZSXjZ4t0LbXe91vwhbP/tnPAjEUZh8Yxp2U98eAgqB/2Kh7x29rLccEtGIiboLLKmZtzdHmF+Cch6hWQMk36MTGcdaAjGj3mB+yEU4hyTAgyNP+rlDIdj3puwoGJjGCFGef3eeBnFDx8xURe2LLeXsxjNnSwUURrU93sUQ3ttZ7xv/4w/dHfkRF3YaLFOSBO9Q7g7mdPoQTPN7e/n3g+dBA8jGyWHZ/vvk8NQMWl3huAB2Vp0ieBAXtHZUoszv7JMA+Unxjn4sdz28ZGQU6fat1LlPhgLMTNGuN9xz+ak/N1Xyf8TZ49Bu5m4NKCdt73La1Oc4wqe57/LEMnPVmOozCmr/Fg62wIJgMCYxMsOdiJ1uJJn7XZ2YbGb1P/2f3meEomfpo3nTfKH4+q7Xtf5/byF+NpOHPEczHz61Zmk4k6FkQHcHuK4H72P1fgQ3ly01+IgCFs5k/W8lf464WlvdOuo/gpoqmBOPFwdoxAxje90/5ZCracUqr61ldAk3Xwf20hiTaVgjozqzQM1looizNjN8q08PEF2NDh64KuFLSFl6aWOHvPX7V0nbmBQkXlHwa78GGKJpBT15NaPmqRo1BVdsV9OYOGnw25f5JbyDnwVsw2OZqvEBXelGstd1g+TwL0V57q6AB2JY8NPsHlyCn4+XRYa/jY8EanNZbPZFgUqLdWiN/7wiReZD0QbX99jMXkBNcNr9lbP1OZnFYHmAWotW9LwWqeMqUUGwus7qoqwUbgzdSQlgbMNNC293/YWyPrXabZvxRCeE4q7+JR5dttosZD70VwAXrNaXJQBJbZWSNq0I147QWSrwZCVGyTKhof2XoO1mxISeUDKZzfy6NmWsb3YX39D1IVya/eJ5Nk IWy/Ypg6 gTxBBKZre9sFZpvJ85tA4HqLgeonu8zsQE4Tg6ZwStJmKMElxPAjKVEeZS+exH3p86lslXXPN/C5OZZodgxH784AdPFhz7P2xopgiU4v8z4sdzOV7QRbcQgfN59iyfc4ravF8A5/+Fk1TyfppjnW7wdlvAfaf16JSLbkUlMcpNEjW01Cyx/nqyBUAxL2nRmR89Q+/X7+jvtN896rxtKMw43rKu6oyWSiEDmkZIuYUpHMxi6aZJkNKoBRjx6Ce/uGUH8cZZTBhZOI930igBu3SrAget93BDcwLWS2FRpQctB1aw9G47VstecmRGUQTa+V5paOo0xCGyrRr+vQoBwoM5jiJL6VguJ1bVLMzDfEJ1eRa3J0BPHFfuI64wjDjnC8mUsa1UsZ4lbF2/r4G3IjEmO7BtRdVibuo5pk8Fg7C9rEdgrBKQBHtaJM9Fot4+uRLZRcJN6ChjfPpf8sjJvKG+mQOzO+tJOn+K0cxBusqGd7wOANb2MwJU4MjYEtX3GPXvz583CdKgshmxYFfb0CTBQ16L1/ZMMBXf0vpoicFYEMnYzF5Cq2NTr0seT5Sb5InCQRtMrjJ695yuHtJXqm4Hybs+g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Cleanup cpumask.h inclusion in core headers
|
expand
|
diff --git a/include/linux/sched.h b/include/linux/sched.h index 98abb07de149..f2f907ef1389 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -13,7 +13,7 @@ #include <asm/processor.h> #include <linux/thread_info.h> #include <linux/preempt.h> -#include <linux/cpumask.h> +#include <linux/cpumask_types.h> #include <linux/cache.h> #include <linux/irqflags_types.h> @@ -1778,7 +1778,8 @@ static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpuma } static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) { - if (!cpumask_test_cpu(0, new_mask)) + /* Opencoded cpumask_test_cpu(0, new_mask) to avoid dependency on cpumask.h */ + if ((*cpumask_bits(new_mask) & 1) == 0) return -EINVAL; return 0; }
sched.h needs cpumask.h mostly for types declaration. Now that we have cpumask_types.h, which is a significantly smaller header, we can rely on it. The only exception is UP stub for set_cpus_allowed_ptr(). The function needs to test bit #0 in a @new_mask, which can be trivially opencoded. Signed-off-by: Yury Norov <yury.norov@gmail.com> --- include/linux/sched.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)