From patchwork Thu Aug 15 08:29:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Gondois X-Patchwork-Id: 819973 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F7AF1C2301; Thu, 15 Aug 2024 08:30:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723710652; cv=none; b=jx2cIfgQOJ3wmMblfmwBDZslamxRynNXcwhNdLg7q15ry4POwTz9h3iCtFzTRB7clOvwcmATaLIBCiNGZcHkK7qcfs2GvTYBHVZd5iNrXsc9RFi3L37dbydnt99UOoxwnc7LAV+auH46n4MSn+4HvR1cChm1wK8Sjec3MQnV5F8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723710652; c=relaxed/simple; bh=UCKGBoCnmN1loLFN5J/skTKjHoNsWsvh3M3lDR6/A44=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VK1DqtmvNJ18YwXN+RHsPVZtdqFEQ30762iq8xo7Mu1X6M4LyCthtEoTvibD/RMuf9UXLxUR2heQejqUSftPF8eBIazhEtd19CgkUHXO1+aX0A1CjGi6sWBZNXO2Z4qrKCXTmFyyE+UoMW7aYt0cvkxgJA3xvHTw9FYrrjRMNfk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 12C931756; Thu, 15 Aug 2024 01:31:17 -0700 (PDT) Received: from e126645.nice.arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 94E103F6A8; Thu, 15 Aug 2024 01:30:45 -0700 (PDT) From: Pierre Gondois To: linux-kernel@vger.kernel.org Cc: Pierre Gondois , "Rafael J. Wysocki" , Len Brown , Viresh Kumar , Robert Moore , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Martin Rodriguez Reboredo , "Rob Herring (Arm)" , FUJITA Tomonori , Mika Westerberg , Manos Pitsidianakis , Danilo Krummrich , Thomas Bertschinger , linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, acpica-devel@lists.linux.dev, rust-for-linux@vger.kernel.org Subject: [RFC PATCH 5/6] rust: bindings: Add bindings for rcppc_cpufreq driver Date: Thu, 15 Aug 2024 10:29:09 +0200 Message-Id: <20240815082916.1210110-6-pierre.gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240815082916.1210110-1-pierre.gondois@arm.com> References: <20240815082916.1210110-1-pierre.gondois@arm.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add bindings to prepare the enablement of the rcppc_cpufreq driver. Signed-off-by: Pierre Gondois --- rust/bindings/bindings_helper.h | 1 + rust/helpers.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index bee2b6013690..a7ba64b5614b 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -22,6 +22,7 @@ #include #include #include +#include /* `bindgen` gets confused at certain things. */ const size_t RUST_CONST_HELPER_ARCH_SLAB_MINALIGN = ARCH_SLAB_MINALIGN; diff --git a/rust/helpers.c b/rust/helpers.c index 3b2850a11859..624b5c94dad6 100644 --- a/rust/helpers.c +++ b/rust/helpers.c @@ -370,6 +370,12 @@ void rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy) cpufreq_register_em_with_opp(policy); } EXPORT_SYMBOL_GPL(rust_helper_cpufreq_register_em_with_opp); + +void rust_helper_cpufreq_verify_within_cpu_limits(struct cpufreq_policy_data *policy) +{ + cpufreq_verify_within_cpu_limits(policy); +} +EXPORT_SYMBOL_GPL(rust_helper_cpufreq_verify_within_cpu_limits); #endif #ifndef CONFIG_OF_DYNAMIC