From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 ED7EE2DF3F2 for ; Tue, 2 Dec 2025 19:37:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704274; cv=none; b=iujW0lqyxGDX1xk0p8cfVU8oT3pG1U/JkpkYqYCoPXhauTWGrUTd9fHgSQOkG5lVQ4cnBv1NDqqJE8EXMLD5vFScQ9YUD50k71OGSp4fvTvK5jMje9h2lDEnC5YcBOLJTifiXEJ4CG2C9IA7vP9n62Xom0zDpycrsYk2NPvUojk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704274; c=relaxed/simple; bh=KrTcPRj3kk8ecxiZ6V2FePs0o0lFQY4TeRIDSk6mtks=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=P+R/bsu6rG/2MjeFYsIyNgRBpKxeRz8G+O7lKS7ln0915wmtwo/n8GRZZprvW+xK3ZjDWxG1QYon8LpqbI8yIzVBF6MsgQhBw/4paJ2PqDmzDTpSNLUhYLwJbrNEUe+dD428zRyMSXNh/W9skskFlZMKbCOHZulPQ3T6+Za/aKI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=GcK5Z+47; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GcK5Z+47" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-42b2b642287so3059376f8f.2 for ; Tue, 02 Dec 2025 11:37:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704270; x=1765309070; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=35fE5jiNN4qN1heeykpDeyMnAdG2GzW9esF/MwfbKHE=; b=GcK5Z+47y2cUNEpmlETSZbYMOixfZQXXJlym5+zLOV9w/Ac0DvD3xucxuWsAs33PxW brOTxhWMq8wRtgSK4VmUrbXT5PpplIZNytkdDPscls9/M3OLQo9jwdYBoQFjfbNxPSCe kuYXFl1dacGs7KY+uPnsD/deGXRE6P+zpehSQL28qPNe0CUYNgcIJVss//W9+OTXzzUh yizUm49anbqdNf1e2SAU5kM0jmGQOsUPYWpVH0QIeJV50Zn3mzb+g+KdcSuk+XUyuBL7 25fOhKrY+m5fvMCc/02y8vsIcfPgb4fdmND9DkBQ0mWXQTcA54ZrcX1ykTje8+KXHcGC QULg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704270; x=1765309070; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=35fE5jiNN4qN1heeykpDeyMnAdG2GzW9esF/MwfbKHE=; b=lWT/te7vI1BmHRcn7E8eZQ0mdNk9ye1TICiFdEEm1PGyO75/vS8FoXtI4myBhWt2Ls RH3jqFZddMfIAnyBohDaVejkiLg4Am/Z+hTU+7KnsUTaFtsDc5hjLm2cPr0kdUXGgFWh F7FD2IRp4Y/nfg/4+MeFgSLn5U7I7Nmo5X65xSddx8iiAeOIvki+C4aOaRzEjbxSRNU9 uNJT4R1A7LohyU10MvsmfzTx8EAHZ8Xe1Wg8/8+0xCjID38TTd0eDSuvyyTU0B3VjbRz 6zCJTLhQY3R1p2xM+VpMbCWwpciKxeCjlug5ikG3ZDTUYW4lL7UxqJCAzOoIYLpt4GQ1 FMUQ== X-Gm-Message-State: AOJu0YxOz/d032bmJanSiw94PYq1YN7vdelzOvr2bG7gqg4lCO8zAMDL rGMiwnWSpAYlPCJLEWLCNT+K/Mo1q5N+saPbcRiM1iZH5HjTIR0aF8eA0dbMhYcrFIiNJPAhJyX g/TLiBW8BhndKeWwnlg== X-Google-Smtp-Source: AGHT+IHzyc4+lsVIW+GXbX2eeHAyTIHI5LBqCm7Z6BNxznU4WRlrlO9iqtoyaHP11iCUYlkvqJM76J5Ksasm4So= X-Received: from wrqb12.prod.google.com ([2002:a5d:40cc:0:b0:42b:2fcc:57d1]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:3113:b0:42b:3d7c:c7cf with SMTP id ffacd0b85a97d-42f7221c33dmr413625f8f.15.1764704270240; Tue, 02 Dec 2025 11:37:50 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:25 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1133; i=aliceryhl@google.com; h=from:subject:message-id; bh=KrTcPRj3kk8ecxiZ6V2FePs0o0lFQY4TeRIDSk6mtks=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AGmF4ZqM29Fv0IkANgi1X9ydX71ofLn1Tym 9KMrKMktRWJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABgAKCRAEWL7uWMY5 Rn+vD/9wm02QonXpBBrLuDaCzqFVePM4Wg8JnPZY10dRetVt7m37oEykkkA4DEzOKS2CEuMr1MX wYzzL1AfIB0+fTZWaKYFqiwL/Gak7LrvWSIpEe54sQlfJ2S1lBynaTtsC13kkLxZHDOMosbMgXA 2dgJP+PddAiX07Z4fXrJdmsOV0tgpuQCTXsZv5NAP/qRZwt65ifXmfMrUBRG03Ua/pRKM/nIyXD w28bpHdgCGID5csRpVYH3Z9EX8fJNrdwntDh1YTi7fmUc4vdMb1cNqrADq6nS5vHRKL2gAgwplC U2vAjKNgE0knwrXf5yisSiAlwYjEMVSGzGL/0Vlcb9FhnGGIXS13vgnJVkJt58x4HVt04x24rx2 xxAMju68UcCyWyV1ihu2PBTyWED/Hgww0f7uGgSOW1ZYvMU+5EvDXqM4sAF29n82XarB7QdrOGt 77Yy7I5ttfxLN4ldV2oluP+Sb/3RRhNfWNRTB7GImN4GIw+j621oofzF7dt1w4Y0XRxQrTkBXO3 C+K9Xz1vX83SqNTvmRrROtyBecqzF/I6CiV8HoeknRyZ8NvqgaWaoTDXWWip5hmRWa1nJhmrAxh Cpg5kkL133cuXrgD7tCfNxBr+4Ak1C3IUehdLZ/mGAc/fIVBw+huyOFmNs/wpltAwlC8xLwTi+3 4Z+siIayCb5pu4Q== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-1-a2e13cbc17a6@google.com> Subject: [PATCH 01/46] rust: auxiliary: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Greg Kroah-Hartman , Dave Ertman , Ira Weiny , Leon Romanovsky Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Greg Kroah-Hartman Cc: Dave Ertman Cc: Ira Weiny Cc: Leon Romanovsky --- rust/helpers/auxiliary.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/helpers/auxiliary.c b/rust/helpers/auxiliary.c index 8b5e0fea449367ce6f462b421fa37a12a0ec11cf..dd1c130843a09a5688d5f7b620f= 2dc709a5ac5cd 100644 --- a/rust/helpers/auxiliary.c +++ b/rust/helpers/auxiliary.c @@ -2,12 +2,14 @@ =20 #include =20 -void rust_helper_auxiliary_device_uninit(struct auxiliary_device *adev) +__rust_helper void +rust_helper_auxiliary_device_uninit(struct auxiliary_device *adev) { return auxiliary_device_uninit(adev); } =20 -void rust_helper_auxiliary_device_delete(struct auxiliary_device *adev) +__rust_helper void +rust_helper_auxiliary_device_delete(struct auxiliary_device *adev) { return auxiliary_device_delete(adev); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 17F302DF701 for ; Tue, 2 Dec 2025 19:37:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704274; cv=none; b=RGz1JibDWtc5fMJGQPMx19FCFWMY1AFIbBRcoNmrG+zocAKpmn2YiOUvYoiqTN2i0qnOPFz09IrRQWGiq9pniIZvpa1p/FCUTdJDCuni0grpxzEia9bcOCKEFOUrMVuqzBl3Kd5ZBXxV/qtjP9jj11y+a9W0KCfuu3VCJ4ol4SA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704274; c=relaxed/simple; bh=1NgpNp9EMSFxPD8Sg6/iDL86PIYw0ffRVg3J2fh+fVk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=c6TdHm5/d3C4CyDcqjB100NVMclmPYpD1bc20+K7Uh1F08JdPA59kVaBcp9wEcXeKvaQJkwy/omehBvyz8PQ8+/zXQAYcp8K+s14c44+f4iQ992Bc1N5NeuXH3AJ9UnGk2u9I2VQegdaJ4bkDIZVgAj4oQiWzFy0hvosvfQy2Jw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=x6n5OFFq; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="x6n5OFFq" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-47799717212so44387035e9.3 for ; Tue, 02 Dec 2025 11:37:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704271; x=1765309071; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=WwCYyp24SdF7h9VKseqDU/38E/OiCNQBttHgpWFmplw=; b=x6n5OFFqLhVjSHimR4Q1i6dhjG9nfS0qZDLpg59/A5GsOoyVfKUTYqnzAvEVZY355P Tp7TixEVtVpnVZHggyiYoVUgfnLaXWJIw80eHdJ1GG/ihpbtMpizJ49nq9aegmRUqRTm xIFxxjMKYlvolsXGwzh+cyOfBlj+oc6vuJV2oPyrNXMP/5spbNJhhokpsDOY3aiTLdXB R5ARynOY1tgxK5BLmh4nh9Lt92Fj/aEfY/Q4Zx5+edOfTfzO2oypTWHlcHqsFh4YIPoc IeY9HoqV6/KT2teflmEJEnzfCpxdFTeruo4AUDJW4ybUjMVv7J230toL8vyxNZ4FYIbO a3mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704271; x=1765309071; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WwCYyp24SdF7h9VKseqDU/38E/OiCNQBttHgpWFmplw=; b=J2ixlKO66FbvYJP+1KVgWyMAJFC/9obGmyiwik3d/FSdgBJhWD4mxAaxoABK51dNVx LvhYbpeLLI/212VO82QU5xxPlhSH2OoxAAPUjfPb5a2N5NPwOlcOpTQIoDkLiMEMFpgw gUkB0ygmvMRkkO88EVGhvM9gCAclTqSxamECqUbF1OPQq/fMxb7oALDF8wFBqstA1GD6 uVKjWjL1BrHkIX/aPRe6JW6qosiz1dPU6wS0kRLrrqIDOsEsjRVPgApJ4uuzswdr/VW8 tGEZhMv2xox2rXjacvMEKSymOXYvZl0RULfKvVLKpvamq5mM7ct64G9iZ3AOrUgdl1Je Wsqw== X-Gm-Message-State: AOJu0Yzpi4BGO8i3p/8gocYYd8FGVRV6/pGN54g6ALK6Q/GRCtNuc7Wg 98lqWG4QRDkKGtFWlErXgySi5wqx40LDLuY5JaSCdXbB7sZZ4bicse+M1jmAFcPHByI7XYbCmfg XCYFdIFZgV5qYJabcKg== X-Google-Smtp-Source: AGHT+IEXA+5E3gD+NJOCvfgF50BJNZCaNXDPSKbCMUp92cE4C4Xar+1BE8tubajjA0Pc3tk6zlXcYArvgfyLwxQ= X-Received: from wmqg19.prod.google.com ([2002:a05:600c:4ed3:b0:477:a1f9:138c]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1c0c:b0:477:3543:3a3b with SMTP id 5b1f17b1804b1-4792a5ddbcemr6766645e9.6.1764704271475; Tue, 02 Dec 2025 11:37:51 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:26 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=949; i=aliceryhl@google.com; h=from:subject:message-id; bh=1NgpNp9EMSFxPD8Sg6/iDL86PIYw0ffRVg3J2fh+fVk=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AG0rCjQD0JBEGmKS5X0Vjnz0TcRPX2GZv/f 1bzlhg9sX6JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABgAKCRAEWL7uWMY5 RlPrD/9dtwChc5XcWGTSH3PenkcJtaHG0JU20v/5vjFnhONQ+8sMMh2BXgktl4szbVOWlge2+rE 4HXIGi52W+G8gLRkSSapScRBJSg4BAn614Y5Z7qtT6VPn5kNsxDtJ0tW7DNwXk7IH8T2FHQFmTq JbWW9uD0UCwdzdHF7svqeVcqCxrX5PlZ+LxjUglXsnEhJCAdofrh+qicBIA1YUjS6ceBlEpwz1H RoWkPDYkFaggM91AVUSjBoeDPDfBTzhKzNSQvLZKRBBKTA9OYt8i36zbK4Aa5VLKm+Fu+HGNt27 OF2wMkeOC1xY8ATwJMKaxHSACD5s3YXY8KQgcezhotCc447GLNSU9t/kxwUPwvFu4Iz8l64yd4Q JRTpsbXjOjW5Q5eKGjWPiK4hu6yFswHIKlUbovUGGtWRCtl7ZmnboCqrIXiRTXwrEOlrwQDx6DP IjRnpVYoI+pZK7v6mIHNykpPmb6u4twTPYO5hhDGGy72JgmGhtfaUQom48/PTCGvlIwS136RqpY wO5mMbb+62pdHxze38aoLo7DSOfdqVFo5i2B/OHIPgXLaeeq3QiECUeX3WoZw8fio26BpUM/tcS RM9aEOJqW1+B6vXVyVPRZAXX3b2U+5QJw7FnLbSlIb8Y1ug8oB7JF/79/FPn0hQViyLnJsZ/+7u f2729H44c8054Sw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-2-a2e13cbc17a6@google.com> Subject: [PATCH 02/46] rust: barrier: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Peter Zijlstra , Boqun Feng , Elle Rhumsaa Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Peter Zijlstra Cc: Boqun Feng Cc: Elle Rhumsaa --- rust/helpers/barrier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/helpers/barrier.c b/rust/helpers/barrier.c index cdf28ce8e5116728c97e24893cf12ef41578d3ac..fed8853745c83639c32f79335e4= 0b9494db11e98 100644 --- a/rust/helpers/barrier.c +++ b/rust/helpers/barrier.c @@ -2,17 +2,17 @@ =20 #include =20 -void rust_helper_smp_mb(void) +__rust_helper void rust_helper_smp_mb(void) { smp_mb(); } =20 -void rust_helper_smp_wmb(void) +__rust_helper void rust_helper_smp_wmb(void) { smp_wmb(); } =20 -void rust_helper_smp_rmb(void) +__rust_helper void rust_helper_smp_rmb(void) { smp_rmb(); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 1D12A2DF3D9 for ; Tue, 2 Dec 2025 19:37:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704277; cv=none; b=ClUtz8zj1n6qIgzb0WrKqjiJbtzwSqlTaJF7NbfyjzPhQuhOm4ANTTel5XGd/3opb1cT8M4YFHp1OctDxb1ODzU/T71+FtMTI47busMA5VdOovY+2mpQTpAjcvo6az5RMk4wv/baYgZb29wQGuD2+mzzaaGOVGP9O7ZdG4853IM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704277; c=relaxed/simple; bh=vm6Wf1Wd4ic3j/FfAZO3AmNOKApA9t2nGPy2yseb8Qw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=K0rdCHAxTYLkrdeIRo6uySNybxZy4SpeSHucw3RqYILQBVskuoE3AVCeuVG44BvprGxw/VJt2cBYL18oAv5rEcgw8Cfc+IOG2rTCbnaaXfuTgNcQNUJNtP9jYmOomLXDfvNFBVzBaF2UkkgEzGINAk0klM9t6NhLpKvLp3+m4ng= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=jKTBqLx6; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jKTBqLx6" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-42b3c965ce5so4257365f8f.2 for ; Tue, 02 Dec 2025 11:37:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704272; x=1765309072; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=sFe5bmfhiLyCcVhQmcwuWyTvbJt7v/+I11HunR0UnQc=; b=jKTBqLx658PiMb8LuerLVRNwvY+GZgLTmTnT9wbdK7bZ9UJfFiNONjBsUrcx0uhwqk W2Oh6k3+4cyd84E3Khk+HlZg8Zc4VyC69XVU/UaTdmZuTsKbDcWhjiGbgdsZ11ft3B1/ ApfHa55gP2r73RQpN+5779TIsFORA9tVjs/guT2RiYdRWr9Xu3gFUIFb8HZniNPP+/6Z s3+Nv3iCvqrShuCtlT1dQ2PNSOUvw6V9NoAihy4TNI6VPMV/DOaOrai4lU9u8MtNK3+H LqhcfST9eVhcLezChFJ0Y12RjSGchyYyWo/7mBwSUX6wq5x0av3whHgwmyuHu64nXUFP Ka6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704272; x=1765309072; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sFe5bmfhiLyCcVhQmcwuWyTvbJt7v/+I11HunR0UnQc=; b=rgvDOrgAIqftWvqk/R/B6XOZNabXSg1FqYupgFIkVh2igpz0JCk3BHeXuYTBfkb+JX bHYHAo14f5WY6apMzg2+7l0ofchZXg+jcH1EulnZD6rPE4WuDsVDsfWdbmio64SE6xEX ixefy7ER9o69TWy1A7yvfUA6hV+koHURWkugiXUeG7nYH6j4NoMjavJsnWORj4sxGYq2 6mTzSNLGC+gS+5zjlDF4fEYhj6DP0YHLsqEfPgtIb7RWEELWGSe421Y8iRFpYoN2gUqi 3XAx5TX1GQO34ALm98Vzhc2CjhLfBHLoTcqLP2lrzlNwhGxmN563P3nW1Z6F9yBZIcIP bIaA== X-Gm-Message-State: AOJu0YxjETfYMXdkyB7s7hcr5kdK6mCnKJYuw0xNjyM0rfR3OM7m0msE enqRxUCplfecB24b4mwYj7KoL6EP3Vq95SLZOGgQGSKEpKCVA8Ahibtd8kC7fk2x9TRGdnhu4QW v/Nup5JJU8WsK08u80Q== X-Google-Smtp-Source: AGHT+IHm+hugQkulk9EwGwcwh9r2QFeBYCjxWRVpn72SgiBAavS1T+bxwEOMDJ+0mSgvzFKkcKF4HZgNdfGNT6Y= X-Received: from wrtn6.prod.google.com ([2002:a5d:4c46:0:b0:42b:48e6:2125]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:290e:b0:3e7:45c7:828e with SMTP id ffacd0b85a97d-42e0f3491ccmr33287068f8f.33.1764704272435; Tue, 02 Dec 2025 11:37:52 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:27 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1472; i=aliceryhl@google.com; h=from:subject:message-id; bh=vm6Wf1Wd4ic3j/FfAZO3AmNOKApA9t2nGPy2yseb8Qw=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AG+DKfWTuZlNNxSVfXVmW/NdkyaCDUNq8o9 NCCJ8KBHqCJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABgAKCRAEWL7uWMY5 RjLOD/9kdn+rLfin03t+sUWhFm+M81rS5qZLh9dL+Kk5wlKaAqvYmvBmISECY1bFGlltmQpmH0Q LynMgsdrzoHMBJDi4D+fFTCJWH85UADVYE3K+HCX88AjP/m9vcghC06a/YCRqFeAyarzn6ahpNA 4A6KuC9sMA3OMFZ/YEtbuR5XgwSBKEvf1qZRVk66aSRcpzpkkhSR5eUE3nhYVcbFka46hNdgHc5 1mkrlEWnYJyjD/FpzZFw7TBobtTPcCKbqI2a8KU6w1CUWU7qddvG4FqF0vyZubL33SJZYGV9LUe ynLuHgrCrrGKdjI/Aho1L8/UkFyXiZ5lCe5ocmp01DRW+ziCxAsquCBMv6ods0pQI6PxlcNujin ZwqrFGSPH6uyXjcnq35Ijj6Efg3zcJ3KiztC2Oeu3MfNEZm+6J3GE6Pk7PE7RviSanqn2NZoGs0 1KNImsFzbZKbMmd+dq97lG2ENQexxOkbDYTImOCL/b7sCWJ7j0I1GeSjUIomYS93qDm53Ohr9E2 DO8SCopQlSwFXe5LFcAW4kHSCa3+9K3XgH6C3LPhtbTywJ7jNe4jxZB8eHWdCayPQaK+IzwPQ5E wPbSZPyVV8OUVRSjove1LPXuUG/Efa7c0PFzgTMa7WQzkfbFcDWack3EcQmYBB+sU7NPuOgnAjp cioA82VXKPPouKw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-3-a2e13cbc17a6@google.com> Subject: [PATCH 03/46] rust: binder: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Greg Kroah-Hartman , Carlos Llamas Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Greg Kroah-Hartman Cc: Carlos Llamas --- rust/helpers/binder.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rust/helpers/binder.c b/rust/helpers/binder.c index 224d38a92f1d985d78767d5a72f5ff60765b8508..a2327f1b3c9443df0ecd33275f9= 8d4719f0ab8f1 100644 --- a/rust/helpers/binder.c +++ b/rust/helpers/binder.c @@ -7,20 +7,21 @@ #include #include =20 -unsigned long rust_helper_list_lru_count(struct list_lru *lru) +__rust_helper unsigned long rust_helper_list_lru_count(struct list_lru *lr= u) { return list_lru_count(lru); } =20 -unsigned long rust_helper_list_lru_walk(struct list_lru *lru, - list_lru_walk_cb isolate, void *cb_arg, - unsigned long nr_to_walk) +__rust_helper unsigned long rust_helper_list_lru_walk(struct list_lru *lru, + list_lru_walk_cb isolate, + void *cb_arg, + unsigned long nr_to_walk) { return list_lru_walk(lru, isolate, cb_arg, nr_to_walk); } =20 -void rust_helper_init_task_work(struct callback_head *twork, - task_work_func_t func) +__rust_helper void rust_helper_init_task_work(struct callback_head *twork, + task_work_func_t func) { init_task_work(twork, func); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 28E682E173E for ; Tue, 2 Dec 2025 19:37:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704276; cv=none; b=n4xwU7eHiEr/U8P3QxjVPOiF/OilNe6IOy9UKiO+c8uztgxc7XhsGdxGO5R6goXVXAnjaqn6K+OzAxrksrQptvLkeOTupOqnrOL+LXD26wK00AUnI7zu05C1Z3rAk1vHpkhR1QyCcw22hFq6MUUWcOmgZhPMcZGmkP8qGuYALug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704276; c=relaxed/simple; bh=J4mncn1owE5s9oryWUtB//Q1Sk1bGK/HELXSuG+un0s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ECHstNKi7N3yTpTd7m+eKXbpwegyVFL4baMjra90dV44ycFFK8I4mjcx8aaJ+g7bcaPak34PifrpZvFmsf24WReuf5EiRbdAQ0mjkBH52opLqoYjp2AvLT/7e+4wedqN2Sv9fkHs5Id49v4JTMMmXPUbnVKI8Yu8jZsEE0xyPXQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=MkGC+xBR; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MkGC+xBR" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4779da35d27so68500305e9.3 for ; Tue, 02 Dec 2025 11:37:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704273; x=1765309073; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=jBoadXLKnf/GASk8KpNchuSWw2ZfdjysWDU1JTXwDrg=; b=MkGC+xBRf9HI1xe2H6N+eQDvOIZs4Su6M1NnyxH9ZLrVu1HvuSDGa0KnCph3jGTJPj rCH0hsUFN3gy6BxcdMPONPePp1tLmgbjinIklaiEvGyYSAYo6oMDhhhjciHBdkSxQocB 3Vkvngf7x1pDs/WVR1RTlLQ1TibRYXmQfjod9WLynSDqdwM6QriPlb0FgBzmArlZTgbQ Cv9XK5HOkxMZE37gzrC7h0HvHHdCtCc+9E+EMV0WiMs76J5EcXG1NlemrrhcF+hyzgOv X83YHtFbnt3Ly4XHPCJ9WxgThiN+urftggTwyxMhNas8ht+s9BY5sFdy+L6alu3Mx0Il FLKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704273; x=1765309073; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jBoadXLKnf/GASk8KpNchuSWw2ZfdjysWDU1JTXwDrg=; b=pUdlCcaZptSfUH820TVpksXocuX/UtwzqH7CMsza1HtSkZSBab2sIYahvZj0pudHCm bqlk9uq+hxNvuq3MplepDwicvPsFavnq+zYHrOqC7ibRaT7cBl69zAkf59eahHlw32KM I5fWqshfSHr9VdvvjaaFO4t6oogAz4lXFwOmIWijH1CD/27hZ7H2RMh9+n/Qt6wnKeGI zNEv6Eu+GTOh2ObpN7oWsmrWM2CZsFGqJ4LNvK1SSvck9r2vBMZctz+4dvwMot8lZ+jt pmR5vl8/Z/hST+3MUAWEhTCLj+xiKvnenrpUZucZeAPTVHRWao4YehKTus02oO1344nY ci1w== X-Gm-Message-State: AOJu0Yxq35aKeybrYl376mWxptHxJM3bVbk9yYcbtF5C+CYWOmqLW3bQ eiL91e7zlRtUfImWTFVfoQ4bSdarXbRfV9kctEOq+4PpWwuQYeqQOW2dofC2d/ERDk9MMBy91nd mArbSMPa/t/qHx7hs/Q== X-Google-Smtp-Source: AGHT+IGYXtAuSCHdFnDprDlJlDS7MRc2w0yjsLw0nyDtJVelCtYCehMi3d2+WKPRanZhoq5mv2NVvDvaKZy340U= X-Received: from wmbe3.prod.google.com ([2002:a05:600c:5903:b0:477:9fac:c456]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4f49:b0:46e:761b:e7ff with SMTP id 5b1f17b1804b1-47904b24957mr308612715e9.28.1764704273701; Tue, 02 Dec 2025 11:37:53 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:28 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=919; i=aliceryhl@google.com; h=from:subject:message-id; bh=J4mncn1owE5s9oryWUtB//Q1Sk1bGK/HELXSuG+un0s=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AG04A+yHtoTx42+kVX6fwxbh678vMqbWTib 6ReIp4QyKqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABgAKCRAEWL7uWMY5 Rr6kEACnDfYEC4RehWPOf5VlOU/QhwioJ/OZYzaPJhx1hIueWaoEGnBrw7ThSHIdGFxpKV6BOat r5s8ojJ12e+M+eAgrpRVszfEGgRGwuneodz7C8WfmnXnQqsCfmKwF+fsft36+oU/WOVg8hIBBUJ bqw1bEskVMKPyuqUYvpCNsXCymocy0FHxlnc5mG2fcI7+hOVCDXjJDn8XxHva5PBkZRIFwwKHdK fnFiAbY/CSWdcMA0ZTxR2eeY0oQ6Zu2iOoJBJkIM5pwmoUI9kRhjpXaV6A7rEn4cae5THKVthA+ 1d9q6+NRWG7ZiruIO4QbNIbWgGK5IKVHp5r3K3NL5inrJxfbXeTvNCMKU8LBJia4zca7aZ7XBIk nMjYebh6qShbhKGDhu56N9ePotStB+G8SaqlmYlTITNOoxqfC81GDSxQd2yLMf1TANqk51HxuO2 APiL/ShySGhzaijya8uIyAMSVoFV/RTHXBZ9qG+DboCrHGeDi307snOIyG6ZEfCA6peTaslFgw4 jqAx82He19Zp27G1VKb22ublXj+3YnlXOAG3dD3y/hAxcMW82QnrQmv7KNBm4QO9iDLqjgVs9IC AYygqnrSS3nK/4SAIrv+aEMoPG7QzTek2MQy5Ejt+/0O+HKawULovJ4kabfW/dpI/jvJaRmYaBn 2fi5/ToxMM13V1A== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-4-a2e13cbc17a6@google.com> Subject: [PATCH 04/46] rust: bitmap: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Yury Norov Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Yury Norov --- rust/helpers/bitmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/helpers/bitmap.c b/rust/helpers/bitmap.c index a50e2f082e47ad1bacbf453fd79d1fdfe2cc11f5..57e9e64ab0c385cbaec8ba3f169= bc304e07cf419 100644 --- a/rust/helpers/bitmap.c +++ b/rust/helpers/bitmap.c @@ -2,8 +2,10 @@ =20 #include =20 -void rust_helper_bitmap_copy_and_extend(unsigned long *to, const unsigned = long *from, - unsigned int count, unsigned int size) +__rust_helper void rust_helper_bitmap_copy_and_extend(unsigned long *to, + const unsigned long *from, + unsigned int count, + unsigned int size) { bitmap_copy_and_extend(to, from, count, size); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) (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 B83792E0B77 for ; Tue, 2 Dec 2025 19:37:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704278; cv=none; b=EXCN8EgsY7gS4hhBjJQ1fVZ8KTQR9hbpyaWvldiTUjLsRvXlOth9JTYfxFxS4QFHhK3f2DOD8OTWbKzT0HCG7W0/CTl/C6FnpkqiFIslRSN/iUbnca0IbuV8SYlB6BpqA8CGJX1nX0K12qJOxb7dpt3evX4IZYHEyF3A7Nagomo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704278; c=relaxed/simple; bh=uD9j+reHmCHmSrEyVog/aqUXZL+9jxZv7Nupt2ADvSY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=T+1oXajnMy9KG9vg6qbNURAIFikliWSf/eRK67gkMyKF6I86NNIrg/3lMFwqubTUD08vAYg2V8pXkiPqR0LRE2bMtwaMsXGwt1I4gRrbVcn220qR9aleUrKiAXN8Jc605pSRNGT9Lzyil5odBbDAVVfB+tB58TQpyC6m7MZDobo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=jT8nfLK6; arc=none smtp.client-ip=209.85.218.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jT8nfLK6" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b7178ad1a7dso751387966b.1 for ; Tue, 02 Dec 2025 11:37:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704275; x=1765309075; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=tk0jlp0yP27cbQytEOCTLZJMfOudYPczuG81EZ19s80=; b=jT8nfLK6ew0zS+MRwmjqmTM21tPFBHJscRpUMsEddpUqfJ4hVWNt1yw54Np8g2Eujr tgCa0wcPu3YR6V9p9I953HC0u/XDahxWOPQfV1Vd3BV9sIHgGVEUCKawrLQv8yX9L1+B I9VoYqqIES1DavhIgsWkIuBRBG0vrF3h/+fPtgjPimsVzA5PfaTsD89SaNNY6csDf+yI NhFbv9N0pKqyqNfKTRPhij+MS9utVTl0bKBIOLQl4tBsgzjdHwks//jejeX0JCotGYzU sCobGbCfWeRbCi4UdHS7W8dZqZgUReMkgRwfZNy/1jf/1nPYGhU5dqbHNhh6TswA93Gr i/eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704275; x=1765309075; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tk0jlp0yP27cbQytEOCTLZJMfOudYPczuG81EZ19s80=; b=CLU1BTp/iKJjyuNnJ8Vf8+9zbsGhHQcC54Y1+e1VE12bxlIN60/1qmnFVGtaDALq6k WghIm4yFZ5iMC5jegH35W6LrnjKIwGyVoNNqtyZ5DH8GIYk7lZNDU0YKd/M4iWXgbt+L 6vuUfgizHIJs9ld7zbfn9y4Y4Sve8MVBaGTIRP7n5RFmAC5YIA9zF+jq8noU6XDMRT3Z MSZTw3M/rrFlMDn3iok8eNFP0IXuo1QjlLs8bjB1QNKH8nEYnfJ8jE5igdHSpDRESk7J VS88Rj8d6bOXlZDOOsps5QDC/4ai8kk7WIM0IWewPBbf6hKjLFrcIi3iYI1PLPqJQCET vIJA== X-Gm-Message-State: AOJu0YzLk77eOzrncjWjl7ogpYDvpC1SG88HtJ9UXoMEy2M9jgVjKQ30 hflDdosbf82Ge4ByDMksuJp5C+Csf35yxyVF/06BGZguYcXtdodw5cAmzfYhbVP5N8d/CNpiZGf ax8uNJlx3yXcAJLo/Mg== X-Google-Smtp-Source: AGHT+IE/YNamjRwj5ca5T3qJEz1eVSOTSd4qUP6wtwrB4BgmOn0VYvJoStei03Op8ufUluirwMAkNvwcn0A4HHk= X-Received: from edbfi19.prod.google.com ([2002:a05:6402:5513:b0:645:417c:5ef3]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:968d:b0:b76:c0af:779f with SMTP id a640c23a62f3a-b79d0f77ed5mr37709466b.43.1764704275118; Tue, 02 Dec 2025 11:37:55 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:29 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1358; i=aliceryhl@google.com; h=from:subject:message-id; bh=uD9j+reHmCHmSrEyVog/aqUXZL+9jxZv7Nupt2ADvSY=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AHryXbGVBbdOODmUPCCouvq3NVaJBUH/szo /GySq+VAEOJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 Rl6jD/4+Ic2b8oc4ZURno4q6Jm5HX16l65EZMB6RJi4Zo7kTQxr+KE51eQOrg+q896R6Q3fEzc7 p3DXjlrd2hBKkvwrlDNNyhKX7REmVMo1ta9YQhoElzPxMS+mB2Ds8/H5v5rbwUEgasAKW4osbJy JoFWb8Uh4dKuywhIZISDdg3mS3wE5CPhOHI5akMOSZoPSF6U02BRzw76ADC0fL6zeYVb2uH4U+x bFHrvosbis6G7QbZwBJf/QVVw8cRsUft+y5HZmNhUZmk5983j2NZvlaDUwZQFQr3PMHiET3BMwk Xsl3At7+ErIu6fxukH9yBPNIWWTzcsR2N3vhoBo5mArZdWlVwSLmXFwcRKA8B+PSdDdo2OSiyYy HwyZ+zyQrrSfQjfsjKx4CTfIRsJrGnW2KpcfAWbvp0Sp++aKSbRyL5UTuNvtQqkl7Ig51paP9Fw ilA5dhjDbyxcFKhGqR9s+nULo/9bcEPKNx4HwelSGr/60as2Mhq1jRNg2wRHtAL4ojztGfCZkVq EfspkKYdqB3phWmy4aPhLD1nebM9UGIwpz/iv9/uNjYZuswuA0t7ZZaRxwssmbLXuAbjYYWtyh9 79aY2l+dPrjzzRZpbvg+IcldN+CBuEhhUjLb8O+DgDrsQclQrqvceDuilyaU+q06Msna4tHoh+k MEepqq6dy5zCR3Q== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-5-a2e13cbc17a6@google.com> Subject: [PATCH 05/46] rust: bitops: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Yury Norov Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Yury Norov --- rust/helpers/bitops.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rust/helpers/bitops.c b/rust/helpers/bitops.c index 5d0861d29d3f0d705a014ae4601685828405f33b..85be08b50a7c39e0627e4a2bbea= ec110bf591ee5 100644 --- a/rust/helpers/bitops.c +++ b/rust/helpers/bitops.c @@ -2,22 +2,25 @@ =20 #include =20 -void rust_helper___set_bit(unsigned long nr, unsigned long *addr) +__rust_helper void rust_helper___set_bit(unsigned long nr, unsigned long *= addr) { __set_bit(nr, addr); } =20 -void rust_helper___clear_bit(unsigned long nr, unsigned long *addr) +__rust_helper void rust_helper___clear_bit(unsigned long nr, + unsigned long *addr) { __clear_bit(nr, addr); } =20 -void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr) +__rust_helper void rust_helper_set_bit(unsigned long nr, + volatile unsigned long *addr) { set_bit(nr, addr); } =20 -void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr) +__rust_helper void rust_helper_clear_bit(unsigned long nr, + volatile unsigned long *addr) { clear_bit(nr, addr); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 26AD72E6CC5 for ; Tue, 2 Dec 2025 19:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704279; cv=none; b=W3jRhfliYoC4EQOZaEZaScQJ98Xb2tJItChjIfXzInTVE1+3iT7gTJyHU07SnObza+nE31613BWFpeapBf68of9yIIxYp/TkJZoilCgukI44JUc5lY34BILpiwAOnXXPpwhcnCzDDVzyQqyJk6uIMdmrCBTb4ZWfnighkZ0DVUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704279; c=relaxed/simple; bh=xERiU4ppA0AFlgBc/6yyG5R6CDD3y1wftzYAux2Kp/s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=as/WWLCfuFdeC8RE49+PH3T8AGImoFycmbzVYyFz/NnJq4koPtPWSfJPp1ilnHIVmp2itc4JSm3utQGmj2+EZC6GGYwdfFR77VVzAR1YhqX24FdIGRSbjpYuRODZeuyZth+gWiOLpc+dxrRTF+Wg4GPO72VHqxAdQX4OCN/WPdY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=qjJatZU3; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qjJatZU3" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-47106720618so74676755e9.1 for ; Tue, 02 Dec 2025 11:37:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704276; x=1765309076; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=A26qkcx0gzbdQjnPGB2mh5/mO34YYNtCkv24hE/+hVA=; b=qjJatZU3G6vu5eLhxQ+hU+aXgU2wubH6r6z5g0FjJSIyzUAUO5Ip1LtCa8yaXe9Xxv mu2ciDXyEH5iF+wotX0Zqu2AWkd9MuIcJZ3fs3eAAtX+oE3u8noVSzs1brLQWErTmavh 2rNrIhSq6BI/jCqVfxKJftV6PM/SClVhj8QsxIX/M47HA4SyEdk5cWlHZtlgcnRQ8lfQ NSUN7gaFUxkWrQvBUzosM2c6O2Q2JPKZTKNRIu4JdIe+yCx0HNwf1K8PqLUiVmMR4scL q4wAjSxryjNxK1XLw7Lt15SUBr1ON2+Y7b6ZrS/X1GUhcOJbTSVrXLbtmn6Ke3xqqdv/ MfhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704276; x=1765309076; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=A26qkcx0gzbdQjnPGB2mh5/mO34YYNtCkv24hE/+hVA=; b=CCo5sEag4yu24VxaG6dAfYp/xQVhrwvbHiT0dMSAakPyOUxZrVNIxBoGjAMsde5TRp zkJMMw6grEKbVK54/XWDSMfcl/HHFHS4Z6RHSgVw+Bxaa0lYl+08xc4Q4tgO+xYVucK3 KOi5wyIiXWZOHOv0nMj8IJgQEBzSv2DHyxgHxSyXkFcxwuEXy0qviW85/T+6RqbVfpDG mnfEApjhUNGkoGuEeTm4v1oQgXSMSeLEkoR5+h+nEbRmzqGmAX/OuZaJz0yzYifTucjb L01dllTC/nSQLsabxiyV9l0oQkOGW8NugeAJDSUnVSrCudJlO1E+oCasNxjOYkKYOkEZ ALUA== X-Gm-Message-State: AOJu0YxPv7r0LzLUmOm/QaIAgNnWnVnGwWTQC7CIORn/TdOOy/nqMq5F trbM3vpa9DrlMWunq3jCxUbRMPyNE8fTjLv36QZAwCUQ1JCr23WoSlnhIjkEwPzvDYpFuPdQU27 DCx7MJSrs0dvvajY31w== X-Google-Smtp-Source: AGHT+IGYpROhkFCJXaqZVss3Aj7Z4dCuqkHvh9NnQ9AmYfoUFQabruKqVts+lURH0yzSLg4Z6xsNOogkjHo39TU= X-Received: from wmbjx1.prod.google.com ([2002:a05:600c:5781:b0:477:1022:3342]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4443:b0:475:da1a:5418 with SMTP id 5b1f17b1804b1-477c017484bmr443104325e9.1.1764704276660; Tue, 02 Dec 2025 11:37:56 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:30 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=983; i=aliceryhl@google.com; h=from:subject:message-id; bh=xERiU4ppA0AFlgBc/6yyG5R6CDD3y1wftzYAux2Kp/s=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AH4l1ngaorSNoUeNZ3T+oo/2rSZCNF6W/TQ ksLlNducOiJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 RlDSD/9k+P6WIKkFcV3b27pkAPZFqmhGLpmqtIyvY5VUEk583LUlqBWEiXgYdPySMg4ZoGQOlDi xdFGnVVUqVCwBOkPCOkaHT8sNsU1adY7+0vSeg5fdAO1oGBanZD0ka5jekp3OGxUcFu829VvTQ/ dzrQZHoE8VBGN5bB2pc7IZwhuCRFC7rSRd9dcmpY1qXxS3/kTgz2ec6Y3YXMXq9FvGrke+9kAAC Nl71iaPvgxwnRtf6x0v8gHymZYa7ohOKHfB6YHhgD44byPCIYrPsembqgXbbQ0A2sNFfB2qLVM3 zaMr3BHwcYajhqFgZt5C1mq9svLzJ7SpGGE6ajEm5tGgNVvahIm39IlfLyUnIH2FtMLiC9kVnNz 5DMdGjmGZ7rJBODU0vhDQzL5cfZbtfLa+rcE316sbuOzzmi/lMd3G1UlrcSREjwUHP26Neeger+ EhP2HFpmWMdMOchAWh0uLVBvguqvBj9y+K0TPDuKLRJSaub6SplTB9NAqK4gG1w6t2+FNRsORdP vk+SNYTtwk1O2IwB2xOBlNp/P+DGKNphxiccJsE+XN2PciejYioYALNij1VeC05TDuPwXvfyvsZ ITUA2KCHzGDrkst2lbcev/aGQegtK3WnrTjLMyigV+YItcn9tvh/StDMORI046NBVkrVP0vJSUS qaMgTQq2SyY21NA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-6-a2e13cbc17a6@google.com> Subject: [PATCH 06/46] rust: blk: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Andreas Hindborg , Boqun Feng , linux-block@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Andreas Hindborg Cc: Boqun Feng Cc: linux-block@vger.kernel.org --- rust/helpers/blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/helpers/blk.c b/rust/helpers/blk.c index cc9f4e6a2d2346eb2814104cce706755ba135e06..20c512e46a7a5fd126d092a5b9f= 8742a1deac9ff 100644 --- a/rust/helpers/blk.c +++ b/rust/helpers/blk.c @@ -3,12 +3,12 @@ #include #include =20 -void *rust_helper_blk_mq_rq_to_pdu(struct request *rq) +__rust_helper void *rust_helper_blk_mq_rq_to_pdu(struct request *rq) { return blk_mq_rq_to_pdu(rq); } =20 -struct request *rust_helper_blk_mq_rq_from_pdu(void *pdu) +__rust_helper struct request *rust_helper_blk_mq_rq_from_pdu(void *pdu) { return blk_mq_rq_from_pdu(pdu); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 337AF2E7657 for ; Tue, 2 Dec 2025 19:37:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704280; cv=none; b=KcXX7bFYeMq3vXHtl+4K8X72Iftns7avwKm6YbhDyXJ9YFtuqWHRW8QAqdj/oDt52o7ezJ841hwXWxi9xuvIlOv/BLVH+qzQSMOxSVaSgab/chFYT8z3oWTMoOj9Ao2mKw2Kxszh8oLjaughspOgXsvlBxZ+bf/cSsERipAb5L4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704280; c=relaxed/simple; bh=QIaiKhlP/U1VSiljVP+FyBFwImIt2hOSsDPWIdXSW+w=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BFkUjfdSc0kt0G6J8nZruRNKetZ+FJ3v1uxgV/GtdOijpmqAeIDVXak+5Ck2wbHe+CXyQ8WWZ47v1kxLGl3gaE98k0CkGQWST81vg57eGHcuVD1kK1B54bAe96D309wat9I1JXJybmxnWmgo71mf0fC+qv8Ly+kD6q7zu8m9Mos= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Ncxi/zfF; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Ncxi/zfF" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477563e531cso52165635e9.1 for ; Tue, 02 Dec 2025 11:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704277; x=1765309077; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=OO7Ni+amOIeDY/ewsaJuBgCaFp0/uU/jCpOiLQk/U20=; b=Ncxi/zfFuOcMEs/FcjOWvhSCmJ54NKtGW9mlGsKXr/WiC1GqO4OpeB/rZHXrf32NCP bjVWWqDV7w9yXS1bAmWLn1CQmjqEM3USbKVmXDssvMMH7U8BzlIt1BDZ1KLJvoNKD6Kw qKdp7WmJNvfY8mggWM+XLgbmDIWIa58nF83CYXjOnoRbpWgzCGknVSjk+lKAE7N+H3Oy dXPXVej6GRDsdIVvqIVv5o/Shg1gqllh+q240rp+C/1/i6JWXjCr77+WCI4Sncug1VB3 cHaWCScihM1C5aaMXfqmnj8nkf83Ddn/zbBJv5VRoKG28WFUzF3sCfi9HKaA8IZ70K0L c98w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704277; x=1765309077; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OO7Ni+amOIeDY/ewsaJuBgCaFp0/uU/jCpOiLQk/U20=; b=cLpQD2SNsipi+vMX55GnykoL9t/oJ6iSayxt/AtiT/DAaegyaMZ06JbT99dqUCZtZs tVAYjG/u+qZ/hGxhUReKGGNjVxe8IgrajCh44/5QIu+eWAyKy2/ry6hydSvGv6lf3BLc gg2awVMjCIfxOGUfPiJHqcWwwA0Q/x7KJFDKpr3T7Qus01e9iasfnd+RyJtvCTCe/YmR jNjEE3d+K2GfhUv4BzetIGOP5HKHAIiX3Z2hpIu2ugMVQKTXlo6emiq+yMIKDYTXM2PX BjldzY9TNmo98MpjXjv1iBOcXSxMNO16rJP9moXcZOL9pfyj11zR/o3x+uG+ih4QGGrE 5dcw== X-Gm-Message-State: AOJu0YxojZVfZBU+i5FXnfb2yCV9hx5gZlQJHm/ObvOIWcGvwK3LLLyK rpvhBHLe34Xdnaugw3BGPGap6Aws3502UwvwxijJPkRsuHG5c2reXmiX9Y3QdYh3AJTwMkaZuYY fE9gzmaQ+gLc7tK6uCA== X-Google-Smtp-Source: AGHT+IG4AExFY39o7FmcNPY9DdkGP7htI9FbE8ElUZQcvp25lm+A4P8cOENTD614OgDhPCEDEFYhLnHYN5dg2GE= X-Received: from wrvn6.prod.google.com ([2002:a5d:51c6:0:b0:42b:b28a:674c]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:444b:b0:477:af74:ed64 with SMTP id 5b1f17b1804b1-4792a4ba88fmr7875175e9.27.1764704277720; Tue, 02 Dec 2025 11:37:57 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:31 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=813; i=aliceryhl@google.com; h=from:subject:message-id; bh=QIaiKhlP/U1VSiljVP+FyBFwImIt2hOSsDPWIdXSW+w=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AHIhun8Eqq342okt76IAHOciLNy/uszcPw4 86/9rLo05SJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 RjDjD/9lXTapcapabeMijSaKeOCnvRPuylqbGvwRqKTegnPT0JrUXgBk67vtr0mNH/p+GvKXvfb 2Op0dffzMn1OM0/+trSYuwzLstsscKgu00qlUZnom/Z90L0FWJT/6UpS5SV6ZXnqiJayY2J5XG1 MnLDLkTt6/uHVczLHrPQxZ++T67WfkeNxOZASzfysU/H1CM8Qo+er5Ozm8LLo9ye2OrEGMTH44p OE4kz3psW1YHMoXWU0yMHkhjicPatwo3Wi9xp4rdDjwnjnAguGOg44r8aJpt10YPjtvz9jdfLip 8SvawSgAutr7Y0R9I1Sr+NPYuRQpYAKcfkYekecYFDBD3Ken0FLvh7noDVtO51WDtCkQGKg6K7e rvGxJ9qkaQVP77aywGOwLRhCwCLK37pFOY5zObs84uOS9k1KUSlMytmS+k8e9kU7Ue523skwt1R 8KbtVLMEfEKKqgNm3PpLpm3MQk99C9c9Rs1PgmLjCEecR6s7LqfaNCrmoA0fvMJvVVZUuMod3A8 hxBPaNpSkinHxE1/W/96M6SpdUuBi4VO/QHpuimg27IB/makfVeGIvqGkR5OGwdlRt2wpprCA9S lSoD2wuD7Ng3STsXUeFkbNwa+QugiStYMGBIMEpCkYn6Ps1kPZxSMhbTzw+68tDyDQcuQn7tbKY p8dJXti4tfirkXw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-7-a2e13cbc17a6@google.com> Subject: [PATCH 07/46] rust: bug: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , FUJITA Tomonori , Miguel Ojeda Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: FUJITA Tomonori Cc: Miguel Ojeda --- rust/helpers/bug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/helpers/bug.c b/rust/helpers/bug.c index a62c96f507d1c16cacc462199e390857b8afec28..b51e607725785f540dc46156630= ca848dd0de491 100644 --- a/rust/helpers/bug.c +++ b/rust/helpers/bug.c @@ -2,12 +2,12 @@ =20 #include =20 -__noreturn void rust_helper_BUG(void) +__rust_helper __noreturn void rust_helper_BUG(void) { BUG(); } =20 -bool rust_helper_WARN_ON(bool cond) +__rust_helper bool rust_helper_WARN_ON(bool cond) { return WARN_ON(cond); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) (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 789242DFF3F for ; Tue, 2 Dec 2025 19:38:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704282; cv=none; b=Y5iD0NGkzxKHk2QJFqvWHkuWQ2ADPZFxuiI3ZJKaHIYyVfj9tmAnFb907wQVDJWeVTRBA2sYCS7Z1hH0pgyUJIQZNJr8ea+j/OQkh9i/q2Qbd3ab9fITBjesv7Oc8XOxJUP8b+1+cbtvC1VNixlSZFm7fXy4rRL6qUGOPpuZWGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704282; c=relaxed/simple; bh=1/CBJJZvebUaEpMRMz0jLxkYbfnSPmeqMANTKwDdJu0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jkBbBA4R32za/itxu16qCtCOWbULBObXRDZihtB/vHj4lNuvsUVJMIqlZLXvQpgCMa8CLX0aYEZaO1Y0MQQHqEqewpzDeW/tv1hWhkYcqYGzl8cSyo37IB7BzTDvZhVGQgAEDT0gu2hayJHNpxJzg93eb71JvOExWXZRgsX8E3g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=N1AgoMuU; arc=none smtp.client-ip=209.85.218.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="N1AgoMuU" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b72a95dc6d9so240256266b.0 for ; Tue, 02 Dec 2025 11:38:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704279; x=1765309079; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=anbYi57HP9Kk5aEWW2q8d0oeV/qqEXxz5j0SSHgcxrY=; b=N1AgoMuUcsCf5QF3kSc6W239KpkldxGRo944B+y9CYKVNJvdBXW5PH/bMGeU8TFoX5 ENc9xMk32SAyaFQ1UPTPKlURByHIOJG/bdnGYNHA7zJsjmxfxnaR119VFPxQ6BacbTRk akfpG8KunWTbzL527Pv68w2kREyZnMWDzYWAG/PBEg1vaji80ujut307VNX4EcJDF/zq qxkxw0Ommnx5pWoq/Qh1yUKaES+RywtVXN4TmoLeuMt6RfMJ6Whj/KXQqtCf1T/f9qOE 1aR59FMK1apOmZXisPuMWMxlnXRPDk1EKWHRY799FPl2yaJC3z1gspCaAQJ3+FLFQse/ jcYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704279; x=1765309079; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=anbYi57HP9Kk5aEWW2q8d0oeV/qqEXxz5j0SSHgcxrY=; b=Z4BZS1RG6ByHcyp2TMd+0wP4sLwr33SY8RtJqqJ3u43A/UPiC1SMmFkHRz7wkkcoR9 s1Z8oTjPgdK7uPOFM52Em0rR6OuMp99eaqJRhHCK9F2k5OPQFbaVGku7hTUJBkGVgR9S 97MT9FYI6LGrPQD5yTJJYVC6m1ppBbYKFHtffYx9m1yzXPQzNiTRMVQzTp5CjtuO4Kcj iPsmam2Mwwe9TFc8+zpIv9HNInVtIVuNNK3yau7+FjGR292rrvTve92YG2aIj1zvVhJQ j9mcK7s/+6VTL933+7w5ijaNHghZ6DHLd0K1srpJpF4sGhrWxLRSgHN2ldjW/lFfEskT NaMA== X-Gm-Message-State: AOJu0YxRzPR1raE+tyt6vqiVwcOPg/CUNRiJf9axqnGZQH/qjHttj/SU xgBdcWO/pfmcEGnirbx26Rk1t/ugJoQnaSKd36SavO8tsKdNX6TkO0RQ9jr3X0S8Q30X43LeJoq hgMjyZDQYUZ1bRK8alw== X-Google-Smtp-Source: AGHT+IEHLu2e1wh0pKkfNaqVfAooCena0g/j0wnKcnhPbQUc8IVuiRI0uzLmPudIDsc32YztlsfObKZFfzmB4Ks= X-Received: from ejcrx15.prod.google.com ([2002:a17:906:8e0f:b0:b6d:5546:e475]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:2d91:b0:b73:6e0d:4f6b with SMTP id a640c23a62f3a-b76c55f3f27mr3672546566b.36.1764704278806; Tue, 02 Dec 2025 11:37:58 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:32 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2597; i=aliceryhl@google.com; h=from:subject:message-id; bh=1/CBJJZvebUaEpMRMz0jLxkYbfnSPmeqMANTKwDdJu0=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AHMbOjMlXUVhRM9/lrrLNLf+mAvxHS3sb5i YG3l5GW0MeJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 RofmEACSpUM0gIo7V9AIyX0oEO8+ZcypT76Qn+4QeYA7Qw79eTx4uxZaxAGot3dzh8ib/iRRKDr LIuDYYu4OBZYqeTwPIQtJ2CQ3U1WTsw+lAeBZjihoJNEa7q1qHSBptnh78orgD8sHjqCfQvQfqM o7eqP3tbwpVi43DA5P5E2/FMBudVpNdqScRPH9NMjR764iGsry4Vs2Ddj+/BRALHf2e8gO8YKdW 14zBaMo32P2ovyX176J5yE5NgcxzytuVSDbjhlYmqeBawbzbFYmjJP0Mvwk1dYbiBWvbQU9+fjj obQ39nMIbmwB9OpRuzNtB9Dv5+IJBVb2YeTm6TOiXbqZ8znV2rnbJtBkGNd4HwgQbCeA1rGklj0 eHu8C55USZ6CiRqaiCBisV0qRKA5CEfK526qC6vvCcsb9RobxkQ6TOouqJfwBXuEScTFmZay7s3 OtqlwJcuiMLhQmU2SO4aPTWxLYhDiRc0uo0dfv+enX1BHabQXadHcbaJWNo0gpGtHVPOgYGJu5i aJVINVXOu1yF5Q5OKK4+I3jESDD5h3BRIrXNJGTeDUScGt9C148p6GMyvEzS5muq+VSsKuiolMq lmkIpHI0K0ny58euq/w4+gTkDmw9Zqs3C0kaxeXQzd6X9H8+8tiRZGMcarsMp8lr91p/raiCumn NAr3+CEaAFuKNAw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-8-a2e13cbc17a6@google.com> Subject: [PATCH 08/46] rust: clk: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org --- rust/helpers/clk.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/rust/helpers/clk.c b/rust/helpers/clk.c index 6d04372c9f3bbc4355c86eda5b1ebd7576d26442..15fd7e469cddf2e10d9e996c505= 5c7afb219e68c 100644 --- a/rust/helpers/clk.c +++ b/rust/helpers/clk.c @@ -7,60 +7,62 @@ * CONFIG_HAVE_CLK or CONFIG_HAVE_CLK_PREPARE aren't set. */ #ifndef CONFIG_HAVE_CLK -struct clk *rust_helper_clk_get(struct device *dev, const char *id) +__rust_helper struct clk *rust_helper_clk_get(struct device *dev, + const char *id) { return clk_get(dev, id); } =20 -void rust_helper_clk_put(struct clk *clk) +__rust_helper void rust_helper_clk_put(struct clk *clk) { clk_put(clk); } =20 -int rust_helper_clk_enable(struct clk *clk) +__rust_helper int rust_helper_clk_enable(struct clk *clk) { return clk_enable(clk); } =20 -void rust_helper_clk_disable(struct clk *clk) +__rust_helper void rust_helper_clk_disable(struct clk *clk) { clk_disable(clk); } =20 -unsigned long rust_helper_clk_get_rate(struct clk *clk) +__rust_helper unsigned long rust_helper_clk_get_rate(struct clk *clk) { return clk_get_rate(clk); } =20 -int rust_helper_clk_set_rate(struct clk *clk, unsigned long rate) +__rust_helper int rust_helper_clk_set_rate(struct clk *clk, unsigned long = rate) { return clk_set_rate(clk, rate); } #endif =20 #ifndef CONFIG_HAVE_CLK_PREPARE -int rust_helper_clk_prepare(struct clk *clk) +__rust_helper int rust_helper_clk_prepare(struct clk *clk) { return clk_prepare(clk); } =20 -void rust_helper_clk_unprepare(struct clk *clk) +__rust_helper void rust_helper_clk_unprepare(struct clk *clk) { clk_unprepare(clk); } #endif =20 -struct clk *rust_helper_clk_get_optional(struct device *dev, const char *i= d) +__rust_helper struct clk *rust_helper_clk_get_optional(struct device *dev, + const char *id) { return clk_get_optional(dev, id); } =20 -int rust_helper_clk_prepare_enable(struct clk *clk) +__rust_helper int rust_helper_clk_prepare_enable(struct clk *clk) { return clk_prepare_enable(clk); } =20 -void rust_helper_clk_disable_unprepare(struct clk *clk) +__rust_helper void rust_helper_clk_disable_unprepare(struct clk *clk) { clk_disable_unprepare(clk); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 747C32E8B98 for ; Tue, 2 Dec 2025 19:38:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704282; cv=none; b=QhsukWkZwQmsfDHNuulsf20gaTcJqDHR/11dDd+wfJuXD0HcG0NOGh4083lfoOQHnuyb6J6wqZzbah0zkWp8LKp48bHFlD6bGP+BaO1LxnvcTROIWoObA9cba7Db8AiUxAPVAeW5smPNgWx7mok6MG7bX4UokUCtmo334Xx4Yrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704282; c=relaxed/simple; bh=AFNQuzpNE7meShdo2Q9iA3Lm6wmDYhxY7EbHhOsawIQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=MD50nTFUYJN/Tqvo3Kd+4N7k5GdqPdzCVUjEjul/MubaaBQcqKndXKvtOJwtX6ucvgiv8MM+N2lerUxYJtV6czjgmgzCFJJVv7PnfaEqqElJUveIAUI/gWeRmgH3Dzb82+JgFUfoCXzbxZ7ZDKBRqTfl1ASPbIRoVqRD7itAIDo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=28iB83Tu; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="28iB83Tu" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477b8a667bcso67724855e9.2 for ; Tue, 02 Dec 2025 11:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704280; x=1765309080; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=0DBu2JzvBXQ/bHiSzyFFlsRf8BaL6jhwoTdjUDRcGqk=; b=28iB83TuQPCsRi/KC2EBNeLtGhqcwaCOGBe9zYeVx1JhQka5PkpPI2P6yqdvfVqXrm gDt4Xjc+O9EykQL605kHi859kN6GHbBwHHbFgxu2xKxHq4UweTcES7c8s4MjcmoTbN54 AUVur6XAqT3VybmY3cjNNdvEQGkjbCp45wM0RPZujSoaq67FoWu8rQzMBjtssTT0F2jc C5IarUyz/yUgfiMJ8TwmtlW/wTcFj0jk9xyS8Sc+OWmOWuHOuUGOShkPxq+F2KaJgSSV An6Q2v1UhFq1PdsS/bZWMmD5BWuFKhFoGBpfzvwKP7dryf5nFRKPjCk9B5dzdptBgadP YYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704280; x=1765309080; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0DBu2JzvBXQ/bHiSzyFFlsRf8BaL6jhwoTdjUDRcGqk=; b=MmOxx9+LepUo3xElCWMi7n6rOPjwRZ1SVhS2UvqIJ1ZUEc+efN458TccA5sY3s/OKZ uUrBOE2vWZBflaZSIYY9jIH/nZ44x55aMt6M8J0XtHpQPnJ1xYYJyBvDlhjl8jrf9T1G O8CLYEDXZYuOHx0YpChn/gA0DXAosbx22/Dl857Uzb1frklY7lKST2Hx1WFTxC04NEcI uN7ow/oErk17YhQ4IYc5v8LQwmGtKVs4V0vOJdgmJZVq7BnO2+jT9qALaUlPqDmgWP05 57n9JmCNwMyq83HuOqOqbuu393FuIvvyW8FBgXJqlzwtU+QpjClWziKXt/HTafzNWNIu aKWA== X-Gm-Message-State: AOJu0YzPy4AFkQWlZlTsmtJKGlX+Wndm4VKu4MvDT9MrV98fD7Xo9jud 9Zugf0dHHZCCVRY/UXQOcyGTQaduIviRM5pYVlBuLivHxvH2gOPvxS4xrkUeEYVkKD6jC4Bv8PM Gi3E/VLjCCZwaBmaNJw== X-Google-Smtp-Source: AGHT+IFlSuappKIMEGW3tWPLVMe1wSD5OTvizXcuLPL83+o8h29LsIYl+nBEKbK3qjqYDccA7vtIQ0pUJDig+ec= X-Received: from wmby25-n2.prod.google.com ([2002:a05:600c:c059:20b0:46e:1e57:dbd6]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:19c6:b0:477:7975:30ea with SMTP id 5b1f17b1804b1-47904b25e46mr288221625e9.29.1764704279970; Tue, 02 Dec 2025 11:37:59 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:33 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=838; i=aliceryhl@google.com; h=from:subject:message-id; bh=AFNQuzpNE7meShdo2Q9iA3Lm6wmDYhxY7EbHhOsawIQ=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AHhKKv3flgplBNSfmeXYKgfwHbpxUz3g+gF /s5NkLTZrKJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 Rv1rD/4reZIpqkIL0w3I6jAJ/8/QT4/D3R+xO/eSkoAp/D0GHfeZ42XCULOzQOR10oxgKX+zZZu iOczSCY02uVLJMGbsTHRtbpa/IFlRHToIuEMCEaYbcOd56m+4ah8rwb3twJxN/LsK8LcacL+Uh+ oeaPNDPREXCZjIK7JQdmy+zJMQIa3hgnNJbcr31EpUcXvWu4KEuNgxxQvHNH1dtw0J8+36nrq5V UsKdaMN14Zdv8Wx2ORnaQcUZFeH6M/X/lLK1bjDLLRoo2QbNkZ0SCs0pN5JtHVVA7og4lzliOBD /yKh5nTxOnH7PMwDdL//tXsn8xzGzWWPSKoxdJdUSptryssWKlxCFCL439yfo/O/fWYAkPY+see vF36sC+B+/w9dv/NgAyebrSVcp4ddiz6n3zOoqcjhyuyw1y0cOSQzbVeb1zADinFRU8Pw4F0JwG Yb/lEVwYTAfF9B85OpiM5+3CBRZ8bArFKibtV4YTFtbry4tQEwuyUOk8ckZHi6lJfpNUZckeS92 I0U/aNgUjSraA7eNTwQIWJVZ+igC4DyZ7w3drSGgglc7w1+CyomNHVdhwersI0O4Qye/axjQkst wiE7niM6X6Gv83kUq5aWxdQigRzQNP+2lVksvd3u/IzTJ3AZfNpd8+gEgm3K0otyNUfswjvbm22 r+3pgm7OXH3/OGg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-9-a2e13cbc17a6@google.com> Subject: [PATCH 09/46] rust: completion: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Benno Lossin , Danilo Krummrich , Boqun Feng , Miguel Ojeda Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Benno Lossin Cc: Danilo Krummrich Cc: Boqun Feng Cc: Miguel Ojeda --- rust/helpers/completion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/completion.c b/rust/helpers/completion.c index b2443262a2aed30db0084efa00b140d4d5929bf0..0126767cc3bebd56db706048b8b= c07c6788de5e2 100644 --- a/rust/helpers/completion.c +++ b/rust/helpers/completion.c @@ -2,7 +2,7 @@ =20 #include =20 -void rust_helper_init_completion(struct completion *x) +__rust_helper void rust_helper_init_completion(struct completion *x) { init_completion(x); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 BB66B2E9EA4 for ; Tue, 2 Dec 2025 19:38:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704284; cv=none; b=sAzLA0fxWszWSDuAT9U78GvMk+ERbs0Q8OxAla8oYbg1ihrViATxd8vFBJSHSSayJSKAmwYQ4nWpdYTJUQ+uTm22HRB82zhJVDCwWZGlgwqIn0WyevMRopJOfQvyNxnNuC0EcrCH6HFPAnceCn7TiuEfva3PD9R0JDxJmPY7dJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704284; c=relaxed/simple; bh=ppCQQedRG6QEgOzUV4GKFRMR61T3LT/5XGqZFwRIOus=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=O6teon02QddQkKMLhW2SDocJ1Q25iEfmGceVZcIzXh6WVkp+WT0cNShITYFwXJR0pjGQdvZKKRfZul/2qGD80RL1Um4HMoZw3wxo4/CI0lbax1utvpelc7suwvmKq1cA9VBsaPht9CKzFXbXSS0iLIqena18t/tvSOyUC451ZMg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=e3Qh8P9k; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="e3Qh8P9k" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477771366cbso35956845e9.0 for ; Tue, 02 Dec 2025 11:38:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704281; x=1765309081; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=sZsxYjovmGTq6J02Q6nQn6ZtPLgWnttqGqXOR/V++38=; b=e3Qh8P9kmacxyOZnwfCDCqDRlTbovJZ7H+S035k04jK5tz17PIM7ODoWFM1D4vqKap Tom2NKTkVKoH1v1vQyB6E1OryO2v0rutj4u5UWN+OpjAbZ7NPsX2LukEojgXOkfbvkSW R1KuJF28206Sj2FgfJ5D4XY13CXy32bz+IeiCMOd6bhzoYxXTJ0heix04ETNgOTM8xxP fuusKD0GDTbfcBAjv1A/2RbOScxHPa1ztTQvpDlnmaQzbXg/8GF7VU6ptKPoN0SIxwWI KJ/lrnEsUFibKZR9N3sfXvWmKk7V+Xq3aUN/YIknvhVfgcbRBzHMsFenJ8z3DV0WoATe 9nRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704281; x=1765309081; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sZsxYjovmGTq6J02Q6nQn6ZtPLgWnttqGqXOR/V++38=; b=AEwmoWgHN2tkOzYmgPF1dcIE10AqNfsE6dEYXCencRsubpV/q6lxv3eNpjHVHfY1u1 XJ+Ub6qiFdpyVgvV94ZmMeT5i6Rb0QKcjLACeHd1+FmuqNXpKJB+AtkdT5zQ+7MyUs8A 5UGVWz0I/UDZw7mobeiw6eJHD3ND4cK4VaKmOo8OqdnXc4N6mLEjT7sSmE0YkFCYaEkM tBp7x/aIB1bZA2Tp//SgCiUONjsT0ozDeESNyZ06U1g8jM6kgJTqCC+EeQXkI0nBN5AK oK5ZQ99g6GzEsp3gQuNs6+HPC80/Za9PSJ2lfhzjxVlQqWNJqXT911si+BzXHTUkaHNG 2HuA== X-Gm-Message-State: AOJu0YzL+JA7ppRsc9J/SJqi3av0icfU2+gkxUbCXuN+3lFwGakQoaCI ARWoNomRuJ8YlZMUE/QBwrOEcGrdUp2A6OF9W2tFQgd8zc4rgmt3Hxo2owGAociQhcaaCLQFhIl Fu+9h8w5JZKa3oc0tYQ== X-Google-Smtp-Source: AGHT+IHigM7q34hUOIjZvwNaofXgFk2G4pUL8rhEitJknCx7q4UWaV4n0iD3Mefr5Ss4h1ImhAzm/D8lE4ou48k= X-Received: from wmcu23.prod.google.com ([2002:a7b:c057:0:b0:477:7949:c534]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1f0f:b0:471:14af:c715 with SMTP id 5b1f17b1804b1-477c0165bb8mr427764625e9.3.1764704281475; Tue, 02 Dec 2025 11:38:01 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:34 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=732; i=aliceryhl@google.com; h=from:subject:message-id; bh=ppCQQedRG6QEgOzUV4GKFRMR61T3LT/5XGqZFwRIOus=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AH/yjqHtJJa7oAzmOSNV5ZKJdxkuhmGZyso 2rgFYdol2+JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 RhIID/9V5sp0XjdSgf7sByl5KdviDaV65xnasWTtqTzgU4srWifepMp7SDbI4mmlmE6/GJ2MRDk beMf6m58sYkYq5cSQN+64sGTZovPxa+CtoRLcmHZjtOwdopvAo9f8q8zWQN5Ze8IGj+p+4G/rla NHKvdFJqevBZJHbSlUvHiwGaTTGXNkuYDfo9BkhPz2Sr6hNeUtxdabFTSMeRaBfbpCI88beQfYN Q79s/ahgrNit1DeXjU6Mrmkt32bi76oIke2/9GfwVqpKQimqZlop8t6GDRDitK3GArZFkMyumrP QZKnTvd+2j/bCLh5QOU+7iyLNsynOgr6R/68WuXllO42/H/VRNZ8uHfI0PuFTlwo/zvzhyq3Tzf zxM9ZISoEIHVtPJOxTLYpaC4X7ez0Yg2w7VGjma1RLMcsiEKHoRiz9VSClDG25B4nkOQGkBP9HT Up15dbdxZ5BGK3iTpZZ84iQhR52BfOMbjVGibs6/stzUqvTWaJ1XUfY/aa7RUXqOBKjEf3evUnI /o+BYbK3SVWGRQxxdnEug3I24z9n04GhZtro289yzSpRVJ56CPZInMM53dPW9jpfGaGBQhB5HR2 F4KMJcSR4FTDvTWVNtmYLYL8m/xX/cwL+tDGxqRPe4Uox+Q7m7Kaj7NfzRVhM2zXzSyddqb5rgh O3fDZ75Gxk/fqaw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-10-a2e13cbc17a6@google.com> Subject: [PATCH 10/46] rust: cpu: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Thomas Gleixner , Peter Zijlstra Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Thomas Gleixner Cc: Peter Zijlstra --- rust/helpers/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/cpu.c b/rust/helpers/cpu.c index 824e0adb19d4c988a6d5974f3ed94e6708dd534f..5759349b2c88b483f445ea03ed9= 2d174e16b5959 100644 --- a/rust/helpers/cpu.c +++ b/rust/helpers/cpu.c @@ -2,7 +2,7 @@ =20 #include =20 -unsigned int rust_helper_raw_smp_processor_id(void) +__rust_helper unsigned int rust_helper_raw_smp_processor_id(void) { return raw_smp_processor_id(); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (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 264C62EACEF for ; Tue, 2 Dec 2025 19:38:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704285; cv=none; b=uGvzqyq4IlkZo/zPGOo4ExAhpvl7xRxAtv5U7S8VLbS2e65GLqVn/bVKVZBupyMy66jpRV3bWQsr6CuPZ+u+o6Nd3W6ZQGchUM+LnU+pB7ZSp01Ygx7KRBPulTveBHtKurMj3clWMDI0arTYYCkx39vMXSgbSsFwY2LxB89+KAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704285; c=relaxed/simple; bh=/uRkXMMnQbHggezbPMDlJAAX7sbhCQ8KF+LNPrndfLE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=kcgSgi9r+q9BRTC8twEhYQYVgloVncuwhN4LWIySpb00QbXh6R9/sDFd9KDaoiawNedE+YCcs6Wg5PfF4I2+YvdJXu6S6LI2DT3z3q0l1Fr4AneXJFwIdJtmcZDZ6c7Ccrsfpc16CKypEAczJYfFBsKXkkqKgHlhR0DH8RrMZtw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=z1AM+O7X; arc=none smtp.client-ip=209.85.208.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="z1AM+O7X" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-640ed3ad89bso9880670a12.3 for ; Tue, 02 Dec 2025 11:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704282; x=1765309082; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=54syvTsAoYC8sXnOsRu1oetBVSsGxpCbEliB3X2MzVM=; b=z1AM+O7XGonDp4xbrG89jUQyhdGSrdvFybl8/REMj03lsF0Al+bzGZGB8drj/+53z7 kN7Jkbzur9hxIWzHQXRkU/IUMmBg7Zr/vujdPqvdOfjp1g50bZQM9fxK5gkoflB+gQar wnE20T+UgTUUFlqInraX8TNibfGw1nsjZwSQmfX7WpiiXSoi9t3LahFiPjafnvCT1sET 7wXCPQFWjNptn5egy5yiIxr49WdmnBUpoDnMD0W5btkDnaGiytcK14suQiLY4sLGHMDU K2U7FAnZ5FjDejAGc2klMleAHe1h+L1Oav0o1iVFNMgMeQNojRAovAOE3oDS+5llpGTk OHAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704282; x=1765309082; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=54syvTsAoYC8sXnOsRu1oetBVSsGxpCbEliB3X2MzVM=; b=Mj8dxi2neif1ZSXHGz38SO8RvFneBzq2HObc3fNgwkHogyefMH+DX3fLxHuqVD9OOX ezLtl71aDJUNd3s0SO13Hw/JB/aUM4zrG5MXIBjg7P0MStOpU1w59TX0zAOdjCpnsjoq S+NVKBzOKepfUcbd2DNVL/6RAwFuvww8EkvzETj/GdsK84CwrykA6pgI2SV1LwM/Kx9S K2OXWOcFLXm1+X4NvivkxrNFFWf/3zbA14kZrhIlJSQHyQsU+gjDKwtJPGGj8FoP2PY5 A7zCc38cFBIihQ1vwuBVoRU/9zznIcDrsgbPv84MjYL1mWTuGXUizhCVTjHW3Rkwk4iq 3bng== X-Gm-Message-State: AOJu0YwH5lyx7uYV/DQj22AZHbl85oGskWatglzjOG1dat0lVB2jOeHX dZReoCQ9jqqxdlaGMWFdq4L5L2U8fS/n01hmk9+BB0cA0Gd5NRV2BYe6xAxNT2qmLzxSYpjcozf NqeJVBskMjhJXs20YKw== X-Google-Smtp-Source: AGHT+IGJc3qMQV4Tiew7vJsG1JacIYJGPoxXANnYISLPrZ170ZFOcWUF9+xQRkP5vtmpknWxelIwF6l2qj4993k= X-Received: from edaa24.prod.google.com ([2002:a05:6402:24d8:b0:641:8ee4:8ffa]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:2708:b0:646:6de:a09f with SMTP id 4fb4d7f45d1cf-64794f2b59dmr697109a12.2.1764704282535; Tue, 02 Dec 2025 11:38:02 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:35 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=873; i=aliceryhl@google.com; h=from:subject:message-id; bh=/uRkXMMnQbHggezbPMDlJAAX7sbhCQ8KF+LNPrndfLE=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AHjZMlnHHFMoh929di8EjUsCLjmEfSxg3tT 2GhNI8gm7iJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 Rj86D/45UKCvMffghxd1TOM9Kpgv7sTNWQRLKPICF/FwK/EUK0t9tCRyN8DOXECqh81J1HPWBLH fwy0VurRe2Uf2/N1tu8YV/B/rjJQ9bau7gz+JB/z/OYuqDM7vP/ZItEK+2mgxSEKkcoy26qyrsy 9ts+t9ddjYnA3Nav79AkmodsJd/yRujVVzJ+qkOtujY25VTEa0vzm2aP0MF8Z1nsl7L+NFqsBRP /tfq0/CyWnPCEg4cYuJiJWHOJVoGUUcfPKTHnl75HfLngLBs8e88t4eMY8MCYz/gviTTYs2oQmd k9sC0j2uRjzfaZd0rq3iw8czk3Lzr3v/Sf+8E3E4btY4JhXZ3EuiDWCXrpuYO/flyUyIVG4nO90 E/9QD0knl9DBegIUsUD7fHwQa7/M6NW3scA4khH+92YbjVo2rZo6LoEt8Eq1yh168NECZY0wpe8 biJs4zuB2mZ49ZAvd+wFjOJXGYleBMK8hrbJJ3R48HGkpPRO0L0T3iH0BYMhWKCt63VJsJsVRX0 9J/0+4h2EFSmY0CR8Yb0fOYzFZimBaTkhAFPVhgml+xxnbRLdSy+JqDC4b9zRd2qANDfH70F55A TCTRH+E1HLAoGhmkej8TNgNGMus0YvztTSZuMepiXDfdau3polP4u7y2z8xuwo8vrET8oeGIeG2 ilPM0gn4CQU1RcA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-11-a2e13cbc17a6@google.com> Subject: [PATCH 11/46] rust: cpufreq: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: linux-pm@vger.kernel.org --- rust/helpers/cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/helpers/cpufreq.c b/rust/helpers/cpufreq.c index 7c1343c4d65eaff6f62255b6c9a9a67f89af1541..0e16aeef2b5a696bf8974f37d9e= 5e3c24d999f40 100644 --- a/rust/helpers/cpufreq.c +++ b/rust/helpers/cpufreq.c @@ -3,7 +3,8 @@ #include =20 #ifdef CONFIG_CPU_FREQ -void rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *polic= y) +__rust_helper void +rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy) { cpufreq_register_em_with_opp(policy); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 638CA2EBDCD for ; Tue, 2 Dec 2025 19:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704287; cv=none; b=ELMNCSk642p9rEKdi8hJT/jzQLoIJb8B6CiAhKuggDgnKPlDeJvSi7XvswqZ9HDOde81ZKK+KV5MODcEt6bjDasYNTbaCzF68emZilgzCDlpDlxPHuDvQedp5iO5jPqeChyXB6xn729RYWNg+Qg51LPueB9c437lqx9lQNIy3ac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704287; c=relaxed/simple; bh=a7VTth2aYrQ9mZFTdRe9Go6iNqEHXqz/QI+sMZttxME=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=MpB0LqqEPLL3yLFVA3RLjh2QrtHQnjM3c/5wmqb53IZ4TMmNu1acpryYe1NYIPPnJXIRS/wwgfPT12Gn6r2peMiMATgYNIYvwXnm0+LufGZaC+qGdsyZKHs8Ska5dc+0x402VLZwiTgYxmbcKAPg8i/9USMuGcuXG+QXZRPcGpU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=dXYL2Fry; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dXYL2Fry" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-42e2b9192a5so1569814f8f.0 for ; Tue, 02 Dec 2025 11:38:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704284; x=1765309084; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=d0tgl8MmjvwwJY4eQJEMeAOTmofxDLerW3paWOGY4Q4=; b=dXYL2FryDaN+fjWVUsJfoffGyLpMigDTrtAqNsuO4e6Z5fJ6E9Sr6fBrFPtRMWL2C2 cfgFHmNLUF4cPSDdjuMDZBPDyE8Y+hMpuKOwcktz7YvY2d5Z/osoIMvhsNg7utibyb/J auRhNi/s25Buf8h0mGk1cbDyb+37aEJQqanOGEKSqU+GHzYqX4cr7C2mJ0bL9mlpELYK 9u7eBwoK+MenH2QAK3z8YHAq6guojgvJJJZPEYEp/KwW3mG7BF9STiLlKe6pAlvntMWV a72ZATl4czSEoODLM8Vgwf6U5B1UUokS1aj9MPBgf606dJAamXlt7aVL2FQxQtV6pwzD 9LNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704284; x=1765309084; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d0tgl8MmjvwwJY4eQJEMeAOTmofxDLerW3paWOGY4Q4=; b=CPQM7CHLbgUoDbogBEUq+rD+HyWyx8TZeX7jHzYU2V6avmF1kIyXj8S1e2TAHmqA4l JA228Glbhk0ghLK92V7yeZz/+f/z938MaIRQc3OB6qSgVK9hFididF2kPN7bH3NG0zrC 1Je9BzWrd/WzehY/mNkrTtuZgrr39z3WOG2wBwD/+qM5tVY6iJMEoVRlC1zvUbR33ZAm Lx+tNabD5ZHjud4GikIFqKl7xY5ITVdCvkfAElwVy1R+3BQUMBWWxhpnM/dUbszZg/6y RE9TvtP24wWibHgXetKDp7Qwd9+PsG2VXhRcEmo1nGXCsLND0FCOXgo0mWrqdFFhdP3X gniQ== X-Gm-Message-State: AOJu0YyVeo3/x4YozUKGbS/vUzQONg6ZYbPaf3E9jAI0eIjzeAsYXxQg ijC4d+vlmIqr8w05c6WZyJcoFltI673W5Rr+yv85B5LkIOdmQEob7MgDD+Pj7q5HMAHG/muTLJ3 ihD9/RhtV0zDquNAj9A== X-Google-Smtp-Source: AGHT+IFe5pFXs4arACddezu4I93+33c8S/KIxVS4tlwUSeR6ZN3FbywdSGa+UCpUfGSyjcndFvBbjjkOqlk5HCQ= X-Received: from wrof8.prod.google.com ([2002:adf:f588:0:b0:429:b8a2:8f17]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2509:b0:42b:53ad:bbfa with SMTP id ffacd0b85a97d-42cc1d61ae6mr46860917f8f.53.1764704283637; Tue, 02 Dec 2025 11:38:03 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:36 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=3167; i=aliceryhl@google.com; h=from:subject:message-id; bh=a7VTth2aYrQ9mZFTdRe9Go6iNqEHXqz/QI+sMZttxME=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AHuzv7TNV1xjJWwAX3bwv986hQgAi1LtuNQ yZHjx9gsxSJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ABwAKCRAEWL7uWMY5 RqZ0EAComROQ1eT8cwFFiZXPqTVrK1PONKDkWc6diDzcCW3EfuRN+Cz+n6QT3Ze/z6XyGrug9Aa S2FH/GFHsHwNQBkkM6inRhL+SnMEkML6CSC+0g+nf11HLlT+TWIn0QMadqSvdM7mEljgGzwLCEW 0Uv2/CGZWByHTVM4fwBC1L59HEQzuVPA5TptN05OnSBdRNBNVL3IUrkMcH9AZCxYvZ1CvtEvNGq 7gFouqnXh2RmeT2p9+ARpmrkR0Gwrz64Hiw/WytxhkDpWIjdq3j9//jXniUMsxM93j73a53/UB+ 8+EwvvbFgit2yfwytSYfcSP+N+KkHvQidjEVAva3f6sgUAr/1/ocEiEnAxIeJfTlgXz8WexZhdA bsj6mB8/MJxH2QY7ezi4EVbJa2lEi5QELdmTlNkJ7Y+/Ax8gNLtQcJXyufxUfDvlQIJxOg/k3AQ sA4mlnmCA59OKQOzxvC7Ex0xbkJHQgznu9wCSZRs4fg2iBnBMwOW6RSrEbXSn5cxyZXppWRCRnw tMmQIk046W4F37sF6pjWuZmY7ipK5CawoFuGx4/IG6wtEi39/5227JYw+9/j0gO+UdYeJeGSIEO IqdJEbcEnfjn+nYoGip7rBLpjI43QcdqHh6JKxqAZhKHtdZq0DlaoMet31EZbWPuxivoswb4ZI2 DMa/d+VgXHO6Qdw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-12-a2e13cbc17a6@google.com> Subject: [PATCH 12/46] rust: cpumask: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Yury Norov Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Yury Norov --- rust/helpers/cpumask.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/rust/helpers/cpumask.c b/rust/helpers/cpumask.c index eb10598a0242f31598d0c401e194dce194ac85bf..74b561f7bf6f112c22e6a3ddb26= 6ac003b06f531 100644 --- a/rust/helpers/cpumask.c +++ b/rust/helpers/cpumask.c @@ -2,68 +2,74 @@ =20 #include =20 -void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) +__rust_helper void rust_helper_cpumask_set_cpu(unsigned int cpu, + struct cpumask *dstp) { cpumask_set_cpu(cpu, dstp); } =20 -void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) +__rust_helper void rust_helper___cpumask_set_cpu(unsigned int cpu, + struct cpumask *dstp) { __cpumask_set_cpu(cpu, dstp); } =20 -void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp) +__rust_helper void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *= dstp) { cpumask_clear_cpu(cpu, dstp); } =20 -void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp) +__rust_helper void rust_helper___cpumask_clear_cpu(int cpu, + struct cpumask *dstp) { __cpumask_clear_cpu(cpu, dstp); } =20 -bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp) +__rust_helper bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *s= rcp) { return cpumask_test_cpu(cpu, srcp); } =20 -void rust_helper_cpumask_setall(struct cpumask *dstp) +__rust_helper void rust_helper_cpumask_setall(struct cpumask *dstp) { cpumask_setall(dstp); } =20 -bool rust_helper_cpumask_empty(struct cpumask *srcp) +__rust_helper bool rust_helper_cpumask_empty(struct cpumask *srcp) { return cpumask_empty(srcp); } =20 -bool rust_helper_cpumask_full(struct cpumask *srcp) +__rust_helper bool rust_helper_cpumask_full(struct cpumask *srcp) { return cpumask_full(srcp); } =20 -unsigned int rust_helper_cpumask_weight(struct cpumask *srcp) +__rust_helper unsigned int rust_helper_cpumask_weight(struct cpumask *srcp) { return cpumask_weight(srcp); } =20 -void rust_helper_cpumask_copy(struct cpumask *dstp, const struct cpumask *= srcp) +__rust_helper void rust_helper_cpumask_copy(struct cpumask *dstp, + const struct cpumask *srcp) { cpumask_copy(dstp, srcp); } =20 -bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +__rust_helper bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, + gfp_t flags) { return alloc_cpumask_var(mask, flags); } =20 -bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +__rust_helper bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, + gfp_t flags) { return zalloc_cpumask_var(mask, flags); } =20 #ifndef CONFIG_CPUMASK_OFFSTACK -void rust_helper_free_cpumask_var(cpumask_var_t mask) +__rust_helper void rust_helper_free_cpumask_var(cpumask_var_t mask) { free_cpumask_var(mask); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 6CCD82E8B98 for ; Tue, 2 Dec 2025 19:38:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704288; cv=none; b=djuBp9yfocTnTvkT4GMoVZYXRH+OqICZecUrnzP1/aZJOSu/1Eb39ogzqoI7HyhdYCyodnSMGi1T1yLGBb5VCU5fh4U9kRwYxfR+K2R4WY/zhntD0X3ldEjdvewYQkcOkCI0z3FAE+D8D6Vu4ryLY442xwofmAWA436OFmCU2Kk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704288; c=relaxed/simple; bh=iagzukUnDA80z6IbyS3VNcLRgqeZOme4pi+pUnCTVcg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=T2HZvOp7RKXpi68JhzM/u1pm+/J8LS642spYNDu8fTux0QP0Fr9+11m6UahnW7p5UPHPrqo2+RaHJhgrN5yDC0T1C/H7NxEC+DIqx4tm5W3WyJQfoT0VEdK0jt4NY/9bY2xJWxemMp2TaQrw+Y8C36VEWTBU3frDlhvVlEEW1gI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=PZ4p6KQL; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PZ4p6KQL" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477964c22e0so1064725e9.0 for ; Tue, 02 Dec 2025 11:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704285; x=1765309085; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=gEt9qTAed3TDa/k2bHDc1mZBoMnzLbB/7WUiQnq55ss=; b=PZ4p6KQLVrpZc9Q7dtpn/Z1K/ZJ1huOt1cqQm27TtIZGwiaExfwuieSUaMw5FH+1Gz uMvnUHod5brmXOjI6ibgcVlS/ZXKaW+KTnJ0UmEWPXEJqiHm7DnqoVdg3fvqCorRt2Ez zLM0SFxBZyWayb/tkp1+ngp5OWho282hxzHn4Vmd3lRkOy3u/yJd+sTGg/TuChox42HP 1hoFv0IvtcHCRKtJ+8MhEir2HnXUXMTBV+cGY3iYS8g3SzgqO6mPZekWxHIZMFeP9gbz me1Tt7G6HAkqGJGKeyRBuNnerTnNM2BPQmlTbJsFTBVTpcOlS+l6EKu//dGEQAojt0jH dEWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704285; x=1765309085; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gEt9qTAed3TDa/k2bHDc1mZBoMnzLbB/7WUiQnq55ss=; b=pkrB3U1I7hTTr35+EF2Ps2NhqEJToOAiyN/oysvGA7/4f5CcdpRF/zypW1j0gT4Omf ZCzj5ZGIT48ScHKfPtaGnVFtq5YWZ+FttxWgnIleqv5fcMx+nh2wi5y1VOmMC7sCRKJs yAsD2vA/EWRVS8elSnl73vhUj8CP6rCNnriMAnaQ/gBtZwK0SjP0WNIbsFS/DbM8yGj/ yS9yOmmMQuSzkgnJHWkXDi4q/qmDp7PQOHhQxpq39iKkcKtvM5QaWSYIipTOjanfzLdg eAA7rFB+WbJMz6ct5wPh4Q2V6xP/iq16wvRpP/wrxXUiasJemKHy2QUp3do37o8/Bhbd m+lA== X-Gm-Message-State: AOJu0Yw9MRaB1d3zFoHgosexzAwP1Tw+XdajD0xxZHF17bBWfa/MyEgQ kpCpV6qU2xyouFVPGfEHqjo8G1ugus2jgqiCqgXMbCdzQtJHtid6D3FygNWLXRHMrMbJq9TyNJA yqcSbJDZMBF6BQ/yhQw== X-Google-Smtp-Source: AGHT+IFTGXZdDwu3G/FYzKsSjoitBd4kosCndgymctVZs7SCMI80OF1jOg2y6FFY3lnd14Jki4pIxhg01wisrl8= X-Received: from wmxb14-n1.prod.google.com ([2002:a05:600d:844e:10b0:477:98de:d8aa]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c8f:b0:475:ddad:c3a9 with SMTP id 5b1f17b1804b1-47926fa069cmr44892965e9.13.1764704284837; Tue, 02 Dec 2025 11:38:04 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:37 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=946; i=aliceryhl@google.com; h=from:subject:message-id; bh=iagzukUnDA80z6IbyS3VNcLRgqeZOme4pi+pUnCTVcg=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIOAFMvsxtRspJFDSQ1QA/MeXCtacEMkSW8 Jy3aMyERtOJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 RnXwD/96L30+UxevVFRGYDp4D1g5weISgc49MbZoQnqoU8aUeMRIXy0Yy+SuWLQxEfdhVHfNAVZ +gpu70EzFzT1HZIXeYY1KR6mQKBpRM+CDQHsbUvaHbNMqJTh3RuwIzWtCQuOANcqskEm/NDklZe KBlbtFyBbJClP7wZKR4QML+Q90ncY3RrLjYUGVtB3mR7g82sZqPW0IhKW9iwLbWYsW8dXL+L4AD Npm6ENjgAb4xsfxAAo6Ojo0ALHj1qHh7cJ1xCWYftWng1mTYfs10v2+rGiOO/UYRf6taV0yVqUU PQt0VzwjRzEKSjC4KjuRc4Kw6EaJh2OQkTcOUYI1IHqm6XplzyywMQUvfjVBWLIvUYG+y9upFe7 u4IyM9oq/o5n0K1juDgRFtBxl6uodax6rpaoHxzLWXx0fbUfLmw4gq/FEjeHhENjarW84/p3Amv bJphs2/t8US006vH2WTqzhGRPnEWI+FhzE8jSWhpfhtGTGDBbbipR0rVvyvMzyQPpBci8wi0N9G dih2yiu1tiFjmxmvog0sP0m05Xdovxg0ibApsHQI/fqQco0ALOnyr3XCPfcibA4Ov1wDJZz7XUF r7MUALzWuNDYUqmdBpL3NAwlPVSJC2tYeNveDiA6Oezp/ecteK+Ef0Cs+SCHVNOkMDJl48Xezus 7l/CZCZ6x+wgr8A== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-13-a2e13cbc17a6@google.com> Subject: [PATCH 13/46] rust: cred: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Paul Moore , Serge Hallyn , linux-security-module@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Paul Moore Cc: Serge Hallyn Cc: linux-security-module@vger.kernel.org --- rust/helpers/cred.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/helpers/cred.c b/rust/helpers/cred.c index fde7ae20cdd19f04ac5f28808586c65de6b72f09..a56a7b7536232733dcdc640f09f= 8f2537e69d75e 100644 --- a/rust/helpers/cred.c +++ b/rust/helpers/cred.c @@ -2,12 +2,12 @@ =20 #include =20 -const struct cred *rust_helper_get_cred(const struct cred *cred) +__rust_helper const struct cred *rust_helper_get_cred(const struct cred *c= red) { return get_cred(cred); } =20 -void rust_helper_put_cred(const struct cred *cred) +__rust_helper void rust_helper_put_cred(const struct cred *cred) { put_cred(cred); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.74]) (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 E85132EDD4F for ; Tue, 2 Dec 2025 19:38:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704289; cv=none; b=BT6dy9aBBbFN9ZKPUoljAUDpj8MyPLCKNy9N2HvZDY2RD83AWXlDsRULXD0eckT2Gz1TzGhJ2BHIxhjwTObO3lgjdzIn1IvIEq/rdZOosL1elvlRgCQWt8JWTJTzLP1kedmSWnZi7DnXpBALKz/+bWT5liW+tTvP5PSVHRUq4kg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704289; c=relaxed/simple; bh=6o+KPJwvLA0f4xSzame58UmeK7zLXVerAQzULdZX0iQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=A3iX23Si9QBRn3oXC8TskAsjSukp83dbeIAL9vEaZPk+5T8nrXwM89mw1SsL/yNinxULcA2j2hSgwuA67gyRb7Cnn216ySnp1RJvb/efRY1gFQp/nuzzRFzgyEXVvThKCF6V9VCCWhqnuSluPEcUeKnJjUY+5ejssItDndf9r0Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AWLhmQj7; arc=none smtp.client-ip=209.85.208.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AWLhmQj7" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-6416581521eso6521440a12.2 for ; Tue, 02 Dec 2025 11:38:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704286; x=1765309086; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=QNiGalR8PRJw0q0ZxlbmFuTXo7JoG4iowPqULhb2i2I=; b=AWLhmQj7UvmiWayWxwBPuVLh5KlVJDYKPJFwME23Fv2i2k5eDwYGkugA25qZkU+oIR 8nTwoXS06SdKaHTQx4jKfFkS6xa1GfZbHPoEZAlbmsbXzk+6Cd+WCydbMWAGJxgvFf0p n6r/wyDg7UMe380oqhO3b4S+nmzzb4TcR17Ch/4xF99SydlyHlolfj5L1hx6GTA6lg0X pdkw5/alGRH7is+nGLHwRPiYud8gNW5rVdQEdiu08cAQCIO4dm40w0STtGoSHO2bz2uV pWJeNeiQ2T9HrYSc344N1hn3Wnak8DnCurCRr6mjWdHS3wF+On94emgh/oiVHd4xK01v 4u1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704286; x=1765309086; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QNiGalR8PRJw0q0ZxlbmFuTXo7JoG4iowPqULhb2i2I=; b=Jq0oFZhFCdE91q7QOna3ltH810QoEKWaei5sGNb1/FGUtj0IR5Q8gsWckyTgXnMdyg u9n60ZABl4v2Ehp0Pc8qASuX0LbNV87UaBAUU+qgcIn0gF+9rN2QPHuHteaGysD/sjmF SAoI6QETsDUXumwacggaEkaJyAKgnxORQj5ytWJuDzySEKoxneQonW8CM4H6GZ9emFmk 1jSVHwAAaqQnGDWFlY5b7DdhIPgb/4jP3IK6oTQLGI5SqsbdfGoP9627/nbblqJ1SoFI HnuQc93/8BKhl4HOsJxsYg306ohDNjZAgqGsTUdOtpRfB/3+/ODG+n9SJ0afQVc22YyO HCug== X-Gm-Message-State: AOJu0YzjTtMFUxc/nVXZ7wm2pjRQc/sPB1pX4u0iMMwUxTEax5T1e2cQ r3B+ZGv/aFcn6nFr3JO1sH6KNKPU4Pyi8zEGm9tJX+rkuTSrhtczRBRESXz/lBmPep8oL13MVqX Wp+bK5HY/uS2ipL0TfQ== X-Google-Smtp-Source: AGHT+IE0ILkNPVdyrVmO92dSHLhcoGslYLKF+h6AF05KDtYZQI9z6dkVQHUEc+HhJZYYv0yPFV6PibzDsGMAoiU= X-Received: from ejcwb14.prod.google.com ([2002:a17:907:d50e:b0:b73:8f8c:46e3]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:3d90:b0:b0e:d477:4972 with SMTP id a640c23a62f3a-b76c54090f0mr3291644266b.25.1764704286208; Tue, 02 Dec 2025 11:38:06 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:38 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1727; i=aliceryhl@google.com; h=from:subject:message-id; bh=6o+KPJwvLA0f4xSzame58UmeK7zLXVerAQzULdZX0iQ=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AINPJX3ixKRZTFjg3g84AsOgJ/DVeWSUYne IO7p3gHePyJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 RgawEACuX90QL0ENvwBDQCrVd5NibcFC4X1e/Vc8qahUypQecczAEEExh3Si6xhU/F582w12ybE BsuQm084XmYBhOCP7NxzoxBrW6pWlFvlLfzjjTYboGCUhQBl75e7tSzEkYB7UqUz+4F9ncdHjXN lPGULZOVz+PVyGeit81LFaVHmWZuYV0P3kN2KJIH7WAMOn/f1BuIjzwS1CujVJnZA0qeuGjdVE2 vp6EvWde/u5fI2/4byycOLoHHZv5DIkRBj4qODCu0kHrnLv7+rrNI4+07eJD1idWPwpNMHnTSxE mp0wjTGn4onM4uQkaBonqch36Fyxl/r6Ob9ExcsNf1LwhKzyDOjsXI9qxjzZDBJpcNgS7ZrTsH0 7JsPQsEeD2GqDWvQ2dVKUbvssAcmXfCSxuYWl6YeeaUfqT7D+KQxX3+hpGp1DYNpPHWrisoo7kz EMHWB9/xK5iMVJSbUcYZrxfjHCikytaIJrMs3nOOwhPIbHpHa8Gk2KAzozu0B+JZouE2OA06zpE 4IBjut2NvRWGNRBCAUUnGBYfbWIG49ElelncukuES25UVrV9vTuD7t1POhJy0vTOkLKeHkLlGKT rC58jRVxVGZG5IJ0utJ6mIbFiFXf1UkoG6PNGcYLeshKobIVPtIQZBuCT1FjassIcY6DzGgB7Kl yS7PYFkDiSCnKEg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-14-a2e13cbc17a6@google.com> Subject: [PATCH 14/46] rust: device: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Daniel Almeida , Benno Lossin , Greg Kroah-Hartman , Viresh Kumar Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Daniel Almeida Cc: Benno Lossin Cc: Greg Kroah-Hartman Cc: Viresh Kumar --- rust/helpers/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rust/helpers/device.c b/rust/helpers/device.c index 9a4316bafedfbc4015446ce1945f1bf1ae7face1..a8ab931a9bd1233c613a9127fbb= 3a93a3bab7951 100644 --- a/rust/helpers/device.c +++ b/rust/helpers/device.c @@ -2,26 +2,26 @@ =20 #include =20 -int rust_helper_devm_add_action(struct device *dev, - void (*action)(void *), - void *data) +__rust_helper int rust_helper_devm_add_action(struct device *dev, + void (*action)(void *), + void *data) { return devm_add_action(dev, action, data); } =20 -int rust_helper_devm_add_action_or_reset(struct device *dev, - void (*action)(void *), - void *data) +__rust_helper int rust_helper_devm_add_action_or_reset(struct device *dev, + void (*action)(void *), + void *data) { return devm_add_action_or_reset(dev, action, data); } =20 -void *rust_helper_dev_get_drvdata(const struct device *dev) +__rust_helper void *rust_helper_dev_get_drvdata(const struct device *dev) { return dev_get_drvdata(dev); } =20 -void rust_helper_dev_set_drvdata(struct device *dev, void *data) +__rust_helper void rust_helper_dev_set_drvdata(struct device *dev, void *d= ata) { dev_set_drvdata(dev, data); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 E9ADC2EF655 for ; Tue, 2 Dec 2025 19:38:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704290; cv=none; b=GORlatGfmLhTBknbU4aJI/6ocjqqc2+yEmF8JSnH4zYlU4nUpZGo7+rr7qN5My9ScwV/Q4XJzxAW8qhumPKBy79ogxHVPQFFwmUAAkK9Uzpk4D56WxJ3jYWfuwm51+F8DgP8WPn8Z/Tk9jiPG4Extq4ZMgiHa8EnbjAVds2bryQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704290; c=relaxed/simple; bh=+SfSvQ9a3Gi5EHmtxkYRqPc23ohpJeYUKHNRZolLHsY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=RMzHcW7OKDe7bxhj0m2L+aGVHELiHj9FhUX5/bdBxunyyTXlMTq8QuytXP+tqfFc9Q0pIQVLbFd2dByJG6POKaSVIoicSbiCFaK1seBbilYDE2vrafydtvtcJC8KHYefFCc0sks6tU+y+AygVgHPlyAWgsGrlvC7LGnUtOG2pXo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=VPHIx0gz; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VPHIx0gz" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-42b2b642287so3059445f8f.2 for ; Tue, 02 Dec 2025 11:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704287; x=1765309087; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=v7DBbBwSHYJvs4uN8+pltwzqNRUvBGXX7QeOpCF5FEA=; b=VPHIx0gzMPa6ZmUbQsgux8Q1tY6uWRJLgRt1leSXcPiyZJCi23GCRalkuYf0oAOCjl HPmbUVPk9XZKKfzzzWUXY/lXtVpLiI4R64iOZPx0Dm/w2u0kdKE4+uP0KXr7vX+6pHrb 7M66nsu/cHoAoaxrlcWsDODXctVGtQIKoQ4HB5RhDOEGPbST27kFWODbxepRnn/HQ/LN nmelB7yhM8B7rqY6F5e5yFWkp13TrF3WvYsnqSNN7etA8DhWDscpVkc4FMLG1Lv2ERWE uj6AX1Oq+93x3fc3Z6HD+J0q7CK1rJFkQvgjU4u4aLS6fcx/2O+O3iZ8FIyY7H4uXcKS UjWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704287; x=1765309087; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=v7DBbBwSHYJvs4uN8+pltwzqNRUvBGXX7QeOpCF5FEA=; b=G5tbcNdgg1zfR5o6YcmKvlXCx+OQAKzrV0VNApCyuYAP+55+l3JB/WNn4VFj4UA5xc q5l8Oqu6ZBCOm+lX+8kWHeaX8aivVUZjRByQOvwQrIkg46zGp9OfRD4A7kw5jdmeWjhy 1g6E+fwN2zfiLWhX9S4+PvVYPNeHNEvAZtgoFIPw9hsxEPWrt5vfykHR616GQmmioPNA g2GjqywPGi2z1F7djLZeUCYEYS5+FlgjRUu7zYfva6fub5np7d59fJnysrNh/SRMjQWg iftfKW8VgvwLalBF6ctgac8RpDNtYei6NFQ5SGIgwbEKF7jiADpOJ0xb1wUuuhAXHYW5 DZIw== X-Gm-Message-State: AOJu0YxxKf8WucpwNiRfuSykNQFqJE1GUlJ5qx9LLkGE0+Fjlnpj66m/ 94xOL7PNFRuJ7oYWAP1O1LVclc1bWHwX+IGZJFyf8tcVG0w1AhZCeEKChC5X2S7LC04HptJx85u 4cJacI2p/BbS52Ns2Qg== X-Google-Smtp-Source: AGHT+IEjaHpsFZDrlVbXI5sJtXIxbhUYn2waQH/CPwvFsgbb1WKNxDpythH6IMJdXZYkDRIN2sXGCSOjCIJ0XeA= X-Received: from wrrc4.prod.google.com ([2002:adf:fb04:0:b0:42c:a418:b2a0]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a5d:64c5:0:b0:429:dde3:659d with SMTP id ffacd0b85a97d-42f72245bc4mr363105f8f.47.1764704287370; Tue, 02 Dec 2025 11:38:07 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:39 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1718; i=aliceryhl@google.com; h=from:subject:message-id; bh=+SfSvQ9a3Gi5EHmtxkYRqPc23ohpJeYUKHNRZolLHsY=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIe2RZqlnuFajzOCQAhWFK/hXXG78SFuN5E Qjn2q7/C26JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 RnDrD/99yl4liYwfGYqLBcR87C08EYFgHLM33xMyV0pxRZmFWUu+GboMaZmwDyi/7A6A9RA/2ZH WPjdVD4L9k79NSfLicyHhG6QSr25wmvSGeFx0ga/OSaOHWRwRZsuYC1O7hHnzeTBN0gfjLsLW1I Da6tQfxQ/SYf0r3UiMIP+sGb44EOBG3wuLrXpkkACZas6jvxPz9rPD7WspzfTArmlZbJNtlxaD3 OFnCZyNzNGu5rM5jr6ANVD+fUpPZGAu2TviEz8095ALx/ZnSmD1FqBp4m6n/xEfWkj22XZr+z2s mbVd4WVpXzeyGqaCNvgoNdh3ujW0aXcHZLrwGJs7pfa6sDbwOoNnhynJHjatXY4LuVOOuuotb7v zFRKWD9JyGDx7btSsRD3/iXO4dnywlL7eLhTLbz2CmaUhWm3dfoMvQdh4zFAY10jN/042LmwR/C 363ePx4hYEiw4NgyVqfTSrUGmLslUDx5ix2UT9k4dRD40aJjlZCVqE3AFahtx0xvyXhMX8SJ8VN AC669OZ+6eX/65PzCHOD/Purv2D4PDJ+a1YUrrGrdOu57ECKYDeZl0uHO0/0N90GrQgJ2RbQeHx 4573EmnD15wAnAJ6s1I+oBY5nLOUGFIgLxTZj0FHD5MKXYcs356gGWZ0+k6R1VimSlXS5ctHtt4 6CMO8bf9sQ+L0eA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-15-a2e13cbc17a6@google.com> Subject: [PATCH 15/46] rust: dma: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Abdiel Janulgue , Daniel Almeida , Robin Murphy , Andreas Hindborg Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Abdiel Janulgue Cc: Daniel Almeida Cc: Robin Murphy Cc: Andreas Hindborg --- rust/helpers/dma.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rust/helpers/dma.c b/rust/helpers/dma.c index 6e741c197242572844fe550de4ddcd93520cbb42..8c7e8d7b888e3fe456b50cbb2a7= 5306cc2a6cc2a 100644 --- a/rust/helpers/dma.c +++ b/rust/helpers/dma.c @@ -2,20 +2,23 @@ =20 #include =20 -void *rust_helper_dma_alloc_attrs(struct device *dev, size_t size, - dma_addr_t *dma_handle, gfp_t flag, - unsigned long attrs) +__rust_helper void *rust_helper_dma_alloc_attrs(struct device *dev, size_t= size, + dma_addr_t *dma_handle, + gfp_t flag, unsigned long attrs) { return dma_alloc_attrs(dev, size, dma_handle, flag, attrs); } =20 -void rust_helper_dma_free_attrs(struct device *dev, size_t size, void *cpu= _addr, - dma_addr_t dma_handle, unsigned long attrs) +__rust_helper void rust_helper_dma_free_attrs(struct device *dev, size_t s= ize, + void *cpu_addr, + dma_addr_t dma_handle, + unsigned long attrs) { dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs); } =20 -int rust_helper_dma_set_mask_and_coherent(struct device *dev, u64 mask) +__rust_helper int rust_helper_dma_set_mask_and_coherent(struct device *dev, + u64 mask) { return dma_set_mask_and_coherent(dev, mask); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 2ECAB2F0686 for ; Tue, 2 Dec 2025 19:38:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704291; cv=none; b=lKKHYzhkhWVEVOUNuiJODnd3Rqz0CmnWjwYZpHcXFrtEK+sDa3jXK8Gm+9CpbDG+3PB9EFPwGhc2EcKRbcVY88Svt3hEKB1mmbeyAEx4m7SQXK5GTZBBswcmUF2S+uMTl1Pj4m2L3Cb7MfhWQvdiuSkjoh6wLzaqD2BTypiHgis= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704291; c=relaxed/simple; bh=sST1c+3ZyzAW/E80FcjGAk6wD43FYvTDqpSCh8gNtPw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=U84sIJvGjoYfBIourhOrDo51u7iP4XoUUn4mq5dS71cBtqiTxpLjfgws0eT+TB+JjCpsoq1S4/VwN8YqWL/ueWFeE2IQrBTkizeyuuCHjdH2nV6i5ofsOx5TuO8mTPDF5hCaylx5iB/FOS3Yol3hM852S/8cI6L8lg8FboJ7YZI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=xvTBOJjr; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xvTBOJjr" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-42b478551a6so3142221f8f.1 for ; Tue, 02 Dec 2025 11:38:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704288; x=1765309088; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=PfLoGU+E3p+RrNIMIuq46mbvUH2DGFHCCTDh+/lSjFg=; b=xvTBOJjryCKo/pkANS3HVUbnyddtxlY/HHx9Xrx90F/qoYzRs74ov5r8dCCj4njOCg pS/0gF1klTigfEXA/UFhv3NG4s1IlIqnYC3uyp3E6OqTvmqHrvBJRPemdrzwTfqVwZTN jCrE1o1C+knxlj8m/RgZ0fBEjUohbo4eFl4oIuIcb+exqL672q5qjZ85bd9lpcSCrkP2 nkbVlNY1UAaq99U+i2bO32qM82ZchFNRY00inMMY9I7jHNMAW83loNQFGl1rFdegC76G JvVIfZFZ+2/OFpeiRInNuySDqBVlrmkkWISgqt09l56etY3PSSVlbt6TWOWYYvuA9ibx At2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704288; x=1765309088; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PfLoGU+E3p+RrNIMIuq46mbvUH2DGFHCCTDh+/lSjFg=; b=pTVoZAwPbw5luXWFWQEOID1EETNUx/3yV7TANmZISyj57GWdiix42JYHrNbKGPZyUu zW/SlmOmdzhZ036d7ON7Iys0S5wmOTLSl3mcGNDDRJl5gdkTMafjofWAiV5SjTz96CNQ /Usqy9JBKJtdaHYUsK6cxlLIb3L0t1f2CsSEKTqz1t+vhIvfzR9zQT2qQMUppq8cPuQP 4OK99GbTRut1OVKEpeM8Vc+gs3rsCVdGdzGxen8Jh3t/0FHeu7MMw7eGut5hGO4cAvyG UpiuWhUSjJ749DakPe/phabo5t1XrEPLJL83gz93C4g8jlCpvleA1QU67KxL1pfsIGxe OgQQ== X-Gm-Message-State: AOJu0YxmbpEjhqdbPrtLqIiDhbrGKKbjwkTLrG/LbbX3WRv5fp3KJ7HR I4NlBQBhchhpoDCVtQyvCfTz3Qn2T+cxCgb+6EoceW4JMhhCBR6gzTxMqFNY31UG2lTaF88J9zC dtgnEE0Vy+Np2pEFVdQ== X-Google-Smtp-Source: AGHT+IHCJs9DCLp6lX8zcuuyuXzAWqOm2o2jHoyKCx8BF4VgkI61l+lypwThJWpAO2fl7b/Ej96PMm0qjlZYpug= X-Received: from wrsm11.prod.google.com ([2002:adf:fe4b:0:b0:429:dc18:dd64]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:4203:b0:42b:3dbe:3a55 with SMTP id ffacd0b85a97d-42cc1cee3dbmr44714640f8f.14.1764704288473; Tue, 02 Dec 2025 11:38:08 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:40 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1156; i=aliceryhl@google.com; h=from:subject:message-id; bh=sST1c+3ZyzAW/E80FcjGAk6wD43FYvTDqpSCh8gNtPw=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIMEAmwihjM6RGs9E6W/WhMe4RZWTlHjdVW 6gJ4QE2URSJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 Rj4SD/0cxHq3vUR3Q5TbVfh/kEVY7Wus12D+u6RIRBco1tW2zyRMwqOfLUMlN2wwnmq4UQ17wOg HuiCRNZsNPC1rkA0zEsuDVSbMGMdr4dVPsvstfzXu4pVc4FtW3YU+gqqU+/cSrTvojq1hXUHZGm 5doS8Ewf1ExjC5lW1YLvNoEZ0zN2fE8VCz4qSY8GvTo8Av1oLbrr/Ga33MHfxklhMPingaop+4y FDDz4S7/HIIcc+Iff1Ary8ZjVwPShG3vefBKUa4coa+9TgUUXMkBmNIgJQggRMviFQJtEyUVoVP adMyB9fgqAsOOIZPMU/WAMksCd3i7BU7Gh1KOuZextcOdsMuttmQpWunT4f44vxna4RaGwUDA3d G9iwxG0e+xLHRnSh3qaSuMePJi3pyY0N1B7p91RwSITEXXdTCzjC2H7aObQMkx+LqRTfRKM0npP fLHOPyXGTNXX83i5qwxuAAJCsBXeunikZLxdGlxCu6PFvq+1LZVdkRMXjWvD79qI1wjfjCis9eh /E6NdyE3Y4seXXxSs0goWcktdrhK/ekAHCwwR3SHzIYJEQBTWGwszpT3vFaRDfgyPlMot1iJqfs LVgd3oMPntCW59FmRS6kE2A5t+V3YeNt6nbigTpaGTzqjvj9okXO4hfKfC2E30uNcj6ntmgusZ2 8/obwN+FVZBuxcg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-16-a2e13cbc17a6@google.com> Subject: [PATCH 16/46] rust: drm: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Lyude Paul Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Lyude Paul --- rust/helpers/drm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rust/helpers/drm.c b/rust/helpers/drm.c index 450b406c6f27390084e041f9bcc527fe3ce429b6..fe226f7b53ef0c02e6b715e53e0= 1e76bca9bea56 100644 --- a/rust/helpers/drm.c +++ b/rust/helpers/drm.c @@ -5,17 +5,18 @@ =20 #ifdef CONFIG_DRM =20 -void rust_helper_drm_gem_object_get(struct drm_gem_object *obj) +__rust_helper void rust_helper_drm_gem_object_get(struct drm_gem_object *o= bj) { drm_gem_object_get(obj); } =20 -void rust_helper_drm_gem_object_put(struct drm_gem_object *obj) +__rust_helper void rust_helper_drm_gem_object_put(struct drm_gem_object *o= bj) { drm_gem_object_put(obj); } =20 -__u64 rust_helper_drm_vma_node_offset_addr(struct drm_vma_offset_node *nod= e) +__rust_helper __u64 +rust_helper_drm_vma_node_offset_addr(struct drm_vma_offset_node *node) { return drm_vma_node_offset_addr(node); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 4D60C2F0C7B for ; Tue, 2 Dec 2025 19:38:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704293; cv=none; b=QVY61xfX4f1NW0tuV3N/AxFfS5+dVXYRUuf5/ajxreXz9h8GAgILG+l9rhd3iqD9sIrLhMB96yxMpMYH3CxVB94fba63v6yDZLCr5qaEPqsvkjj29zdgWF3LP6Gzf2FPZoNHG4nF0NKXcdyivfNXp9QcQpuIlVpRLsl9hfVlnwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704293; c=relaxed/simple; bh=MpnFAfV0XjyKamsJb2lrJxsaSWjn+wGdUIDfF+VVQus=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=hsnkd2v5vviCFjb1FIU6FLEIQwcFn0OzrwAqf4lgjfFe2pwBk280Hl7thWiUDQmLkRjhCQnQ6W66QYo45glKwtq0BPq2TN01XNnYGqAjKmnAm4Ypy8vBlOYLGBbRKrRaakGr2kmTf4IxD5ohk9CWBFIDwH9B0fQG4N0J1vcT8MI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=HvFsFhG4; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HvFsFhG4" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-42e2e3c2cccso2010415f8f.3 for ; Tue, 02 Dec 2025 11:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704290; x=1765309090; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=mR24ItDXxq6oeO13JnK65D/3qDA0jdgO70K07Z4qGEM=; b=HvFsFhG4dWz8cp7ZFSv5qxx2qXU2ST/IL35n4TCYPq/LRv/nZeNh/Y6timQfbNdKux Xzz6OUSHf/cAwlT4CYPlx8PYS8I4WLJkuUaaZDIXf9SDRzWkip1Qwo8wircSN8S1FH45 6FlYQMpZW4iYKMAjvdDeKVIU3ww1wOqDSHGNmikPF7zu+jBX3Zx27aZxI55flauLHKel VikTDPqr2dusQq6fTpxutvF6x0J1VK5tHPGxEH42X7esMqW6U+TRo0RQF6gtrdgw5Id+ BZXifYHFiOVDGJPD2ZLbTvvlYfilDgGpeRzQH2ZJ4JRT1OLd2fQ9C7JgDWDVl0vRr2mB rk8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704290; x=1765309090; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mR24ItDXxq6oeO13JnK65D/3qDA0jdgO70K07Z4qGEM=; b=u8/YloQjBNbyzbWqNhGvtsYUtTMnUlNkntcTHfXqz5dK4ibpYESISVzD4SPkTgCLla glNYZ6y6U/5Dr/8UlumM/ll1xwWb87mr7vGak3/1NaCkyYLKQ39bzaIpZ6oaWHioEl/w OVjklo2/igMduBOLuqRw2F9OnHMchHjTsioesg9yqbzGO/tg4MkLgZK0R0RWmdqXqBU5 ULv6mKSMCk5H4ZXMg4T+mjavRqIkI+YspSh31RB4j6tF/A/IWtnnagI2rM0GMc3OhiPu Or5qv88WHwGXUYgN7m6CzLhb+t4szNEWmIft4O0JFY8yYo+ElJJk9ooX0QM4QuoOQsVR OkgQ== X-Gm-Message-State: AOJu0YxyBP7v6Nv+Jgtn2CAwQstjkTcDTJ//LGhTx7LpJBn7xoSxH/ar e0KlFB5WZC/Q6OVtcf0MJS76JULluW+3y2Y+uOPd4uhFhW+2ZempTE9Hfa+4j0NVV2ElQOusjjJ 8yA6ZY/y1Q4al964kqQ== X-Google-Smtp-Source: AGHT+IEMpyMN4BNh1ATi2Yjkyo1Y/LjaeHr+KF8uJ0CaUGHJFvymaXf+BFgYanfFIluI7ORDE6rceQ4lFue7Sxs= X-Received: from wrbhg14.prod.google.com ([2002:a05:6000:1e4e:b0:42b:5d42:f6b6]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:1785:b0:42b:3d9d:c5f8 with SMTP id ffacd0b85a97d-42f721fc5d3mr341413f8f.6.1764704289729; Tue, 02 Dec 2025 11:38:09 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:41 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1379; i=aliceryhl@google.com; h=from:subject:message-id; bh=MpnFAfV0XjyKamsJb2lrJxsaSWjn+wGdUIDfF+VVQus=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIOx21nkOp56I17y3e9GPWG9CnmN4wTMgmN vbcZCgyhzSJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 RiA3D/4iKQ+cGMwsROoypCMabHGzuReU9sFuvLN2FR4gB6sotkg5xuwcjALmhaAKgGYS0uN7HOS VJKIvxiqbc+qgUI4OhlDuhPAowY1/4J2Z0fyekAC3TPa6cxumUcDKSwR9lYlH3Tv5bUTnkj49Vt aewcvFk2c5JqEfEGhNl9r9GDqBld2pnUG6QQTRw9nVGONXlh1d/or0kjNpBs2c7n7fF/pw1ATC0 ShU4TAB3k6xi5uucFmaNdsFp9DTL+IEXLTD1aX+Xd+CEn7YEmyK7kam2WiutKaozjb+eN47Qz2q LTKf0vgrhLCFOjGE19uRzUulgZ9PXgwMdaSh9B2QFUp6c5FPQMZx1nOKQ6o2TVy+Y75wOL6skyQ wxTyDj5h9k9Y2WFpo6Xpntu1bRo+nFv6zhoFBGzVECw+ugPDArITiscQ2HMDzttW+WulwsaDJyZ hu/M3Q9oJRnrPitlVE65D8CqzL6py27u5enaI34mVAbRm/NiOdZpDYWn0lvqPpw/pInH6VxolBN szOyGFK2g0TZ1Q3ZaQP4DSLprjqtrSmJ7HG1z88L1y65tPnH69eKrDeG/A+ThehGOccbPsFXmfi oYJ4ZEdq5PTU/d7gjt7wA6HN/U0/0E8Xs4SmFb+HKsbPDqQAqsNwMziTIRCn9QV8ckbH+UOsGlD D17WkcfL9noehpA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-17-a2e13cbc17a6@google.com> Subject: [PATCH 17/46] rust: err: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- rust/helpers/build_bug.c | 2 +- rust/helpers/err.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/helpers/build_bug.c b/rust/helpers/build_bug.c index 44e5794880373e5b4c3e9de5677d8e03ccd4a2be..14dbc55bb539589fd822ac8777b= 3fdaccfee7897 100644 --- a/rust/helpers/build_bug.c +++ b/rust/helpers/build_bug.c @@ -2,7 +2,7 @@ =20 #include =20 -const char *rust_helper_errname(int err) +__rust_helper const char *rust_helper_errname(int err) { return errname(err); } diff --git a/rust/helpers/err.c b/rust/helpers/err.c index 544c7cb8663283edbe202318e5bca870708546f3..2872158e379383d592af6879911= 15a0d223c3898 100644 --- a/rust/helpers/err.c +++ b/rust/helpers/err.c @@ -2,17 +2,17 @@ =20 #include =20 -__force void *rust_helper_ERR_PTR(long err) +__rust_helper __force void *rust_helper_ERR_PTR(long err) { return ERR_PTR(err); } =20 -bool rust_helper_IS_ERR(__force const void *ptr) +__rust_helper bool rust_helper_IS_ERR(__force const void *ptr) { return IS_ERR(ptr); } =20 -long rust_helper_PTR_ERR(__force const void *ptr) +__rust_helper long rust_helper_PTR_ERR(__force const void *ptr) { return PTR_ERR(ptr); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 CB6382F1FC4 for ; Tue, 2 Dec 2025 19:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704294; cv=none; b=AcxeKqinHs59U7ye/+1XHzC2xWFHJKr5c0imtqljVNN7307k64uswsG9Xi+mLywiyxhc4gR1LO62x8staiZYwSc5txJnmHoLVpZkUh7UT61kOW3Kkp6Oe8tavZL/KygeTS7gkk0ORKGCPPHUTA+GKraWP9NwlVvvGq5zwAxwLCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704294; c=relaxed/simple; bh=nrmkOqCV7ocjGEn6QgTEPI62gVcQmYigMQiNH975fcE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BjLp7chs4Gue+e9cN1jK7lsgwFhwRnxlUA2aoSinsUS+S9qIxLvyHxKMeii1R6S+isNzXsRgzNDFPq1sQpTBXJWqMDVktsv6aWW7g6e2/5nhC0mrVzMVvADa3NwLC8st/urAqAMCg0/PNqZshYdGwRRJv/fxovYUbQC0jpyUwPg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=T2w60A/J; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="T2w60A/J" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47799717212so44388245e9.3 for ; Tue, 02 Dec 2025 11:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704291; x=1765309091; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+O21Y6BxBrJfbXbsXUMMfUGXrVsdmNULpo//ikWcag8=; b=T2w60A/JtNYuOAKLKXUBlK31FZQ3EsuTx4DtqpW6jCFnjSbqX39tIG5+GgxZhVd7by RKoTiNvqG0uXg2WhcgXiE0C4HL1vJm4XIrMu3Khc3HNkfEZ5CF4WpikRzrdUEkrwA4rU zVWRbFx67VA/MLIU3jEAOnVO2BlKCGSZFzQ/9MQWaEXqPvJ/Tms7qJ2ZNogKKiYLjKfh tOVa5d4h4dHPF+D3uVMerQ6vO2Ty4hDH/i70qyiRKyF5ahNSjrJSZsn3tdmFuATpkBwE ynFrXLUXCdlUEOv3GOcNMIk9Lq9PQdiUActTGEIoHCe2c8kFBSQSKqGeofr5SqU5WRhy SvLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704291; x=1765309091; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+O21Y6BxBrJfbXbsXUMMfUGXrVsdmNULpo//ikWcag8=; b=ZSXBtm8U4wBWuXxVbw3Uw5cVVfqI3FNXKRc+3CwE5hPaS8xA62Spo0q6VmasZkO0lA 7jAPganVYYebu4260B0dP0YRm4nhKjpQoxwZtmk3UlOeWoTiGQ6SkAajAdF6+c16Ju89 cza7RyxSljSWTOW1r78Ym91R+YV0iVkB1CitxH79Jf3oyQzxx/TGbGYLRpe+96F+3D3h 8y6cOpq8bMQrxBBeK/aduNhI32Xf0xdtlg420mdi3973x4J/3S/7i+859j+6c3f4yqpc EEKDtrRxO7BQA8stxgAP+gH3jfhdD/w49Gvc2b080HcRvUbijk09ET7Mpn+vNQWnNWbA Qz7Q== X-Gm-Message-State: AOJu0Yx/hAG5TNFBPgpu+U9Vileb8wFZRM070h8hLT2koZoe7dJ5t13P lDtyBDMLhGQkHJPI4aXc2FeJJXJa5vqMKPBg9HmloF/Zzhx4BMcwVqVLA6SOgQYe4cn2U3V3GjT aie3MMTLEBCfLa2AsHg== X-Google-Smtp-Source: AGHT+IGJhNJ6fdkKPz0fEer0RCHqcdeCiQS5QAFfJGasqEvSFa0DpvrJs94MsIvPxEzzdpQYnq2TpN3p6gEfAw8= X-Received: from wmco13.prod.google.com ([2002:a05:600c:a30d:b0:477:9d88:de6d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:45cd:b0:477:952d:fc11 with SMTP id 5b1f17b1804b1-4792a6112c1mr8153245e9.16.1764704291267; Tue, 02 Dec 2025 11:38:11 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:42 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=780; i=aliceryhl@google.com; h=from:subject:message-id; bh=nrmkOqCV7ocjGEn6QgTEPI62gVcQmYigMQiNH975fcE=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIG8MtytrS+nDHlPRvfJf7YOQNDYwcAWYVB YM8U3hFPleJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 Rh0JEACH8pjfDtrai2a6Zg0Alno+thLKmojRD0ODC8gNoJKM/iTpVgQ4W/BElUkBzeZ0/WVUKES BZv0jeYQxQfkiSwkm8SncMlXb5ZgOY2jRVzzzCEQSYMs+XWkVCf4phy58X89dPwXG7LYGuTbCv5 rWOpTTw7rDK3fDN1krHOXHad3oXuP5cb3F2MU2wsVUJfvLjGLYGi+dfE8lVHoxQQZ+RD432p4z8 KUcTPJGqVMmF/+/p8If+eT1idfSAHFxqe4xWnijqd+dgZaTWUiL3joE9Gn/67sg6QcDgZ2YChNa hzXb17CM5FihJPUNk7jelAmHv1yuV9DQeiY5gsOiqI8BUjtS4BQk1HJZzz/WK8jGmEkLtTPiMtY jj5C9MaKlzpOaVQ2QPY/CPnnE2kxiZgiJ/v7pfI41AUZ3a+HrlFst7IVunicvj5VG1esswCwLti DlpCqsemkFl0F+GAYKnNPQ9RbVgtqG/uplHdT+zZPwwNTikCPIVFMAlLc5XfOWlVLBL5sil0osv ryv4yBUTIJ9fzyoAHtHSt50qPyo8iiV9JV/leyRtBUoUySTy0fJi1YXJ1B4AHUmMgpnm/J2UWHH qMQnxZzXbZRJPpBD9LiLs+vqzb2bZA8L0WojMUcW010qkBw2mu4lHXuqwCrXlIF1MK8lLchCsi1 qZp8JqfAY/oSRAg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-18-a2e13cbc17a6@google.com> Subject: [PATCH 18/46] rust: fs: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Alexander Viro , Christian Brauner , Jan Kara , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Cc: linux-fsdevel@vger.kernel.org --- rust/helpers/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/fs.c b/rust/helpers/fs.c index a75c9676337246ce532ef694e64ba9a7d7ad5842..789d60fb8908b99d5c50293cb7a= 3ec6c61e768f1 100644 --- a/rust/helpers/fs.c +++ b/rust/helpers/fs.c @@ -6,7 +6,7 @@ =20 #include =20 -struct file *rust_helper_get_file(struct file *f) +__rust_helper struct file *rust_helper_get_file(struct file *f) { return get_file(f); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (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 1D5372F25E3 for ; Tue, 2 Dec 2025 19:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704295; cv=none; b=fJfDk6uRSWibC9aMnxEDx2/HYdzDfj90x2JdOHNDtF0XuI6H44aOBLv1uR6zCJzeUm2f76KW3SNoJc+8lnMTGIr6les26B3t3ArjkG1JDc36FHGIXlrFsa3W/ch1BQx9Kwxij7Tkz80L0uSIw0/truv60CoSeQ4IvQh8iIh9sj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704295; c=relaxed/simple; bh=EUE4K5iTzfGORdv4PT/xu4tqe2/2Ya5xo9yL3tcaod4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=NaTTMMJmxT5prIeGLV2hUeaMBEIoc6y6VkGiIPzCkqYR6TZHKf8ihBbT3r/1IBq4tVowVKKVdPE0yGrXNes+/BI+4duoEnan1xHFQh0JEd6DSnLJshGt68k5qT6ean/XRU1hPhrCZtxGbKGb5V0QBZkTSzmPujLGL0y5bgQNtgA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=P3zhdPYQ; arc=none smtp.client-ip=209.85.208.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="P3zhdPYQ" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-640789adcd2so5693279a12.2 for ; Tue, 02 Dec 2025 11:38:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704292; x=1765309092; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=9DFLJh1k6KKFA37WMPtagQLHJcdlMyeYXxcT/it0y+w=; b=P3zhdPYQRgTaQOKGVoOqEuGyjMbRNK71LJgQyLzC+lYpMNJ4JXETL0Kh2K6T6dxbBI yt8At23nzyqwFBe6wgsIvExrTxt6J9K3uq7jT4D80KoAQhiH+lJXUmdWLpuAeGfygJ/V gYPRfb8edHvfLdrAB3ycQcqUDdMjxKnO2mwPA3TLmHbrCGy9J6ZQOoyzI9cTvPDpKEud Uy6rRGHNkxxL5dgIcPiqMSoTdfygeyVlUy0rDAOhk+jH8Jg77s6OkIYm3zKFm0C3bfmR vXGxJ8Rggxu62cLfTdSCKe+gkhU5HcUhy0FXKCvpsZf0F/K6JohM75Ef7L0CoBc+tI/w 1nEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704292; x=1765309092; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9DFLJh1k6KKFA37WMPtagQLHJcdlMyeYXxcT/it0y+w=; b=uVKdIkU67d8wukz1a++znZRw2vpTAnqjYJdSLVV8IMnZNuDGDht7GLRzNKTeVIOcpR AX1836Kf068AfBtYI/uC+bsg6QBYqt5hqYBlICzJSGxJ7AeYJ7dM26LpSl6iTubWD0Ml Iwp7vrubLSYqVTyzCaHRbcwLrGHNYpOEnAXGhcUu2wv69t3Bziaxlm4fz6w2CkNz8kwf mMWdUg79wesjTbzdEER0wOFzmmia2btwe+E+9aOIuf4rrYRfAO80+XTBPzk3RYhQwAu3 AjzeZSAgGc0ZhRc8Xrg1m74RRrbiqjVFMHdHgo9IgO4fykaQeu9AJMzJvSUwCX+jcLf4 TFFQ== X-Gm-Message-State: AOJu0YykdX3TcyVkUVWfSDbbuvJ4uI9hqj+9B7mYnxkAHknfCEAk5aW9 0shGPV/FuMJf1lv7DPD8k2ecTvvsa33M8qBGukmjde5aDgzUvsJcUOkwRZNdV9RSC6H3W7q+XvY R3QYSYLzsgu5vPCGcHQ== X-Google-Smtp-Source: AGHT+IGvCYhHLfd5PiXEMOtAZu6u6Msjnyya9KsDHQQAbr9JB/sBWhFYX8ywgw5aA+Nx8s8Pprq8YSMLMyDysSE= X-Received: from edh5.prod.google.com ([2002:a05:6402:5045:b0:641:8485:70cf]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:2714:b0:641:3b4f:4dc8 with SMTP id 4fb4d7f45d1cf-645eb799fc5mr25540339a12.31.1764704292466; Tue, 02 Dec 2025 11:38:12 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:43 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=5731; i=aliceryhl@google.com; h=from:subject:message-id; bh=EUE4K5iTzfGORdv4PT/xu4tqe2/2Ya5xo9yL3tcaod4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIhX9T8SHriDk55CZBWAv+QkdQBmRI9aOiW HJY21M1bb2JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 RslQEACO7EQYN7HRbMUuIcppgXdikB0p8J3GW3ZPfvQaebKpVPDvfLvA76xUny4AsLISOKX57Eg 7dvXJsRFtifOssx9VmccRgpql9MibS+aSNE/MQ+CylnUasgVAQ+Dc+FdkmMFv/Z5gHOk2a87YI2 RuP6jrCwUykym81awqdAE1nWMPwjIlbyn9ExmRlYbe8GbRhVq1yeboprkchfXkBH/I9104PsoLF mfOS8w2l09thGFSYD5vbTgYer1dWZRmFkXHCFa2vhDg2vYaRY2mel28ere985c1K81gLuD2GWeZ q7ILcgbI0WhBIEiv5sL9CK0cRHHU8zNO+V2TB9OawN2QRFoXqEhcJP42om7OFolkdicFRpqn/Ww tNmR1l+6nlDxHc/UsXsy0FZkCZa1Z5ZH5vQrMNxcgBxhAOwXOF38ilGH869dzdA4aQNLvSA3mXg YtThNa2nWp6pTDOpwcV5JCDmkgdrUOVjD552uwo+gnDqb4um+WrpIyLYlU71meDA9gd6F8FXf+r 3M3qBkD1wTQ3hlkfdLGwtR8BqOd3wFrulkiLiKbonz85LUOEtfqLgN7E54ScS0xfy0j6wYJvrRJ SvKtPh3s8j5tv24XF9Zf05T6D7Rnp5FdcQvQ5I3Pu2P1Mr53vZ03LYnZ+/cCmN/GMGLhZRscvrr xcd3kvtxei209iA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-19-a2e13cbc17a6@google.com> Subject: [PATCH 19/46] rust: io: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Daniel Almeida , Miguel Ojeda , Greg Kroah-Hartman , FUJITA Tomonori Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Daniel Almeida Cc: Miguel Ojeda Cc: Greg Kroah-Hartman Cc: FUJITA Tomonori --- rust/helpers/io.c | 64 +++++++++++++++++++++++++++++----------------------= ---- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/rust/helpers/io.c b/rust/helpers/io.c index c475913c69e647b1042e8e7d66b9148d892947a1..397810864a243958b23c0a6f530= e2705ca5e909c 100644 --- a/rust/helpers/io.c +++ b/rust/helpers/io.c @@ -3,140 +3,144 @@ #include #include =20 -void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t size) +__rust_helper void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t= size) { return ioremap(offset, size); } =20 -void __iomem *rust_helper_ioremap_np(phys_addr_t offset, size_t size) +__rust_helper void __iomem *rust_helper_ioremap_np(phys_addr_t offset, + size_t size) { return ioremap_np(offset, size); } =20 -void rust_helper_iounmap(void __iomem *addr) +__rust_helper void rust_helper_iounmap(void __iomem *addr) { iounmap(addr); } =20 -u8 rust_helper_readb(const void __iomem *addr) +__rust_helper u8 rust_helper_readb(const void __iomem *addr) { return readb(addr); } =20 -u16 rust_helper_readw(const void __iomem *addr) +__rust_helper u16 rust_helper_readw(const void __iomem *addr) { return readw(addr); } =20 -u32 rust_helper_readl(const void __iomem *addr) +__rust_helper u32 rust_helper_readl(const void __iomem *addr) { return readl(addr); } =20 #ifdef CONFIG_64BIT -u64 rust_helper_readq(const void __iomem *addr) +__rust_helper u64 rust_helper_readq(const void __iomem *addr) { return readq(addr); } #endif =20 -void rust_helper_writeb(u8 value, void __iomem *addr) +__rust_helper void rust_helper_writeb(u8 value, void __iomem *addr) { writeb(value, addr); } =20 -void rust_helper_writew(u16 value, void __iomem *addr) +__rust_helper void rust_helper_writew(u16 value, void __iomem *addr) { writew(value, addr); } =20 -void rust_helper_writel(u32 value, void __iomem *addr) +__rust_helper void rust_helper_writel(u32 value, void __iomem *addr) { writel(value, addr); } =20 #ifdef CONFIG_64BIT -void rust_helper_writeq(u64 value, void __iomem *addr) +__rust_helper void rust_helper_writeq(u64 value, void __iomem *addr) { writeq(value, addr); } #endif =20 -u8 rust_helper_readb_relaxed(const void __iomem *addr) +__rust_helper u8 rust_helper_readb_relaxed(const void __iomem *addr) { return readb_relaxed(addr); } =20 -u16 rust_helper_readw_relaxed(const void __iomem *addr) +__rust_helper u16 rust_helper_readw_relaxed(const void __iomem *addr) { return readw_relaxed(addr); } =20 -u32 rust_helper_readl_relaxed(const void __iomem *addr) +__rust_helper u32 rust_helper_readl_relaxed(const void __iomem *addr) { return readl_relaxed(addr); } =20 #ifdef CONFIG_64BIT -u64 rust_helper_readq_relaxed(const void __iomem *addr) +__rust_helper u64 rust_helper_readq_relaxed(const void __iomem *addr) { return readq_relaxed(addr); } #endif =20 -void rust_helper_writeb_relaxed(u8 value, void __iomem *addr) +__rust_helper void rust_helper_writeb_relaxed(u8 value, void __iomem *addr) { writeb_relaxed(value, addr); } =20 -void rust_helper_writew_relaxed(u16 value, void __iomem *addr) +__rust_helper void rust_helper_writew_relaxed(u16 value, void __iomem *add= r) { writew_relaxed(value, addr); } =20 -void rust_helper_writel_relaxed(u32 value, void __iomem *addr) +__rust_helper void rust_helper_writel_relaxed(u32 value, void __iomem *add= r) { writel_relaxed(value, addr); } =20 #ifdef CONFIG_64BIT -void rust_helper_writeq_relaxed(u64 value, void __iomem *addr) +__rust_helper void rust_helper_writeq_relaxed(u64 value, void __iomem *add= r) { writeq_relaxed(value, addr); } #endif =20 -resource_size_t rust_helper_resource_size(struct resource *res) +__rust_helper resource_size_t rust_helper_resource_size(struct resource *r= es) { return resource_size(res); } =20 -struct resource *rust_helper_request_mem_region(resource_size_t start, - resource_size_t n, - const char *name) +__rust_helper struct resource * +rust_helper_request_mem_region(resource_size_t start, resource_size_t n, + const char *name) { return request_mem_region(start, n, name); } =20 -void rust_helper_release_mem_region(resource_size_t start, resource_size_t= n) +__rust_helper void rust_helper_release_mem_region(resource_size_t start, + resource_size_t n) { release_mem_region(start, n); } =20 -struct resource *rust_helper_request_region(resource_size_t start, - resource_size_t n, const char *name) +__rust_helper struct resource *rust_helper_request_region(resource_size_t = start, + resource_size_t n, + const char *name) { return request_region(start, n, name); } =20 -struct resource *rust_helper_request_muxed_region(resource_size_t start, - resource_size_t n, - const char *name) +__rust_helper struct resource * +rust_helper_request_muxed_region(resource_size_t start, resource_size_t n, + const char *name) { return request_muxed_region(start, n, name); } =20 -void rust_helper_release_region(resource_size_t start, resource_size_t n) +__rust_helper void rust_helper_release_region(resource_size_t start, + resource_size_t n) { release_region(start, n); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.74]) (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 5F4F42F290A for ; Tue, 2 Dec 2025 19:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704296; cv=none; b=IU7d4FRfwZPMT78Xn3z1kXZvtc6gZZOGcN2QJOoibkoyZ12uhfbFvSjjKCquCwTUgPuP7SVEJbmmmBTQlCryw5JC92Rb0YL0gVfm/2/4VN+LIsOlzIsGGvV1IGMdRf+Pnry58fbmb+vTZ8UNnNYxn3d0weR4ub6BWGx3AQszI6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704296; c=relaxed/simple; bh=UwUB+7DfZNlJYGIKMi/hYPyoEWQExdY7WWA5Hjo2XX4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=OGsF5HvHCj2lVJpmudtyV00sNk/BSLv6+jkcTHOEOuVsQMggnqsaXeI81yGz/elnbnyEs9wECqzGZNvtPQfb5/txpmhGZh29h2YZw5sn+DOT/b+hoaPbKsOtj/XV3Cc1O/XF5sSRUFnhWGLQKIwB8mSvry8md1ONwzuC01S13a4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=LcnMGTTh; arc=none smtp.client-ip=209.85.208.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LcnMGTTh" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-6408222225eso7263958a12.3 for ; Tue, 02 Dec 2025 11:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704294; x=1765309094; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=XmFVnEAbB39QdUOxdohjuexvaXk9uFsAyR0IkFoTqTE=; b=LcnMGTThY5tSJiFYjpytR78emK5GGATyq9X0M1AlsEO3UMDAs5oBLcm9DnifXCZtRj 9xuYlFyy8zp31Mma9O26VIVDG8bE3UL/0K1uhZ9yL+tajATfR+l1LIcZ3Mcs3pnvv4r2 dK4CdigozVlvjE9zpqPb2n6djRFMdAgd57K5fSGgG8VIIbK7h7RUiGDj9isOoCseZxWN C3BPaOXEwqrw3rjN6PHNwpT+rx+pzvcArNES2n0+GCFi37U0PAVARjpEqvY5tzEX0xxV 33MftVxHYnB303dQYagVdu7fkjk86WroX605K3/iKSTBdBzEQ690WgkitU9r8DT75hLJ z3gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704294; x=1765309094; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XmFVnEAbB39QdUOxdohjuexvaXk9uFsAyR0IkFoTqTE=; b=Q5cKj3mv64qRPz0h4DEbZgiTklioB/h9jFkrlMEcHmJhVQG0H5x5/rZRysmo4LQ0DY WsWth0PEO/erOBYZo41du7j61D/s2UxcsoMKjNpC8SZicTBmuuh2izYjsQneVANXSSSm LicIcYKnsWG069LKJHW3s0QKvu1DrFhMbjnD9mMF3KeYwUkrPja5LdSXWbaNEFpor8Y/ yP7XDziN2feKKx3Jg5cbAPGbPrMB3si+gFr4TW9VBQmga4lfvawWGIRqaW0wm3IDMfH0 lmTnhyAKH+gC/7O5ko2yDWRS9+PLQFXSRTPjg5gy7I+Ry8wHisIYvbEWuFv793T8/xf+ KHIQ== X-Gm-Message-State: AOJu0YzxJ223k4zIWbgp39mYW5IRFWD79xJlFucgtX1Tvg9ROJ6qbNPZ iIaxzlRwmVRTXsYX/C4CCooz27PUDire27K2QVCtVYRP4bKsP1lWAqBksJaWUGh897U4kJ9n1EK e/1OGVw19dVzV8haeeQ== X-Google-Smtp-Source: AGHT+IEY3965ftvY1Kcp5jw/A/+wwznTG6Mq9CzU3+B7WLBp/A4HpExQ73wqnxrRBCZ2wKYzu4Vc6Kg2SYlWARU= X-Received: from ejcvb7.prod.google.com ([2002:a17:907:d047:b0:b72:b016:4e0a]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:7f19:b0:b72:d9f1:75e5 with SMTP id a640c23a62f3a-b767158240bmr4951829366b.20.1764704293597; Tue, 02 Dec 2025 11:38:13 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:44 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=942; i=aliceryhl@google.com; h=from:subject:message-id; bh=UwUB+7DfZNlJYGIKMi/hYPyoEWQExdY7WWA5Hjo2XX4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIwP4pw/t2dPUJ8GNgygq60osW44xZeVklU 3rzIS3ef6eJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 RpD6EACAhso5o87kswUP+Sxh9LPZW1Fkz16jZtZ6DdJ0krK2tlewsHYfxbulkau6FxXzg46eCCI YCrXGMKows2TYxx0O8qEuBcbR8QzInMAI6FQ2Y/SxbUfGa7sA85BteuoX02e9VjosFRa2MOWB7c fSGEZoDlNIqUjFL3H/aJWfsgHxfGajg569rSFbcGd1/e6VInwjGvV2qqpi5YzyCK/RJgfU/4Jtp cKGRhA4rSL+G53kfYfg/VwFplzOjbKYST4pR5T9p9ockQKTFKfOJfmYnWCMjA2mDV/ED3CGY8j1 1nkZrdbD79RmGjq6XOKPi8+Qz3N8oduSN2m7fLRy7J7tsrzCaIV987gISCalZ2gPVlPrCTzcMJ8 S2BIMHUP4jSq7ydVAZfEPxki1ptgaUB7kTP5Unrc9L7ZDWle7H6tM6UY3KSe8ZIj/uqAoX2QKSF hTwYmGYE/WaidBtguBVCPm31GJcjTd7ICSGFO9fqRJqUG5C817kqSL/J/ACk8on3XRfLUqc/dCG UZFgF/o15tZcJNXCjyxd3Iyhuo517y4wlDw0ekx3ZcATEupO6DmkHo9zRBAn72qRywDElYu+A7v yEEoWwy5SMmZaYmFohTFN9z3vvQ5O4lXduT9cKebT90ImC0GVT+85PbOQq70WMYxwivIjOo9gR/ 2xajSaL5rLvm7rA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-20-a2e13cbc17a6@google.com> Subject: [PATCH 20/46] rust: irq: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Daniel Almeida Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Daniel Almeida --- rust/helpers/irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/helpers/irq.c b/rust/helpers/irq.c index 1faca428e2c047a656dec3171855c1508d67e60b..a61fad33386621e8830319b92ee= 24b92fe7576f2 100644 --- a/rust/helpers/irq.c +++ b/rust/helpers/irq.c @@ -2,8 +2,10 @@ =20 #include =20 -int rust_helper_request_irq(unsigned int irq, irq_handler_t handler, - unsigned long flags, const char *name, void *dev) +__rust_helper int rust_helper_request_irq(unsigned int irq, + irq_handler_t handler, + unsigned long flags, const char *name, + void *dev) { return request_irq(irq, handler, flags, name, dev); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 62C3E2F361A for ; Tue, 2 Dec 2025 19:38:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704298; cv=none; b=RaktbsBUwiGBELHKaHkSl1VTCCM7UfUsXp4HqVgewWKevEGH49RTxQ6ECwxaMDFoI2HrRWLg942z50P4TdKYfeRLTz+yPpuPw6YzwDSeD6v9Hvl2cXZiplE2MUS7xyr49jMooH43CVNntKS0IZfnWX8lXkgCVENX/MbDRvd37U0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704298; c=relaxed/simple; bh=O2kUeaQ1UWGIYL7ucqPo81K7xsGx82r05RTFW5fUFa4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=gfhCzp0YxW83oVFMrLLCHxZ6GWpYkK/MU8nDI8d/+jtYpqDn6WnBvyqJ0LzouMEzz8qcmzaZFpZwpn+9hhv99zI/1f9vzrWamkQw9lPXTpITcLAq8QFG1fiaOckTX+XQNCZip3g0GuTgyP992qCc6Q2wzvFEEwDRMcsGrjV3SM4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=noHTbZ8x; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="noHTbZ8x" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477a11d9e67so34647565e9.2 for ; Tue, 02 Dec 2025 11:38:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704295; x=1765309095; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=3MqpU21XnO6rwEHBkLWeoEI2kCAx33Iioejz4be4+GQ=; b=noHTbZ8xiS4HhwnxbzhVgxeOA9bWDlFO26dfZ2zLR5X1VGWU8nCaBPMVAaOnfZYHtM XLyZYNxmL+i07T0e4wutz6wnWedOsvAexpBZ9UdcgS9CJbfbbOMeGK1Hy5LeJXWPUUt/ P0NURdRLDm0E1bCGSp3R/f5fnhmNNetBF7QriTj4BX23pvEwO7NMU1gFCnPDt4YoY0sP cGsvdvzbGiBG3zu/sqkUn2KDo5jXBYJiIM6KnnKrQrYpAjPQZdkIoY/DvRRsZuv0wBo7 c4gZWdW+vyXdcAB8mVzV0bzMlF9Jdb77sLb6GqUoK0/Y0alVsK1dAwEVC03L+Afs+XmV YWxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704295; x=1765309095; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3MqpU21XnO6rwEHBkLWeoEI2kCAx33Iioejz4be4+GQ=; b=YMxunaE1CDQFcVPQEbNE6oL6iAvyOxL3/al2ZEzJFiAjocXejcnjF/0L0fuXoEp0Ec TYvvXQKInlpw4Lo5yoPcBxNyiABbqld1hhWV9MgBTw+XFSdWZLezpTwzYxA12IErjytp sU1YwIdq+lVJ7XLWXUMv4XTjkitQT818waHrEuscVsVib6rAaauIQRw4IPLNCK2s3t1J 4pU+G6AwFD5bXcZLIvqbcoLjaNBqfU0M5JLtLpnDRtdZTdtKhC09KXcbea+2F/98Qxjl YQeh8iukUuO2oyvtJV74t85ur9o1svzfb1UZu3xkucKXTG1dAbsWiglwNfd+XhOxdXIi v+iA== X-Gm-Message-State: AOJu0YwBo8n1HpQP2Euefukyv4EeQn5o9fPQsRp3ejGo+qV4a1DlGAvc xQNCRoAr4JKG7eFksmURjKbOnvE4Luspn8pPVD0+UMV59R4qQ9R2OnaNzZfuYvNq95nWrMpZ1AQ tRWFtI+8IV6cARLEiPw== X-Google-Smtp-Source: AGHT+IHul91rsN1td8jmOJqBWMMqYY0RN6pfOrenUj4WsZ0i9f/CnRGBva2oLDCkXKcnRZ75Zzo4TP77v8bK9pI= X-Received: from wmjf3.prod.google.com ([2002:a7b:cd03:0:b0:477:a0e9:dc85]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3592:b0:477:9671:3a42 with SMTP id 5b1f17b1804b1-4792a61e75dmr7394645e9.35.1764704294832; Tue, 02 Dec 2025 11:38:14 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:45 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=925; i=aliceryhl@google.com; h=from:subject:message-id; bh=O2kUeaQ1UWGIYL7ucqPo81K7xsGx82r05RTFW5fUFa4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AIWLFS3CmuvxgrVrJmmtAjOgt0QTv6nNg+F Ed9xoe7n7WJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACAAKCRAEWL7uWMY5 RnMND/9TyxE+Cz3AUPzMh3bbFqiw5HZwLGE4mAo1qM2XPF2OZILAqG9irNQk++aHtpOLIvdh1Tu VQ+g8v/Qz2Na9VwVTtYmwjDF5GOQnQOgYx9WpmYzsgARQCWd6Dwue1QXVcnkZMh7jtCecsBL9g9 rMseS0t4ZlxdulRWncoTB5gaKz+7BlVvJVSkTR+cVghfWDBcC26fh5eOEgDP1EuEOEXX0+GAQrf pNaX3xeYjJQMwaKXAkhZh80wvJCF13JAl6hYHEAZwuVJFPdTOaOYRzG4QiIwGsYUzg0VM2ENBfv GdOdqginaypnWsKeibNnGXNgPVZjVlNVo1qtidulqCiIS1DvBpCLMbHsbf9Em5KqIEaDgkQ+OSA CuRILs2IxR4cgytrUmTlf8bw93a+xJvRKWiWEyYpW8OOLYsi1naPzBQiKpSC89k1Bpi2mpu36Be yTDSYfKAlDc/wWcOpaMK8n4M4DyC+tCvNZQoz30YMiWnDAL1QCvbF7XOy934dZF/mHHWbBULcck 8oNX5+3UMtQ+UFyU0xCl6rzP9qIEn+1PXrZLJq0M5OAx6dvrIp4xgZqyBFQ38fGHNdT80rMJdLU euMMmSKzgm9q5dy1Lpm5WVe/LrUz1WMG0HGimrex1clJ7xOUJS4BinpwbkUR0d2+w7s1jNBWsiq u/cHQ2wM79MwVkw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-21-a2e13cbc17a6@google.com> Subject: [PATCH 21/46] rust: jump_label: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Peter Zijlstra , Josh Poimboeuf , Jason Baron , Steven Rostedt , Ard Biesheuvel Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Jason Baron Cc: Steven Rostedt Cc: Ard Biesheuvel --- rust/helpers/jump_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/jump_label.c b/rust/helpers/jump_label.c index fc1f1e0df08e79c0f06ac46cb6729a08deb7bd41..7ca384e73121820d882fde645a8= 0cf718e6d9fbd 100644 --- a/rust/helpers/jump_label.c +++ b/rust/helpers/jump_label.c @@ -7,7 +7,7 @@ #include =20 #ifndef CONFIG_JUMP_LABEL -int rust_helper_static_key_count(struct static_key *key) +__rust_helper int rust_helper_static_key_count(struct static_key *key) { return static_key_count(key); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 5842D2F39C2 for ; Tue, 2 Dec 2025 19:38:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704300; cv=none; b=tx1yMJ94peybUipWGUBgjeEaw5rfw8G1RKrbnsFJMca5TdN51lvjxUSWzciss6b4Ac+hUrxRUfUCKrxtXHOzma8RsnW7y6+pQWIrQNEzJuLfTCprS1BxzIXCBrl/va6K3yECLxSzcb1hpmuhUonLGGKt04zhc0CW9kWjfyak6fs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704300; c=relaxed/simple; bh=b4hkmeC+wFUlheAh0FzFDJuK+/w3bz7OF5SAt7uxYag=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=K8SM014ilgJ1HjwFkJ7o3MtCn/7Cd+zA+jykiROJO99ZJoSVzyXXlD8Zsu1FsuO/jvLzaLaQQFO04z/sS+ouetP3FEEhJVOTCuKELvVGInm3Pg1xClJmIADNh1RTj1CIhvJKiOfa1YvCNgzw55laAcHeMspsbQ1pmcEcGducDc8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=WrzA+pEp; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WrzA+pEp" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-42b366a76ffso3821210f8f.1 for ; Tue, 02 Dec 2025 11:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704296; x=1765309096; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=j9I4jS+CkOD8WcMHOPpX2Laq2znDkJHzIQe6va7xDus=; b=WrzA+pEphUfmU3Vlzk8uqm0dnUCGcqEtQbymBc3+xfZWXuRoqkIGsQywNgAuSjwaDI l01Jb1Z7nFyPnb1YEoBYGCjgo/XvQgbNF2uVNky6SzF2aUsPc+xFrflxpxgO+4GbIIXH gs00R+mU7oXG7bl6x+9sUC5vp/c72H6YalIc9dGY4TmivGAAncHxKQBECVlAY3pWgNQq kuy47TzdDVBhv6u1xAC29wSdtp0+mUB/0Jh6LXT+aKIDHwXqjikFukOXutQ2Hig4hKKf iwhgrirAWLhd/0nDmkiuZHY3m9Wfm00bsLr6XpXFqJezDJQLPDtssMFasmfJf9xReVcb dKEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704296; x=1765309096; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j9I4jS+CkOD8WcMHOPpX2Laq2znDkJHzIQe6va7xDus=; b=RFOsN6b5byyYhFTN6SmRPkEzVsu2JP0wD6AcIEk/Ze0nQTCjZ5xI6IqjMusFfXHWC6 hOqwphsotIqFd4QnSj/BzlGj9zZir5B6aO0RyJM9rujlyT+OX1vGkwhe5Wp3Tf/+u7mC tBFjO0A19qLIOnIoLDl8Ll5fHMZE+4GH9HRkHtN5pKQqI2wv6c5LXr7vV/eKan0fLTsv TMrtAtgoz8NHsWeSObJq5nipraA3NZIeVVcUE2aNWaYzVYBu3o4l7L7Bqkt9XKHuZKsP WKZDb2SQeB/BfcrXhVRfZzRF/AwhacH0xXjcgZU2pVBqtaKVpVtIjHC9YnleiWYCZCk1 TfFw== X-Gm-Message-State: AOJu0Yzsj4Fr32lm3AV3DIyZNWag24POwhvrNGRZYH+VJ+yj9vrNZaOS gQEyfZmnTHzYUxeuB1XN+0FIUK9j4s2hhecWeqKpNeViMj52A3utRjflXbb/A3+iB3YmtRvS1st zRYK0S+FCWcWovCLwag== X-Google-Smtp-Source: AGHT+IFafOW37ZpmXOGIJbp/0M7mmCXdck1lXQ8qYTVq025nRVZmT5HEkDQlb5GS0Sbcn6sHCWPrq/xZgSglm7c= X-Received: from wrpc7.prod.google.com ([2002:adf:ef47:0:b0:429:c1fd:61fe]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2410:b0:42b:36f4:cd22 with SMTP id ffacd0b85a97d-42e0f344714mr34472907f8f.38.1764704295819; Tue, 02 Dec 2025 11:38:15 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:46 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=826; i=aliceryhl@google.com; h=from:subject:message-id; bh=b4hkmeC+wFUlheAh0FzFDJuK+/w3bz7OF5SAt7uxYag=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJBMbP/V8F4ca/e7BxIHaBBhe7jbhS/93kZ 23C/DV/phqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 RiTQEACcavWxpeD7XyNzmd9xA3CRvW0Gkngtveouc4E0U9uCwR7rKcVHB1yAAzYqnbsCbLgeHMP twUdVG7qDGJy0WYD5pf4m1ITBQTdQ1dlw1Kl+K0MSVEuwpuaE0TOyoaHF2fNZ4okPQoqAi3eF1r 5RwBQjJ1WjzQSo/wLXB3AyWkARC8rJcTYLESNiEs//zLaf+dx6gTrXsgyMUofoAfiM6gDl5sU8o 3pB3iU4PfIzPYQd1iAbngPilPm1o8KUkYHQX7AI8vv5Fu9P5qDeDcfmNLoiI/CP9pxCQgyUhtPB sZ+RSFnM6Aw6FDvmpN2x/RpePJ/fnvuva55OGCTxwexo4zD3EWjkDxu+w04bWFWfdAYnZry3F8v hNWa9DuAqZ6RormLBfN6/BPuzoX6smAGPLzC1yVKlP7YqymgEkm3W2/4e/wBxiF9BXFDJYWtN7c Mg1sI5bVQnpTlMwA2dMcodkCbCkiLLMaU2NFMB4LFIWdQXDTmdHt63nZiHMBRbOa4ah1O3lmjd9 e2/T+8DI8iit9jF3eYiZgICWpHEm19947slxtTGzd3rrc+ThYMBLgKMfkULezQfTXCHGmnhdSWW 77TfecTGBNYxVrhFqww9fnhQNTP/7k35F0rm9wWmkkzhwldmf8QbjnZTjY0m56Rc7hf3d19NfVO e5N26Dt80LxNLHw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-22-a2e13cbc17a6@google.com> Subject: [PATCH 22/46] rust: kunit: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Brendan Higgins , David Gow , Rae Moar , linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: David Gow Reviewed-by: Gary Guo --- Cc: Brendan Higgins Cc: David Gow Cc: Rae Moar Cc: linux-kselftest@vger.kernel.org --- rust/helpers/kunit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/kunit.c b/rust/helpers/kunit.c index b85a4d394c118906d35ffef85221cf1a8b3c6fe3..cafb94b6776c07fe505e1749de7= 1f91125006131 100644 --- a/rust/helpers/kunit.c +++ b/rust/helpers/kunit.c @@ -2,7 +2,7 @@ =20 #include =20 -struct kunit *rust_helper_kunit_get_current_test(void) +__rust_helper struct kunit *rust_helper_kunit_get_current_test(void) { return kunit_get_current_test(); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 0573A2F4A10 for ; Tue, 2 Dec 2025 19:38:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704300; cv=none; b=la8PErvRqTJ8clmxaZfZ33jbHAqBGyb2DdzQLnC5FO24a/z2C7Ho8lgTwL8z2cwZOr87m+NjDz2ONPUf9www7GzFexy8eWupxNoFdzKxkxyPgpGeW8xLs4FDhSJFieXevnzZAzPKJUZQh9LARI9kV0C/nXijNkM8D74GuPeyYbk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704300; c=relaxed/simple; bh=XEQRtG4ngq8j4eZKlMeUQVFI7+jbBl0S1gcS78Q3lKE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jCq8bhS7k0u9eXPLKQC+e5SalHepGIrpzS7rxNFvwA1Co4rmjQ8nJw4eYSFN/uLsw9LJ/dQNGW7FpQXwLUCOZDx76Vap2UETuW7H7IM75V9Gf4d10awn5Tjs7AUKBCQUVc2heSb5ztPmDuZUTI9bDQWEPgeje9WlpBz3nKz2J3Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=r047Ww7Z; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="r047Ww7Z" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-47106720618so74679175e9.1 for ; Tue, 02 Dec 2025 11:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704297; x=1765309097; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=cY6zIVgs8oj5wBS1r8U63RsVERdgroiyYEhYKwsINow=; b=r047Ww7Z3nD1hLHHTzzgkhiCUbDFWEqUjxUMz2mB6dVt3m8uvnru5vrZ8Tt9oehv7+ bUr6jL/lbM/yc3NYN03vsiFqpjokDNVJhsbvZr3LfXkEj9EU78JYjG1TtQ/OjDp7yOJo ixfIibg2RX24DP4mVPh/eKmxe4BYN4n9RWkfppLOlYhvq2+HVbN0IijpWktwTz4K/obR 0wZx9ExtBQur2+IrXeh0Ggo3Dsy5Um6otyo5J6MecOdEIDTmdeZZKC+188JHcIfDXDPM NSImxFqAbbPTRihlCygdIeYvkNVqiNE3KXq8a0WfHDdaA3MhFfWTwdfDZBxQ0ii4xJVq MDnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704297; x=1765309097; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cY6zIVgs8oj5wBS1r8U63RsVERdgroiyYEhYKwsINow=; b=QP7hmSzu3xmyjfHmtct9I1+YlncuzwXcCLtrkEoqZxp37epWdgGU6P4t+n4FdMbbe2 2qYz5VRgsu8gk3DQCuU2PnnJ62e6DtRpVRp//W5FhrqrOWvLu5WKQWqZq9xH7kqU2qUC QAkwAPV1PM4OKGZZ/hjJpZG2/QssGcSlrrVYVSe3bIPXJy026IT9FlAVrDPkEXJzTHoO 7Mk8hqhm7rz/bItxwTyxgdHl1mkNsi6lbBCWA/AkjsDD3yJMlMiClSCiI4v0rnEsWe5o l3r8WAFUsXLcoWABpoufEgg/jjtE3HceREpu8hiHFISmaAtuhWSyjzTFnP12IBthqPxc aQwg== X-Gm-Message-State: AOJu0YxcRzuUICwvcztNqPlV2xJUzl5e5zIpNp9HRLzrOeqrCvUObsAt YuQ+fV4L8u6G3cF72Y8feSxgyDF3Vza01+uKuMWVJEfV4zyDdFwsdtfb2Nplp+E+ND5IVGFVi7E V2nJmkWVHyMlIJhxmlg== X-Google-Smtp-Source: AGHT+IFcwWbMYlcRexEdOE1jDvEmEKwihlP9NvSbx51wpfs2n41agdwJLpO0F/fYzRDb2riuwhzLO80opasVOCE= X-Received: from wmkz11.prod.google.com ([2002:a7b:c7cb:0:b0:477:9654:b44c]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4fcb:b0:477:557b:691d with SMTP id 5b1f17b1804b1-477c01eea7fmr401133835e9.25.1764704297175; Tue, 02 Dec 2025 11:38:17 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:47 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=947; i=aliceryhl@google.com; h=from:subject:message-id; bh=XEQRtG4ngq8j4eZKlMeUQVFI7+jbBl0S1gcS78Q3lKE=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJP35GVKABLJqVHhSfe4YaZmYI3EO+6htmH wgxD5vup0yJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 Rk4SD/0WnfGtosH+E3CoFEpZy4BInOO22qAAUHaIIYRg0qldDVoF5v8cNx0xIEutblsjTOdGLl/ ynKu1+UYXtJz59WovPFRKeLmjwCtGiLBXqE8Ko5auf9sogK7TsOwQERHIzcSgyZEUrynyfNYXAJ 7oiJmoUNXmTPkc2rIQ0pFLq0Lxuzu+j9q15n7ekvBoLIFETw/hDUmtCAZ0WP4GehXxsFqwB9SoU xsSvqWIVjtlxgm24rp/cj6jmZ5F0ECT3VhBna6a0IJj3VK+/YQ0pA6Z8QGMJHxXDRXXmqflBxJl 1EIXyRyegvhcQuqAKYh3MpWSK+jsbnvVOn3/c6lMWbJGXj2E/qREGc9fXlmDC4OTDpLBIRzCmWT St/+9gD/6WqIyj2pEMarUhya+o7bk4TbqbB5izGAp/cU0Md/DLRurq7uEWIvsyNpOoEOwrH6S7n 920XrgYGI5qIP7s50tL6MhDrYU6yh5UVVm3ey/h89cUWSSsZprN73mExdl3JjyBLTLWH60Bmq1K mMi75sUZtORA8cYpijsB2G84gtNfDqgplfrUcxKFJbRqxnWHNSVT077fKViv3nj7hLjlNVkMqy8 IlT9hReYjGbdoD3ns1UXt0NhKK+79OVK0z1z5QVVbSnE2R2GjmxrCWHIkfDcW1XWsBhn2Ax/XwX ksepAqcYlargbwg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-23-a2e13cbc17a6@google.com> Subject: [PATCH 23/46] rust: maple_tree: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Andrew Morton , "Liam R. Howlett" , Andrew Ballance , maple-tree@lists.infradead.org, linux-mm@kvack.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Acked-by: Andrew Ballance Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Andrew Morton Cc: "Liam R. Howlett" Cc: Andrew Ballance Cc: maple-tree@lists.infradead.org Cc: linux-mm@kvack.org --- rust/helpers/maple_tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/helpers/maple_tree.c b/rust/helpers/maple_tree.c index 1dd9ac84a13feed53c0ed5eec6805517081d0673..5586486a76e0de60969af1510b4= b0428392920e6 100644 --- a/rust/helpers/maple_tree.c +++ b/rust/helpers/maple_tree.c @@ -2,7 +2,8 @@ =20 #include =20 -void rust_helper_mt_init_flags(struct maple_tree *mt, unsigned int flags) +__rust_helper void rust_helper_mt_init_flags(struct maple_tree *mt, + unsigned int flags) { mt_init_flags(mt, flags); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 0432E2F60A7 for ; Tue, 2 Dec 2025 19:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704301; cv=none; b=bOJw400CoeibSlfMFiDrMqloU9Y6uxew8E1RAzk+xYE5WVqn7DHiFPcYX24j4NZCrOKv54bHmJkJGe/zoG65blDRFun7zK0mVEBNeMoUyANO2l8QLtPuEGl7ThP3xgLuaKSj58q0KlJEnHuvKmAb/l3gqTPGRPEn0b66y/kMTNw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704301; c=relaxed/simple; bh=s5F849cKunCWhXEDw04RDI6ouvr7CQTpbwq+FWSvJxw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DHoCeEYL9ASlfapKugc6g85jnUz7+jqgG07xktVGRFKDaHNG+KLn7HIJLHC4i8rczVq5J29f+SPAhpP62lQsuI96rf0DKILyj13SBDIWrJLKQlofmarJCM0Je6ZPw8oOYsmBzfOZ83Cu3P53jFNrAzaszjTE+lN/8H+8Dy+mnLY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=K0ZxcRrl; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="K0ZxcRrl" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-42b2ad29140so2896958f8f.0 for ; Tue, 02 Dec 2025 11:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704298; x=1765309098; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=0qMYBEWcYpIOM/tMAd0uS75dTnBdoaoIVwbOFkcZei8=; b=K0ZxcRrlL4vlE9jtZl0iuBpjLZl+9w+9vrevasxiXmPw5o0SIi6bBmwx8zIxEfYmSv KZv/HHFSUlJB9dXmm31BXIjSPjU7oGqhY4aCXFoOKN0dyd2fxcbswWxOyJf10HPYYie4 /qPJmXQKNW5yPro3zFF9UQTMc1Mnq+rGxqwJidoSOADJBHUAFuqKAgjjn9SBnh1KP5zO lWsUon33Pd2YxSyTc+GmNRQ7k+tDESdkNeMXUAOmhd6O+K7n3rfEdYj62SEagThf3ef/ nQXsiqqL1NBZq/brkgwT5gGfIQq4yTj03Fv0y7saFt32YjrWdTtBbVpgc7XUGdPNOOxX +KMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704298; x=1765309098; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0qMYBEWcYpIOM/tMAd0uS75dTnBdoaoIVwbOFkcZei8=; b=ep555Ap2TLnSbv/IgO14QeLbdIiKb7eps3xeT4Fxf8WoMDzbncfwKZKLdcRxpf8TFW RJ68dEI97HRdZ8ZS+cRu+CgRoY0od3LUXA7PqYW9r1KWWWdWG/JnBU9C/VCsaHfQhoTZ ECXLFWRxfQ2VIz230p5+/+iHFk0BhDglKqVgFKT+u2bpI6I/mrbNf661l+I0t7qOafcO Qb9xcJ9cfqURAg/DrpRMxkT7fFnWf/w7dbmp0XhI4XUNwgednoSIRXStvXudDfWfUYms oAQ7Vla11SuffEqAFqrSPt5WwKhOq0oFglvX7EfbyfkCetMwgNoxnARHqsOhM7CpKGUc ykhw== X-Gm-Message-State: AOJu0Yx9BKejMzHGNwBkOVVi1muyRFAnnJVijV+qoyWuPlJGVnyBbvpU hjmvmL7SsvR0ih5mxj8FvVSQlfbWRgd92/9YSNOI43K+eXskOzNQg5Jpj8V+5Zxr78WWqQULHlg pow7XTYBZZ6LWgLlNgA== X-Google-Smtp-Source: AGHT+IF3Aj9rjblOcR3xPIzMTJeS1VxCNmkzb1lfjIl8FlvWxFuJ83OIWlXne2ViSMvh24ifU49i6uNyDCJKhgQ= X-Received: from wrbdi3.prod.google.com ([2002:a05:6000:ac3:b0:42b:3346:5434]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:310f:b0:429:bce4:20bf with SMTP id ffacd0b85a97d-42cc1d194fdmr45269347f8f.55.1764704298588; Tue, 02 Dec 2025 11:38:18 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:48 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=4042; i=aliceryhl@google.com; h=from:subject:message-id; bh=s5F849cKunCWhXEDw04RDI6ouvr7CQTpbwq+FWSvJxw=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJWR/fRnVCj+DsWwJtPSwRwrcDjpzyN8mfq 0sOX8tn6DKJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 RvZUD/4qk2bOPLDVVH6o1xUcG7fKDtuBkgkvoaYHvWDhZyyaKHD8OGY9owyeYUcmt0x2jXq7bqH EPkgKOcp+3Cw0AfukXcyx0o+uatdJultYdvh+OrKvhTVEBLmA0BJON86RPamY6m8AGpKPlf2NjT UyRL9U+voiZJXo0oBSw0cGHezDPy7vYIWpncqGphzipHTJ30X6ilRQFdkfhXulX+ElmXbUxvZUJ Am24xCt59rrJ9xE/WRBI9qf4jSVJFsbmJl0PRxsuBLTkRQmsHUhWLHCslAoFx9/6QcrwavEyPR8 4h1GQG5bXrYNh2hXa9cX+0vroiDZ/HxAs6VzgVMc6N1idyZWwcAodb6uiyz3PCGUf4NPNE+1P8q WUvfZO24jxODhRZXzfvUHqrZ2rL05qBY5uzj9XPpB/7EOF3ALh2PRTa2ze8+q6lVrQBF8zThKNb D65FwQ7TvitYVjF2b7XPYnKHLOlJazGEx8NRmO+r3TKAD15fFqO78KZqjygtM+br0UeWHD5QyvP FI0vxWYerfITc94IYwV4sG47FHjRtyieKyrKXnj58n51wtj95YVr4IMNO4XTmTu/y7ok18iCzak X1Tn799NmNMmiOBUGzmsnHbx1oAI04dFiSaMXIfSvuvK+sEHy41PG2x+qznP/f4V9XUdqoEbx9s B+77XbIBao49Nvg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-24-a2e13cbc17a6@google.com> Subject: [PATCH 24/46] rust: mm: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Andrew Morton , Lorenzo Stoakes , "Liam R. Howlett" , Uladzislau Rezki , Vitaly Wool , linux-mm@kvack.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Andrew Morton Cc: Lorenzo Stoakes Cc: "Liam R. Howlett" Cc: Uladzislau Rezki Cc: Vitaly Wool Cc: linux-mm@kvack.org --- rust/helpers/mm.c | 20 ++++++++++---------- rust/helpers/page.c | 9 +++++---- rust/helpers/vmalloc.c | 7 ++++--- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/rust/helpers/mm.c b/rust/helpers/mm.c index 81b510c96fd2692dcb7ab4705f790bd3a41a630e..b5540997bd20d4398e2838956ed= 70b2fb61c5661 100644 --- a/rust/helpers/mm.c +++ b/rust/helpers/mm.c @@ -3,48 +3,48 @@ #include #include =20 -void rust_helper_mmgrab(struct mm_struct *mm) +__rust_helper void rust_helper_mmgrab(struct mm_struct *mm) { mmgrab(mm); } =20 -void rust_helper_mmdrop(struct mm_struct *mm) +__rust_helper void rust_helper_mmdrop(struct mm_struct *mm) { mmdrop(mm); } =20 -void rust_helper_mmget(struct mm_struct *mm) +__rust_helper void rust_helper_mmget(struct mm_struct *mm) { mmget(mm); } =20 -bool rust_helper_mmget_not_zero(struct mm_struct *mm) +__rust_helper bool rust_helper_mmget_not_zero(struct mm_struct *mm) { return mmget_not_zero(mm); } =20 -void rust_helper_mmap_read_lock(struct mm_struct *mm) +__rust_helper void rust_helper_mmap_read_lock(struct mm_struct *mm) { mmap_read_lock(mm); } =20 -bool rust_helper_mmap_read_trylock(struct mm_struct *mm) +__rust_helper bool rust_helper_mmap_read_trylock(struct mm_struct *mm) { return mmap_read_trylock(mm); } =20 -void rust_helper_mmap_read_unlock(struct mm_struct *mm) +__rust_helper void rust_helper_mmap_read_unlock(struct mm_struct *mm) { mmap_read_unlock(mm); } =20 -struct vm_area_struct *rust_helper_vma_lookup(struct mm_struct *mm, - unsigned long addr) +__rust_helper struct vm_area_struct * +rust_helper_vma_lookup(struct mm_struct *mm, unsigned long addr) { return vma_lookup(mm, addr); } =20 -void rust_helper_vma_end_read(struct vm_area_struct *vma) +__rust_helper void rust_helper_vma_end_read(struct vm_area_struct *vma) { vma_end_read(vma); } diff --git a/rust/helpers/page.c b/rust/helpers/page.c index 7144de5a61dbdb3006a668961cd1b09440e74908..f8463fbed2a2670ddfd4c23dc92= 2b46b0913c3a2 100644 --- a/rust/helpers/page.c +++ b/rust/helpers/page.c @@ -4,23 +4,24 @@ #include #include =20 -struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order) +__rust_helper struct page *rust_helper_alloc_pages(gfp_t gfp_mask, + unsigned int order) { return alloc_pages(gfp_mask, order); } =20 -void *rust_helper_kmap_local_page(struct page *page) +__rust_helper void *rust_helper_kmap_local_page(struct page *page) { return kmap_local_page(page); } =20 -void rust_helper_kunmap_local(const void *addr) +__rust_helper void rust_helper_kunmap_local(const void *addr) { kunmap_local(addr); } =20 #ifndef NODE_NOT_IN_PAGE_FLAGS -int rust_helper_page_to_nid(const struct page *page) +__rust_helper int rust_helper_page_to_nid(const struct page *page) { return page_to_nid(page); } diff --git a/rust/helpers/vmalloc.c b/rust/helpers/vmalloc.c index 7d7f7336b3d2f5a32e6a2b6cf8407da37775cfd9..469ebf2f41c94744e2a2719d7c0= eb7d4d7dc58ff 100644 --- a/rust/helpers/vmalloc.c +++ b/rust/helpers/vmalloc.c @@ -2,9 +2,10 @@ =20 #include =20 -void * __must_check __realloc_size(2) -rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long = align, - gfp_t flags, int node) +__rust_helper void *__must_check __realloc_size(2) + rust_helper_vrealloc_node_align(const void *p, size_t size, + unsigned long align, gfp_t flags, + int node) { return vrealloc_node_align(p, size, align, flags, node); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 8A03F2F6917 for ; Tue, 2 Dec 2025 19:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704303; cv=none; b=NEJ+cDI3Y5/O4JSnc8ypuJuPO9B+Kc0Q0llpHIGtJPiomy3TJJF1t/GuZ4vjLxfGxvXwbxnKyWpSVg5BX8KFYnzdSVdvvm96UC3r5ZLOtlKWtnQ53s79NQ4WTtFrwC69Mgadrh2SIMeIe1pVhTX6g1svLf149jhKFWyzGX4cMW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704303; c=relaxed/simple; bh=Lu5/2dkCBekMOnFjfAtPefEM4sDqyp5zFvk+JuEa/DA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=dunQfenZtyPo63OwG+FPlYECN9Scf6Ja8gGCow6xb9oGrdY199d8QHBLgHSe8BhnxKPIvfaZMV0y4GWudVpcEmTPw1DjultcBPXYVrA05UsAUP7EpMEXweQxXOMWi3LzEnl5WXO5oaea+UXmn3Vy3h4sOfyLINWDWAN5ZDf68Dk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=T/n4pfrn; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="T/n4pfrn" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47799717212so44388895e9.3 for ; Tue, 02 Dec 2025 11:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704300; x=1765309100; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=X7h6JfaQinSsVoRNGKp5y99NtfYL+hb5SKedwfR4azw=; b=T/n4pfrnZUjkDAzlKpPvmKqSgLkW0EJDXbBAUg7h4plzkmQbjtaR2kMKdj82JUSIRc 5YczFSRkOlRzeQsrdH4V7i11ahvv6tP1w7saILahe0ytyIXopSt3FSnaMUsI3pXlIGE3 1AYFHaD6UlPrIbqLZa6CckrUwKRQawCh4lB6MV14r0ZUZ6TSBGPVSeFU6ZhG0pPmdhl6 kshGFw/nLl02rM4g4nQFDLqEe8rnRlffwXKH32AUd00mn8XX27DutCVycBB64lLokyGK 5L/4AnW9U52AqFm1s3KS6eevTvPLmrIiTJ/1CZqfHXW69R8WbFM54M3nGo1jGbc8FKMN aNyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704300; x=1765309100; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X7h6JfaQinSsVoRNGKp5y99NtfYL+hb5SKedwfR4azw=; b=ifsVlbx5N9RuSiSQmXW7FCiMOH76M8JXio7Z3QTeVdoFERyzA+xG6+1j8yvHlJErMn 2LUEu9MH1g5Um3mqCsqHFUUbARxVBmuAJCxFN8Jdz22GhZIe3PZfEPXqBbb54fXeIcQg NUywuYblO1bmno38Rk5gLDFtbk6nUbOfJeWPsoHH1CECTOnRI7mvhdYqIbd9/Ppvl9nq dBQQFiwkURSB/UJbeol9zgeO2mdr7rB2dkqZUTUQWgiZHE6IBZm1cPCQsM1rBmkZfSYu OypFQw8SW+lgcNfEvr9l1oeP+jGVY58Ez1KacK+jqtL+gHRyPGNsxZ/7izh8wxG3oR99 b6QA== X-Gm-Message-State: AOJu0YwiXS+d0CQmY/pa6b0aM6gOfUnC2oXMpHmgIWE8Sw0io53s0cej Gh5a/C5VNiuDl7dMFra8EStt43IHSu/oKn0R3qZAG6LB3L4QnQlB8c8FVj6NfbEzVpPvURj4nwh yZOfKzhl7IHlrgZJGWg== X-Google-Smtp-Source: AGHT+IF470EvqzkQvtaq+IbBhM9Cb35wltaRH3yorsMqKH5J+qIBD8RPwyfg8j+Z+GJGoe0mjXwPUH/cER1xfmY= X-Received: from wmpv21.prod.google.com ([2002:a05:600c:4d95:b0:477:a480:b38]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:444b:b0:477:54f9:6ac2 with SMTP id 5b1f17b1804b1-4792a4b8c51mr8092885e9.0.1764704300016; Tue, 02 Dec 2025 11:38:20 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:49 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=772; i=aliceryhl@google.com; h=from:subject:message-id; bh=Lu5/2dkCBekMOnFjfAtPefEM4sDqyp5zFvk+JuEa/DA=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJDW4Ic6TkaUrfsfwk62CHeR8GDaGxtm2eE OevQCMXARaJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 RtRVEACnD2Qh/Xn2QyWvQqpvzNqrjwA6t40ohXHM8XqIOyHQTAU0PgW34zFFG3mx8tUrjNUvkhc Au4QjJM1QQ+EMpEj53c2oVbbGTwNgxSXh9kzOLx1knFy4NjIjmasB2f6/2b2a00OeARRSrTJHqV u4DzmRscHMR3frRZ6L5+JJUH6QWBBxKf2UpBKune7BA+HNRp4IH+JULFPtfZrWAV+in+iaxmE0l QRR0P5+MkmTUGrbInO2vW+HWDrVNnCAi15P1IeJTVOWBm72VxE4FCQObXoT5YbaUpADvGu5bRBs Q3LEgIsdyPXO1upffHJyaIkgQ9omam29AzMDE385vDn78TXsGXv1O3bb8rfTXw0FuFHf1/VdLq8 Cq/gsF/qis7pTpyDB49YDHGFpe08ZOXu9iu+lsQKxFkqy4hlo5U7u2OGCk6sA4glW2+bT2yVjrB rSO3mlNTvqyelmW9Oo1HKy3sR1+LPHoG0lvzabTrRxD2ghycnOW85yn9320lQtUWmb8nQPCIEtV ymP4VezENQ3q9x69QfChIO5Yeux0pnNGW+VvFnEKLKnRkTRasdcA1UWhvaydZi8+lRNFC4MlRak fon1vNXPjX49oniZqbiNvia2ilfLtoKqtA2jWMHJbuKLcHQV6rGqlgoFGJDNohCiOsX0sWeKGw1 HjjLIcMtAz/jrqg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-25-a2e13cbc17a6@google.com> Subject: [PATCH 25/46] rust: of: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Rob Herring , Saravana Kannan , devicetree@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Rob Herring Cc: Saravana Kannan Cc: devicetree@vger.kernel.org --- rust/helpers/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/of.c b/rust/helpers/of.c index 86b51167c913f96b626e55adb51bdac2a9f04f56..8f62ca69e8ba54098343dcef77f= 5e82e5a3bf497 100644 --- a/rust/helpers/of.c +++ b/rust/helpers/of.c @@ -2,7 +2,7 @@ =20 #include =20 -bool rust_helper_is_of_node(const struct fwnode_handle *fwnode) +__rust_helper bool rust_helper_is_of_node(const struct fwnode_handle *fwno= de) { return is_of_node(fwnode); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 B8F682F6194 for ; Tue, 2 Dec 2025 19:38:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704304; cv=none; b=Nc96sApzEAwlrK5FlI1NIAX8LVi0R3RcwWgU62X6KmGRLMTkV7l4fUsFqITOSwLvjtJ3SjV45RAUhb41EAVSMbycWyUz2r5Q73C9wnQPD05MkKTkDOmZxMCETT9uMLZSnDNkt6seN4674ikOurXjEeKb0nv5sNQfBriPfZMPtK8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704304; c=relaxed/simple; bh=AzRC3WFBY/Q3vLjVIVgCByxiHwFCvi8tNmj1QH3Ve94=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ANYKfQZYVNKq1Cf7PitY/G0ERBdQ0Yi+gd+UusZoce46zRQ1NdtO+t8YRFR9KG3BPqJ2NGxcZHwcDqGlUx1doe23en6xSSgFJg+iy2pNtW5i3UKhi1MfVOUX6mcHywc4GBhNWdA0eW5KB2V6QAmkCDM6YD9LxgG2HU+SgOq7gP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=b/bS1AM0; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="b/bS1AM0" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477a11d9f89so27272575e9.3 for ; Tue, 02 Dec 2025 11:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704301; x=1765309101; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=MF56K4WpNFP2ISNOdvB3Pju7fwJyMMOEICtLWYnRTgE=; b=b/bS1AM03VqZjdiniPuAiOrEdQDe2QbUL0oYtWBGtVd93l1si54R0mQG3/OCjc6iQt YL61vLAkoo1GrUWTs6LTrDW6G2avMVqTvOwRIephKJ6c2R3f3oV216vJ7Hsc+f15QvFM li42PyGullRpW8BT4sBZqFExFUukRKJyIX3Y1JNAa3rXi8yu7+F5644pEMZLg7PM0qIn U/YMICHuYtzZ1Jk02furC6eLWDkzx94jLpZ7rT9YWAh8Jvkbs4PG00EQfHsNeXa1uLoP C2v6L4FQg5GnFWkbVEruMFHOlt+iDQqAw7ahcaphjr47c270nzlZKIp8yfUfcpwWngb0 pVxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704301; x=1765309101; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=MF56K4WpNFP2ISNOdvB3Pju7fwJyMMOEICtLWYnRTgE=; b=vzN1fok9chMyxz5iqGU21NCZZLRt7wgpMO/8Own0IVmy3PdAq7cAqPArMZOLcv6NRU /8GBnb7vAZG4CvGI/il8XKfxdv9j5iuFC/cegkHew0ojVCG8rz72Ev2P+wI2O+lq1NTB sP+3nlXoo92jfJkIQqcC2FJnmYYXW51U6Jf764Y2BcKT0Xp+yeZsTDmmloVI87L01EJU l9foc2+LSSevV+6/ZpywBwSMwWVJz/02bHMe5Tw5mgYSxsyy8ZhPRB8d6NQLSG+44c0c Of4S4K+z0yOb4NuG+/R0KorMgtKUT9KILIz9OFcyuo49P9y3PYpkKT8JBEJyB7vtnfiT +zEQ== X-Gm-Message-State: AOJu0YxpuhQmlcgD1+bLfJVd7gWldGWg10Y/u7b+TcctNqObPZL2xqiZ yLDNhLii8EU4vUIsnuG6yF7jvpV66H7rYT34YfyMzxKgQa3J3svvFmAoMArKKY1de6X9l16DOhq 5mZmG3gv8HfgXPBLvLQ== X-Google-Smtp-Source: AGHT+IGC2Xs5AK/JfmohwCUN7H0jYiJPC4Ii32MVyNUiqk+dlsh3u368LVs5ZKQG1ZHWB2EcR35c0HxHzASIcw4= X-Received: from wrum3.prod.google.com ([2002:a5d:6a03:0:b0:42c:c2d6:2a7]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:a08:b0:477:7b16:5fa6 with SMTP id 5b1f17b1804b1-477c0162e8emr438081995e9.3.1764704301228; Tue, 02 Dec 2025 11:38:21 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:50 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1710; i=aliceryhl@google.com; h=from:subject:message-id; bh=NYp7OoK3bsOUfj2xNaPJNGSbqoufrekebFMpKGVqrnw=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJgBfYjjiPMvcYRbacTMtv98Ax3QQDfLyu8 heBSOm/P6uJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 RqE3D/0dDs4lvJD2hUZYTIYzBMOVBNIcrNF7203Wn7ujOfokUTt/v/lvfMMZOf3OlQeF27ASf3/ jR8L5iqzQFErye2TI/6lUGAAAlI7e3AA3qi842V4PmlZ8pT9uY0dGCtpUeFLC1FEBIGYUMSIo+b 1LObKA5Cemde77+2sAb1Q2GaZXxfyaJJEuEDOJOlc8nhmDvNYsWVlCAuN0jQrzD9+zErlUuA/Mh Oynr8zlWjxTmYx5gjWu4UIMsZxB9E+qGu4oo2fZ/EaNAP+smHqRiFBv2rKEa+98dxaQr0SPIvC2 zndQyJpqIB7GwVl4ciPORcn11AXrkIuMSzLqpGr4lpLhTn7KzUqnZzHU8ZwApSxjG6Q7JIC0gJr NbZcIKSgNC2GBReUuk2Kk09FT91NBmVDpD5mP/pLjLXgicnt9VlxGaV0G3k2domy0ZLVXn/N0OJ W+W1qxKSlz+sVoad1hRaqIpgSpVp4DQnUmGeinayeeAl0cFKe2SG/kpPfV2+bYGBG0MWTipCR7O IVVD+A80CXVNjmW2CcCImAJMcb0yHPW+BodBKwrtcsPD9SFHN4mWQwYMqWq4p+2RihzxCDVwku2 v3J9D1p8+tyGKzjteX8PDhvOE790rBnsGcoSLPvnZxIMaa+KM8qtfK1Q8bbkGuTfIS2zeRrty/r VXFH84OhZmpClcQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-26-a2e13cbc17a6@google.com> Subject: [PATCH 26/46] rust: pci: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Bjorn Helgaas , "=?utf-8?q?Krzysztof_Wilczy=C5=84ski?=" , linux-pci@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Bjorn Helgaas Cc: "Krzysztof Wilczy=C5=84ski" Cc: linux-pci@vger.kernel.org --- rust/helpers/pci.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rust/helpers/pci.c b/rust/helpers/pci.c index fb814572b23631c255eadeebccca353ab0dd3076..4b77a73ecda1ab71a7fba8b56a7= a133d8c77c690 100644 --- a/rust/helpers/pci.c +++ b/rust/helpers/pci.c @@ -2,28 +2,31 @@ =20 #include =20 -u16 rust_helper_pci_dev_id(struct pci_dev *dev) +__rust_helper u16 rust_helper_pci_dev_id(struct pci_dev *dev) { return PCI_DEVID(dev->bus->number, dev->devfn); } =20 -resource_size_t rust_helper_pci_resource_start(struct pci_dev *pdev, int b= ar) +__rust_helper resource_size_t +rust_helper_pci_resource_start(struct pci_dev *pdev, int bar) { return pci_resource_start(pdev, bar); } =20 -resource_size_t rust_helper_pci_resource_len(struct pci_dev *pdev, int bar) +__rust_helper resource_size_t rust_helper_pci_resource_len(struct pci_dev = *pdev, + int bar) { return pci_resource_len(pdev, bar); } =20 -bool rust_helper_dev_is_pci(const struct device *dev) +__rust_helper bool rust_helper_dev_is_pci(const struct device *dev) { return dev_is_pci(dev); } =20 #ifndef CONFIG_PCI_MSI -int rust_helper_pci_irq_vector(struct pci_dev *pdev, unsigned int nvec) +__rust_helper int rust_helper_pci_irq_vector(struct pci_dev *pdev, + unsigned int nvec) { return pci_irq_vector(pdev, nvec); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 441BB2F8BCA for ; Tue, 2 Dec 2025 19:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704305; cv=none; b=g6OkvjWdjKUm/wQFGyeQ6L7QaOnqdjC71U6B709VEZmtdDeRLrl0gUd/ofNHbwjVLkaRdpqj177NNU9XWnYyBI4LMLhRlO9zVxAtAS9XALrYhhhrLopWfDwme6mwJnj5IqqKmJ35IhbreMJNyHtYbM7wudenjX63ClF2Kaxu/6k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704305; c=relaxed/simple; bh=HQPmlZuqmy1jvaqXEPB8C2ivHe450I5q9ZiPbZke5PY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=S+qzv769io1lGanSjbzksULyxa3EMaaRLglFPeBjXebh8KuSnHp0AYPxvSxj0yz/fffwukiri1ZOZmgMiFaVdFEGUBLV5+Esa/cLQhnY7On9cRvZnd2jZ7SOTG4m9Az/2zqjaH4uZQN1xZi9+IVt78FjNNtajmvn+V8PNMFsRqM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=en+DfVD+; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="en+DfVD+" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-42b3086a055so4372884f8f.3 for ; Tue, 02 Dec 2025 11:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704302; x=1765309102; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=GADi53shPuPGoaiF6mJrq7SoXgEzWuFl0LmVcCyBVzM=; b=en+DfVD+OYs2d1WhePT9jXrhnSh5ixCnTYRXyzoLjjPFTsnJx70MrrPP5oiSvUedWs 8qLfGLLhb0e9ms9+wh1Smh06cctvXkY5Bl1G6FmqNAXAsKqm+KUy9ESy8kmDwAfwSDyL VWcGU1fNN6Gr0Nh61MXiCNSOPcngXOi2ys4ivxMTgP+MyPKuyZTBW9s99QKaIWcdwrca S/1OmNn+Ba3wvkN1Ss8xvNIv4+kXcfZmGIIwd6tKrPRI3uIv3b2+3pkDckLaxdIdOBmI DvG5voFzNuueiX+7CFjyZXEiSOLoxI/JTjdT7Ac2uiJEssxhf6BZoCSsgCm1RcfMX/f8 1jXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704302; x=1765309102; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GADi53shPuPGoaiF6mJrq7SoXgEzWuFl0LmVcCyBVzM=; b=owi6VOsO3+LuaNkponavVPbGoaLcysLOiTXF1iX66fsct3dQWrcMFWpwUWrNWFm/4O LwLwc+QFAHdVnfUthAFCe2tsRy0W+QzyXB5HQd/ZXU2mhGYcvOl8IidfpYiAcMevjFXV C45sZqPDs82wgKshc5V/kOp/BP5nB/Nl149cunYjb9/JgZIA0yoVhKiFlvg6fwYFs2aW qj5xDYm3PYHWN9EfyLOsAISjPe6P/cKhLl/2RJ3ItRDKj6wTX++YQ4uiuYCNRtlPyZpT FRvpX0udv86956lpfLF7DGWSjlA5RYKXuL/AEf55D0o4u4C4KBEoxCciz9gtalZYFOUr fC4A== X-Gm-Message-State: AOJu0YxhytBBdyJv6g5V9S3B0LaSgHWmPCbbugj1bH5013WuKjqwluBl cUmVqyCPUSVnT2DtaM3mUep5itq2J3w1FLSWBIzJe/LFLhuEoxr0s0jX866vxjTZ+pZUPcRSbID cyPtricDi7bq/KI6jOQ== X-Google-Smtp-Source: AGHT+IGivwLFquKKyG5s35oMf6wfTUf0UfR+ZxkDHpD2o1P62MgxX1Lca80vTDDPywDVEqthNU45oDE/TbH1WWw= X-Received: from wrxq14.prod.google.com ([2002:a05:6000:ce:b0:429:de3f:8271]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2482:b0:42b:32a0:3490 with SMTP id ffacd0b85a97d-42e0f356837mr33418843f8f.49.1764704302663; Tue, 02 Dec 2025 11:38:22 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:51 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1243; i=aliceryhl@google.com; h=from:subject:message-id; bh=HQPmlZuqmy1jvaqXEPB8C2ivHe450I5q9ZiPbZke5PY=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJ296M20eaXTn5iHORSLjRa4kioC3pSUgCv 5qxgOseeOSJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 Rl6LEACUhm6wg6FScz7UhWQKnntpwfOKJ1ySq8N9dMY8FBpurIiGreTpKT5FRtehtUkmfYw1VNQ +ko+2QeozmL5fSqzKSAwQHtMlrsQHPvNXqtkjr/bFYPc6ykbIM2cfMiJuXSJ+U7R2mswhQpcsPE GQLv0+r5XSKIL1BUQuibfWc77NOSGPDTzYun5AmdjwYGNdEieFpeiqRRnvgKAXuXxwTVJDSQmGm yxJCYow5AUM+okFK4QgdtRi5pP2qey96nTyhiBnMZ4IB55OgunN5+9MunHy6gxPSTDtM//83M5I FVpdt+VN7/ZMdCal5nlIGqCx7RZhYhIhC2B+DPkeWcfbUPhyHT0mNSMVoOhz5+bYCjwZ6VrPlr5 IkbV2ean1sU2ekMd0YtAy88bNSTnQNS7QH4CiPjJSRjC3/k4bXVUXVXNsotk2+mjpjyes10Nr8P HqjVjT9wfCNLB3JQTDv1mIHinVIwgr8gc7lMt0wMA42TTKpQaR2cCeEL3em++seMzo/dPO1clw6 BJm/3Ef6RxXdwhlNn9n4d6LI17YMdqUeTpLKhXd3uECBClI+I7uWKU1EoagOPVeP26eqvBIc9NB 5Gam/Bs0Xhn9lQ3A+gNkuWNuT7a2MivBIlLzG5NgIG/3mKi1WiYWnqUV4Q1cdeE7d0ZHhn48maH X4dSF1YHsUk3XEg== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-27-a2e13cbc17a6@google.com> Subject: [PATCH 27/46] rust: pid_namespace: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Christian Brauner Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Christian Brauner --- rust/helpers/pid_namespace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rust/helpers/pid_namespace.c b/rust/helpers/pid_namespace.c index f41482bdec9a7c4e84b81ec141027fbd65251230..f46ab779b5279f0912c7c744088= 5e1c006f5b875 100644 --- a/rust/helpers/pid_namespace.c +++ b/rust/helpers/pid_namespace.c @@ -3,18 +3,20 @@ #include #include =20 -struct pid_namespace *rust_helper_get_pid_ns(struct pid_namespace *ns) +__rust_helper struct pid_namespace * +rust_helper_get_pid_ns(struct pid_namespace *ns) { return get_pid_ns(ns); } =20 -void rust_helper_put_pid_ns(struct pid_namespace *ns) +__rust_helper void rust_helper_put_pid_ns(struct pid_namespace *ns) { put_pid_ns(ns); } =20 /* Get a reference on a task's pid namespace. */ -struct pid_namespace *rust_helper_task_get_pid_ns(struct task_struct *task) +__rust_helper struct pid_namespace * +rust_helper_task_get_pid_ns(struct task_struct *task) { struct pid_namespace *pid_ns; =20 --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) (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 AAF382F9DAA for ; Tue, 2 Dec 2025 19:38:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704307; cv=none; b=KKjTQM/gs3OtI2aBXyIiZx3H8+7cTjMtliVgoDGUux7QSfLPm0aV5SGaHDWiMvEEYnRndlSgQ4bpgFE2KXD5F4lDwG2n0P308rtwFVS+m8+wXpDUc4EE6qx1gOdPbdKKcbfQ+5IPwSFtcgHceFwyrh7n+M2tzgqB0ZcEbBWISzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704307; c=relaxed/simple; bh=1D+fp/+Bt4Zy4BdyQSq+tRaU4WSyhLl5EKgt+m5z4So=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=g3GteirPhSDM2M70hMCs9zHi8k0oj/n16o5rKsfq24tZnDmCiQPuyknhInjsCkFTftNw/Z0yp2Iz7iD6BezZKqyd+wharjeJ0NBgojb4mamWoloMxp5GTsQrM4Bxm8MOO557yg8L2vTY+vZJ9H7GOqynjNWzgFV3wBrFVPzk1QI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=h0rWXGiA; arc=none smtp.client-ip=209.85.218.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="h0rWXGiA" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b739f418149so640612066b.1 for ; Tue, 02 Dec 2025 11:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704304; x=1765309104; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=f/zp2llsrpkVOG/ol1VS8t2YJCLpWnWfTR6j9xW+ehQ=; b=h0rWXGiA/oJzNOLUywLLz6tytT0rq37y0JbECAwXB/ijc/mWCyLw4TLJL3t+kCjx8f 3AbcTWMVlIb6k+NRie7rKjZoNwrUlQUT541JPrT75cBv4oiNX3WPkYatKZzJ3kI8X2Ly S4uEwfW2ogaFTE1iLeoADoAh2ctjab5cRahJZK3Vbp9inEUhX7Emh7xo556eE10HL8t6 IgCVn4A3tCxG98QBWYkuC3bCGiiseFi7VaGefwR/LegIsvras59jMg/xs8mP5bdZYwQj WK/JvFnTxI+XqxHpfqUo+CzE4HpRX23TqrSeaIMNgngQDlB0pnjWWGFrQ5tYHuYGjT2C F2Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704304; x=1765309104; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f/zp2llsrpkVOG/ol1VS8t2YJCLpWnWfTR6j9xW+ehQ=; b=IxzwYRuTFMOFrxWXpj/c4tItmrGQkxP1e57nPEFAGahP+Y0+lBaJ2oEjva1TMVHS88 E9qCO/IejJneZNdQEiSUCrCQRUSJ1y6yL1QCHCQV5BVyC3Zrotly4BxzmvTsJqZUU10l CFeAhF9J5bIgIoSynA8v5vifJ6tyq5uhL3WhX+dtrH9Yt2qvEW7S33P4vREynbmE0hIj KhEpsk90BjLPNb66spY4v3pFcs/GnPrPG1JN2UGW+cMy2EPHCf9puQs2CdAywtzEZlC6 7qw1Zcu9Xhs6O4GL4OfIAZeLz4MJNxgiNRSSK9dC4vLPeZ+iLbXbWddMhU5VYlmGwpTd nqSA== X-Gm-Message-State: AOJu0Yw7lxf5XMZBGsrtvpmIm5nFQnqGHa/wIkZUA9Ij9Pe5fWme1WdJ IWF3BuI8bhBZOE7ICG6hkUeIQMqOe+6rTVypfvTPhtqaHmlJYrh9cFZMPpXqa+22T8YjmaU957s 4Gpjq5OBgVBJbHMKClg== X-Google-Smtp-Source: AGHT+IHYnlo3utOQQVbvr2Q+LN9JgO8EBW5b8wMAwGCi8jbMFHrkXMibx1ivdEeF6smcSduTER/AhJakZuFj6os= X-Received: from ejcvi11.prod.google.com ([2002:a17:907:d40b:b0:b73:8e7c:deb]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:3f0a:b0:b76:3478:7d52 with SMTP id a640c23a62f3a-b76716953d5mr5290932266b.38.1764704304091; Tue, 02 Dec 2025 11:38:24 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:52 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=862; i=aliceryhl@google.com; h=from:subject:message-id; bh=1D+fp/+Bt4Zy4BdyQSq+tRaU4WSyhLl5EKgt+m5z4So=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJhLMpuwg55UgGW8aCR8BJP7Hf+Mr+DvvN3 lmHybmrRc+JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 RsrPD/4/oGOr0+46FpVA3ER/extqiA8k4QzbFDtHCmr2SaeiUSQyqVLofQ3zWL6GGszud9ZtK8t id/+Dkwj9yc+jQHP6osirMAqxwe/EgPwn7iwqhWUOMWRMY084fVF77+VhycllZsq01g8VwfwU// 9QPV5CCSFlAhLsvBz+Xlhcr6Dvij+vFppShAXVlRAUVvDJIP65MIW+7JRfrM+AblRCEZKU1UM76 TnVwK3pR4UXEOtD2s+2LNhDikrL7HQOEpPknTibobU+dPYapOld4ssTtOa8a//7j9MND2qVamVf xo5K1XjFSPHVDSlAvQ1BnNMVggNlN9PKItgQfZx8YrmCGmkm9zXb8jULWV307sucjZTSYLxD9W5 01+c0dfqJP+SnGMirBa6Hw5/eXtKNU5eedeyqywICoTRO7/By2PJZ/D5rDhgfyAsuIk/pKxSzFP O4EsUNZC7GOT5bNSARTE49pP+nFiYOHyFfG6ZSNIy9YJug9cmUzuFHM49wCTuJ4JMtr2NYA7jBJ Tvpx7GqdpIKKB22M8FfYtsu6AoLYi27hL5qGO3grZgUW2/RYSVuZsN93vl1X2ZW63tmeGF9eiKb nX7vAkT/9q5UI+HeznvHU6DuSdusKGxdK+3YJUGJye8RDk7pEIlsNQb7ohd9TNUviYxbVF3xMqF SlKQa33Zcw3Vo2g== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-28-a2e13cbc17a6@google.com> Subject: [PATCH 28/46] rust: platform: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Greg Kroah-Hartman , Benno Lossin , Rob Herring Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Greg Kroah-Hartman Cc: Benno Lossin Cc: Rob Herring --- rust/helpers/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/platform.c b/rust/helpers/platform.c index 1ce89c1a36f7913f6fb535f95e82c7a31782db0e..188b3240f32dc470dac8f5f2520= 3ffa88c3544a7 100644 --- a/rust/helpers/platform.c +++ b/rust/helpers/platform.c @@ -2,7 +2,7 @@ =20 #include =20 -bool rust_helper_dev_is_platform(const struct device *dev) +__rust_helper bool rust_helper_dev_is_platform(const struct device *dev) { return dev_is_platform(dev); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 E0D0A2F6917 for ; Tue, 2 Dec 2025 19:38:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704308; cv=none; b=LkgUG7HK+QoYfPnFiYPF0j5AexUdsk4H0avwrNkl6rzutUEELMf2FoSkPw24AE6NVoHA4Crtz456Qm7mbVk4PAba1A6nYXmtZNvMywz725rUYxYBv4+QPNyoJ4W87ssF7Ib1HdUDkcuf3NYwJVAgFRL3pSMpfr4RflLYVSJvyks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704308; c=relaxed/simple; bh=ZfkP33VcqvWUNnVMxmueuVO7iCL5H6N3VM5f/NFItZo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=MguMYQhUj5gAoTQMDcz8b6a80hXZLoT3Ij6EyYfzYFxCLvsczHGla86eCkFZQfpq6G5cbVGjEyWBmZcgnLe8LbBw4HW7OQYFbh9XzuG5SoszSzOqs26R4Pt14w0bIa0NJ8HJ/wjQOZPHNNpNHfnq/1v46cR4433YhxgB6t5QDJk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YRySokJL; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YRySokJL" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-42b2ffbba05so3291320f8f.0 for ; Tue, 02 Dec 2025 11:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704305; x=1765309105; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=HH0tVHLG3ca9kBOTOLq8pgJbAOcVBVaThO/dyel0SIk=; b=YRySokJLUThIPVm+gTfU9T8NE4n3c+XnKmUBCVj1A3HgLPFqRn1YK2GnYOqcBw2MfM /+EaxZQgZs4q9k7DRt78Y2ioCiRbbOWYVrI1iTJp2wT6rpQAGNvcwdXtY19sqeAM+zcf crODL9Brb3nNyqQTL7QtU7N6Nsw8Hbvt07RFpThR8mSpbEY9ulpfUH8vQGg5XG7bglFa H2mrSsM1SYIBoHUUDtqDL88CCPjP0+kNt3KNZyc2sU5JPX8pEg7bBocLztrQ39RJI6Fx itHLFzKXpnADEVCVPjnPt64Ncv+oKJ/IMx8JoHHh5cycIV4Y9RSOCo1HSt/YlVClxymc dGhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704305; x=1765309105; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HH0tVHLG3ca9kBOTOLq8pgJbAOcVBVaThO/dyel0SIk=; b=CDBwGhLwBmaYoSbVSuntP82JNxWxTlVpEQXeTPGKGANNVb5d0zmZtw5nLSY5uZb/h8 GgBwB/00w7B5j3rm2zrddOl/8Mj+MAykf+rtOuiImr+XmQTdXLsoaZZEdC2Jrs1jEuT1 ZvapwzoDXBi0z6+hJ86HTkVb23OPbh3n/+tB2goZbCL899THULeCu1RaQCiQnlTjjs4U /pPiQPce7ueyc4lM0Y2kPEB3wgDeEUokZApF0qkQDyjSGksah3pVXckD/mU/XUoOhWyZ 6+fM8DNg96jvuIky88gqKunjGN6TR408Rna3t+1gmK/vMvFHOB0/G46g2FD5BVXWp9Xt /+/w== X-Gm-Message-State: AOJu0Ywy+HGWc/pRXqq0fjK3ZFV9dYX6O/IwErT/u3cbkafS/NDsP3Cj +oRLXHL8Xnofa15KDPn9dGcNFFjs8iBvgVrXWcWrOIpFAiIvxmQua1FJZcquDlztK1GOt2QeXxH GSpHZLpVbrCaNiLTIYw== X-Google-Smtp-Source: AGHT+IGf/V7uMCrPGDznI1ahB6Qjky/a/3TGW12QgcKWncVdeiPUB9bmFpIWoqj96g3SR7EqCpOa/x+z2oqUhrE= X-Received: from wrbdn6.prod.google.com ([2002:a05:6000:c06:b0:42b:2ced:aa88]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2f85:b0:42b:4247:b077 with SMTP id ffacd0b85a97d-42e0f34fa15mr34531491f8f.41.1764704305201; Tue, 02 Dec 2025 11:38:25 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:53 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=948; i=aliceryhl@google.com; h=from:subject:message-id; bh=ZfkP33VcqvWUNnVMxmueuVO7iCL5H6N3VM5f/NFItZo=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AJwLCgR7mi0GsjPC1OLCINkJCKuI0xJ/WMJ wKkUshrxeqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACQAKCRAEWL7uWMY5 RkQIEACx0wChzM7/WLtBFZYMdf+NlCmVZYNJtDxNf6q/dKCjt4O3ZcntsoScZYgpn6VCBrxe3Vd Gha703JoobNb4pQymxebJXzQnruwYEvAYYf7eoFVWkA0+2FD0EjcDL7lfjEv1XcXjGRM8CTxS+0 2apvW0AmezBe3ecv3BTuLA1LrvdDiLVRlmehFar0twMSIaR8fkGorsuZhzbg2FFKFiImVs2OR49 ln4zIHyj3E7NbEUvkMdgyE23heKlfE36mtoGWbaPoNmlaqP7fPQFUXB8AhxWWQCycvXlqJTJoCy 8w6CuL1T0A6eqc8nttjZQvizHPIWD4Pyo0Gl6itMxHhPycw1y1afYEUp59h6+K44k1J71djL6z6 quehTuVL8skx1J2X5zec6fFbyMCiBBOHv3h0I11IgSm5zCs9AerzHaa74UmFWa0N2QWdqjGb393 VQUKmH1AqdnfUGOXqZGqnO3xiOlm+N+skoGyIIgrN3e1gLrM3a+q11QZquMwXZCVqvQiVwbsEps hazA/NAsJrfOfTJE29TFqXntaOTPsSp0Pg2EHpVB0H/NWd9WlXodLf0kiCcIdn24oy4qPjtcx8Q RACdWdkVJSPysrZ6tWlONK6KtUNj9/huNAHGgBOtmqjkum7CzwlezILWCprgV4nVqfKKwvH7mwu 6tGg1kGezOvl9AA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-29-a2e13cbc17a6@google.com> Subject: [PATCH 29/46] rust: poll: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Alexander Viro , Christian Brauner , Jan Kara , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Cc: linux-fsdevel@vger.kernel.org --- rust/helpers/poll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/helpers/poll.c b/rust/helpers/poll.c index 7e5b1751c2d526f2dd467fcd61dcf49294d3c20d..78b3839b50f065a7604dd80bc0f= dbb5d8c50b430 100644 --- a/rust/helpers/poll.c +++ b/rust/helpers/poll.c @@ -3,8 +3,9 @@ #include #include =20 -void rust_helper_poll_wait(struct file *filp, wait_queue_head_t *wait_addr= ess, - poll_table *p) +__rust_helper void rust_helper_poll_wait(struct file *filp, + wait_queue_head_t *wait_address, + poll_table *p) { poll_wait(filp, wait_address, p); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 E50952FB0AF for ; Tue, 2 Dec 2025 19:38:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704309; cv=none; b=Muhut9XBPtxMn/fjZ0n5zf+M+hzifYkucT577yj5/J9hOZ4Lp8eWMyaBaBFoUJMvmUzMLa9AuuMKC29LtnZd6TkEgCd3rLrNpEWFzO/vjY9QdKoZg57XvU0I4EvbhfKwj7vtlMns0sIRlUjiA9VoNgRkl4ivzgmCfos6PC39+sc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704309; c=relaxed/simple; bh=IoPZCRAlu+5niXg13rPMjj5rO0tLB+4I2hBxtpTXqC4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=pEvG/6CEe6ifuhnRkXK3OtnxCuiFSMuze6LcFPjEfuVAVVDhH6lIPRzS4ztD0aPg2v95TtNlt8QzdTn0x36wE0p8P1wz1WhS7HWMg9aqL2f1ZNdlhD9cY8mMHJQuVGOmtvRSSMYhZXlZUKzINSHLqrfYJmD5gFm+BE1whwzvYa0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=dUNvWvtp; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dUNvWvtp" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4779393221aso33922115e9.2 for ; Tue, 02 Dec 2025 11:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704306; x=1765309106; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=oXrTBe0/yi4vln6YMJTX73VBhT4PxW6T18C1lUiWqFw=; b=dUNvWvtpHrmP2nuvHNnkHzxZngncqtCyfqDJusKeKOYHlV4cSfBCngWMh+IEfTjCiD RZ9FTr1TpmO3onkYbroBT8yCcgwgHbLdBLQee/OnZPwSYianH5W5snxcv9ITqZ/KDcSl XQqQM8TBJIhPY4Iw4Zt8YwJ/NjkmyDevq8nX9m8aO9XiEBlsOkUWo5VRqWtQZfBzbPft 4viZYcXhwYt+IU0o/7YJjDg9mrN1W6sQhQzQ8MOnWy8ccxATQUxrfwDeZe8fJKBCg46t +VKbmnn43OVdSr7Vm3e8aOdz1azwyqFZitBSCyE8u4ogn8IDz2X59Zsj3EErECogMc7b 0BWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704306; x=1765309106; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oXrTBe0/yi4vln6YMJTX73VBhT4PxW6T18C1lUiWqFw=; b=BXC6ozPJWtIuhCDrIFn1axvlBXPTcFHn29ZK3caEiX3Ir5gBHrxz0Jmk5GOW0AyeGB NRV3BPZQHCiK46Y9s53DOhpirt8PZI7KILlsGLHiluEyG+zZWpcdfs+6d8+3D2QyEew5 rbtG1nGIk6hq5/6UGlt7WdD+SHZPJ4SnPfrlNOiMYddbBSvqkVRm7A+/UuuUqBL3HQYw grfUBXkGYADmBJgnkLiGWzAG7AN5kei5o83CvTStPuJI4ZAqzTpSg+SxNVuubS0t1LdP jrDBy86nt6cVFlmfEx2v3O6eKblg6nyVMMGqaLyvtFVNxlusoT+ej8K3UCav3+O2xTgJ iDoA== X-Gm-Message-State: AOJu0Yya4rd+sA7+engb337Bh2YGbyPQ08SwyCi7v0snLUnVPBywM36Z Dxd442OCIX+lSjyvkWqMelZ/HLUfT6FH/bySowV6MedW+yKFoau0TxZPlcCSI4wHMUuVvhSv5av f/nqkjB+SwWsmToy9Ng== X-Google-Smtp-Source: AGHT+IEaMGSM4+v4OqSb59ixQJ0QCnzyg3QbzTM3G/b8iTqU2mxSpcp/IhlUclwVO2H6tGDEFQNjOaQB9evZ0eo= X-Received: from wmcn10.prod.google.com ([2002:a05:600c:c0ca:b0:477:a338:214b]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3b05:b0:477:9a28:b09a with SMTP id 5b1f17b1804b1-477c00e7900mr470383425e9.0.1764704306230; Tue, 02 Dec 2025 11:38:26 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:54 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=810; i=aliceryhl@google.com; h=from:subject:message-id; bh=IoPZCRAlu+5niXg13rPMjj5rO0tLB+4I2hBxtpTXqC4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AKOn4LXIPmetQmN3+SEL+dLYQVefcNacAj+ ThJ3pn8tLSJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 RuyID/4gbpPJyRVoyPXCRuIhwQz5gImVsvOBXZ0gBsprVc3Lnjp5/+S8jG+KhBIdpjonUeSEYqm o5lnIXVWgKJXnv9kYUtqrG+bHqPLLJb7TuCJz/lLxhlWGQxPENetxjrY9INaLO1QKPypUXcBbgw r0RXPTwmSgEI5Q7Xv2XCv0oc1G2mwxTYmQT4tvk2SyxaF6GQIVOapVkJCWovrmUe0eTQY0MvMEP oXl7jymEtjVJAxXmAzZTaKdguadrlOvXrniUhgRACk1pMRVnR0RPvv6nHq4sMlRHnPFZH8D+6DW H+g7v4dZ8d7Vj1d6wgq1Ad5/R+QrD9lTEpub/GDk3/ESL8xkpdWupPLSxt/SIr+YSgvGvFK8D6a NEPj89jhkttdlnDOs69xid8AfudehMimZu1Zq05uFfm9/D60PlaZZQDglEzDWRHfJqWBneT+Mbn eFs1S0Vk15pxES03/K6GJl3pXmnqXwKpZVzUUYlrGSjqWmMVzgwV+zzNZSI5vE3dupndjbNfGDz G7uYWRx4eO8IXcFUojqdZ6k9BRLTlhiRn28Lhc+88OdBGDdHkCe6B8dtd2+ya39JXsyACDwf254 q39Cml2JtfpiYEX3fYo4AF9eVb4EwjVKhkF2wMLCWtHacRgvTHKf3CnokcFyqh+fOZ6pQ97nci9 qzFQZ81ife4ffkQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-30-a2e13cbc17a6@google.com> Subject: [PATCH 30/46] rust: processor: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , FUJITA Tomonori , Andreas Hindborg , Miguel Ojeda , Daniel Almeida Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: FUJITA Tomonori Cc: Andreas Hindborg Cc: Miguel Ojeda Cc: Daniel Almeida --- rust/helpers/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/processor.c b/rust/helpers/processor.c index d41355e14d6eb593beb018b5709118afe855c852..76fadbb647c5592db4526569fb1= ed6b04ed17e87 100644 --- a/rust/helpers/processor.c +++ b/rust/helpers/processor.c @@ -2,7 +2,7 @@ =20 #include =20 -void rust_helper_cpu_relax(void) +__rust_helper void rust_helper_cpu_relax(void) { cpu_relax(); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 313F22FBE0A for ; Tue, 2 Dec 2025 19:38:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704310; cv=none; b=m95dLiKt2i5Nv1Gs+AqzzZvEZ8FsuZ3N9UvW67OskyJiAignMJO4QYb0rAUkwttu/Unu220QrlFbZm4fV+3COVeIhamu4VBsyJ4kMCGeVgH4+EVt9vwT+rCmJGMAz41trhy/8IsideZrpIkFi/0O/W+u1LPveq/IXC00IokEKeU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704310; c=relaxed/simple; bh=nvbW0QWOFExidYM4uyOd62M66wiG1d0ChmhDcn2ACYI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=PYqhLIjeaFRsmUMzzi3iiZaPYduqKeJQ6GqsMcZHXBjb7UcguwJvNckkZKBQbqrHVAcp09dBJkutg47A9xUkQfi7xo8fBBdY0O73fjc8CZrw+PRXD2UeqMtiOuTG3UoS2uZh5iEjOHzUTEyjuCa4esrLH5fQytVHpbRZw3jXpVY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=cH016vMc; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cH016vMc" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477a1e2b372so53761665e9.2 for ; Tue, 02 Dec 2025 11:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704307; x=1765309107; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=iK7cooJExov2Az0ET9JrSCv5XSrP3ynKUu1nxAbf9pU=; b=cH016vMc5z8DOAyaSFo5D4zpZVDTqwwVbbf2hCJ+mXE0Ui98DmEwSCt1ZoqR1tTBeg 1/tDsD3zJ5uLY7B2SmTMv1tlyxs+Gob2LHe2B4tJ/0I4naFl8hm63CexszqrDGlo3rHM vceswmu9BMiqZrHt4DAgf1thLxG5IxZJeBGKl5AIVSLNjc+whrfCTz/pWl8SDmy2ZDIw 5ib1YeZ24gD80YVoriQrhMtbQJ/eCH5LsBlSvpcq79LrI6AJx3N/ZTgVM1rHqoHZpnj0 nAxFuUhMmjvmezcokhWh8c21jD7wf4kx6HZkEQJ/7tK/QfsDH5PvP5alU7Udhk8tODrJ agww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704307; x=1765309107; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iK7cooJExov2Az0ET9JrSCv5XSrP3ynKUu1nxAbf9pU=; b=U6Hkc4FhFkW64a3my1jzrZgUyyqDmCjBE/ZRnFNvxCxpDcd2V65PRicp/H0QDQavCu SohEddgYOpP28s/0tVF09VB+0u8WqlOfhZtrx/Ahc4qf+2fNyQZuFKizjKdZWUbuBCtj TTdxTMyKAVZCPfeXdcPRtdz89LKBG6M4Kn0Necq8sXAFByTLtO32pSzXgFbDjpedZcGq Vb6fn9dg9mFeCuDArPxvwtCR2v86FmnG8VF0PjtDoX+Ztmsc7NyDasuZSA/sWNyth5CX KBxwkpfy/O53RoTh52r090S2POL9j79HEs6x1Krkgnq1gBtAX6NoO7WLkj1b6O+2W9CA H7EQ== X-Gm-Message-State: AOJu0YyKHWfWH5zRkcEey9guxA9KVceWX2iK7FLHP4fIYqNkUxwWyFj8 sY8kgi/eXXkCg+axO8WIm/RhdEiDomWnXYO0bdo1SVvRvq9CD1CN7gnBe6EpwsbKA54dbtW+xPY KLDHDNH0LMUeqaI7fjw== X-Google-Smtp-Source: AGHT+IEKca/QS3byD+XwtAWeEchgWZ+ng97qQ/iQwMflYGY9roKxMM+2AJ8845ksnMX8RnTVpyyXVSCFfPoD/DU= X-Received: from wmlm20.prod.google.com ([2002:a7b:ca54:0:b0:477:9aa2:7d50]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3553:b0:477:63b5:7148 with SMTP id 5b1f17b1804b1-477c0174840mr398619255e9.6.1764704307752; Tue, 02 Dec 2025 11:38:27 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:55 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=781; i=aliceryhl@google.com; h=from:subject:message-id; bh=nvbW0QWOFExidYM4uyOd62M66wiG1d0ChmhDcn2ACYI=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AKefbF0jpji5IQgI0uZCDEkYaQSFg1Ca0xj oJrfJexHDyJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 RrUlD/9sS/BIWMJk/cShbydrN4pnnCpz8LAtTrXvo8UF+2x1YSD2LKIm7n2EQ1BCIjnROTaYULo 9bge96FWmhnbNfT8LAuq6RWbi0jLBb7JxR+TKAaWNQJF/YGezg61NwtvU9pDAeKx5lxQZX1PC4U OY6k7+FXoIXb7A+mIaD8UiFwuIBv5Z6keW8YTjJIqTLFYGklhkiUSspV54erX3soCHz+FHEbbWa O6016xu1ojsJoYIMQuy/FGNNj6D1llCnScse5YANAKjA1SX9zVQYHtngkmQ6l8+YPFAU4GEE6ko b64XtSGRuXnLPKDEJSjcffPdtrYLOMrPyz7ugm+tijzJf12TRmrtoSw2pSQkdpF1WzAxpWDVddv Vwu6fb7q+HpwTxHb89Ak6IrwhTOYXnB3Cn7jNQXP84wPfDloHrpbWFpBdXj7nvGYu+neDOLK4fg X63ofPfhAGxdU31fONNyJlxhNn+J3E9o+ODqRVN2rbpuMVy/fSMvDxT+ndDRPb7OTf/jL1qeJwD xJgbHXH1H+hzV3q2lNtj9SearDSC/PuxQy+wJS18CNFJ8+shkWTdWS0XcbF/+7flQTixyc9P66s uctlQhXeEyo3q/bcT8RDZgmr0WE7rhV2C0wTHv0/nNO9yKVqRPLjNBaCUGOo98knZMcR70HzG+9 iIwqejOFOYuqIQA== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-31-a2e13cbc17a6@google.com> Subject: [PATCH 31/46] rust: property: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Remo Senekowitsch Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Remo Senekowitsch --- rust/helpers/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/property.c b/rust/helpers/property.c index 08f68e2dac4a983c06d84a72d56247f19333cae2..8fb9900533ef45e2ce2b21ac7b0= 00ac3fe6291ab 100644 --- a/rust/helpers/property.c +++ b/rust/helpers/property.c @@ -2,7 +2,7 @@ =20 #include =20 -void rust_helper_fwnode_handle_put(struct fwnode_handle *fwnode) +__rust_helper void rust_helper_fwnode_handle_put(struct fwnode_handle *fwn= ode) { fwnode_handle_put(fwnode); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 67D772FC892 for ; Tue, 2 Dec 2025 19:38:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704312; cv=none; b=VPd1oRFX46X6fmQNGNEvUV+SBVUjnb7LZ6+hPgZHDUdGz61ANw9fkf6OQTx9E4ogTL6R4eHV561bS4LXSn3gu+IcmtIEKk0GU+Ul1w4fWeyMIMtde8Hifc88LQGhsdRIwBDofyG1z+aFULytQ5AFCcZq0QGwU7cm88wXiC/k5dU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704312; c=relaxed/simple; bh=xiSvIF5M2v/o/jV45RTHiR7AzByrL2xh1a0T2ZwMloQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=WoqYhUjvIw4B8rJRqlvHLc9ZFSRGqPLTVz8YbutAQpeYu55sB5xpoOdorXOUrgPsaPeM7MRdwruSYlkmbtryW8Wus7g3/zKKZUE9lpu+G6Ay67Y5mjxdL7UAsxlATcy5hL2jLjECJ09/gVwoa59GaBQMFw3pGw1OArwO7oUAYDw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=C5HlLxRs; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="C5HlLxRs" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-42b487cda00so3368675f8f.3 for ; Tue, 02 Dec 2025 11:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704309; x=1765309109; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=8EZ+yuqOOTtnQ/NJL+f9iYWWqL77wa4Wqu/WdmElzms=; b=C5HlLxRsD+9zijoh9F8M2ZT2GlPMmB9AI42TmJ4AEzypzNMC82gjophD3sRG7tw7GR eD2XDvROzycks6lnbOE9gCeBbbszx/CFfxb0ELh0kzQWGlwDAr8iTDnPIAVCbVpbTyZR TfleBEGbwoBL2a2kbnNk2t1a0JsF5H3J/keTJRYovOadRBb/XQU3Bxe6zqAYrX22cm5m pz2MjY5PTWZnuTKEJiwsIthS/iA3H5VPsLLCAnmGerwjI27zzQqbu0AqXv5xpvnJl4Z6 BfJpZgPNiXc0j98N1EnvNq3lwN/NVGjm2XO5OOOiDdSFiBckCC4z/uh6XUAnLKJW6GiV 0Qpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704309; x=1765309109; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8EZ+yuqOOTtnQ/NJL+f9iYWWqL77wa4Wqu/WdmElzms=; b=lSwau2TsoGiIlrEg1hZbPltU4R9Qfosk6fr1jmkWmOiXM+EB3P50drvoBUUF2Z4AVn rjJA+yfUEnrTHmwNw1fDMLEt89yqhn4GaLyhbDIEXxcf9+BuIcOhkuAkyjnJmRTmRAn3 a351YcgYlKKk+ATMLUo5olLwQarlnmLcJsd1kL/+tINeU2FdmG/+hFPjNqxocihw5DlC aY3oA1KE8+QtrUZHFuD9EGhjAxQSU0xJg7MhDf+/s0VbUar97hePXMEfsys23gSbn15q 9q9TBGJlcThZA6gsvOHYgMkLfJzDZ3Zgk9M64YvbyGFIRKEHbIEdPFf5S7xGjZ/XAHHC TWYA== X-Gm-Message-State: AOJu0YxTnF7cVhqJIIlGOvVr1Mhm6jLLR2kXm2FR7Wm5POIp9rd3qiFu /BDvZ6iMZoxZb9BnNn+A+2n08or/OxljCNVxAYYhxGfwsIqLEG9eX7dfPzDlr/w6XW7JT8S2wLX XhaYveWr08BXYVZ3Quw== X-Google-Smtp-Source: AGHT+IFgw8oQkylVOLRrXsrqC45NxuzH07rkiaCMIUiPQ0IG5ERn4DqU43KCn/T8QaryJXKQNzRD8M2pH4p0McQ= X-Received: from wrmp8.prod.google.com ([2002:adf:e608:0:b0:42b:2aa2:e459]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:4382:b0:42b:3e0a:64bc with SMTP id ffacd0b85a97d-42cc1cd9b05mr43590267f8f.8.1764704308826; Tue, 02 Dec 2025 11:38:28 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:56 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=804; i=aliceryhl@google.com; h=from:subject:message-id; bh=xiSvIF5M2v/o/jV45RTHiR7AzByrL2xh1a0T2ZwMloQ=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AKPxlLkkc0R3rTp64JWIa3zr18o65zul/eo q1lbestvDaJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 RsRwEAC0yYF+Sw9joplwIUcXbkDPbSARdbcvrL9X1AFLin+Opdr+YKWiUr0ALlUVt2TLuyCvFtQ DtlNSv/wcAKENDZA0rT+jhizKEBc9qKL0UJxaC6IQfMry2VsWt3TnpKeEelan1M5JhXTEnCcZKS L5O2TIHo1O0oiIlaLQYokDOj4zK6IyVaPFaIGxUyjTgIowTbVzHYW3YMu7v8bBbZudWKHYmyiE4 7At5LQ9cnjww4ohd1YEC/vyLkYWX+8kgXjwDbKXTY11BPgpQoYpsFuuz/kjCGM7f/ei9Hyt28l1 ShSCumBiiM1xFawyi3gxKOYetCMJfcH84ApRLCj1T6W4kh3lMSUm2SwMJgkjfkMKqjzrMCXXdDT OpsZreAfGrbVG6ja6oWNPUOXvpg1eEFyZZ82N/vKafOiJfLqj1bUydanwvXtLATGYAX9wfddIbR dqJuhd+6EFyesqAqrCTsGbzKv4vROnvdF2qyr+cqGiz0CYV6EsTmlafBloCwjprmv8NO9ROKqUB Id6ci6fHzTGdNjHUK5JbUjU68qVyxMxA0znOAmqpn+IxBXZ/z7Ds7sWFEpTXtxT5a4icLQphK8o RS4bfrZxA8UTN0+DtZ6q1X/hst9Nqq+Ia3sCBsCWOO0xEbf/kQ3Jp7te1WMQ3IC3AzrABinwK97 NUn6GTFqMAFZquQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-32-a2e13cbc17a6@google.com> Subject: [PATCH 32/46] rust: rbtree: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- rust/helpers/rbtree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/helpers/rbtree.c b/rust/helpers/rbtree.c index 6d404b84a9b53990cf7b301cb501f3b3332749e9..025f80a37203e3cbf05a4294704= 7a58035018735 100644 --- a/rust/helpers/rbtree.c +++ b/rust/helpers/rbtree.c @@ -2,8 +2,9 @@ =20 #include =20 -void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent, - struct rb_node **rb_link) +__rust_helper void rust_helper_rb_link_node(struct rb_node *node, + struct rb_node *parent, + struct rb_node **rb_link) { rb_link_node(node, parent, rb_link); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 8EA892FD1CA for ; Tue, 2 Dec 2025 19:38:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704313; cv=none; b=IrfBxZInG7axwS1clnVRKOCxzQls9deYT0ANRfOaIv3UhtJxE1YUnP4zirAkK4guX5/yXjwxnGPz4/4RtoPOODYq5MkKzLwjYXf7P3faSZtElSPoy47zvWaLhU9qN+dqipGBeGuAz70lvY9amEMsm0HtecGv1IP4Vr44+ZhVc3w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704313; c=relaxed/simple; bh=KfA0aYktAmVEQNOHs/gAJiG3wUVa/u69tlizsxjAJZ4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=qhs1D5P1iEibJXCfxKXZ0/QAN2oeiM4Oe6s/7FakZDlL6zxi9fvVWRw0GZ5MiYK4fVVHcpoZF5pHPouDEoiJDoHLEbbyHImgQcsloeiJavus9D/xBpVOJJRWPO31psHejhQ0KYHQcUraUJs70inki5GBd/CMiu5TkeYMpH7RI0c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=imfkV4aE; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="imfkV4aE" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477964c22e0so1066375e9.0 for ; Tue, 02 Dec 2025 11:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704310; x=1765309110; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=pRI/D7GSmJeHvPRj/LS4GLskzfvRR4C+zfs7kuwZ/dY=; b=imfkV4aE6TY0w3w5buzfapGBBmDGXPMPAw2JoHnc1UVpWfKyOS6HUYtje1c03vSeJT TzBkFX33asmmm5VX1Ch1F3xSCeA7y2Xj1d7IfYSY78ptnJAulsfhXkKZgegbB6pMbl5r 7v/6M6MG0dDOGTmwkFzfVbrXbe1/LugC+b0WHOJyClvVmluDR6igyZkxtYYNOuV2Hwwp GGbMgN8V4YTwXgellDNFxv+k5SttOtcgwhrqqhMjohMiBihfqesjFFevBdZHmdhaTMpV Do6h74HNxxr19c+pD8RTjN5YPJI971KgEgkZWeqGHmeqtXOpK7kd3p0rCi+2/qIQtT+j 51WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704310; x=1765309110; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pRI/D7GSmJeHvPRj/LS4GLskzfvRR4C+zfs7kuwZ/dY=; b=coYl/ixAb9nZAd6YPQbJQayGMFnn8mp5lgXC8W+qTw8N5OjkZ3sQur6qzfXTOWm48j 70oK3MyjQJWWpYdKCXb8T3BOKhCqsLSzW8xVXPru/hk4RRauifn7GpLKmfkZNnfVOFDf jS821DlwkKbeyhy0XCp7lWpX0Dpv3ScqvW3W6LLOghVClv08GQY6GcOaZB5+3t5LtH16 QiNIraLRx77qruC2pe2ZIgsuIxRtVPvOiAAT072iP/yxS3lMpcC0TQ8SlNiN69XGr2Uw lNf/WzpXtCnY0ZmUOsFgpKSVy/93IhBDXTlws5oDVbwFKRHR0gQV27nZtLFz/sTodmOa 2eOg== X-Gm-Message-State: AOJu0YyuaLgk5iet5+R2tRxBz5mu15SS9Sh16nqJRukYRQ9+WX2hj0Tg 54VFBMViRVwGqrhmkV/a24M6FXPPVm43eHAEsUtVlB00u8rxCd/BJv8Sg0jDxaUajR5LeKWzadm jwItPkHD9DquGBkE4Rg== X-Google-Smtp-Source: AGHT+IHKwYwldcWP9HsSDKqCx/7sgEqR5Z+VgtB3rIj+E1+fJg+WDt6u52ebxKppoPkC56kc9KTd+Woi9K5cvBQ= X-Received: from wmbjw18.prod.google.com ([2002:a05:600c:5752:b0:477:d21:4a92]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:358e:b0:477:a219:cdc3 with SMTP id 5b1f17b1804b1-47926f9a96amr48689665e9.12.1764704310043; Tue, 02 Dec 2025 11:38:30 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:57 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=852; i=aliceryhl@google.com; h=from:subject:message-id; bh=KfA0aYktAmVEQNOHs/gAJiG3wUVa/u69tlizsxjAJZ4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AKA2Xf96afgiGb6emGi3PKdj8u6PTmzfkjC oednJNtBMOJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 RumdD/9UzACEB4Q3wy9lLxRO9OjlxBFaWAUGdJuXJ+P2Zsl3+vQE/SP6caC/06J06Emqt1fOShh 2T9R/yFvIpYuk7w1iZ8QQ3CzjPAiWbk78MrpzKkekGEtTr8i5sCta18KSztsHsJ8WK2kKsXfG5V 4CUvuu6vQGtsX5teagvNKJzY8ySrNGdp81ODE1a4Bh9m1fznGhSHY92nrGZzW5r344N+6rjcwpi 847FeNCkOIwoESXEb8uKCyCg1YHgVsFM6Q0tgKEt7qE0y3B0dMVNgQuUWI8GSykwP6sQUKuBTwC K7RroWqRBFYjC2zYDd6UV4eF6oSfI4Im4SLAupfAMmaLLVIpNcjOUBlMl8lFnFwEygykjFcUjRq cpejU64nBRWB1jZV9qNwdF9gOANOs9migVRrT+VMTqk7RSo6LNcxPpB3CuwMmdoyBKhIEfjH/Nk rWU/G2h6LacefsErKzpuZIXkJc79eXwX6s3QGph1BIFm/anEW9UxEgqjp7Zm1V9HR8fiQrQdwRu KMh5smLzD4Ecq0q7cX7kk3XiG3QFxzOuvzaM1/QhdD/aUIJUXEXqDe5eXlIeDG1odfs8P7n1nAI gOGdI5WclrywEDLp0o0iUoFbFpZwIszZbv3V5EJq6Z4NWIlTXFztEls8D7jl2oco2osyUqUQTGi rkhzCQiudX/negQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-33-a2e13cbc17a6@google.com> Subject: [PATCH 33/46] rust: rcu: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , "Paul E. McKenney" , Boqun Feng , rcu@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: "Paul E. McKenney" Cc: Boqun Feng Cc: rcu@vger.kernel.org --- rust/helpers/rcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/helpers/rcu.c b/rust/helpers/rcu.c index f1cec6583513497e996f74835ca2c6c3f4a8c954..481274c058577276e20093a1014= fc49f4a40421b 100644 --- a/rust/helpers/rcu.c +++ b/rust/helpers/rcu.c @@ -2,12 +2,12 @@ =20 #include =20 -void rust_helper_rcu_read_lock(void) +__rust_helper void rust_helper_rcu_read_lock(void) { rcu_read_lock(); } =20 -void rust_helper_rcu_read_unlock(void) +__rust_helper void rust_helper_rcu_read_unlock(void) { rcu_read_unlock(); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 01C222FE06B for ; Tue, 2 Dec 2025 19:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704315; cv=none; b=QDikfonZp4WdEYhNIX5GnKGfwnBOSFvGQxenH39iXxiDGoqDejlyxrfJo9c8aPZ59aq7i++ZrBhIDE36bMTBrlooTcs4+8daHB6O7S6A2rDxNxyF3NdLKLsE0GfpGxdeqbI/hi8JyyIYUSTiRhRvRg8KRlh2PL5btUzNF0uOOjA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704315; c=relaxed/simple; bh=QXDwV7c6I5ccFYbFpKbncYS7vrDQedc/CL/7TN6KLf4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=mhIGRjHkxViZHZYSXVQB3bHv4EbH+T5/nTBoYbHbo8fnmvPzaw3lNILh8biAIDa0sI7VNNl7EjqTml4hRdwVLzW4Qc30P2cD+b7lJRg2Lr1zMuZ++rrmIs3cDY5m7XX/uDb5GBlc7mc5CIxOnslj3NUfT7AY3OO2JEoYPZiERIQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=svRpukJk; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="svRpukJk" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-47799717212so44389605e9.3 for ; Tue, 02 Dec 2025 11:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704311; x=1765309111; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=GwKZZlFWofOBNIhvVvCg8fDrYWEwaIxXOdbqeyBSsYk=; b=svRpukJkIt6rCa9bLoWmlELvavW1TJyjqlRqrYV4N2ZrpJDb7yKV2pFOokOCNUqtgl 6yghxdDc7vW1/zhCHde8Vq30G9ycLLCpMGyx4/HNQwRPSfFogWVbKGUYcPrWYIGgFrV2 EkGhirLyAlU79oE29PUpWe44aDL4PLQfEX4jYMJMG0/ook4PAk5OsLdgtKUDHku0Ix/B CSQePQINkzXbK4beFRYA8b9bl9/eKKOKpF5dfiIAxerfaPJ8gogG5yPQA95CI/2O1ZRQ OWEqZN+PEzwAPm0fn4Gapk+pDu07xJHZrBdR/MVLHG00XOD4B5D+70Atv+AHdIX6qcNV UNpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704311; x=1765309111; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GwKZZlFWofOBNIhvVvCg8fDrYWEwaIxXOdbqeyBSsYk=; b=ppamH2aQMSO60jTy11uFlk+XQ1gvH+7YqgJspP/XtN4Lq3ZUt++o3X0D5uvBB2M0Bi LAGMJDiqWt+Rm5IWxvUkFS8UYStx7C4QqpE4pxWay4sJUaEnZ0N4lzNCyqpRy5T5KF/s e53csd32pT18noODGUMySx9oHbnzGgLHZdNDB45G5IArg9dn6cTsSnTwQHsqsVsWiirH WJv9zgYAnEgMZ9hO9B3A0m1cDF6qj1K9QHFcmUZkS0znX0YjB67Bys0E77dCKCzhxFb7 Rca8D49a16YOt/N50OKtT8j+DyNbGj5YjILif/eUq5I46zOLxuGzXkmrwFnIefWw5oMd LYcA== X-Gm-Message-State: AOJu0Yx2fC5j7jAbhDag1+pa+J/slVDegJoA1l9WAbNmNCsz5QpGlnsH 3Y1eoNyCvzcm0cRwI7b8PtUQfsvPKmwFLY0DTwF2q/BD+AEx2WjwVoin/vJIX4PnXV3lHK01LeU JsJGBmikxFJBV8WFsGg== X-Google-Smtp-Source: AGHT+IGYjRiRRmEYoIWiBAqVvlAn1/rMUUXjj3nCKM78lKsbIxj7Fs6oLnefZbSqLAcKF8DWjl02huczrcNd6j0= X-Received: from wmjy23.prod.google.com ([2002:a7b:cd97:0:b0:46e:4c7c:5162]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4e91:b0:477:7ae0:cd6e with SMTP id 5b1f17b1804b1-4792a5ddcc9mr7150695e9.5.1764704311516; Tue, 02 Dec 2025 11:38:31 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:58 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1510; i=aliceryhl@google.com; h=from:subject:message-id; bh=QXDwV7c6I5ccFYbFpKbncYS7vrDQedc/CL/7TN6KLf4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AKvYXCDN2x85iEPNFC+AtH8oiwYvPD4YhRF LUl1fm9hbuJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 RoOUEACcGa1ErFZhdYWK/LaEy1u/c8SZe22Fam5ByyEVolD7UvKUrWGMC1f5+rUOsLTrrBHQesu hQmOdDwVpH8mc3/TJbNhvDJJkmUGtYZ/QbRf0jNsv9NzrzeFcsFw5YBNOmqLX3qc8Yx+L+GycQb h8XelieOFuy/7PBLuo9SM+4PR1mOBJJkqIFUvy4X/5pYJF61j+nv02EDqL24nnJ4PmeGE7ReeDD 9OB+g4yjaXZiYvNL2JfikGarLkj4OX6S+3SB7zGKIT0VBZ8WdiRagBIxUoWIKZmbFOvkWMkXsM4 dWFsW0GeXowB4l+7aiNPst/D5TzzadbGvmqdowpWTeVW6igOg2OVtwKf8LiB3lEtFESvL/A67iG AT1BVa5SKO5xzOPoItuCl8HQ6ZhR0+xp5OyJgZWJZd+SWKA07a0032CB55FOkQBCM7YEJTM2JOY AwRkgPd9Y/2baUhBXbi7ZeZDdHfcg+0bgI1fKYqsDQndiCi4ObObFiCV4XcO/wE2neleAPfmdzR soVeVDu2OZ5NGbLZnBJF4PtWEwKoFzSH3nGxNU2bjcHwyYWM956JtSCLc5UHikUW0xuB8pWNzlx UaX1lGO0hsRWPrT0fAaXu/e91TKFZN32x8oSWxGiZZLDAm/ty/ylGQVzQ8wILuS+3wCnhfB9nxQ u/S8QTGXaAjT14Q== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-34-a2e13cbc17a6@google.com> Subject: [PATCH 34/46] rust: refcount: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Boqun Feng , Will Deacon , Peter Zijlstra , Fiona Behrens , Benno Lossin , Gary Guo Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Boqun Feng Cc: Will Deacon Cc: Peter Zijlstra Cc: Fiona Behrens Cc: Benno Lossin Cc: Gary Guo --- rust/helpers/refcount.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/helpers/refcount.c b/rust/helpers/refcount.c index d175898ad7b81ee9da3d9d125764db02e837da52..36334a674ee42eb46792210903a= 0e3cf9debd9a1 100644 --- a/rust/helpers/refcount.c +++ b/rust/helpers/refcount.c @@ -2,27 +2,27 @@ =20 #include =20 -refcount_t rust_helper_REFCOUNT_INIT(int n) +__rust_helper refcount_t rust_helper_REFCOUNT_INIT(int n) { return (refcount_t)REFCOUNT_INIT(n); } =20 -void rust_helper_refcount_set(refcount_t *r, int n) +__rust_helper void rust_helper_refcount_set(refcount_t *r, int n) { refcount_set(r, n); } =20 -void rust_helper_refcount_inc(refcount_t *r) +__rust_helper void rust_helper_refcount_inc(refcount_t *r) { refcount_inc(r); } =20 -void rust_helper_refcount_dec(refcount_t *r) +__rust_helper void rust_helper_refcount_dec(refcount_t *r) { refcount_dec(r); } =20 -bool rust_helper_refcount_dec_and_test(refcount_t *r) +__rust_helper bool rust_helper_refcount_dec_and_test(refcount_t *r) { return refcount_dec_and_test(r); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 754C72FF645 for ; Tue, 2 Dec 2025 19:38:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704316; cv=none; b=Xtkghce54FBxX+cq97c799QbkBabc9jRlwW3AtjorGxzTOFaVmIFyulCDeUW11CUU5xwll5bPTu/r0aI+1DOctX6UdUtKu1gotju5witJKOA16WNU+jNe/NJlb9d8++0QDo+ltPN9Rj562VRijTwPkOnDqJCeD0iwJp2atRpHSI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704316; c=relaxed/simple; bh=vz3m6NeQJSylE3JPgdd/bOcQBQbw7n++c1XLda4b+eo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=YGkA7v4RJH8IRr0xXm1qgWPJWSsah1uvwf19b5E+uGbc6os8Oy7E0hE36BafEQvwTd6xf86tURmS2nstjBjG8IJGvrcAv9YSfFtrADYd8AyxXfg1y/ew4ei1rmydVTUFpk5WZce9OmDDyOOMnIKy00mS+q4j3q4ldKsDE4dGaxs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=E550LFZ0; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="E550LFZ0" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4779981523fso44959115e9.2 for ; Tue, 02 Dec 2025 11:38:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704313; x=1765309113; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=uDJMo/qM8HRwEHpmxsk4Rgtv64e6UZdFKCiGpyEsToo=; b=E550LFZ0OXyNh2oBHJ0d4CCDZr/rPQUnf9Z++uEGsUhgJCHqVkTqF6C8bmYBPumS97 XBOa8qPTCfs7UKA8O1/JE4ogm1gWvCNQsL/XP/muvVU+QZU5/rrL8ZLxc05uWZtbVZ27 VFdR7eun3+XP2gtiNrAHbaisKQIzaQR8awc3oAG+Nrtvpvsvu73lb1em2JhdFkaWY2Cv HpPiXQqQRq5TXSqkn5tVW8QLdFNgP2lqRdmcqxiNevA8noXCltNZCG4pf3gSWAwyGbTX TIm+BKPEY5Frh93JFFVw1l8XNCmuuGCxX5INMk1tX952guDkUm0ihJkoAyOVR2AGsUCl zkHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704313; x=1765309113; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uDJMo/qM8HRwEHpmxsk4Rgtv64e6UZdFKCiGpyEsToo=; b=TGEmvToqwr4Am9tmLpRnVjGRfoEed1yBAvfsIxGFFTx31I+m0CnRpm5MLoA2whoSaV v5KSEV8p1bxMGEfVuwDDhi4ebjVD2+R4wzMhFqlT3Rh2FMtvxZ8cf7Z1UXa+E9qR2VmF 4su1IHfo31XADe4YuqunrByeywIi3zO+rN5tZ/NGLryOo7RIuhNg3kMDFDgyC+Sjarmb WoFkytiyyROBCHcdC1BAr+tP50e0gLR16oJbX+fWxz97H+/yoEDM37k1zSW4QdGhggDI AZkld7pACKymZJ/fqXU/HakWOvGfWx5WWIZ9rcdXVvZE9U0nCynNTLDG2CKZMo228XGl FiaA== X-Gm-Message-State: AOJu0YzZBMOBLBoOs0GHp6TIdDUa06IcuNkPJpf4qO9xLAM4dzvmfUQO 7jlcLoNwSR3EJbw23Wdm2VN2qKZ0yzoZmkJHJHbnrimPyU8RfmUEjOr0tRVlct/nBE/5n1E0eH6 YrEFrnVELeDdynomwEA== X-Google-Smtp-Source: AGHT+IF6LM6DSlysd4zfZecqsnadOM/G4MzuDRF9ci8XsVaTeBUF0QR+eDXsaXFyIxIx35MTb7E1It+Z7sQ+SbY= X-Received: from wmap10.prod.google.com ([2002:a7b:cc8a:0:b0:476:9bb8:201b]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:19ca:b0:477:7b30:a6fe with SMTP id 5b1f17b1804b1-4792a49a3b0mr7414465e9.18.1764704312887; Tue, 02 Dec 2025 11:38:32 -0800 (PST) Date: Tue, 02 Dec 2025 19:37:59 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2773; i=aliceryhl@google.com; h=from:subject:message-id; bh=vz3m6NeQJSylE3JPgdd/bOcQBQbw7n++c1XLda4b+eo=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AKpEgrJfRXZ2KZbXXmC0qjjLWTCyrvkrWW7 IIFHA2uF5CJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 Rhw/D/9eksE0hJjtujIv5OowdPyVroM70B6z0QaqjUuNGXKWxvjF/IxZudcEtt/QV6OsZKx+7KF ZpX01DLJxzbZWAAercEtG99hybZEV3zqu9c9jejCjviy/or7TlaPleLBuzDOGQAsAP67tukFcJS PXieIKTYK2Xl/J5ztocj6oMZ6FVmKuYybMHA4Xz4+lLgVvtNFVTRgDbQoGfdMMKTwen1Ntd8fuO rVWN5iISEk7sbIjtUhz86xNP6iJo6jXuAPyWKNzR/HM24Us2DpPxRZWDnjxJKh2s9jxZyG+7yki 4NE/2p7zSRA9N8dYZbS34S70P8G8uAN6ovwmw6iAQVQ2CXB+vMuA0U/EbZRHJK3oCynELhAn0lv +cfdPIiwCYHXWITlE5QzVg0u8iR2nZ9Cc/BTO/l6Zvem8L1APeucCrpBjqX8d457juoV/q/byIV Aa2lMwxXK78iKqjaMQIP+vhdzs2LIlzVLWQPo0m3rPQjKkHc3NO4PjRkZwsw3F/8I8s5zHpmkmc IDnz2i6SiNBwpLMWHIMhKDJ91sC40eG/PyzLGx7KwIh8Rg0IKtCOfCyLm2VsvXhqaq2JR4zecWd 4g2fDKCV6C9egal0e2g+FV5stn15hitxQJM8/xtSNT95GtHnavorzdZ++398oX3e5xC7Juqo6vZ 93uOjD7ycMj0xEQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-35-a2e13cbc17a6@google.com> Subject: [PATCH 35/46] rust: regulator: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Liam Girdwood , Mark Brown , Alexandre Courbot , Daniel Almeida , Boqun Feng Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Liam Girdwood Cc: Mark Brown Cc: Alexandre Courbot Cc: Daniel Almeida Cc: Boqun Feng --- rust/helpers/regulator.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/rust/helpers/regulator.c b/rust/helpers/regulator.c index 11bc332443bd064f4b5afd350ffc045badff9076..9ec5237f449b9a67ee378d15a76= 1304281f1c483 100644 --- a/rust/helpers/regulator.c +++ b/rust/helpers/regulator.c @@ -4,48 +4,52 @@ =20 #ifndef CONFIG_REGULATOR =20 -void rust_helper_regulator_put(struct regulator *regulator) +__rust_helper void rust_helper_regulator_put(struct regulator *regulator) { regulator_put(regulator); } =20 -int rust_helper_regulator_set_voltage(struct regulator *regulator, int min= _uV, - int max_uV) +__rust_helper int rust_helper_regulator_set_voltage(struct regulator *regu= lator, + int min_uV, int max_uV) { return regulator_set_voltage(regulator, min_uV, max_uV); } =20 -int rust_helper_regulator_get_voltage(struct regulator *regulator) +__rust_helper int rust_helper_regulator_get_voltage(struct regulator *regu= lator) { return regulator_get_voltage(regulator); } =20 -struct regulator *rust_helper_regulator_get(struct device *dev, const char= *id) +__rust_helper struct regulator *rust_helper_regulator_get(struct device *d= ev, + const char *id) { return regulator_get(dev, id); } =20 -int rust_helper_regulator_enable(struct regulator *regulator) +__rust_helper int rust_helper_regulator_enable(struct regulator *regulator) { return regulator_enable(regulator); } =20 -int rust_helper_regulator_disable(struct regulator *regulator) +__rust_helper int rust_helper_regulator_disable(struct regulator *regulato= r) { return regulator_disable(regulator); } =20 -int rust_helper_regulator_is_enabled(struct regulator *regulator) +__rust_helper int rust_helper_regulator_is_enabled(struct regulator *regul= ator) { return regulator_is_enabled(regulator); } =20 -int rust_helper_devm_regulator_get_enable(struct device *dev, const char *= id) +__rust_helper int rust_helper_devm_regulator_get_enable(struct device *dev, + const char *id) { return devm_regulator_get_enable(dev, id); } =20 -int rust_helper_devm_regulator_get_enable_optional(struct device *dev, con= st char *id) +__rust_helper int +rust_helper_devm_regulator_get_enable_optional(struct device *dev, + const char *id) { return devm_regulator_get_enable_optional(dev, id); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 4830F2FF65A for ; Tue, 2 Dec 2025 19:38:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704317; cv=none; b=J6UITFq1rAvm9kgKYG8k4wSlxhhlbd2YSTmwpuXuBjst8Gcyq2bL0SpXlLHM4aC22FbcVbZfIM3ArZYRQUcNJZvcHAP/7nv8AAY0D1I5Uq4nX8nb4WU7ON8IjDxvc6fYVE674NMaeBL1jOKvZdCr0jVhDqqan7sEQSCBpjnYnmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704317; c=relaxed/simple; bh=hacth0a4406OsghefqrhaXrbvUZUuOkCCOw+ddGJ0s0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=tp0I0jj1AxxBdiv75Tc3B/1W13bc4TtAIaY2bbZDYPdw0DgJEfddJLZE+FPPWxuPs0O6Fs3g2v2Y9Pe6JjNjwu/gqcEzgqEwuNqngBqcxgVQuuuPUnq5mQnYaNT6p+kgdu9dByOYSYGhHCCOOSlvu7RwpOH0idzezTjp+ATRuyQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=t26h38Zj; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="t26h38Zj" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47775585257so41064105e9.1 for ; Tue, 02 Dec 2025 11:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704314; x=1765309114; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=p0d/eB1fQs7rmZ4HCfQGDjpM9sRegrHBa4mXJBpgTeY=; b=t26h38Zjgs0Q84gtp5umcfdQuqQmaOXmjq4vnpkSbxkIJ8jsP4AU0FilCkZAbqFMNL w2wdXFJVYugBBRt42rTMxMBfJCGLPe487Zood1l8M+4bFLNPfbfZ8HF3aZv4hBtKblk7 VcL+C7uleYV/sQzF373Xkixo+LoR1GgmLorJin6oFDjeD9ocoM/NhBnIIOYw8w0txQs7 hsUG81ofDqcboi7kh7TODzoKVr7enkKfyuYcM2VHTpDe0Z55wSbCk+kXSuBqI2ictXQe ZIbxI5L86Kno4m3t+cBZ+C5d9WmfmRzEMrU7YMYp/Bks6eie1dqcbd7mj4LRzJIrRMH2 mTxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704314; x=1765309114; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=p0d/eB1fQs7rmZ4HCfQGDjpM9sRegrHBa4mXJBpgTeY=; b=E00nHcqCqjDel8juBhVVxYqSPfLQk2Uk4TlfOI5RPn6sMXWImrrLaBdRzPXoMkAsAj oHtA+V1uUKjeW4eLivDNgUys5NZa+PJhiBuYmduY/zeOSjLUrhxyHxS0kk9xt1mPLTGQ L6vr6xX4SSChfeZeXtsI6XhpxO+y4N07bVuYFz6IcwxqcEvfAayP0Q8NOVNHAZuJF/H+ +9HTqqldunshttLMpEkC+edtwAXSy7vOn7MMJLa+hBMCCfsexdJTvPeN+o+j+tr6wNCT etSUCLli01u5Lqi+fFOqlDopIPvuOEosgSyd/vn6UFrLPqMvbcW92vaf4Z+PJbJeSfEK MubQ== X-Gm-Message-State: AOJu0YwgPS+QAcI+96xzW+sjz1/uF3CoXIYHqfoy9UioF0GEX8pboI6o xcNbIiDj8CH9erf+W5c5ixoivriZz0M7UsayyZXGfTq/72bEnEoMTK2SYjFXPDcLGKiN5QqKqAl k5NegqiZe1hEicOenPw== X-Google-Smtp-Source: AGHT+IEUt0FSoBzuBFrcasSDgVBUsrlmIcOrWYcQeE4TNGcpmEOOlvRtAB+gaMtJN+SzZyh0n+Z+Nn06zAVJwGQ= X-Received: from wmjl7.prod.google.com ([2002:a7b:c347:0:b0:477:74f4:31c]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1546:b0:475:e007:baf1 with SMTP id 5b1f17b1804b1-4792a61e69amr7187575e9.34.1764704313881; Tue, 02 Dec 2025 11:38:33 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:00 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1680; i=aliceryhl@google.com; h=from:subject:message-id; bh=hacth0a4406OsghefqrhaXrbvUZUuOkCCOw+ddGJ0s0=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AKs2O+Z4UTuTs8BwpKb9vwCtZhVAMeOrr9M CRguvvPpiiJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 RkhUD/0YPrHvYLxp+ig26Uz0JITkGZEKUa0QxyZk7J7ebLa46zmWKFH9l8Tr8UMTuukfGZz1iq8 p0upCEC2TAT1aPpsyiWJXBjhicuHi2EvPRMuHlbeXLH9nfywdD/NPSjGM5NU1PfnxALcFZfhmQy VuJqD66Mug2+jJD24nofxC23zdzx+PxBiiQHkpZh9vuorBe8sXa+culjq8DaMo9sleG33RUiaAK rus234m6bmV1PBcC+q6GZmUhCk40u1BOLqOe1LJvTAkVNl2ddTbwlnC+BA9Hu2Q/mksFXl2Mq7+ 8IGiftKg/Y2G+hae9Ho35BUmBcvuXkqsi1lVbZYtjqPNe2oEvt0UqAIrBGnpH482vdUqs8k6nQ5 e1nc9AP3jHbWgc+j1ThG160kwkH6kOgwtKVNtihnpB99OIdYg2iddI/RtboyYzp+mYR6+i1PXpf jXfJX7XI3BGx1nVUUHCdgSGqOKQFSIS4CXmiJj5txt/KG5XG1HzVr4xvZ6hUDWPh0aQ/09QrkCb eRKk4iibMK1EssPCW7LMN0+suuaVarLylmA5VFna9EXP7DFRv+Wzcv1WLECHaul4LIOblcLXvKe LUxrh+0LBKfcychaFbwstC9R/LHW+FHru7dxXkGf8Mq919wnBhVmPLh7vvbaxct/lBwc5Us40D0 9rVPqtKhsX8KdCQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-36-a2e13cbc17a6@google.com> Subject: [PATCH 36/46] rust: scatterlist: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Danilo Krummrich , Abdiel Janulgue , Daniel Almeida , Robin Murphy , Andreas Hindborg Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Danilo Krummrich Cc: Abdiel Janulgue Cc: Daniel Almeida Cc: Robin Murphy Cc: Andreas Hindborg --- rust/helpers/scatterlist.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rust/helpers/scatterlist.c b/rust/helpers/scatterlist.c index 80c956ee09ab4119a0951709c6f339a2a2c23894..f3c41ea5e20162d670d37557165= de71325356351 100644 --- a/rust/helpers/scatterlist.c +++ b/rust/helpers/scatterlist.c @@ -2,23 +2,25 @@ =20 #include =20 -dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg) +__rust_helper dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg) { return sg_dma_address(sg); } =20 -unsigned int rust_helper_sg_dma_len(struct scatterlist *sg) +__rust_helper unsigned int rust_helper_sg_dma_len(struct scatterlist *sg) { return sg_dma_len(sg); } =20 -struct scatterlist *rust_helper_sg_next(struct scatterlist *sg) +__rust_helper struct scatterlist *rust_helper_sg_next(struct scatterlist *= sg) { return sg_next(sg); } =20 -void rust_helper_dma_unmap_sgtable(struct device *dev, struct sg_table *sg= t, - enum dma_data_direction dir, unsigned long attrs) +__rust_helper void rust_helper_dma_unmap_sgtable(struct device *dev, + struct sg_table *sgt, + enum dma_data_direction dir, + unsigned long attrs) { return dma_unmap_sgtable(dev, sgt, dir, attrs); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 DCC013002C3 for ; Tue, 2 Dec 2025 19:38:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704319; cv=none; b=R54yBJFEr9GJ3pyHNAU0Zod5a9byLNY1wzo7CU2meRLZBQIrzszvOGefTK237FOSTLbZQnL09hmrV1BEUeTFF6K7OPf/R1WFybQgLQSa682/4LA0Yux3ADme+b4qzkhChQlxXUrD4xWmGirHGNQZk+MESh0GPG61rXq7xhF8kuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704319; c=relaxed/simple; bh=NEo81OnYLoeIBTiu58i1f5sfqGYGea/teY/C42KXlDU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=HGoaxd+l3Bo88jvsW7X1+dXbWWP5Wb8CNauNqoUrcJb39mD4HOXVkrRqIJmueFUKzkA2BGdxn3shSrD04uYnc331c2vYmHGhOLv3rgA1z6j2FVWz8Gy47sohof4mcPgF7V7UmkwLRfy5WRjerPymwE12o4WdD6JhTggm1/q+XEk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=XNrA+Xpt; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XNrA+Xpt" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477a11d9e67so34648765e9.2 for ; Tue, 02 Dec 2025 11:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704315; x=1765309115; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FWykuHZToj66G/MxeF8fmUld14jo6i6LfCUhY6lHEoc=; b=XNrA+Xptfps6TlCRv8FrMm04ITOa95toGVRzsrRVu9UCFzLlbx/+bKdE2pSKEiEoln qA4SEWOvrZBILK0urCdm81KzjiF94K+co9gmg/+bgMEjMWAmkVRli06biyCIX5XTDnXz pA4VeplSzUX6Tj09vOAxYAcPoFcM6KyhUPxh51pPHXQr/VifJnlNLZ0USvmUZ9tSJbya QQ+sHkSE/Yp3r0EH0eOJNIZIGyZCOZJz9rUZ0kk1uFEYbpOUqP0BdQTMWpskajWy48QH du1UrGWOgUkvZvRhtd79rKulWraxFYb78R1/hJ2cCqNr6qfOsCpWxqw+HvhHEOrWnuk8 pfkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704315; x=1765309115; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FWykuHZToj66G/MxeF8fmUld14jo6i6LfCUhY6lHEoc=; b=bgnhKZc8XnkH9KomUgVTNuuXMLwWuWpUlVdhBM+SFhfYqzGZrxhdHRJ4bQzEjX/EWb YRCMaDbQjo4b/YZiBANIIoD6ud/Ulhh4EE8mzk2fRU77xMCI51FvRii8zd1hzYcwa9Ty s3GoaMxbU+qafghvqBrQTDqdv+eRGnREPwSeSEtcgmoNZE+xRNhNVjuGZf3rxvh2pfBh u1swcd8lUPTD8NjUEUX7de9/ZlXW8LPYd9o7k7bTpvErrugdbLQp4+6OKDjqlZwfDauh LauBDSSrA/nSNSQ/7FYsgJI5uaOxvFreUFe8JJwMGVeZ0/BaVqvMtdNv4XuypTiXiDR0 AJBQ== X-Gm-Message-State: AOJu0YyA/+EYFcWa1a45XlyFuPzf5dPVlMxQmgPNXLEqSQMPf2lRm5BG re90mT72f4ZvFk5GwrUGrZQaqs3i4cB20WPXkSpmZkHPe6Mu88rbYmwSLQSxuWDH7+GH3rGVI7d t7Q9E+f2QK0LCBf/2Cg== X-Google-Smtp-Source: AGHT+IEd2aHrb5NkrrBlEoHDtMpEDioA8uFicuIXJpZO5WFmKYX6kDMfylQzv42mf+aiELHL/3qdX29f5o5sJxg= X-Received: from wmlm9.prod.google.com ([2002:a7b:ca49:0:b0:477:9e14:84dc]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4f54:b0:477:54cd:202e with SMTP id 5b1f17b1804b1-4792a5ddbc1mr7612815e9.2.1764704315304; Tue, 02 Dec 2025 11:38:35 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:01 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2514; i=aliceryhl@google.com; h=from:subject:message-id; bh=NEo81OnYLoeIBTiu58i1f5sfqGYGea/teY/C42KXlDU=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AK8URMtIpbheqidlvMIeVO0gK24Qbdyvh75 GwClIA6TteJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACgAKCRAEWL7uWMY5 RuU2D/0WnwWgQZA9mqsxQSZ5+ysBzw7YAjhiHjpCxm8QP036iQNj420B/8MZXlJA6w8icApJGVa Tk4+jq10oOHx2tmzhJf2BYaCOpjNDKFCkDvaDujzXujA2Y4/5XutVnlYUxX+0deQltSVTXJCcWP YaurQT3hcT2i2cK7QsFwRyhlIYajhFvxACU0w6XRqiKIjN6Jywi/UfMSTbuL9g0BhM+EQ/e88MG hk2aKgwU5elQaKIACdToYOpcowYoddLeW0id0B3b7W4CN2Hpdk/NqKenEodFB0QDolVxqu+Qd5V osbEWmOBFlJLsPl9HnxJvtLdvm+GxNlKQSSMzBQDxgp8k9Czr7XwzXIkjGwNuxNPW+eppKqY2n0 kNbFCUiDidFtPcB1cOPIKYzRVemnxBzs3I3g62c9Pfcxe7nynm1chbACnJBLQ9EpvDxbZSY54YY v+La0mP+sTZK/WucAvfJII6tPT7fOUwpyOJFsKu2jPXPP416SCBTZHrgNRRvoRyDWLn4PsyLQYW x6f1ZVnPx6PQ8dZB473oGIke078H88l9YeZmhDfE0fTRJCwksdXEWZW+kFl7aRr+mvmtTgp5xjv Zcj5wUx/mj4VEJcgORBSI8FDqjcwLHvdNw0xD0aECCJbhs6jaouQlYmYZ5k9Vxh24zI2sG+JPnw fFmxFiCY7Xc/FCQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-37-a2e13cbc17a6@google.com> Subject: [PATCH 37/46] rust: security: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Paul Moore , Greg Kroah-Hartman , linux-security-module@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Paul Moore Cc: Greg Kroah-Hartman Cc: linux-security-module@vger.kernel.org --- rust/helpers/security.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/rust/helpers/security.c b/rust/helpers/security.c index ca22da09548dfed95a83168ed09263e75cf08fd2..8d0a25fcf931ac6540a986aa101= 87c345614fc9e 100644 --- a/rust/helpers/security.c +++ b/rust/helpers/security.c @@ -3,41 +3,45 @@ #include =20 #ifndef CONFIG_SECURITY -void rust_helper_security_cred_getsecid(const struct cred *c, u32 *secid) +__rust_helper void rust_helper_security_cred_getsecid(const struct cred *c, + u32 *secid) { security_cred_getsecid(c, secid); } =20 -int rust_helper_security_secid_to_secctx(u32 secid, struct lsm_context *cp) +__rust_helper int rust_helper_security_secid_to_secctx(u32 secid, + struct lsm_context *cp) { return security_secid_to_secctx(secid, cp); } =20 -void rust_helper_security_release_secctx(struct lsm_context *cp) +__rust_helper void rust_helper_security_release_secctx(struct lsm_context = *cp) { security_release_secctx(cp); } =20 -int rust_helper_security_binder_set_context_mgr(const struct cred *mgr) +__rust_helper int +rust_helper_security_binder_set_context_mgr(const struct cred *mgr) { return security_binder_set_context_mgr(mgr); } =20 -int rust_helper_security_binder_transaction(const struct cred *from, - const struct cred *to) +__rust_helper int +rust_helper_security_binder_transaction(const struct cred *from, + const struct cred *to) { return security_binder_transaction(from, to); } =20 -int rust_helper_security_binder_transfer_binder(const struct cred *from, - const struct cred *to) +__rust_helper int +rust_helper_security_binder_transfer_binder(const struct cred *from, + const struct cred *to) { return security_binder_transfer_binder(from, to); } =20 -int rust_helper_security_binder_transfer_file(const struct cred *from, - const struct cred *to, - const struct file *file) +__rust_helper int rust_helper_security_binder_transfer_file( + const struct cred *from, const struct cred *to, const struct file *file) { return security_binder_transfer_file(from, to, file); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 15B672E2DF2 for ; Tue, 2 Dec 2025 19:38:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704320; cv=none; b=LEKRFJZ0/0gDVziB0ULwo0Pwf2kmK6ia+koE2vFceABKU9TK1kla/vx1b6PJd6VE8sab6KEXzWDhVYlwEsBBzQdZXSDP/xCzGFBuNIAwi4FgDNGsYsy/J8EBG/rzOF1FblPK+bbe7074HXSJ1Mgh/5EzcTSpY/1HtrpuA7DrLhc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704320; c=relaxed/simple; bh=BcJjFBIrbnMCfL+tTdUx/9KtBovC7GXyFfHNBnYb/J8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=HnuO9kVdsKBwSijL5lp2GC3ZuWqxKfbdiNc4/9hKJevFv2x5l5+77wTwJxj2cVvZOtXN9visPNuMO+EaTQ8bVfDjQdYnYLgqTlnnPHRxhd+cweWMwgVvUaXiVrdTw1fKTWtA5jGWuZNx24n7QyB5Qf3Qb82Hlba/goWPepQf9Qg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=dBwhE69l; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dBwhE69l" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4779da35d27so68504945e9.3 for ; Tue, 02 Dec 2025 11:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704316; x=1765309116; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=JnRlSN3lcoAwyJG7Pqrm4vfFp8J4RfE+zA+Dlc8IdPM=; b=dBwhE69l0ri7vlmotibPXrhEycUqfvnuXkBFqI49xJNUUT+kPVg2WnEgdx6o2FFPd3 8uHLTW1HkABOHpuK6ikM3seenGJn1RWhE6sd0db03MjVH+iuIqMOoHDVlncPq3+UeiHE gTFtYN64ukbNdPzUHx98j+UZZBHbmyP4dFlcSpzfORAV5V/mVJPVmb+RrFR6R1t1tyzS C6wO4LNERlOOkHLoAp9QTttCp9oiNOWdhXN88eZWLeGQN8zKP0aIwfcd7WMBlW2Oh0JY wPq/IcbwHvqEnflNvVhJTO7Za31DZBbPtABgrF12fJZx3lyUTYHFvSqI7k236J6/SFwh mcbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704316; x=1765309116; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JnRlSN3lcoAwyJG7Pqrm4vfFp8J4RfE+zA+Dlc8IdPM=; b=SXJmVQvd1vSklpaRipfddu4wbcztVhPamyXFCZ8NBqFeIRcohjt7JMlIWe1bM4qCl2 uL2LsoeTpiRd4KiKk9o/uqlKW68u78rmZoCH+R8DCKFg5eW7vS4EyJMzkhxVVz4ZDnpP Fvo5NQOt8OxE1Ch5gKyWl+GSv97cQU5va+tvAZ0j1MohaSmjrul7RKY/nk6HNQTzLDaV sEQ2pZ1tCwf4308XizC2aSxrpSOYO3oT8Y5z7RjX0AUl6fUH89kJjMaNaj7+ChmYCKIx e3Yp3krNon7g0u9a/L/y7Q5uMGWulTkqdT3WMZouZamOJuG22iUqS6AMkuvWy2ZSBGOZ +Kcw== X-Gm-Message-State: AOJu0Yy37lXWwQxZH965T2i7ilQRaKcRd0ntpmxspctXs0++K/NwmTgC Sv84LHF6ikl+3iqSP2NBIyERSL/KAKMbIKplgGiC9MWKbucpQ5x5ggdgXcNTvleMHcK4XOOcpPu v74Zbr2bb5SVb0jX5Lg== X-Google-Smtp-Source: AGHT+IF3Mc3n09jK6zC18NIN5EfePO9fVy8GVae50srFlirv0oLPDOd3BU+lq2B9kLvdc/JpkYqBb3zsUZ1ykRQ= X-Received: from wmaq9.prod.google.com ([2002:a05:600c:6c89:b0:477:a148:c6bf]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c48e:b0:477:58:7cf4 with SMTP id 5b1f17b1804b1-47904acef07mr300551705e9.4.1764704316594; Tue, 02 Dec 2025 11:38:36 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:02 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1573; i=aliceryhl@google.com; h=from:subject:message-id; bh=BcJjFBIrbnMCfL+tTdUx/9KtBovC7GXyFfHNBnYb/J8=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0ALrxym/CbT+Rtp3yjFFGVsBVg4V6bf/mEnS WqrhwhFM3+JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 Rm4+D/9G+yVyFHcHjKA/A/hdrLXUxuemrQqGUmxPJI2NuQx9XD8NJLB1KB/knpnRZiTFkQKV4PY qADjp3kpPMfPRkPYc/a5mX3CMCTk3LYyBk/QJipWAmsrSf1mPBQS6hHPCn0222+o2a9AHZHuuor ynMkXcd3Zj/T/J4pwT7RT0iJbbrDwH1g9pD6pEJPIsuLTAGC4JUPfuQklyo8cTlwku/LyWLABj3 jUP7tpeUom5qoIXauZbfXg5DLy6wdYdbjhEwA0/O8snqJCMzMFwOddC3ZxqWjNvtAsgBmK9CqZb gu6BrvdyzI3oqIjfzp8YfOyMW/HfpUurMSMWeg0PNU61eihQgFZ8DBOGUpn2VppSGzALC/YoDs5 UykHVTjuVBZH6gTKB8W+bIuxr8vTDlEVYX4qJmokuF0Wp/Pa1ng/R9QpyyrMVb5N/xUfD3/0APL 9VNkiS1MoiWihP0mJm6SX6hCIldtcr6k0CjbO4SqtWZ0VJJ5z80wx74CqdyDZorw/pLx+50G7RC REqerMTRhJLGrG97NEL+524yBjsn3B9eUAJzmVmH6+NatwE9KB7BCNepIm3oZhC2+YTwYMhZMOF dIw1QbSdbDlQNyfZeWeg1XtqTG7D5BCrYOplen0YwMlA26lkMGZ3e9vjvhZ4HNLCn0G8ve7C7oi H2lCo7aidQcbb5w== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-38-a2e13cbc17a6@google.com> Subject: [PATCH 38/46] rust: slab: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Vlastimil Babka , Andrew Morton , Christoph Lameter , David Rientjes , Vitaly Wool , Danilo Krummrich Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Vlastimil Babka Cc: Andrew Morton Cc: Christoph Lameter Cc: David Rientjes Cc: Vitaly Wool Cc: Danilo Krummrich --- rust/helpers/slab.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rust/helpers/slab.c b/rust/helpers/slab.c index 7fac958907b0a7cbb28ef3a8a56e0cc10d39288f..970161023d8885935f2116fe819= 49d0ed622f9e9 100644 --- a/rust/helpers/slab.c +++ b/rust/helpers/slab.c @@ -2,16 +2,18 @@ =20 #include =20 -void * __must_check __realloc_size(2) -rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigne= d long align, - gfp_t flags, int node) +__rust_helper void *__must_check __realloc_size(2) + rust_helper_krealloc_node_align(const void *objp, size_t new_size, + unsigned long align, gfp_t flags, + int node) { return krealloc_node_align(objp, new_size, align, flags, node); } =20 -void * __must_check __realloc_size(2) -rust_helper_kvrealloc_node_align(const void *p, size_t size, unsigned long= align, - gfp_t flags, int node) +__rust_helper void *__must_check __realloc_size(2) + rust_helper_kvrealloc_node_align(const void *p, size_t size, + unsigned long align, gfp_t flags, + int node) { return kvrealloc_node_align(p, size, align, flags, node); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) (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 1C8FE30102B for ; Tue, 2 Dec 2025 19:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704320; cv=none; b=S/w3N3YOKiw7CkkLtJQYhzKHG4t8ZQfbc1vzRXJzqntha+syTQPNpOzh8oqQRBjAp1RScswXvC+FGED/LCfVlK913hU7LLcOSS++9JdVGGxkoZLcz+CsWWwpx4R+plc4M+o4rOXNhqYwUvvvG1OR6uW11dkpnCJjeZX7/sBIPmk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704320; c=relaxed/simple; bh=9sd35dLjfBIr4ySTscB92KQs0hjfJ9K08rqyCMh11R0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=HPg57ZDC+G0249Hsskv/GH0plKsEjVdbYBPOx0xnXnn+zHmTnXKPk0+3dbJERWbcQ7YCAbylXZLEwSd1gua/X0wr7SZXB7VZpfiaHOunqCTujSIkdtX+cTjP1wpF5qKhMYT9uME3rfjHgw5xWCmbGloFOTE1/CfevWorwA91ET0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=VjrIwbVB; arc=none smtp.client-ip=209.85.218.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VjrIwbVB" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b735eea0bddso468303566b.2 for ; Tue, 02 Dec 2025 11:38:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704317; x=1765309117; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=BcTtAwcIUdoQIiOTydVG9uZu0V4P1X92ytgjA3f10BE=; b=VjrIwbVBPQdPS3zCrXkwMv33/2BMk79s+FfZ/E8NRiB5MxShZYth+vYNYTIL2tVv6T UeZTpe4dhep+66rKfyxWtnMidUdV5JvKPC9DLJPV447RNHGFA0WTwR+TxZUra9fslYLc CP5OmFMmE9KJ3tw4GsHG00VlGJwOYNZmiN192C7Y4DK2zqvjD4K+mTqfvFevlc7z/EMl A8ZGW/eRmioyVF6dO8H9R1ZcHuQ8hR+zJumPyRX4ivXzwOO6SUa0Cmz6W3VIp6Y4QhAC HIYRFBXOjhOJBBwGsYWIEcGayFJ+CXaDFbOzYQ1+PPf6xEwcpQjGf4yAfchw/qNxInj3 NxXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704317; x=1765309117; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BcTtAwcIUdoQIiOTydVG9uZu0V4P1X92ytgjA3f10BE=; b=goC3X7OdMQXY55oD4sB3/LFeeq5bunS/4i0BtWOdg0iuXLZtm3vyFpCmvlmB8hbu70 zx2nFMJZzHbhNSgfS16wAGUEHi2MYhpaN8NnIRRGcGK3Krn54AGOaRIvvyeMUP9V9CcY 3lwWtbnCXYYnDaoxxO99R9wjLSaly6O0RIjFzscpetnpjlSp3von2mV+3zpKDOne7C8Z SDQHul8YW8v4YAiZ8uTdDiCwGwNmCfrjmxRsVqJLpAlnqf+rKQKgZ4Q1yjstsgdEXBiH uyEOfiog4hevDMff1E/X2MMkSAEfycrZFUf0Zhj4LzwbwILkJZBKMIV9i1JG/nleWKkf 6yrA== X-Gm-Message-State: AOJu0YxhEEo8dvnFnBtmRUBl8FXi5R0i5ux8JL7lZInMP0QgLZ+SH8Dh z72G35cbABmml3+BjvTS5wMOC9Aqq3leR8BlTRFcn2q7Yb8O1s5XUhgCZCNiaaaCiV8GZqy6VP9 FIxipxe2OFHnU2mY/8Q== X-Google-Smtp-Source: AGHT+IFx8QUiRueY0SUcnLRlCKX1GgoenQ+z+9TsVrAIG6VQYyC2OT8A4BtrIEIJyfslJuVypkcQKxxuZt2+Wzo= X-Received: from ejcrl22.prod.google.com ([2002:a17:907:6c16:b0:b73:6fbe:a15e]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:728a:b0:b73:8d2e:2d38 with SMTP id a640c23a62f3a-b76718ba73bmr4763116966b.50.1764704317658; Tue, 02 Dec 2025 11:38:37 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:03 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=3754; i=aliceryhl@google.com; h=from:subject:message-id; bh=9sd35dLjfBIr4ySTscB92KQs0hjfJ9K08rqyCMh11R0=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0ALY7CC84fe2jOMgOdOpe3kwEvaxpWHppCWj nxPnGhkIVaJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 RgAmEACnn1+0gHmj8o9AQH30HSt0Y9nJ2a4rjg7INu0yP5tL380pnhyRJZshrwufQqH0d0DuNRw PSiQo6QvjSVCPjBvLrTcLrNtpdyDjYRsmR1B7PhWIeU8LamfDtWKzo28/LFsoQSHusrtKbViWPi gAn+IJvmlnZwp1GATVDiDq1xXh+3jcxS1j7gIpqfybC4vCYvI1Xq5cOj0zRz79PG9+AqY1mIe9/ 9AZj2N7mEePSiusMhE2vwvGFazatSteR6+Zgdh3o/3VEHrYcngxpink3uMXRfvk/XfrgPRE+6c8 pcUo5CZcM9NCe9NeE2+KUPmYeB78rgjvNlJ+wMQ+cLl8J4gNp22+uXY8x7CaigZbOBwC2GK6MsH LTxXJYi9gKyjltl5N1Gzi507hjHoPgRTj+Tmx/1PaHO9v/hz3kMZMt05dVLXhZ7JdqyGGjZvL/g oTVj6RBQWXt0mnLpZRTgVpTpfe77PzFV5/PP3M+9gqbVgu/ndXQ0DEmmKBMeGGTPpXr8TMcIymR cV8TRdHplLpCKStdFxni9Z6mQMeS4YTububLo7m6BLFp6LZ+r5w7XzsP+kZpDhlDWhoeqjVE2Nd hQEF9uIay0s/DU2JzW7uYZz9enEOdKBNV6rHI/w9MLjmPKJGDlVZ2R37tr48M3OcMyv5u9mXUpo d4YNdo+gOEPDceQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-39-a2e13cbc17a6@google.com> Subject: [PATCH 39/46] rust: sync: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , Mitchell Levy , Benno Lossin Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Boqun Feng Cc: Waiman Long Cc: Mitchell Levy Cc: Benno Lossin --- rust/helpers/mutex.c | 13 +++++++------ rust/helpers/spinlock.c | 13 +++++++------ rust/helpers/sync.c | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/rust/helpers/mutex.c b/rust/helpers/mutex.c index e487819125f0dfe0741601205e8f84d322c973d5..1b07d6e64299d509bc3ce1af99b= 19aa97b721fc6 100644 --- a/rust/helpers/mutex.c +++ b/rust/helpers/mutex.c @@ -2,28 +2,29 @@ =20 #include =20 -void rust_helper_mutex_lock(struct mutex *lock) +__rust_helper void rust_helper_mutex_lock(struct mutex *lock) { mutex_lock(lock); } =20 -int rust_helper_mutex_trylock(struct mutex *lock) +__rust_helper int rust_helper_mutex_trylock(struct mutex *lock) { return mutex_trylock(lock); } =20 -void rust_helper___mutex_init(struct mutex *mutex, const char *name, - struct lock_class_key *key) +__rust_helper void rust_helper___mutex_init(struct mutex *mutex, + const char *name, + struct lock_class_key *key) { __mutex_init(mutex, name, key); } =20 -void rust_helper_mutex_assert_is_held(struct mutex *mutex) +__rust_helper void rust_helper_mutex_assert_is_held(struct mutex *mutex) { lockdep_assert_held(mutex); } =20 -void rust_helper_mutex_destroy(struct mutex *lock) +__rust_helper void rust_helper_mutex_destroy(struct mutex *lock) { mutex_destroy(lock); } diff --git a/rust/helpers/spinlock.c b/rust/helpers/spinlock.c index 42c4bf01a23e4003ea82c65b16bc8f495ad37750..4d13062cf253e67894aaa9ba968= ff381db2c651e 100644 --- a/rust/helpers/spinlock.c +++ b/rust/helpers/spinlock.c @@ -2,8 +2,9 @@ =20 #include =20 -void rust_helper___spin_lock_init(spinlock_t *lock, const char *name, - struct lock_class_key *key) +__rust_helper void rust_helper___spin_lock_init(spinlock_t *lock, + const char *name, + struct lock_class_key *key) { #ifdef CONFIG_DEBUG_SPINLOCK # if defined(CONFIG_PREEMPT_RT) @@ -16,22 +17,22 @@ void rust_helper___spin_lock_init(spinlock_t *lock, con= st char *name, #endif /* CONFIG_DEBUG_SPINLOCK */ } =20 -void rust_helper_spin_lock(spinlock_t *lock) +__rust_helper void rust_helper_spin_lock(spinlock_t *lock) { spin_lock(lock); } =20 -void rust_helper_spin_unlock(spinlock_t *lock) +__rust_helper void rust_helper_spin_unlock(spinlock_t *lock) { spin_unlock(lock); } =20 -int rust_helper_spin_trylock(spinlock_t *lock) +__rust_helper int rust_helper_spin_trylock(spinlock_t *lock) { return spin_trylock(lock); } =20 -void rust_helper_spin_assert_is_held(spinlock_t *lock) +__rust_helper void rust_helper_spin_assert_is_held(spinlock_t *lock) { lockdep_assert_held(lock); } diff --git a/rust/helpers/sync.c b/rust/helpers/sync.c index ff7e68b4881011ce0aa9beb2df14bf0ffd147337..82d6aff73b04f0ab1030bb5170e= 40ed6ccac41c0 100644 --- a/rust/helpers/sync.c +++ b/rust/helpers/sync.c @@ -2,12 +2,12 @@ =20 #include =20 -void rust_helper_lockdep_register_key(struct lock_class_key *k) +__rust_helper void rust_helper_lockdep_register_key(struct lock_class_key = *k) { lockdep_register_key(k); } =20 -void rust_helper_lockdep_unregister_key(struct lock_class_key *k) +__rust_helper void rust_helper_lockdep_unregister_key(struct lock_class_ke= y *k) { lockdep_unregister_key(k); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 8349631280A for ; Tue, 2 Dec 2025 19:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704323; cv=none; b=SIgIOO0UusypTLk9b0g1JxmwI68X86s1WOpJKAxJxVryLUncAtHRQUPlWaHYMlbdGuoNyd8JiZt+ie6bgfB5IgV8pTu9ReTQjN2/ptuvyd9LUJ6+d3C0oWWPyXuOdWWBoXfR5T7qlcKShYyWMlIoFxu/f7QitA13jADjj8ptJHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704323; c=relaxed/simple; bh=fhl2/L8d37xBi9+kQctstqXrXpvPTlJstd1hr/eEYas=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=dYWKFrBnGy5gvPapvznRGvkOOr/J+bAjJdmx+Tmog0u5bobOXZSrIU1axDBspD+iLYtG1GsOPh7FKAuqJNecbl7cAW3QPQxk2iXTBEh2mro/b8oZtbNxjPMTb9t1Dy18O1rqWTIMrAOYYfeeJgQTf8fzDDgM3JpuYbbA7wisjbI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=4CdjiG0f; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="4CdjiG0f" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477cabba65dso34681685e9.2 for ; Tue, 02 Dec 2025 11:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704320; x=1765309120; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=5OjswDPS0SLEUD22kwMsB1RpbvmlCyv0yd+mnCZz5cY=; b=4CdjiG0f7KKscTBCGBMsBp4Ro+VxQv1Y/lucZ9PgoHw9RX3PynPwNeBGNlY3CovULU RIjmhpLy1ipmfwVw0248x05VayCHzVyhERODEUcchk1bpTxulQW/h9Iqf1BSXjaHxndK yfzUOVzdvMC6zLgg9E0FearoB/xwI9I7ssrUKK1RZ9m82LFV2t+/HklcTWF3aNh3368l FinomYiXXHOIOaDfMtj3XcJLhs0fPA/OZbmJ2GZlYbh1awbpNOZFoO9JMu51Djt0/Zp7 dPgR2uEt5vCHD42rPkIgjeO32HDuQmeNJeyn2NrG3+El8SUT09uoaJWEH50xVUaVL1PT +Auw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704320; x=1765309120; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5OjswDPS0SLEUD22kwMsB1RpbvmlCyv0yd+mnCZz5cY=; b=UqCh3uKnogdFHKXfHxjPDV8OUW3rLL/Wx8Y6JGaTCZfitS7eOlCRvnr/PrVnqTUYJo naLishVGSVkdO9oBrAYxAHqMDSTwZALyQigCWX9ADFpgn6mHu+o4Sg1W7RMGeb4dhdst TaMKNZUDtEo8WxXB1YGYY6B/N29GQ3+H0f5stbok7t9tli36OVhmCkkC28ZuRf2qJtCe DCG0vv1S2auoMKJaJxdcGK+yy/b90pCV5+hoNg0e1ds3uLfDgYcV34zv6P+g9QJii0IM /qFh64kJP10fXJ39WfcLLzB7xyqHRIkZb55/xbvIpOzBitzIhLMPg9VrQldoKWQ07MTr 8jMQ== X-Gm-Message-State: AOJu0YxRQGQufEIr5DwsCqyuYTqFpAFhyzLQU7fqe3D//5iqoLHjNnvb ploaERUreWZxN2RjKZDfFaF5A6vKJbFSSrKl3jJzbYLsGlPlhae8SUhNvp5Yfn7bWsnjbO/isLF DZHapzO2l5Ch+Vq2Xbg== X-Google-Smtp-Source: AGHT+IH3IsNLxqVIjDsd8SX6LigRSR5jleDESEUf+lfOqtR1Qszy2ph3i0V1SbAjmB+T48mjcdigZszxhQtcWRo= X-Received: from wmxb9.prod.google.com ([2002:a05:600d:8449:b0:477:9d88:de81]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a7b:c857:0:b0:477:9fa0:74ed with SMTP id 5b1f17b1804b1-477c01c4d6emr308335215e9.26.1764704320104; Tue, 02 Dec 2025 11:38:40 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:04 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2996; i=aliceryhl@google.com; h=from:subject:message-id; bh=fhl2/L8d37xBi9+kQctstqXrXpvPTlJstd1hr/eEYas=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0ALE4/ozza32VHggOa8E2TzpS6ahFD7YWSBX KjidaIPDjCJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 RsjoD/oDFLlm/qNC48G1XnC1y3Dc+mvnTysw2z/2b0sVZcUXdJRgW0qkc57SsPqw+C3qenCmKot dTClk6SjRoQH9ReFezOs0tJq/pzuT//9z9NYg86CwhMzO/HtdJebaP51YO1R6OAU3f774KKWec0 Sc5uE71FBaiYHmjVNX+PnC3Kb2WyiepQkL8zMnLkbeOLNEpg7lzW+Sc4SBCWwPF5yabt3YnFlbJ 1TTbANQWWO4ihFPheYJBZ57UD7/toKocUsyIDrDQfznuu9jbXH7Ki1xdr9djCW0qAD1ucIGZeM2 uS4OXAb67WymeIGWqe+rcT8A1MoSu8UrN32jJalqk40rEFAQK6ch7xv89r00cKWTFgjgtGY6wW5 y68L1QU+1adblZ49fjaRo9BiTUkXtyouMyFE/OS6sHrd2BO1KXWYcmOU5eKG5RzSZsaoGOBjM2s UufZG8crGsg4YIUAWgmzcoE74GwBhLO2Djg03nP9R/Q6YB6oonxdB4HWwMBpNKeKvJjjHqNDFJz 4fZ2y06n1Dn/XtcmMYIiyqxaikS+vD0+XirflkI4LgmpP7xzIkd+AFCyQp12paKyGFalgcT75Wh thzGVbOispm+T7LeLbXenlEAwzpxPoI+BIAyszOTd30BY1f56FdgpswpaSHEUlKwFrx1z08uW8j VHJ5fm+FpFME24A== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-40-a2e13cbc17a6@google.com> Subject: [PATCH 40/46] rust: task: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Boqun Feng , FUJITA Tomonori Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Boqun Feng Cc: FUJITA Tomonori --- rust/helpers/signal.c | 2 +- rust/helpers/task.c | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rust/helpers/signal.c b/rust/helpers/signal.c index 1a6bbe9438e281cd8b61141a390cea042949e7bd..85111186cf3d77508fefac9407c= 87c5f000d15cf 100644 --- a/rust/helpers/signal.c +++ b/rust/helpers/signal.c @@ -2,7 +2,7 @@ =20 #include =20 -int rust_helper_signal_pending(struct task_struct *t) +__rust_helper int rust_helper_signal_pending(struct task_struct *t) { return signal_pending(t); } diff --git a/rust/helpers/task.c b/rust/helpers/task.c index 2c85bbc2727efedf5eb61fe496cd80598fafcdd1..c0e1a06ede78c0b0641707b52a8= 2725543e2c02c 100644 --- a/rust/helpers/task.c +++ b/rust/helpers/task.c @@ -3,60 +3,60 @@ #include #include =20 -void rust_helper_might_resched(void) +__rust_helper void rust_helper_might_resched(void) { might_resched(); } =20 -struct task_struct *rust_helper_get_current(void) +__rust_helper struct task_struct *rust_helper_get_current(void) { return current; } =20 -void rust_helper_get_task_struct(struct task_struct *t) +__rust_helper void rust_helper_get_task_struct(struct task_struct *t) { get_task_struct(t); } =20 -void rust_helper_put_task_struct(struct task_struct *t) +__rust_helper void rust_helper_put_task_struct(struct task_struct *t) { put_task_struct(t); } =20 -kuid_t rust_helper_task_uid(struct task_struct *task) +__rust_helper kuid_t rust_helper_task_uid(struct task_struct *task) { return task_uid(task); } =20 -kuid_t rust_helper_task_euid(struct task_struct *task) +__rust_helper kuid_t rust_helper_task_euid(struct task_struct *task) { return task_euid(task); } =20 #ifndef CONFIG_USER_NS -uid_t rust_helper_from_kuid(struct user_namespace *to, kuid_t uid) +__rust_helper uid_t rust_helper_from_kuid(struct user_namespace *to, kuid_= t uid) { return from_kuid(to, uid); } #endif /* CONFIG_USER_NS */ =20 -bool rust_helper_uid_eq(kuid_t left, kuid_t right) +__rust_helper bool rust_helper_uid_eq(kuid_t left, kuid_t right) { return uid_eq(left, right); } =20 -kuid_t rust_helper_current_euid(void) +__rust_helper kuid_t rust_helper_current_euid(void) { return current_euid(); } =20 -struct user_namespace *rust_helper_current_user_ns(void) +__rust_helper struct user_namespace *rust_helper_current_user_ns(void) { return current_user_ns(); } =20 -pid_t rust_helper_task_tgid_nr_ns(struct task_struct *tsk, - struct pid_namespace *ns) +__rust_helper pid_t rust_helper_task_tgid_nr_ns(struct task_struct *tsk, + struct pid_namespace *ns) { return task_tgid_nr_ns(tsk, ns); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) (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 261F930DEDE for ; Tue, 2 Dec 2025 19:38:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704325; cv=none; b=qB/M3Ffpbuz6HmADtbp+Bu6otaTgRckD4K5Xvt3uUUHf/Ksw01QJEbk8EvCoLBnsGSDt9Lv9dVRq6D6UL+U4icKtTZq2ztQlvXUOJxDkhb4e+j93zqaiQEL2dUOgmENyHYCADyHyFFVuMcsYxQ9O1AnZCIkU+m255qv5IDSvuPg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704325; c=relaxed/simple; bh=b20MU/D0uYth/K+R2p09y0xD9pG7LXGVYnU/nzsG5Ro=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=efXT0lyu7HvFn0MedWQsyP+orz6HHCWMk2NB23JztHAmpj8NSSf7KttdXhIosAQAdlXpzLLGcI5awkcrRvR+tkKey9XjA12QsOeA/PtJsg2eql7Bz0x73dGAigyvNyvh5HWtx+wUG02B4bD0EFLlHYjuiz51Xugim4qlVGMZrnc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=HCt8gfEE; arc=none smtp.client-ip=209.85.218.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HCt8gfEE" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-b79c794cd38so172139666b.2 for ; Tue, 02 Dec 2025 11:38:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704321; x=1765309121; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=N9NCtCRRCoHT0Tb2Skyi2ibvc0P36h0mQDw8/9oRMmc=; b=HCt8gfEEbAwnzTtkTYnTDcMY1su8NnekhBKEEpx09R1eibGpkJiwEphc4ewTb0rGAJ 4qgVicrXT8K+ZYhQQ2GW9W0BKYcw02UDFmEqroTyMc+AzJ98hwMvZ81XtacqUh16Axm4 BAkKRIZ5EO42hjt2wSFx+9x8wmjHvR6J/OYmTS/HYLJThK2yKnxEgTn4JSLagnh1KsTr pqMH1edqiWBrROu7w9Fb3BiYAikdufJOijKX/S5eb8fgyP+G5LAwSZ0cn1O4LtRrR0kq x2b/5daPcpSWjHuBkM2/IG60X/wztVroIL/KpZYN82f+HFEEzYGGKGN/v8seNDzT6xly Gx7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704321; x=1765309121; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N9NCtCRRCoHT0Tb2Skyi2ibvc0P36h0mQDw8/9oRMmc=; b=PPVQCCdrIV+InGjz4iMN9WbL4ekKnAVkfjg34k0Zof7dV/lTSJJlof2q2iUTrCjveg tRoPwxuD5rR32Ould9uq/1K+SYRa7T3Cc2LtpNweTEDw+4Z+8kevQoC6w/jKcS/rJw0e nJ4kGz828ZTafUkEDMug9kI623qqUSb0LEDhaVz5E4VpCHLKk3oDf8MnZ10atsarKYeb tllfVfbhxOov4sZoci9CQz1+hjkGPsuor1Pvoae8OqwwUoNYIq/GNLT8l+RrFHHhCld5 kfNwAbQypM8DSp4oqulNbm9gBo/XnaZ9Gm8QFuuqxzXLA+p/wZi8lt/nPwD/tZCDMyBW Z+tQ== X-Gm-Message-State: AOJu0YztmeNSx/HylPru9uKGO+ET5/j1/b3cQWbAyQfiht+FG11IozaK gn1iEEAQd9Q9Bb1d8fuZRD+5IrVNxIW7+Ih2rWEjKri5+iP/2xU78Dj8Wowz5WJIisBoQqno1a7 Ih6wgOLZQJGk3AWwkEg== X-Google-Smtp-Source: AGHT+IFsRasJS8qn931/253KKhOOflSxIWSYontwI2/HjLoHyUZEtuD8JGptU8meLxSoNv2AacCPouUWr7QX+jw= X-Received: from ejcvc12.prod.google.com ([2002:a17:907:d08c:b0:b73:6e68:83b]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:785:b0:b76:3b3f:60e9 with SMTP id a640c23a62f3a-b79d11e6678mr34606666b.45.1764704321512; Tue, 02 Dec 2025 11:38:41 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:05 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1858; i=aliceryhl@google.com; h=from:subject:message-id; bh=b20MU/D0uYth/K+R2p09y0xD9pG7LXGVYnU/nzsG5Ro=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0ALgkdgLbqN6LRscofluGzJKNmTI/W+l3c2G MMClFnlzWiJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 RmtAD/4s4kPCCbMwESEaBvAg7VDrDubcVtX95tAaNPvdmn5wjw+CX64PoMG+7R5/FDqSoZvEXZE ChbiEMKAnPAuMG4DXUPGSWvrGod9kxgsgG8j85unfiTd9rKKzaaUiR+OTfZhtCxNBu9KlSOiSVX 8j/2m1LntQZ+wJORFkpuuvjPGdg2As5pon+iCXuL0pL6GZBgthzE/5X5RoDmFqrfcurml86K9R0 AoZvwm+gnvAgt47oGRa5IjjAXMMuwvGnOHKddg7WC6YCTnhMuXqpDm+Ayt6Q/Yus/Rru0/vG6D9 ZlxzW3yJ7FXl2ATAnzIxnNJXschn3+1Ih8PUZh7i/4VCSDa1SjoyhQB7KY9wXW04Mx9HCZa2k/0 pmsezrgd/Si6E4NpwxOb8ONCJkzhyyarx9mshfCZ6jC1O3eabCf6ETvcT68mVcgIoh+w5KU79tv StAKB/+jgCzGnqmenyhLiEfCKndlcTV2Pd4fQa4QadmutoKMZVhKi3E1ThNHF38scCH9SXa3jfN gQBl6kmvbLiVOf49fvz6iAc/eKKyJnHGOf+2X2GVl6cEsJ+xOXY+tsUcjS8kF0Qv/a4ykFwn1Dd jLzkWfArdogr9MWvMF3sK0uN0aqNaTbejX2DQsXjwsJyvxNQfm6OOtY4twYm/JAr61q79XQB1Ul OU2NHk20cP9Tcxw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-41-a2e13cbc17a6@google.com> Subject: [PATCH 41/46] rust: time: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Andreas Hindborg , Boqun Feng , FUJITA Tomonori , Frederic Weisbecker , Lyude Paul , Thomas Gleixner , Anna-Maria Behnsen , John Stultz , Stephen Boyd , Fiona Behrens , Gary Guo Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Andreas Hindborg Cc: Boqun Feng Cc: FUJITA Tomonori Cc: Frederic Weisbecker Cc: Lyude Paul Cc: Thomas Gleixner Cc: Anna-Maria Behnsen Cc: John Stultz Cc: Stephen Boyd Cc: Fiona Behrens Cc: Gary Guo --- rust/helpers/time.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rust/helpers/time.c b/rust/helpers/time.c index a318e9fa4408230881eed047154e30eb00e3cb6f..ce394641b17c371eb9b52dd1a75= 3c04efd975d2d 100644 --- a/rust/helpers/time.c +++ b/rust/helpers/time.c @@ -4,32 +4,32 @@ #include #include =20 -void rust_helper_fsleep(unsigned long usecs) +__rust_helper void rust_helper_fsleep(unsigned long usecs) { fsleep(usecs); } =20 -ktime_t rust_helper_ktime_get_real(void) +__rust_helper ktime_t rust_helper_ktime_get_real(void) { return ktime_get_real(); } =20 -ktime_t rust_helper_ktime_get_boottime(void) +__rust_helper ktime_t rust_helper_ktime_get_boottime(void) { return ktime_get_boottime(); } =20 -ktime_t rust_helper_ktime_get_clocktai(void) +__rust_helper ktime_t rust_helper_ktime_get_clocktai(void) { return ktime_get_clocktai(); } =20 -s64 rust_helper_ktime_to_us(const ktime_t kt) +__rust_helper s64 rust_helper_ktime_to_us(const ktime_t kt) { return ktime_to_us(kt); } =20 -s64 rust_helper_ktime_to_ms(const ktime_t kt) +__rust_helper s64 rust_helper_ktime_to_ms(const ktime_t kt) { return ktime_to_ms(kt); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) (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 6E208312824 for ; Tue, 2 Dec 2025 19:38:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704326; cv=none; b=Lu/WkqMN/xYw+xBZxcrk5MFh6xTBCiI3GMq1Cd1qTdnPsqZvu6RrM2ZMfNTsqypRJXAOS+ORkuzC/msSeagmmQgTrWyDj/0IwudSgMBotSSfTNlcDikGS1sEPZ2lETn9EvlnGXQT0n8hNIh0UMPSMOM6PKg9Q/YHQLgdMROGGJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704326; c=relaxed/simple; bh=W95WCLzYMtinxTFTp5aqVioi68i+yJmNYvcw3Nqt62Y=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=NP+dW8BaoIi2iBfnPq0upnrftxsK/4XeGdaehCFQyy07HIZARbaFcaCYvpk2sq9snp7wEGiWjqXlHdGW5Yl/DPmrZzFcf5U9TRHKVRT/1vV0nyJG6TE8SmQ5pjr2To7VEqatpcOeLtlRMs5j8kR0M3ggwJgrgIusohXdne20AxY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=HWxDHUVR; arc=none smtp.client-ip=209.85.218.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HWxDHUVR" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-b726a3c3214so405750866b.2 for ; Tue, 02 Dec 2025 11:38:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704323; x=1765309123; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=ucl/A5VuIe19EvFSp7fD3FBbP6dyaHWUTjLGc7wy6Qc=; b=HWxDHUVRW6LRKmUe3Hh3zDScNaVIqgtDZQk3NJ2oqNmA2wqpD/bcnOovwOx/iKPKdb 6zQRSELO43L3Rg4vTykWZEUkXZhcS140aZVCX4oQrOe3Jn23876iumDESf6D38NPumiN GhOva9mK//PD9Ye86copQO6cEWjqa/tEYEbAyDaiMVwRkdsTN+MXqhPT0iD00D4EaMfw P6X4IVUpFYhWEBcoBsQeQbvWVCEO7IWLyIyCdMk5/+rTcEokI6cmODO4nnPbcS+a8l5m 40Obvvsff3r6ufWhBbNWyJdxrmgn2FVEtixa/y0Wkl8vmP1EMtPmuJ8XSzKe3ALkbJM3 jBpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704323; x=1765309123; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ucl/A5VuIe19EvFSp7fD3FBbP6dyaHWUTjLGc7wy6Qc=; b=KO5wNs+yUhho/KIqNhrl5nuacFEUyzjCYybrJtOfU/EQ6+MkqeOQsqawbFWAvCN+KV h5u5qWupVXSE+KlhqLqBH+Dy3FIZjr2CqiYknUbo4pPOayyC0nMcv8LdfUeJU/IpGBDc 9OlOGakxciNfp+Vc+uDi4J77cpP68BWNxJFO4H5vP4H/0Pj8GHEUgvtLfqdPJ/kqCANh tVn7hrZGIhJyCVMxOHcLW9SX2aciTpeK1YqzgNdgP8YlkI8vq2xYN3e12Zt6r2/HtUfO vP54BMMMnaL3rF6/LX9AWfq1IGzTzX/7YHmJUbNzvAluzwB/ge+5PBf3Cn/YnOyn4zKV mHBQ== X-Gm-Message-State: AOJu0Yy+AXNevSBCes5bWsqTQnuhXjS8vuSyKeQdkQzmGhIaBtJT/t8A G03cJD4skfFT8bJREUpS+QbkHq59GqbsZa9JUCmil/9g4HSg/au6ROd4hS7dK5XbPFDPGnOPA2S sYHHrX1MhKNy92XUR8A== X-Google-Smtp-Source: AGHT+IGSfLNEmJsBEo0VtOw96b9zkGxTkLhBS1RIWi2gH+uM6RF0QQD62Vyv+IarA0bk91PVktiMmf3pPtkhs9w= X-Received: from ejcts13.prod.google.com ([2002:a17:907:c5cd:b0:b72:41e4:7557]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:72d2:b0:b77:1233:6f32 with SMTP id a640c23a62f3a-b79d11de4e5mr35988766b.48.1764704323018; Tue, 02 Dec 2025 11:38:43 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:06 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1094; i=aliceryhl@google.com; h=from:subject:message-id; bh=W95WCLzYMtinxTFTp5aqVioi68i+yJmNYvcw3Nqt62Y=; b=kA0DAAoBBFi+7ljGOUYByyZiAGkvQAuiRj25WhDfH68/x7ja9dBraRpyh4J39QjG+gEMVaUYV okCMwQAAQoAHRYhBIOSopRNZAcK8Ui9sgRYvu5YxjlGBQJpL0ALAAoJEARYvu5YxjlGM+0P/ixJ yJeGrODC+O24NSj3rpf7I3+AXZWPCdD01cTGGr+acEjsS7B5BJWKQFI1jc2fq1/K9NYAUSMlczs CnqF/XvhpiSPjJkTLaxJvycECMwxVAs+WS8WNzQWeb2QqKsJgWjQe1iICtVYUBGQYx/o+XmMdsJ l790xUytlHL0VEbrzrGKmvPGF1eI7MiYilNNO/i6funkdfjxG1Z8DMySlD+NBj/fyZ+swH52IMW 2ANjEYRuMVIY161X4uA+9jmXBip5g/e9D4BnNUv81I1m7GaF5qc3N2kIovVX9DkYq5NrJyGq9Jc 7EYmfSYLWnTsiQK3gR57saH9AsLtBoR1uvGf3kl5uMWKhYLkLWARJa6yElyCowdtZRlsvCotXct g+8KTL/T+kJVuXr+UfNVFgnmt0ZAh4A3w+eAVInxlX5qkjZ63Dus5vN+R38HSCTeMNoUaQ5+iU6 PgopftyxJCAKhMWKXlywjMSDqn6UPsGSKhiI0wKeXsmWM75wqEpodWzhJNGsbd3aDmPo6+a95u2 g13alHiCv7AfV40x0YVeqOdXHFQ+wUAL1MlM0N4j1vYP8+++yXFTdFrNi7045s2sI/wNDcYpe7t ksglta9q7LOzQnW2lsn7ba8JFziCn8lT6CCNWYXNsUvUrMtlaud+uQy7VhxYcKde29aJnx058RU ZRAMw X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-42-a2e13cbc17a6@google.com> Subject: [PATCH 42/46] rust: uaccess: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Greg Kroah-Hartman Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Greg Kroah-Hartman --- rust/helpers/uaccess.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/helpers/uaccess.c b/rust/helpers/uaccess.c index f49076f813cd641a55b3a083ac3f7fbcdf53abb6..302e06d264360ac7afd255f434e= 2f3f8848a5424 100644 --- a/rust/helpers/uaccess.c +++ b/rust/helpers/uaccess.c @@ -2,14 +2,14 @@ =20 #include =20 -unsigned long rust_helper_copy_from_user(void *to, const void __user *from, - unsigned long n) +__rust_helper unsigned long +rust_helper_copy_from_user(void *to, const void __user *from, unsigned lon= g n) { return copy_from_user(to, from, n); } =20 -unsigned long rust_helper_copy_to_user(void __user *to, const void *from, - unsigned long n) +__rust_helper unsigned long +rust_helper_copy_to_user(void __user *to, const void *from, unsigned long = n) { return copy_to_user(to, from, n); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 EBB6331354E for ; Tue, 2 Dec 2025 19:38:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704327; cv=none; b=WenVf7ndjCvDOZOlMEJ+2b1jtRjY990a2WR96UDgnNcZyassIrSQGG5e/054wDmvZNXjuaG54g3ifxycLQ90scJvabCVWHEZBrzlI94j2WJheDEepNoS7z1h8Rsr8rvT2CVymHiPW4zQ4/KNNhCv8Na4ONV3EwtOcLs84oYQlvI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704327; c=relaxed/simple; bh=+VIXiWvrLLUPSr9F++6Z7/xQPHblhODET0SGWnquYuk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=WJ+p14zpWUFfrHEmcAAwnWTWJ+kmPijEt/3PU7Ln6RjNZmxYLzZ/1DdpQir+/cABCLMUx7Zu0pAu/z2tjlEt0W5UQgk+oFaQesaSeDgDtY4ts7iyvVGj2fN1S2dFxTT7Eg7SwtpL/tpxAw9yp9vDyIekhgB3IyqTnEdcRzm0hRM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=mpWOm+Q8; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mpWOm+Q8" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-42e2d5e833fso1691209f8f.1 for ; Tue, 02 Dec 2025 11:38:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704324; x=1765309124; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FCXFl4806rrcLk+dGcsO/+pKT+b/kulWmEySm1qJxXo=; b=mpWOm+Q83dYgfs1WKMNPOGheRtRz0TXhfIhzBS3j22Mxx71mqlp2x6JmDELv5lLC62 jWtu4CiEFZ8dxn43tW3wuNeYDprIRFF7DsGwyVl+/zdH1hlIXPZ/eJPfHPncSwGjCsQE 501K8CIi4P80+1IjIJVwFDsf/4HHJ2XVA/c0alH6s4Dscf2539lKK4vT4DEQo0EE0i2A x4tHxDG19xhKC8pHsaJ1TQ3bqw59S89Cujna19ceiqN2J4LffqVXdNtxdgjYnkoWqXQx rS0Vvub+ug79ff6pnS8OQcWm45n/P4df0iiw6r1lzXSAdYVeVltJ78pBJhTiwhm/KGdZ 3zFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704324; x=1765309124; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FCXFl4806rrcLk+dGcsO/+pKT+b/kulWmEySm1qJxXo=; b=AINblMvkG3oNHTNbPcSNLDC8kZzwt67aAEc5wotlyOwm0uR9u8mO72aHr6ViVWet90 9879Z6Pu9zkTHaEEGYsMOuxPk3mhFKSCV9pm0m4P6h7Er5RvG7qQbGldK/dJGOVJ9FC0 FrEMimpZ3eRW/wORbdYYZLgzStTqnYe7Bdc0YJzgJX211Og2wZeA5wYykNhAE2fRr6bl IxkW2tzbFulxemtYBzMRbtmWXCVhtqocBhUf3l6qqcJHfAN3Ta55+QFdUmBEvpWJRM+9 mV5y6cn7zFnbxVn37DWjxienpNVYiTfoaJmuTNeG/rPITO1qofODwl5xpzILw8KfXm5C ug/w== X-Gm-Message-State: AOJu0YzJgG4ejBqhGN5w/rCtMAfy97RrXhKntjY01FmzZbDD1MXVwNrG Imu1eAgzXGs/+K96oHEScqS9aU9Wo566b8YU2vkBTo4q/iNOsQ+rP2cU0QMjglLMHukZsK91OFy IyJS8oP8Y33qZivv+uw== X-Google-Smtp-Source: AGHT+IEhcya1K6x+pih8KjUYpSo3LZCMbw+ThNVgSxoNVzl3BHBMxCaSakgHBjbE22UzWv+My5uQpi3ZN+K43iU= X-Received: from wrbfq9.prod.google.com ([2002:a05:6000:2a09:b0:42b:39b8:85b7]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:22c9:b0:42b:3e19:b650 with SMTP id ffacd0b85a97d-42cc1ac9156mr44205239f8f.17.1764704324360; Tue, 02 Dec 2025 11:38:44 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:07 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=844; i=aliceryhl@google.com; h=from:subject:message-id; bh=+VIXiWvrLLUPSr9F++6Z7/xQPHblhODET0SGWnquYuk=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0ALHkAstOY8N1aChfh3zOLSvq4Gcx9ier962 GFgrWbGDEGJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 RljbD/9qe2RtN1DxIsZj+SxOWmCyG/N3rxYj1vH8uJPWwRT0kLX1q2p9H36Ks/TT2FbSrRfraYs xxAq5O8c60v+j8T66ySBZxJyRsUAMSLEhARes12yaqkEhga2MvduKaP5RqaOnQsLzMCJW2UfYZX fPzjwI7wXkt+/1HNuDGFHKGeMFyx1/kTQy+p6hYuZIE+k3J0saOCoj4RQiQGGYwN1Jc7aEduLA5 WatcVu2hlrtZscoy6DtwgMDoG533WUmEg+5xyCUVQxc5cBDnRY8hDOltNNeNWeFXUYyw2Gr0X3d Ee1taXSkTHPPPOKVt7ZqFEQT6JOBB+OUZ17YHwHNUlY8iFA8yHpuui7W2aIAv2LclLl7E0cDDXy VAoIjI+zOJbPUiONPzpb8biftEy3H1oPO/mN9ahRBnRsjPlXzLtkTBuCu8MiwGihFJqzTZEYA53 eDwNCCcgPiIa04s6LoOmXRJfs6WiO+9o/GyVmzNxK+5U5lV8wogS4Qx+qZ4p5DNogkxOZ7hFWMr dB3ChQ4nQvealC9xulAGWXOkOLb+zGKbofcHVQA6IGC93uHvHN+MZA/iKlvCdDLueTv7pkMm/jC xjS+OdOltiooPvT/upyFJVwmDlBBem6z6rz0qX/mz9OnfUNNjs7YJazSo4htAKvFz3bq9BiLLZc sIuMS2ePOdxvO8A== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-43-a2e13cbc17a6@google.com> Subject: [PATCH 43/46] rust: usb: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Daniel Almeida Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: Daniel Almeida --- rust/helpers/usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/helpers/usb.c b/rust/helpers/usb.c index fb2aad0cbf4d26ac7fb1a3f176ee7a1d30800f92..eff1cf7be3c2d10b7e9248252d3= 54eb8a4fd4c94 100644 --- a/rust/helpers/usb.c +++ b/rust/helpers/usb.c @@ -2,7 +2,8 @@ =20 #include =20 -struct usb_device *rust_helper_interface_to_usbdev(struct usb_interface *i= ntf) +__rust_helper struct usb_device * +rust_helper_interface_to_usbdev(struct usb_interface *intf) { return interface_to_usbdev(intf); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) (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 86155326D5F for ; Tue, 2 Dec 2025 19:38:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704329; cv=none; b=dWtJIlikCpvpo+Ez8PYzEcetwc0xwPl0LqX0B9j1ndSTtaILAGkVpLmgGCbdGicpghvGSjAJdUvKvAUWfWTN60eGX2gmjQoItWVHBxKJ9t5u9X7XiN59sLpFRMZhD5JkcGEteVGkUwf5am+SJSDdYXFsqfDckhn6hx+TigAEq4U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704329; c=relaxed/simple; bh=H4iaBBTlhvHCEryCjQFMltQR7e05Fh09B4dM7j/Rqpc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=oonCq0N1tmLL6IrGWxUzsFMUzQSOXFQ8CFJc3uFU/TfLGIVCj9KnOhClfcCho+OPjjhm5f+eQV3dmvCmhyW3uI5s7O4Ohb5XrnZql+FS0rpwpelmZTq/hJIrIGRKZ3zHdhHBknKjYj/0pweqNX2wCGbhLQ45cJX9NAydjgytx94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=DcDb6OLz; arc=none smtp.client-ip=209.85.218.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DcDb6OLz" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b735eea0bddso468309566b.2 for ; Tue, 02 Dec 2025 11:38:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704326; x=1765309126; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=7c+Qkndh1wtrCANM0QTrcfgR7cYUUNANvU6GXMtJovo=; b=DcDb6OLzF9SxRnSwBHnXvl2LP0XUGjVXl+8buHf37czqwRfpaeLtWgI5DbMY3KsJeJ OZ/fvzkkRzOwEWfszZX7Z+J63rwrkQikthzFt9rZD0YpX37ngL4X9YVycnH0iPkLgBXk MB3QljMfGkbA3sYE3IhFDB4ugC02U5O6KzVuz8D4cvROyC/6QXD05dgSDs90i0O3faW+ VN8kTz4zqJ7OLj18P64fkiJOXH9yhzO/ClswrCQIq7ApCOXLHNkWjXTVEzSyUtjY8KCP uivJi++2mU1/R0Wtea69uc+cTTyUnWHextbALg9/9LmXaSVdVws8ATyF07xtjC63tWh7 zhAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704326; x=1765309126; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7c+Qkndh1wtrCANM0QTrcfgR7cYUUNANvU6GXMtJovo=; b=HYtacwD8hH+QxuVCvdljKdsCct4r+KJBBH4uC7ZlEG+zI7ZXR5nTfpsSUJ8hxE3LjG +ohBjN8f0gU97KB8UQkMzFXWlU4H4EWJ3tUxBGgUC0HpnaUK5Lyaj1sSI2yn9XVj/WAX JlAPKsR7de1UCljUedHeWksXiPhoX9ll7bP/IaaHFT/QWn4QobKB6wUoLBlkbnGL8L5l P3lfMZ/quxejntVybZLrV2N2nnTCNOg+lOy1Q4QXaJo7z+ICsus/bIZInXmTxB7DVecH /9wF+h6RayEslmyLLdRXVlVCZNkZ5TI+Rs7kdd2MQVbluoJHEuod7yvoovTGfxLVx0KJ ZNBg== X-Gm-Message-State: AOJu0YyzqhoFChA9T22PpgUp8+YxntEzZCpivIq0OBmQvyIXICnfpr/+ GrhOIdfT29a/mOL8urToFmBFT74NjpqYp07ZnQXMOdew6OSdpv+pRN3RWxVuUz3rkYQ+Uk54bVW YKTPpupKa+aWZ3GLy/Q== X-Google-Smtp-Source: AGHT+IH1FNX4pO0fJdY3R3ClHdd/TtBuRnnBE4PcG+zysrs71gOUglmOKornsqNxKpbo6MHTmNNfswsZlhs62Hw= X-Received: from ejcti14.prod.google.com ([2002:a17:907:c20e:b0:b73:79f8:d4b5]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:d03:b0:b72:6d3e:848f with SMTP id a640c23a62f3a-b76715ab9f6mr5143870166b.19.1764704325934; Tue, 02 Dec 2025 11:38:45 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:08 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=835; i=aliceryhl@google.com; h=from:subject:message-id; bh=H4iaBBTlhvHCEryCjQFMltQR7e05Fh09B4dM7j/Rqpc=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0ALw9xRxs3yeSyc4DhwiBD9bWAc1PfE5x2uG elwmIzeDfiJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 Ru0HD/9faKljgYx2I0IQcXScwNqbmWoNZht0bhOyo3Wt98SKnkD7xDWcUBzKavMxEfzKQmhDE+I BfbE10P3wz5/TrGVL2zQ+phu+5JSWI+4WnZp27g3zPYZdAm1U/xue71fZ2UPGAtscUgao7VfIHo JWqF8jS1hIxTXGQwOMR46epETkxdVYhKfYAGc1x7hKpIaJ1YWIifdQseR0h+v71NspxP544JAjg 1B/cGRFtQfje8IofU2y7pOg8mSI6GrAzeSFNOSn4V5oWF0nk8dK8PPPbsZkqZab/G/N876QRw3p T5BuaDUKTDr5v7AQfD1SNe7VlR+IOo9CP1h2WIdrrxhiKjCLu+VdIDD4HzbSCquHf7JaG4cOT5l jL1NFBH4f7PpJbgpczXAMqB3w1sFT9KQYjNuaeXnf4Z+2ExIM5CcFNdE/0wAOjz+qjLpVIkMlq9 ssexYO4Jcw2qKnpw5P+eLxA3GuKyTbD73fBEQWWx5HVWGNmQCfgl7GiC4qJaHMg4Jm+sC0nlcjv SCsLvdpfcKApwFRMCcySGN+1KwrZ1i/Sc+HSDgXcXKYywCKGk0tzC97EOVIm7P/GZJYhSFFtMnG 8yDVNpA9zdi6zTT6kTY+G9xCpmB4GE6iaD/lxalnvCxs09/u5B2AzYKV66jNb5roQ8IyjnJNb6w Yr7Rmd9R96Zk/0g== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-44-a2e13cbc17a6@google.com> Subject: [PATCH 44/46] rust: wait: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Anna-Maria Behnsen Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Anna-Maria Behnsen --- rust/helpers/wait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/helpers/wait.c b/rust/helpers/wait.c index ae48e33d9da3b0a780722b79b89d8d766efae17b..2dde1e4517809d20d09cb9a355f= 8005fcb160d4a 100644 --- a/rust/helpers/wait.c +++ b/rust/helpers/wait.c @@ -2,7 +2,7 @@ =20 #include =20 -void rust_helper_init_wait(struct wait_queue_entry *wq_entry) +__rust_helper void rust_helper_init_wait(struct wait_queue_entry *wq_entry) { init_wait(wq_entry); } --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 B93DE327BF3 for ; Tue, 2 Dec 2025 19:38:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704330; cv=none; b=MbUZM8y98cZV9+/3fqjkGZA9zkUL7wW9fyc74+Qr3Ec/AX/W9UdJ1FpdotMgJZTh4LRSwUw5tmcSPjqbkHiGzqm3k2sIJRwMZ5++BX2JXdneXIgaFP8A7sNCSSjaN3s8VpiVxDMLnsjC5xbjM5wPxiLlIA9EoLA8jKZ2XhKqgSA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704330; c=relaxed/simple; bh=Xwi5teGSa8ww6GWa6kU7GK1a7/Rk5hWhIeVBcLUeEn4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=txVnWUuP5ghhhN++6E4vZu6ai/WHkVPG2OoxK1s6eSjumgDQ0xrB6t30NwRgbVwsqRKNbXErWrMlUHwvZtle1pPvBgqZdt8xQjOJOUk46XHgBmsbx2q+z8y8+tCUAB0Lcl31rEo9o1b4P3/Gnhwcjw2XMc0/mIptb4gKBSEYWQk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=idRnFb6L; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="idRnFb6L" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477cabba65dso34681985e9.2 for ; Tue, 02 Dec 2025 11:38:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704327; x=1765309127; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=y5m+KL+v1jMuyDrANGRkUhiq81fps/2eZejCizQFnb0=; b=idRnFb6LiTycPb+dVxtQZKylhKX7kLOXraDeDQfHz1Y0LKRYXoL07TgUZabjg+N/rM LT7IRcW5GOW1U36TwAMfFqN9qfOhv47TwjgH+Mh7Nozz5IrJuStiPNbSYVBHiAUaR8CA e55aCwQRPbesa+llZCZXpHGYYN8yW/rP8L9ddJzFxvnOQrC8D7Kc1U8JiBrNmYbvh1t0 2uBy81M8I7r/17tnbgRcHG2KFY0+HMRvk2KaSkbNhsF/7TQe2dnYCjg+JUfYmBLradGM hN7PxPFicddwyUaMXqgZg58YYEMzsaIzwl+oyz9+rlKfgTzUsmHon6Pp4yQg0csWJy9a U85A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704327; x=1765309127; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=y5m+KL+v1jMuyDrANGRkUhiq81fps/2eZejCizQFnb0=; b=KyKNkWtKFnRQrzs0ZKF7KAYnAouB89Mz7hpdTly4jeaQCO5C6GlscN3ciP2lXAm7V2 UJkjA4bR+/inCX2O7w6U+9P4ZmdzNVq+ORhXRBiht25agPNPARa89LocJdfu/KqD9w34 BYLcyThOucziT/8Fqx/60UwPK6L7+gfCUs9xv/xpi6Al2CyOtRQrlOAqZkbTIRuxR/ad MCvcqAgNHlgmRCiq8H3q4jbxi6nPh2s79YmILpMNVPhYRlxhDZnupvO5BfY1ZvIBFjnC XPAOPWKljFtd59zvFLBY8QYuZGSlnJr7gMx3ZjmraghSltzcO98bygJQ0V1KdS1oD6kQ H+Ag== X-Gm-Message-State: AOJu0YxNMTTO9HfOAdJcYJITQiLGvFjNTpZ008Ykk7td4BNR4waNKg77 EckDmBdkAVvEgeUB0y52JdGFEBUWwM5qGb7ypvh3Ya3Vf0WbcbBRaMdUtaelyfEJXLAaaRoRLL2 O4ng5tm5ohjUlvZszRA== X-Google-Smtp-Source: AGHT+IFZZ5LDaduG+5Xz3xSUFaXzU3Ns4ABL8O6xUI6yh8E4yAw6bdAuHa0A6zHcHOa6r4ee97VrkZ48cMxvR0U= X-Received: from wmat14.prod.google.com ([2002:a05:600c:6d0e:b0:474:979d:a20d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3541:b0:477:9650:3184 with SMTP id 5b1f17b1804b1-477c0165bc3mr451900555e9.2.1764704327053; Tue, 02 Dec 2025 11:38:47 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:09 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1045; i=aliceryhl@google.com; h=from:subject:message-id; bh=Xwi5teGSa8ww6GWa6kU7GK1a7/Rk5hWhIeVBcLUeEn4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0ALLYrSFNnqoFqXUg+09tls7ShgF7K0GmA7R AAVxDpCTNiJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 RqT2D/9Y+i003cKH5vZ0juleAsr87AWKFjiNaB9CcE65z8KluQM0P7kd8jrJkQVDhUWBoQr80uX c9gc0wRNV+HPLtRCrzt+rqGC8RvaT3jls/1hXOACcvKIzdJcWsnIamsSXN9VoQguRgwAj4RBiAg ZrLF2DsYpM4v11wWuZffLzH66im2xpI7N/0HYGBzXCKincc6MvqXnpMqLPD9up94FHCh9j1DUAd c9sC8elDHNA08673qFEeA2sIU0Ve5hsOEtC588kTucT5JSb0nEijT/6EO2S99IMLXhVLiWj9oMr P8FZNNxC+2qn9ElTCabv1wkQyJPXNWqSLK0LytleA6sLdxBzlTBZQrWBTYQFVTOfPYMOrJqlkkM MbAOexajxKASllPhSrWiev72PO3hzRk4n/jSbVvgWSS9+/msc6gJVgEx419ODGriyasymC3ujLH frY7Bd6Ulm/Tz+aNYht7ECaLD3lrnD/iOp8CZI+rTWrX3Yykvx9RCHIuLNIxWlybw7LDdQsTawB NJ2/DBocenpx/FbZtSssNB8SvB34ifGkiZUgd21PYkXQdYnN+pYJim/UGtSDjx6kd2iibuImxjy FeNDQ2AIAq03j3M84ydt1mVCpjscYJpZTMji9hYdDWZKljSMkFJC3QckrAgt/YClOGSSHcTWbcI mq7fihyeeL+TDTQ== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-45-a2e13cbc17a6@google.com> Subject: [PATCH 45/46] rust: workqueue: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Tejun Heo , Lai Jiangshan Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Tejun Heo Cc: Lai Jiangshan --- rust/helpers/workqueue.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rust/helpers/workqueue.c b/rust/helpers/workqueue.c index b2b82753509bf5dbd0f4ddebb96a95a51e5976b1..ce1c3a5b215028cc04e2f4a7d9c= 9c60931792e07 100644 --- a/rust/helpers/workqueue.c +++ b/rust/helpers/workqueue.c @@ -2,9 +2,11 @@ =20 #include =20 -void rust_helper_init_work_with_key(struct work_struct *work, work_func_t = func, - bool onstack, const char *name, - struct lock_class_key *key) +__rust_helper void rust_helper_init_work_with_key(struct work_struct *work, + work_func_t func, + bool onstack, + const char *name, + struct lock_class_key *key) { __init_work(work, onstack); work->data =3D (atomic_long_t)WORK_DATA_INIT(); --=20 2.52.0.158.g65b55ccf14-goog From nobody Sun Feb 8 12:00:45 2026 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 BA1E4327C0A for ; Tue, 2 Dec 2025 19:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704331; cv=none; b=Z5FeCo/rQlQDq1FG8UjeWcl7RdpHS7E0azKWkgaBZV6Yh7roHtSAsy9O/wJXnuF+eOdyHQXS5mkLfgPlB+CHa7cS67NWKUOW3SiwFrD+If75CeTyqsGvobMBVO5pfjkvUMr3u3BvvL3D8keNB/g+73jF2qqZzSUbYU/U+cg7+3M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764704331; c=relaxed/simple; bh=9J2MLVDNZYm9xM/OMq0zK+0XZtRU22LQEL0JJo068rA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BjIPcG6a76yxhLUcvHbm3UsKRuiXxaz+EeTIcO1KpHTmGv+qvL9KDMNMK0sZIyAWnDcXaxOkju9IXY/zmhRXjJxrt6Gs2K7s0nAKzY/BQWwlPAjSrU07gZicKkpxXCQbFoK0JDmrLf+Uu/mD92d7bqZLHGAYlJcYNZH8tHBAEmo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=D7Nuyz91; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="D7Nuyz91" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-47106720618so74682565e9.1 for ; Tue, 02 Dec 2025 11:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764704328; x=1765309128; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=cIQFzvQj0Y4HZI4kBd8TIFPc4eUfRrW65uunjiND9LM=; b=D7Nuyz91rVW44QGaJSv+HByq9UGzQyiK8mWobD6w6PGsUn7adPDRTv5dWPOCEKp2vX ZcgHqF8G8bQ9PrV2bRi191whPkC92qtayXtZ8fTsgt74xeT871pjwjhsp58bCaEPy1OJ gC8bRHeIUTRfSSEcK0TtgQ+nsmPPVeX4oLHfqrgxAuh/BIYeiWCL8rJYl3qEj8st36Gp HzxVcR//c51NuRL9QKaHXAkltkz8U0qoQqyGtBaFTzMz+auO1OmKHJAId8fGoj6GAxRM IoGwUIXTEKtfaCXl5cvgLm4DzzQwFvOWQclmcT4tA3JVjIi0/LS7kYKBDRVoZibZReFm nycQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764704328; x=1765309128; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cIQFzvQj0Y4HZI4kBd8TIFPc4eUfRrW65uunjiND9LM=; b=xLyHvW/cBql5KEyZ/KdhiyCADeTUS+CO9i8SZGtRgfphKB1YHgOQ98AbNOdn8BkR+n 6VIf9QBEdkFfDJzF2CTOk+KTOQwDuguXzy+mvZwkd6o2GCL6wiPEABYFkxHZJaHVwSUx wHGkGdY7YwbnT9a050rk6jJd+Y5wAVl2UIEUx0J8mAJrlcXnZoScSgCzE8lEBCv/N3r3 8XOMyQAQUr/QupFqIYYIr7PQq6WKk5OtaYZ9hg4jjSMANUkQ4K5zWPg4IIMFNm+qwYFL /7eh08olTftBu266DIgHGukM6E0sLkO3e2CBjRvCS8gv7W8ySr5Wp48eHKD8Ntl3J+3/ tDSg== X-Gm-Message-State: AOJu0Yyemz3JyHiIi9V1BRinNsqsTxCxY8jsYQ/fYnAvSuoJlMoc1xIo pF4GQCfpDbNL3t4Kgvac56Ht8g3gvNLMIurYngja02rAek3ycRnwFb7fRQt9lpaWQE6HzybBJpT uv/2XcD25Y6IeAtTv+Q== X-Google-Smtp-Source: AGHT+IF2Puntj/eKEoW+BjOOwfdx6Hi6RJWJ9337ShucXrIPEpJfEWDgyCzbKBbEoyZebOZYr1FMhJ/i5/uBM3s= X-Received: from wmon10.prod.google.com ([2002:a05:600c:464a:b0:477:9c96:9fb9]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:354b:b0:46f:b327:ecfb with SMTP id 5b1f17b1804b1-477c0184c45mr416068545e9.9.1764704328135; Tue, 02 Dec 2025 11:38:48 -0800 (PST) Date: Tue, 02 Dec 2025 19:38:10 +0000 In-Reply-To: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202-define-rust-helper-v1-0-a2e13cbc17a6@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1496; i=aliceryhl@google.com; h=from:subject:message-id; bh=9J2MLVDNZYm9xM/OMq0zK+0XZtRU22LQEL0JJo068rA=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpL0AL1P6xk5iJWRPBNmQbM7bSHOMHh7jJWICIF waE9zMDeLOJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaS9ACwAKCRAEWL7uWMY5 RvTBD/9Q0mEQj5UCViRNOBAsiVewKwP3L79mXstnuVw4wTobK1OvaptZoaklpIQV8TEkTkdlVpu 7Dp7i7P9Ad+6Sa/lsYJkMEYL/V4cIEyU0F1MRY7NNiTc79GmqdkY1AIosR5YL12mz8xqnan4Rf7 n+5vYnTJiGSTjiW2wy4Kg1REQ3dx2NX87tjzAJAFAhlVE5K0SI9/VTwDp448XfP52mG94nwgbKq NH+TrWW1YdlXDKM7dmp1f+RGIe4n/EZA15DnUpXMBkGWUO9c7UbVbh0FThV2icXU9/3b7zdGrkC mIk/g8R5nkJKOmbSn+t14+7rPkFCLGRUpsh3WvfU38RZMvSGkr+HmYFxUQxHzIXgIm7DIzWacvR /BRNtoMZy7saJBMOxJOFx7IMvbOgQ27hqU7vfw19IXkLq0dDKdmXzVJe1/GTMYr0Zs9UjHeTwI3 7ZNKFb31ffcqo3bsi4iC2mutbbNRNSG01bUytOhya+WcDDQE7melml70NqqTD6rAdh8mLEK6ija ZmS0lJmqCBSCFvEgwir1HqVMbVRbgS/US8LqsN3JRecoESfA1FUXdMEs5AfxFXgUNd64FUOkXjm GD382J03EVUFoS5KLRUzn8kVAy1OW13x3aHiKielhfKXDl/ERrhEXzIE0NJ+plYZR9/S8X2uYoF G7LUOgiGtxQPRlw== X-Mailer: b4 0.14.2 Message-ID: <20251202-define-rust-helper-v1-46-a2e13cbc17a6@google.com> Subject: [PATCH 46/46] rust: xarray: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Andrew Morton , Matthew Wilcox , Tamir Duberstein , Andreas Hindborg , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Gary Guo --- Cc: Andrew Morton Cc: Matthew Wilcox Cc: Tamir Duberstein Cc: Andreas Hindborg Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org --- rust/helpers/xarray.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/helpers/xarray.c b/rust/helpers/xarray.c index 60b299f11451d2c4a75e50e25dec4dac13f143f4..08979b3043410ff89d2adc0b259= 7825115c5100f 100644 --- a/rust/helpers/xarray.c +++ b/rust/helpers/xarray.c @@ -2,27 +2,27 @@ =20 #include =20 -int rust_helper_xa_err(void *entry) +__rust_helper int rust_helper_xa_err(void *entry) { return xa_err(entry); } =20 -void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags) +__rust_helper void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flag= s) { return xa_init_flags(xa, flags); } =20 -int rust_helper_xa_trylock(struct xarray *xa) +__rust_helper int rust_helper_xa_trylock(struct xarray *xa) { return xa_trylock(xa); } =20 -void rust_helper_xa_lock(struct xarray *xa) +__rust_helper void rust_helper_xa_lock(struct xarray *xa) { return xa_lock(xa); } =20 -void rust_helper_xa_unlock(struct xarray *xa) +__rust_helper void rust_helper_xa_unlock(struct xarray *xa) { return xa_unlock(xa); } --=20 2.52.0.158.g65b55ccf14-goog