From patchwork Fri Apr 11 10:55:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 880804 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2806128C5D0 for ; Fri, 11 Apr 2025 10:59:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744369148; cv=none; b=urW1TvJDgKC7onzkpmzq6lRwiP/CxyrmE8zk7tl3F0basoXl4+E4N3SnMBnC/1kgN78S2mDWXDu8l5gWn1dBVw6wB7GroT4AnF3S1nUgjWBoPg/uxX9qo5dr+JUumdc5FyI88SQTLzC4oC1BopGRnNtLdYAU8GOh2zgt3mUXUrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744369148; c=relaxed/simple; bh=Lz8/dlHquQs8+KgJWlTHfeHGDG+b2IGK2cF/V+dR5o0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ul8yJLgmIivDe/F72MkENtYCDVUnIOwIRF5jVD7NR66V5MTZw+gudGbYqHfBlRgHCpKjmFkifxe0q3BhTG/aGzBnulq00kGo4YpEFoUVsWlMnl0JohFjBXn1dxzCFFYZXVzbuKU8cQNe/rMP4vYpxwXnDqB06BaR+K/Oaq8dQG4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=V/nZ8B7W; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="V/nZ8B7W" Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-3081fe5987eso1179912a91.3 for ; Fri, 11 Apr 2025 03:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744369146; x=1744973946; darn=vger.kernel.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=/cw314qO5OzgfErL/PQP5mXU7cjPJv+CNURyMPhNy3E=; b=V/nZ8B7Wdwc5yzPo3fPLqG5IOO865KEst1zoHPUXvJ4QQlfc8rjt8umE16XlMn3Mt5 T9X0uLWMusDiVzg0QekAxOPUQuIcRKz/85VN6iwzKfRxo1+FwNjiy5nAldDtRltkDYoi gwFldS1ra6iLBAEyOUAamPAjqyKqCKxGu+NV6eINHAyTCLjYNHXAcyu5n4EfoDDuaW1I lqL1WPq6/Ek9Uo66w3uprsx6N5DTIdqN53cNBGNIXQiguIKPJs73ATFTMqmTjlV7oaYd jyipxrQUrhbSsI6XAF2X9mArcIksuqUm5TXo6KFVrZiOMyXwXgIwvHtZ/XSe/RA23zAI 8a6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744369146; x=1744973946; 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=/cw314qO5OzgfErL/PQP5mXU7cjPJv+CNURyMPhNy3E=; b=WyR7t6/a385k2rVKXym27UYrv0Jsesv/FfmlOrIwZ4BSNju6IMFQWVKZO/ZbQ7NoTn kRIKVqa92yhyZI1Jkq7ALegqth8xCu6vEuY1N+Htl7gH9L1pf5LhH3H845g7paprUtRf 1H1TGCgVYJ/nVE5YOS//3jaUMfNk+szhkpth9pplDNHrPn4A1tFcpGrBNfBuW56mftHc 0EzhXTLkR7yiTccID8pwlY/LCgOL1XV4OFsZH9MDfCPkbj5bNdRlbh644FH1Pe1hyR1O KwyO/pvfaG1CWfR/EF7sKjDXZ2FpUoxY/d0tTtNgfgDWu32lAlewj4RM399nexeGLxdO mFCA== X-Forwarded-Encrypted: i=1; AJvYcCVT9Bm85he/avVLqTi3e9gN0hQox3CS649IrY9+3ZM3QrnFBACzvBGvsqk5st7DT4tiVM7yJmRd4Q==@vger.kernel.org X-Gm-Message-State: AOJu0YzS14muBkys7CKTjAZb17ETnL4OGxMtAs5B9hW1G727AT9PIHtE HMlZPSmnuXqkPG3PAR33LKzLw9nwIT3h1LDJf9fkF4W3SL8hQHf1nd0a92HILns= X-Gm-Gg: ASbGncvaBsjsrYr759ivyYbXBp4cvJ94bu59YicrmCWZo7/O9Tacba1J3qIHAweXkUS rB6ifinDTdHn4dPtNdh9c2gD5GL9djXt11dsbYUoMrzCkRnSQM3+HTEEiJfInJL3L07Ob1miSUD 0VIfi4vX8w43rbw6VYwRGGzwLGE+pjBWWJry2LNxQhIQkI6/4zwlNnIGYQCpkqjtdYGAJsjBAfr 9cOmeetsS1G2q13m+od2Zls6IUdfI6B84jvCLblP/O3g2qrUXjgtYPqD+lZmGtc8iyTLO2U8Zn9 WrOhDjwmSyg34nIYacYzzlZ1HhNY01nOlUcYvGIeju57Jzs1CFup X-Google-Smtp-Source: AGHT+IEFxwHKqoOI4yL6xARYViMgwvtWz0BpJSZrfD87BTkTPcEYvJrbdX8FbmAvDOdGi5eq0VSwyA== X-Received: by 2002:a17:90b:5744:b0:2fa:1f1b:3db2 with SMTP id 98e67ed59e1d1-308236723c3mr3321753a91.25.1744369146401; Fri, 11 Apr 2025 03:59:06 -0700 (PDT) Received: from localhost ([122.172.83.32]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-306dd11e79fsm5408297a91.19.2025.04.11.03.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Apr 2025 03:59:05 -0700 (PDT) From: Viresh Kumar To: "Rafael J. Wysocki" , Miguel Ojeda , Danilo Krummrich , Yury Norov , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?B?= =?utf-8?q?j=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Stephen Boyd , Nishanth Menon , rust-for-linux@vger.kernel.org, Manos Pitsidianakis , Erik Schilling , =?utf-8?q?Alex_Benn=C3=A9e?= , Joakim Bech , Rob Herring , Burak Emir , Rasmus Villemoes , Russell King , linux-clk@vger.kernel.org, Michael Turquette , linux-kernel@vger.kernel.org Subject: [PATCH V9 02/17] rust: cpumask: Add few more helpers Date: Fri, 11 Apr 2025 16:25:01 +0530 Message-Id: <878eb11f74cd320cbb06fb04c8ef655de81dd358.1744366571.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add few more cpumask helpers that are required by the Rust abstraction. Signed-off-by: Viresh Kumar --- rust/helpers/cpumask.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/rust/helpers/cpumask.c b/rust/helpers/cpumask.c index ae964cddbd41..30fc0bc0c0e8 100644 --- a/rust/helpers/cpumask.c +++ b/rust/helpers/cpumask.c @@ -12,11 +12,26 @@ void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp) __cpumask_clear_cpu(cpu, dstp); } +bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp) +{ + return cpumask_test_cpu(cpu, srcp); +} + void rust_helper_cpumask_setall(struct cpumask *dstp) { cpumask_setall(dstp); } +bool rust_helper_cpumask_empty(struct cpumask *srcp) +{ + return cpumask_empty(srcp); +} + +bool rust_helper_cpumask_full(struct cpumask *srcp) +{ + return cpumask_full(srcp); +} + unsigned int rust_helper_cpumask_weight(struct cpumask *srcp) { return cpumask_weight(srcp);