From nobody Sat Feb 7 14:15:54 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 F29541E5B73 for ; Mon, 5 Jan 2026 12:42:41 +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=1767616964; cv=none; b=A776Xu+6hZD/XfoQseC+LPHO3aXHgVcFJ0GiKhgjGolqp8plkP8fdSgCqT16AOMfrWTrdet2J7n0S2Fkut3Qf2K1gWzzckChIvgeuUlfifcspdw1ow3gMqbak7RqEeNusllc2oemrcoQsK34iRYG289W5nx7bvFgT1yuvrBg1pQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616964; c=relaxed/simple; bh=fX/OT0KxuelAn17AD+WlXN9/UYO4upe54GYZ5Z3XllM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=VYp3/My+RuN/c0PuA1+G7/F38NFtud1CaLjL2t1rSThSYt2NuatTInOxvd/aepOG1x0BZYQj9yW0fiprKB38BPFKRg2gGbBRk9Tcq82+/lynl+acGO4hHi6dzm88/sMG4Otx+4dHemy7AGDkCvpT+K99HCufxtgpADbXa2znPtU= 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=lscsIxXT; 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="lscsIxXT" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4792bd2c290so138528135e9.1 for ; Mon, 05 Jan 2026 04:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616960; x=1768221760; 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=RbMFsQgSUSIjgvkNgaycX/4+fNinqYCFCELf3lScW4s=; b=lscsIxXT0ETdg3MoGaUe5PRqSlfhepZcoLQtkBsIguO3QxFJV1b/VL9LVB62MF9opQ IHlFO4oqF2JOsj7W5onHLD6jHqbvad9op+jX2qHl3e/aJptm9x2D/AENvPjESza0wOGs Sk09EGkITKpcLLzvB9/iDbws05yRnbsnJNQucVdZEhing+YimNNgZB4kvF688wve1iiQ qn57cXBgk4NNpQTFREpI/zLhdmDkf/8UXpkPb7BpfQWXQsQL/fomUIRllTk48c0jI7/B ocb55cFf3+RUcuH9loVFrNiTCAdo9SOjtKnFEsqQ24JMLvmVlNdz2JBcfiFK/f159JKf 01hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616960; x=1768221760; 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=RbMFsQgSUSIjgvkNgaycX/4+fNinqYCFCELf3lScW4s=; b=WQCFIl4DXKAmDA8aV+W/KUm0qFtSQz8Ud7YwuB54OSGhCz+/TS7naVKyeM7GDyhFQW OnrUiC8looBZg7LVhKV/1pWlfF6t2ivTYbanuhwG9uYlnLadut4d1c+79y9HovYapUxL 3k19S+as+f6rXiyEQvBsoKZxvDDO7xo7WjL7diz4+/N+nxft5EI/2M7Nbk/CNGA9+HeI 1XK6jPOzLt5yI4B2BYwDnNpmaLFG3SF1rk9YdFMrU1Y+in9ojov2fXGH1OJE0Kox1oWB S6bh5iiEPKGe9OeViXoyEftJJEk0dU+UbR3t4K/GrAvgf5Ffwv1iVGIA0xW4zXoItnUW KNyw== X-Gm-Message-State: AOJu0YwZuLXoI3iV0qWY526Ha6AXo/3ZkjU423WZXSI6Bm6MftDq9ggw g1tTtgyuN5p1Q8SK4LUzt2cqbKQonnXORJZe5cSCrmVBFdW9fKBF4Jfp52HLK/onkIYNFeNPT2Y zaWqB5CeyqMMGBiQjqg== X-Google-Smtp-Source: AGHT+IGktPiwFvgH1mnMtaCch19Lhxi+eYi3QiApL99Z1yDMvwMh6qS0NxBX1UmJ57xnrTjJDJIzrCCYokygNHI= X-Received: from wmph40.prod.google.com ([2002:a05:600c:49a8:b0:47a:814a:e0cf]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3111:b0:477:b642:9dc6 with SMTP id 5b1f17b1804b1-47d195aa79cmr582265855e9.34.1767616960192; Mon, 05 Jan 2026 04:42:40 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:14 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1039; i=aliceryhl@google.com; h=from:subject:message-id; bh=fX/OT0KxuelAn17AD+WlXN9/UYO4upe54GYZ5Z3XllM=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G6wOg3FmQFbJWbgjDOFvqnSZe5HS89RUBaz Uhj3ohAOiuJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxugAKCRAEWL7uWMY5 Rm1uD/4v+mwSprx/IE+vzGmCmE4aVtnCvwfJj4U7vX8PPq8pd0L0tmKMzWMYE8+QSFXaE5pp9gW DKBZO0nYq9qwZlvu27OaEAKRXWAfa0J6/EPgNT6L8VXsK0erlm9czSH3/XsrjRN1jmMHJ1IQaMJ iYsQw5/rziEqLjNCRmQh2uVgnZ6ho6iplitrAbyg59ODrIomWI3kueFQGhTbgc+cDj4whJGCQW5 gYVvJN4CwOq5hUT0Rws70/vz39RvD9laykeqiSFZEN7wtvwoEk7Wy0NAmdbpmW/GeQQBpXNgTCW 6qHZYJYBec2SUbLmaWmlnTBKFOtG8cSdXBREGAV21zDPcobMJzUhrqgBc3RKMlrnVg6W0JdxeS7 KljgHa7z5zkEfmojKOvC+uBwXWB0sVq2zUkIXw4FnW9+CVP+0OohwrEsHK978dw+jFW811iUkKq g3zKZqa5hn4LfmC4gw40KTsFcPPar0Vf+eqCMkIGVzJw+a7MScA6Mei9c5VrZ+rk2AB/rBQSM8x cDSsp1gN+wyPm6eXiUWMXTUJoaa8V15HDgdGIttr5lhwMFkgIGE02VZuwKUP50WsA0GAQJvXfHk h5UxZbfuEvJHpV219YrlXfDQYfSW1BbbFdavyrUCnxx7CCKX0hJ1HzC+lSV/BbKeVqeoS6IOAN+ U6SEV5mUEU5WpMQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-1-51da5f454a67@google.com> Subject: [PATCH v2 01/27] 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 , Boqun Feng , Gary Guo , Peter Zijlstra , Elle Rhumsaa Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 176D9331A54 for ; Mon, 5 Jan 2026 12:42:42 +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=1767616965; cv=none; b=m/+/QMbsuTdLLi+jIIk/ze93tQXrvPViKl7oSyWuP6n9g4AMZvZ6HvTASk/YAJ6lULk3y9Lf4ZhQfQN5yohxNZpQUaoSQSokpmscfOb/gw11mE/LLO7LrPqjV9hokWHcnVBUhCQfTh5Msi4N9Zo9pGBQXHAjUlLwl3ERHbY8JRs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616965; c=relaxed/simple; bh=7YOfd6BIaSgVOEuggrQSmas2nK001qTwu40Xnq68ho8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=VXhCvPPpUkKBccPrtRfezmA2EIVK6O4a8Z1xFUhEbGwAwMlO/6pN2e4UW5qYUE9Z2N25Y5HDijzGi1ccKP6ZKziYA3nbOFtt4reKmPVeEK4H021Jpsxz08DV2hJvvMwRMJSUtDlVzLFLcJ+HSHKW4XQR3CgrUBPOksUT2POCYZM= 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=rbDkKljD; 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="rbDkKljD" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477b8a667bcso187635175e9.2 for ; Mon, 05 Jan 2026 04:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616961; x=1768221761; 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=pAEWUPqGafJsPyLzRansBUV/K4ksBeeXMLF3e+syEJs=; b=rbDkKljDj20EJBiY4gdzloo1FdlCZZYyTgUtSgNL3f1rD/etNHp4VqHkAY2uWEsDsP EBLaTQonjifuG89asvzOgK+hNiLIMHl71i6mnc+spX8CYyP2zlR6rG9vaIGAo5jVmBhl MJtSqAwlvVKshuQ/gZQzF7s7ioLDDpUBf1SNlSRUTs89gkYWpHIEp/i755VF+kldfRkT PmMRLN3PbP0/atOVtPO1YtYXARFg+iB5QILP+UqpeQMh4Y5PRD+hvFULQ5ZpzL1eEOMC 0clVciGv+HpPO/rPw2zaLmqSOJTHs96HCQu4fM/i8GnKJIx4kykskAtUlqweVqFrIjjK oRdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616961; x=1768221761; 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=pAEWUPqGafJsPyLzRansBUV/K4ksBeeXMLF3e+syEJs=; b=Muk1JutAQ3rgC89Bud8AqIGWnyy4MDWRzDvb8soFh1YLU8+5U7M9p53JE5kAwh5GgW +5SQxV7oyJ3Jq55xEZX1Mw5wtzS28eIHyyh/glwmt8Ewoi1Hqr8T5DtHwkOWIuPgyf2U canFTZhuPtpJg+TJtRB+dlPtTcwmbyD6+50si6DPlxn54Y0A5qa+57DXD12eSq/AzECc P0SONUvYjwssuF24EuUayDF6mIEeoNmUy4wwT1wsV863S0XBv52hcB+7W41g+yQSr8L6 tRxcazImtu10j95hO2DJtuyHeDdDixo6eVCGJw7PFzhTBJ0JezyQtEfykY+3HYoUl1cy g+4w== X-Gm-Message-State: AOJu0YwE4drMrUPsbbMiYJLneIzn9ybhh28Wq32tggqXgXPpGruXr2Pn pQ6aSdfZ8f7zuaKk4bS9cwD87nmKjoketjTA689MvZZzS32r5vXFitxRiVfKhomzcX4ULjbZEOQ TWHWSNXNA6BdZaQc31w== X-Google-Smtp-Source: AGHT+IEqBboTGbJEnAhUdsoO0Sa3wunZtXW/D7wzh2htHW6yOpQKo2iiZlFGvdup2MhdqTDYJyJE99tPLQuWCFg= X-Received: from wmbjh12.prod.google.com ([2002:a05:600c:a08c:b0:47a:9505:f0b6]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8183:b0:477:fad:acd9 with SMTP id 5b1f17b1804b1-47d195a9834mr577619975e9.34.1767616961499; Mon, 05 Jan 2026 04:42:41 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:15 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1073; i=aliceryhl@google.com; h=from:subject:message-id; bh=7YOfd6BIaSgVOEuggrQSmas2nK001qTwu40Xnq68ho8=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G6KgqzoGiKhgM1oONkxTX1RHBvSM0z6aXBh N+S1VG5TBOJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxugAKCRAEWL7uWMY5 RhCxEAC2t5fIdzNQgAQ/ihWYfNvcjOtm10sNSiyBiNu1o2FjcapvY31uMWTcBkfviGBP0wUSIGo G9umZUc6lEnNH/ANYc21Br2Abad6G5FgKMlZIevRk8CBEzP2fkiXBHU4u8fDxdfC32c6b7WK29C kiuR4fNOWe4BKOef7dwJD5KGQbm/bNtYLcho+VvSgEZ8roa/0IQukFzcdtN/GArTywZLg39zOE9 XgC5bJlg7TVbWSQetrFWi46y3aWxBPTwlS8pN7dG9t5CTHONLCnuuFCSlDBMBzBn+Z+o9LfgR3P N0aTu/QY789oDTDX6ZYbnD+wMv/dgJLcyZxEC5tbyhrE+m80+dQZbJmUNkguAqextX9BfdD5sqd 5Zq8HJTYL1FMRPPQ4Br38Rm9OGUG/z93AXyIaJx/i8rLdvqv4OO0ULAKD9qC9AIIKoyFuRbQJ+Z QIZVMycKYb3TZ8ky/pWt6bbsh9xqs+FMdz7GAErjsih6XpRhaFbr7uioi3ah/f76GExdO7pBSxF EDgasPI9aMv/N9l9TGG6oWrFI3bcOcQVMQzGwRoglaVDzxc0WiM0BPnaalsmyKSkryrwM9zwLNL wKkYFQQ5O/SCX0bi1+nrgBex2gt5NrozeJvkjlWqM5HKtVG203Hvwnn4DMul02929uHAS85csGz aU3FieHVe+ObEFw== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-2-51da5f454a67@google.com> Subject: [PATCH v2 02/27] 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 , Boqun Feng , Gary Guo , Andreas Hindborg , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Acked-by: Andreas Hindborg --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 5E4D4315764 for ; Mon, 5 Jan 2026 12:42:44 +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=1767616966; cv=none; b=DOtnPK4Jus7ZGTUJk08jSmHLkAqEwAJk1ZHpOckp47YSyUDqp7VWvBSLtCXoPULf3Z0F63CKlktlGgjbfKzm5nNnhb+zToFZfnvJZ6nRi3O5o3Ypss+vGFVuU84r5YSEVHlzFccIGetLJKdkDHA3nBK6p33YnXNio6jEz6KUJMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616966; c=relaxed/simple; bh=XcNFUIoX+BqwjK90/TBrzmCV++jGxUJlOagYgMK4Olk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=G/Xp3lDAENXF/iGDOlAVoNT8djyx7XWktj555wRdv/zYiCuxOcQnQhQoCbMZuLs3AIIsAWOHkkEvMswkHJZagw680G6ljOFJIN0dwjS8FFep0+a57E6kYMYBOVEI5FKtvcws9Rae9GWdk2H6Ed8XsUuGdDLgS+T2795lzrxr/rU= 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=ZJUfF0PP; 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="ZJUfF0PP" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b8395caeab6so55333266b.2 for ; Mon, 05 Jan 2026 04:42:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616962; x=1768221762; 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=zUWksnLTXbLDZ2fDIZTeWfv3osTylhjQuxBEZDIjrEs=; b=ZJUfF0PPcY5F02yFLNSeslFVdoDcNSAoQpt4k+5nbj3bP1PDVxZ2F1sJjBpwOwmjdj FqTSOcMJb2Di9LnnyncEPiRuCtqPoKKOIjsQcIfG0uLDmnvNcpd2HlzYZaj+yFDD8A1o Ir1Bzh/PL5L+aiVkurmMwDJwZRJdjh86e5qUTiQZNWzHUrRJzmyaZFmBRbcNJwBfD4bS dzAlPBdYRWLboz1BcbSTY9BhJKf94+3R46WMsNHRyV1IKi8PEWfuURYCLi+liYZDovjQ 3YOrM5FB8vuZitgGXkXsXW86cwpCLeR9tB3IW/ztDwWNnhJrvQLmsLte4vv4ER+IEs25 J8yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616962; x=1768221762; 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=zUWksnLTXbLDZ2fDIZTeWfv3osTylhjQuxBEZDIjrEs=; b=q43eTKEBawDKXgG+sEFjtOItup50QLe/nyx3Y8wkegK8wlZuoJVah4THVG+POcH4bf bY4A9/mkKFWRPtpsWc8cNO0tnRZUCKHnKvcd9GHZ0Jv7pQlA4akJGCiaSbAYCyruFXly 29K0zTT0spCxiPulfJf6dnPtc+3UKItAZYiwo1OUvVDVgjV4FrOjORSGw3KMdOJSj43v MigjF6K2HtXENmiAvT/QJOq8tYZUIn/yUeyiYZnc54RDzhb62z95516o30UZBNXq1Zp/ Ty3OjI0b/HLTW5WKmQvgf/kSONVCH4STj3ep7fgvPLawk7wubL4OVfwUXpdQcCtxHh4D 4IAQ== X-Gm-Message-State: AOJu0YwOsAylB4FdG+PQVE82YLxy7vugjGglnPEnOAKYI/NbAo5Y2bTb FxIC/TChVE3zIl94BVMo78CzUBUZURqn0WXsvGX3rvnZeVGl3NbyK87dhZG08ZuFtOav4Bu60DC bH9F8GbfPsQ0OwoKP/Q== X-Google-Smtp-Source: AGHT+IHsQSZkyWbrsS7axkcDRmr4my3BpjCjwGS72Gs31+nR91tNTIs01K6MUzm+Y8+Skawi5hFWbV6Twcn2GNc= X-Received: from ejdcw16.prod.google.com ([2002:a17:907:1610:b0:b7a:37d:5e3d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:906:2081:b0:b80:411f:aa50 with SMTP id a640c23a62f3a-b80411faa6emr3718537966b.48.1767616962580; Mon, 05 Jan 2026 04:42:42 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:16 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=903; i=aliceryhl@google.com; h=from:subject:message-id; bh=XcNFUIoX+BqwjK90/TBrzmCV++jGxUJlOagYgMK4Olk=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G6wtceghCVY1quXvH5J59BI6eZ25mXMwjBo MZ5/r6BsfOJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxugAKCRAEWL7uWMY5 Rrp2D/45sF+QKFFmwTDP0/VS5UOQYhYCWDipftV75/jqe43KuXcePJ48WCx1BSWUdjxZa5QfYs4 R00j6JGrKlNm3BXekjm4p/ZlvnJ/Z5s9spq8/mI/07l7+SBGOsAkFYP/YKtfHKXMh4A0xCyK058 PfAQO96PKQwTOioOukE1PJLCOExfSG/idGA0PwC84jQ08Pv2xlWyojzdMYac+AkNF/Cu4r216wl JN5NiSE5TSBG3SYnQNB58r9WidUn6grI6HCMc5B5j7UH4e24emLQNHTNDWK9U8UkF8jfZMNQL7w zpc9tOD3NsTrU97kDmapubtlDTV6FE9dsWw+tMR69HdyTsvChtSwVIEzNnBZL6Rr9xXrm5oB5dd tNNuBelPSBM9mSmjiM47UmUwTPdNpfOXs0ktxPtR0KH0qn7QHZ1J8HV1kHCIov7SlRfnSOYDn27 GqeDhvsQfedfYU1TVSRHOoNc/H+mR+/ETLiBBllShBYx7UEnB9ppIu8l6HuuZLaM7YfF1TLxmhb 55Yxljj+fYk3QtCuBDCUWFH/o/nV9B1X7cwBv5CU9HVeiRmLHC9xw0hXK2M/L+7r8yG3pUB9oC9 4zGuCAeY4R7eizNIim/Sj3IgHZg48OaVH0SnZ2KwKO9BlNe86IoHaHs8Ups1UVXAE4X5t18r2td +2g9VB5Tal7+4XA== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-3-51da5f454a67@google.com> Subject: [PATCH v2 03/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 69C2C3346BA for ; Mon, 5 Jan 2026 12:42:45 +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=1767616968; cv=none; b=WhA0Zbix+DfvYOAHF3FbMsoS657MUwMH8CNeyUHVEKyfgsOtkhCWKn3mITnvnljL2DZi6qEgbxqmVJRjbhVwFJaAGwW6+EpuY7pxyqIhehCdZwNxXnyeI23EFGsO5ZFGvInU/GNg58rprn8HSr5KviZpwaLNxLWlHCic6lnUoqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616968; c=relaxed/simple; bh=WRkPJEy+GjVSZxgwl7Jzpi8fMHqkkFMtQU4c0+Tod0Q=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=LN+iGfEHni/9OMC9dPqnuMcQmMXXg0tldtMkbgc5xJMD6Pa4X2XRzCotbV15igs7McmKSBVEnFvWqOMl6VegPpzKcv8YzzDpkrPLgJIoq+Yv8Jfc8D4M2b7u9CJkPhh6aMJ/SvvBPK2dQInX4UQUoazCWZ/dpf/YmTxXuYZqcfA= 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=RiE10I/I; 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="RiE10I/I" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4779b3749a8so101244675e9.1 for ; Mon, 05 Jan 2026 04:42:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616964; x=1768221764; 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=Kn0DewO2Lv099plLn+ktyqm9+gJNKKN0vCwkcu0MBU4=; b=RiE10I/Ie82fUB7UvLZVvz9Bz87wh48envxDsKWeciS28ZY3QBiyOn+QvoXw5b8R1J cNY3vbveHMVSc/9iO7Wc9L96ikSeZNlnAF4dbC2DoG1QC16Zjun4P16g73rVwzX4DN4N F6phdv+Xk5SAAS+/dB9JB3C4Zss8CuaUkA4rh/B8OVkFJ2OcCQI9PEbXi/NsTyybbC/O Axdw+3aTAS9yiKDsk5hMgnbFS87RA/3zqvFfhGAufZ7Yo/eddiUMB2fdy6AnUbGx+EAu QCPbEYlfyl5B0UnvcA9M6Vhuu3Hd4nlEFZYC+TkdO63adpHuYSaLd07nJbE5aj1T3AnE EpCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616964; x=1768221764; 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=Kn0DewO2Lv099plLn+ktyqm9+gJNKKN0vCwkcu0MBU4=; b=geBiYf9dv7K3wKRblaAqGjhnlx/p+zf4QvkhGp3wgxGZuabxGhDK8jFldsij1sSbd1 ePkDqP3YbMwPuhz5c7Anf5tVUmK6fOZUZ7v86+EAJs1+AaZ0Hgt0SrGtBSEb0jEAN2qw 81Fl+dfLoQrKCxJJCl7SYeALQargdzRgzoHAV45pGzFHyax/ZQAxna4+1Gkxu7mF7A4/ NKuasgccdpgZv3SO57Qm2lZg4/rjLpZe2pSlx5lyHRtkrH/qU6bRLSYZsHk6IzJFiQsa ZyjjnKbr4Ce9ArrYwVhnLHS10bzzYlxCBYITPLT/ycOnW6so+NmXAaJGvjWDrtyFmktu H+SQ== X-Gm-Message-State: AOJu0YyQsf9odkr7iEKpo77n6J/8ejDJnck6lQMGBIrKw8K4t+wEUkzp lWSdKt7b7fvTNDVedZ6Ckb6Hr3z005A/JsXydZ0iM+w6rLVwtRB9T+kdYQzC6U5e80qSBa3rT3F s5hXyKfMllmuVkVf9rg== X-Google-Smtp-Source: AGHT+IHm2U4tWkUDpICYqeLNPlKYam++VODEibw8EVXPE4rw87vgRP74KmElTW/bk6q2Gh7YOrjrH2FB/w7L3E8= X-Received: from wrbay21.prod.google.com ([2002:a5d:6f15:0:b0:432:57a6:83b8]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:46c4:b0:477:7bd2:693f with SMTP id 5b1f17b1804b1-47d1953b80bmr675231065e9.6.1767616963860; Mon, 05 Jan 2026 04:42:43 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:17 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2687; i=aliceryhl@google.com; h=from:subject:message-id; bh=WRkPJEy+GjVSZxgwl7Jzpi8fMHqkkFMtQU4c0+Tod0Q=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G7/A1DRVQMGUVLN9y7nYjZEkCgkcSSu4DQy 6uUz+hUdG2JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxuwAKCRAEWL7uWMY5 RkRsD/wMFku/Kwblx7IjsnrjOEZXCpxGGikfBuDosOgmFw9jmdn5ADXBxOm8abSZXynhJSWNE6F r/A+F6scg2H2A9XnnFVXv0vrQoYgQA8HpZF/jfrcje7PBpCk0g22PtwWyMS8Mt+Me79FvjJwsJz XFyCkBeMJwWvpVFOgqa34v96JpSonIAqJuQhAVDcFViumNNf5CFoFFRBrKYuMCe2NWNC+JQSkcS ZE6ER8Vc8lh3Nr4eQ3M1MOhn/xabwWIE8Uoxmv4ZcPG0sMmNZgP6YfRL6HvHsVJorIxSFvL27R5 M4afb5QgjN4I+tQi2YWjhtZa37g+LC9UiM7Y8Ybyn7uD27YR/KhFG7kURxW0RI6riqCkUCYRj8Y X16DewOhh9QjXRSUv/vMPvzpr3ZJDD0kdfmyt244jxqBav73uzJgpym1GM7bhdiUCFz/rOcNFpG Y4f68/Nh9ReeB7ofuKfnpJzm1gM21UkhFCXkyY/ieX6pkJrzWW1jxL5GAyXhmsvIPH5bZu20uVI IbrOUiFqfhUZ3uIq+0Gy0Ms35XiVBUahQOr+6LKUC8XK75xjQwhls8LGZhPW0A67ay1WLjdzL3O Lr8M3tnCxQac6kwl+SUiF+nH1G+TJT3TjtmTdhBCjotXLRqB10EZ9JBAb7QJMo4wBiQ43tiVOFk OC0IAytIX5dnRjA== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-4-51da5f454a67@google.com> Subject: [PATCH v2 04/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Acked-by: Stephen Boyd --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 00B8F335558 for ; Mon, 5 Jan 2026 12:42:46 +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=1767616968; cv=none; b=cBhRhFZa1mBPgsuD9NF8VqozCRmd6A3O1xzlVSIC1/P6S+CmxH06qoyT8o2of+pQwnZVzxj5qHpj21s7HS8qgwsMpTZt08FzG7+e/ZoEZpoolOOg9Z3IKjsNaOB3Kym5TkI8wWOEuxXUoZ7KwzvFafMJ+hDK732iknYdAMh9i44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616968; c=relaxed/simple; bh=PUaVfADxm6h8vbCgEPN4uYRrRXeaQDcDvuSkPSy/sN8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=LgkQ8R1ATEWA/xvndBWYnOKGEMhYLq+YNr/t0EHzLFIfATuAVe59PfN8Ty6cIPCpWv+pdc6p4AVJzu5RKasq7tbDHlTA0EfgU7rjSUAxZuzuZ+s4Voh084y2c4mCI3Bf97gCoTHWuokU52nVZkAtwQQlD0FowqxvG41186q7hJU= 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=dJ6422GN; 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="dJ6422GN" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477a11d9e67so90491685e9.2 for ; Mon, 05 Jan 2026 04:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616965; x=1768221765; 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=Lfsz7W7bHsgp2ag+JLydPJnxlFokS7fxZJMGdwpNQ7g=; b=dJ6422GNLoczYjq8u1g1TMJcIZk2eXMy5HhAdrSnnCwaipKYNSO/J6VzVSwH7eztr8 noHAoNA01sKp92csqk1VRJJ8rzKJbAPmqDUdXkZyKFxIZnHHROCIljSxu/z9HZEdUGyT zxsK3EtOHP8ZRQgNBK3PSLNXXRzyTTN6ttX7fkRcAEoMR71XNYtMKPlj73iYxAADzpDB 9L0nxhVtrfHeWvR5gr0nNwa7BTtL+dPGzA7/srBluv2c6sKdwfypL/21AKITJHMfCAQ/ q/JoyICeTO+BCG82FZ+1ouGtebTpYGhSwPKdNrxerveuOMpwmE6h8DCmoz8LjwrTG7Yh 3RQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616965; x=1768221765; 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=Lfsz7W7bHsgp2ag+JLydPJnxlFokS7fxZJMGdwpNQ7g=; b=UbJ3SWN5YhnHT/CWDC0+o1BYRL/Wn7zIUjNJFossAI3poZehGMpaNy5M4ku1dCTTx6 e1/iyAvu8YkPvJV8cWGmkW6BbTnAO2/0g526sVBL0eXyiHfC81NAAmESFi4bE4Fm8liR vd3oKSSCt+VlSktcOaUuaiYCeo3vKwmezAOKGNEteRZ01tH3SRLXFEvv/XT3nMzH2QgU ieyp9n2/uAl5qcl3o7uaV6AhRflUUOJYSLuNq/AoMmjYvDk9j1GZT0VeuvaQ8mMhqWql uriZ7uY6XHsgH0ExDw+/figeoT3szA9js3TcbMxSitoO9v85eUnkMK/Yj4f5Mg0n2e2P dM9A== X-Gm-Message-State: AOJu0YzWaHWdNDia0NBHxrJ+xdjequtn2PnVhziAMXv9DYAFF9ioypy3 mACWVCURbEJwv7ufsw63yOAG1s8aMuvBSxpqCr0gSt3sfsZ2X/u0pn+nCP9ALHLVU8Yee2AwG+L LEeqEfQGOvC2pFBTarw== X-Google-Smtp-Source: AGHT+IGLcrbAZq7Q1lJXrMiQqN6XnnfBMZjTIDzFg2dI8kK4owH69aocjIyseb6ZT4bO37PCbX7bdayFO1qQO04= X-Received: from wmdd17.prod.google.com ([2002:a05:600c:a211:b0:477:a0e9:dc85]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600d:101:b0:475:de14:db1e with SMTP id 5b1f17b1804b1-47d1957b7c8mr443475745e9.24.1767616965144; Mon, 05 Jan 2026 04:42:45 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:18 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=928; i=aliceryhl@google.com; h=from:subject:message-id; bh=PUaVfADxm6h8vbCgEPN4uYRrRXeaQDcDvuSkPSy/sN8=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G7S79WOylxMn1DLYk8kJo3D/uqUgQmD6Rs3 C12VL6xJu2JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxuwAKCRAEWL7uWMY5 Rj6qD/4r7cJ5vSCtNonIYotL4+fj+FxSSZ1Vig/9wc9pk31xitULJGeqZV6QGBK69D/Axv9JLiv vdag7kQyeQr0IGGmXE+Q+4qirXufXPTx3PlcQdBg30jzV/XMhTrLRklGgn7RNG3G0aBWJTAs6xg JOoeJQicAkzc8IWehGvlvExGpqnK88jq9Dg4JWaigel94c6XyaJ3701/8pQQ2e/NjGtGJtT0hXp j3jJuTZYoTBMCfP/fowIdnsdG/yVmRJKmvC+A1TKauUKqswX27+ZtDvnte3AFTjXr4cUUg/L+Vs nDbfVbHk9JZtqFtnXKhOWd7BBdH0QeoCUhLxfy122SdX+PrRM3miD6d5e9P5vzD1yKsrsNdqDAs RAVwpapaE8ohG0/sPO2lPPObBqaml/oXso0DkhsxjBULd0vd2R0p17W6kpUcrmzIRDapCcVsS6z DUJ5birP0hHL1gJUHYASbn5+8UDzYn5LuvrM962ILsNY0qyfGGLxwM4SKQ/ELn1g4QA9bwQ+a+g Ki2GRUvg1vwHuVTvc6sUseHz6u9nXxay4G6sFWZYMY8HMQiOAkpxeyCcqfBbluiNC1wvenVv3Cg ecX4T1Km6mMsxdSpXya9vj45KpjzVy0UdQ1CHbz44Ta4k6YALwFEIkSAFY7HIwpXtv58qfpR5yX kG11InFIRIBxY0A== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-5-51da5f454a67@google.com> Subject: [PATCH v2 05/27] 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 , Boqun Feng , Gary Guo , Benno Lossin , Danilo Krummrich , Miguel Ojeda Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 D7F48334C3F for ; Mon, 5 Jan 2026 12:42:47 +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=1767616969; cv=none; b=aH1m3aRGKdrqeUgRWVv1HWE0lehozu7Za4RZYsq0Hi0izFMz0/q8Kq4zEnBqbzHa5XHNW7vhvuWmsRSAwZVeBDoczYD+5Y5tvNRgNC92EJi0LFIFNT/gTTXAEMK2wF3WN8bQGnEjDmfVpgQLpcs8oxkaSDPNrf0xbHBG3FDkeDo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616969; c=relaxed/simple; bh=7Mhi72A75wN7iG4R+NODbxoA0skgQofDw5GqDaK7dF8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=H8VccV3qMgHrD3PbIe0un44OozC+F2NB1C9qSuW7gJ4FizaW4sZNj7cm5oas6y8EDZ7f5pkVIyzg/r5Wf6VgeDNg4FVX8zN8lcAjh+OOw3q8t5k5m0D5sWbyy2Yp6ES9x7MnGPx58WWCAOaQJXwUktmGaKEQlyoGZ4hBTKSOusc= 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=zt+58vhN; 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="zt+58vhN" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47777158a85so155090035e9.3 for ; Mon, 05 Jan 2026 04:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616966; x=1768221766; 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=JAAVBlQVWqYiEeKDUO/pC9NeXdefkrGjxSUeIkBLkEY=; b=zt+58vhNu3LqKIllD5U32c69iBmfL2kOAcfbr5dGrkfB7aXzX2bDwWHB7S4CrFN945 BABohv5hl1dj0ItHXFKcv3k59RXkHD+mCNvamYm0YmAcQc7ktbjqhcgqPYtYBFNNcvbi ku0mrF28uyKo9B74Fsdt+fSFLw+SMmOBH4uByFgiJQuWSR07Zd5C9XASVyUTj56KhufC eGrbeqov5BJUqbsvK1kpeqywpTuSG8U9zpgQGGjdeIYp5Ek/zAkkLPphXZlCXY8iu2KL sBr0Q7DlDnighs1B5n5tiiVmyfS4logQaryI6BDizC/jZ8m0Q1rMd8U0NlJR6J8JtY38 34/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616966; x=1768221766; 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=JAAVBlQVWqYiEeKDUO/pC9NeXdefkrGjxSUeIkBLkEY=; b=fJtnpXcQxHF7IXCxK1ohpNfDS9L9PwaHzKWOonMV5np7o2qCScAb5FVfpZ7p1shrCc +pCQ88yslyRoTGMxGx0/9cYu941zm0/mrtHvuj8ea7mBQusBaFQf6Lf5N1LeG3Yz6w1X NbCa/iF29U/QAF9+9rlEVs17lqVRUryfTNs+jtF4yWvl2LJOMHeWAh0EBBB7Y4d1EqT/ 3Pp0U0STayFvmXNy1VVqZ6TO2K3R09rxjUayO1mNiYZ/RPWRzEuoAvMS/2oAplBsKt9U AzRP0p+gI+lLCfHcbEUuJCxoy7dDo1p6//DoWVc9+dDqr9TaHIYKojSvh51B+fnCZGs+ VkTA== X-Gm-Message-State: AOJu0YzHwZNoN7a+3vypM/Pz/ko57ajriFjvzyc0hBOu+LnYNf3UqU7p f/O8h58CmrOI9VxvCYbHLX0oAGM73WAfw+YYEWUAeLfEg7CEGDpI8HyfOveXGNl0FKDGNysb2XF q96+2reZbyNsTyy7HKQ== X-Google-Smtp-Source: AGHT+IGNOvjPMf//08Ra3nBP4LEum3MAz9jpQRe1gsb4dkWUXJqU1psiGfsk7vhCEuzAT5TD+i2rVfNIIID3IAk= X-Received: from wmbe21.prod.google.com ([2002:a05:600c:5915:b0:46e:1f26:9212]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:19c6:b0:471:14f5:126f with SMTP id 5b1f17b1804b1-47d195c201bmr655326535e9.33.1767616966423; Mon, 05 Jan 2026 04:42:46 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:19 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=822; i=aliceryhl@google.com; h=from:subject:message-id; bh=7Mhi72A75wN7iG4R+NODbxoA0skgQofDw5GqDaK7dF8=; b=kA0DAAoBBFi+7ljGOUYByyZiAGlbsbvIKDfkMSCVNsfmHkUSp7M96NOo5SCt4Mo9c1hqHifm4 4kCMwQAAQoAHRYhBIOSopRNZAcK8Ui9sgRYvu5YxjlGBQJpW7G7AAoJEARYvu5YxjlGrAEP/3OS CmlMi3EbOSyCWQRr8f2LfefWf4QO6l8lH8gVleX0aso3MevrZkJYyQCnlOGK2Av2my4pvBYIcyD kacXr3wEY3kqdUfC20FXD3MRw4sbKxBxolNkdR/v79YaR7QyhZrUDcUDu+i+2uhGnjiSADqOX7+ K4Ina7tbJ68arI7+hp6GDCBWQV3PgFcx/91szcE8/d2sxK6Rs87FBVyYLrbXQB5NT4Rz/9xhpLq o0f3/PmrmtCeHwSKhx08EGUZBbZTJFbqA4MgHRi1cauCr1a8MBcxGvqWbLUZwuJjCqDF3O6Ds/M +GF4WSvszskYKJymXAxIHPZ4A6x5euvUFfa8xy8mtirirRVlM6P5JSY+hw6U6nNgAY3UU7/qU+B XCMnL4ERrfi2Yu62c7tuVyRCMKaTk8XJOL33tkJEC8FmBfDBYnVGAdHiw+RTtawz41W3zrrtPYY hyJNBvjWiX+xxhzTIWbqTFpLYE33pD+oIYJieNPNmrhbOccbOW71jDr0r6f0UHKOVIkMRH8M6Pd jvuBmhQBZudmCYZweUuSZfC/yPrYEj32tmcBZcCqbgYlJEwJkmEgVfa1GX8/78PpFVHG/iIV+y0 deIeqaaeakdnvxY+JRe/BuXDwSWWQltOyVnBTAcvPzqWdvt505nVuB0SpDESZeclg1HnMrUZwus NglXp X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-6-51da5f454a67@google.com> Subject: [PATCH v2 06/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 21F5B33769C for ; Mon, 5 Jan 2026 12:42: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=1767616971; cv=none; b=QAVqZAEHDkwWGVWpdY9Z89UtnQMFWEF2ixW8CmlifGqPMxxdQ0V/3hBDhUqpHzXI9vIY7w2IdqaNv1qoaTvU6Y8YPLeYBXlahtHcW7QjjDpbLOLd5yVSEiKYQnJT8lNpAw2+TjFKM6u816FS3YUAfyPF7lHvyykgOI7Xygd8slw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616971; c=relaxed/simple; bh=VbQO8D2iAr6md4hBhmn/NGgmQ1GRwF0Hgf8inuSVV2s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=QbkZFxjI8vtRNHoLuRlEaPF6zGwePkhQWwZxFtrTEOsuEqcENUkvMyOwPXb6GlLaS5qBg719hvtfmTBX1DPW1v26woCDMh+EKS8FWjSmi5zU8jL10+Bpld44FPVrPWxs7FxgK+OfwYCBJYJXVWvCdeVqXF148GI1NoT2Phr8+iw= 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=Xb6xyMR5; 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="Xb6xyMR5" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477771366cbso112454965e9.0 for ; Mon, 05 Jan 2026 04:42:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616967; x=1768221767; 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=mk5Ycm28hIYHxTsDaCVqW9TzFl8aqhJTKbC0p4I2uF0=; b=Xb6xyMR523gUlzsh09VKVnIQO2JEQAMtPgk9HgRJrr7G2HM8EQ/5PiTi46u6ViJsbR p9Baddf00OOyfbteeBGW9JBQaU2E2umZIFCWlW0AjOO6SrrOXWj464KaLAX0XdvI8a4F hRqjanvfuaE2m1nnNE2lHy2a5257Bpyu4OM2AamRViYHlRGt1l4oiJsWXQtoLszlVwhp tBeyBsphFykDHDyKQ+aAnNjgtdV4HtJ94E8XKf4ctMwICI0PIVvmanHr+w1PSgFDR8FV kcpOnCYmFBlI97nPeALujK2fxTyWukGbgvWjDBHX7Vqft0HxlUOIjYgjThIaxjv/MLjE aNmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616967; x=1768221767; 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=mk5Ycm28hIYHxTsDaCVqW9TzFl8aqhJTKbC0p4I2uF0=; b=A+dGp6S0BfHt2PzoGHQ7cunWAdj54sIPgwpJ0YuEH4419x2DdZmR2kfcF6rID8Kmzt sTICu3jj7YznzIMRRWf2DcR/qDdRqFiRE5MOxYNPishQbttJFMIa/UrL5vV0VVpqg8d7 Mfk1EUQuaEh7W3NLk2OfZhREk3HXOsESVxMMYRjUKz+p4ZyzPbVNzy/JXEarIZr7zF/X vxzwZ/GyasC7qZm5ARBI5gnGG6FjvgudsfylKS9UBiRI0+U2vFQgInVx9XTzop6okCm/ nSewzcO4xXQPahUKxZuLbPgJTyetyBrv4/ms9KfTr12TWiIs/JxGeUuDKjqOWXBhjZov 639A== X-Gm-Message-State: AOJu0YyLrCYi+d4nwMo516J4H5hjhYYz7oAOhG/+rZ7Zjob9q29GwbmX 1YwTvw4VNb8AI4mzc3RKSSy79TurIQGqK48XFlIP2oqDmyQmdsLgWZ+v3biRmtzgEVRyeKB01EB aOMJkbHjjVZSmhMt/0w== X-Google-Smtp-Source: AGHT+IFXejFNTaaTMK6NB9LtQQMCPav08dwDcr+UaE1CM7qp3nZ+shXwfmslVq4IDm/pw/KKVEDRem3vj7iQ6AY= X-Received: from wmbf6.prod.google.com ([2002:a05:600c:5946:b0:46e:3422:1fcc]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c494:b0:47b:d914:98a7 with SMTP id 5b1f17b1804b1-47d19582a05mr562157035e9.29.1767616967436; Mon, 05 Jan 2026 04:42:47 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:20 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1036; i=aliceryhl@google.com; h=from:subject:message-id; bh=VbQO8D2iAr6md4hBhmn/NGgmQ1GRwF0Hgf8inuSVV2s=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G7xiG52Kq7HkvE/zsYwVfDQYUWBBy8h7V7N WNZ+OcmviuJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxuwAKCRAEWL7uWMY5 RnxiD/0WpbhztWk/Y7Ztogunp/taSq0RfvCk2REjL0ilSu/M4Uguhg787+fVv1uySd2CIlEXQDp uiwortuxv6Dc+3lXQpPyMFYWUU6TF1tM9WlgmC5opTi8kTfF1oS78EVkcj0CdVU4oRiPr6YFiHz UIzdTtJlr/SNSplU3uxYSPpxU+vAJte4jwBVuGGPtTrxZRVuKDhkpqE0at9FnNDxqHDvFKQNKQn G8uSVUqQJPT1pN3RlxcwDZG1nkIK9MkYtY06Tmjc72389snwjyabK8NL9Ua+xhk6/3Wdscctl1C szVVYbT0Eo07Aeze6S25CViEA7ZHpCWOEskTQ3NhzE04EyCMH8wH4mcaf86qjxzZF5KksGMrsqN c/5c9C1otKr22zjR01xpGdFtokwxFmBdrSf1lQa4rwGDi3x+MgoWww2dhAnObw9v+/NgxIPhLTP B87gsXdaoyDSr8CFHJWwxSFnyb30wnUKNeVr+mPtqkvyGO9cn1IAw+pOh2kpon7wtfGSSKf9hg8 eqrWeW1XDXK7vX11AWtaiQeAZJW4qXdurxG7i8n49YPeF5xrf4uSg2xqMwsrRwp602TYhhdnk6W cEktWbCFC8Tlu5LxcjtTpOlmDt0dyTVx7n06CocEHazp9xxlehpOletIlzMG4Su/4mxBy9ERypA yJzBiC1VpZzcgig== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-7-51da5f454a67@google.com> Subject: [PATCH v2 07/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Acked-by: Paul Moore --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 67C88338917 for ; Mon, 5 Jan 2026 12:42:50 +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=1767616973; cv=none; b=HmStPEqm/QOFNgdf6iOWUnWDq9aHqJLkZOC1T8wYECeh91cHmFEI4mnbU5DPRWqozouoUbIElGudRMfft/9CNt/fKWwkTqGIe7UzkfIP2pPzLjfRcPxW1Sh/eKtnfuns1Rhx+2G3DuCQcGQBqfL8JlzoZHhJSGDmXaxZJoSNJaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616973; c=relaxed/simple; bh=Sq3fGgcU07h8oT77q1FdlkaJ3IdYOyIidruPx9dNhA4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=bJhSlIMCjqb4jFE13tXfZWisee2L+9zyAzYMQkUgzyocDn/TsVkdVXVoz1oz4BFbL0USGSGJ1/mnUQoi1gtp7nL/0HoLq0fX1756BgwpWszDnAhcEDmBz310i/XpaTwvdHPBeFju1j1dUW/lGv7Nu6PsSNQZrKPyuKTsmWBExYc= 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=ybub389O; 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="ybub389O" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-430fc153d50so10908400f8f.1 for ; Mon, 05 Jan 2026 04:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616969; x=1768221769; 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=rwtDiFp9KdQIyBnUGPwoXLIyUrR5n3GCum8X5tXUFZ4=; b=ybub389OnapECBmtje2ZUfQzddB5gn4QPsYxXjyhzsasj3fxWNX//hr7kldVZ3eako 7cvEJqRtt/oAggvzbLXCS0EDS+5IR9yt/dalJwMmGZNpb+tQ97ePDAk29fUpzmVDI0kZ 92leP/R9mzfWP06QovkHzrgWxNMlYSs2ooF0RUscLBhE1LDSF6RWLuwAtU8X1QDf/aYn dm4igVkLEOpvC52BQlahp9oe6PGmMDJg7nytUVQL3InFfLpJ5lg746CvIE1+lkJ6OE+8 pEtdWOX6nMoxNE7ZU5ZhSLD47RtOAQ+5nqqxMVis1gcd9GI4j3sCjmD+IG3CMgiezNN/ smVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616969; x=1768221769; 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=rwtDiFp9KdQIyBnUGPwoXLIyUrR5n3GCum8X5tXUFZ4=; b=nk89V3RV8As/p/hTt6vIHOo6TxZNM6sCaVhNGabkY3vif4eFEhFCg5VQpLGICYe4Nx Xm2r7n78Kr2Id2orZVxtL1QBEowdSiQLyFUCOKD6ynLdA7CuBpN7RNL13jHHSKXJ4a6M NJxqCf6711j/4Odqlz2EMt95U2Pxa0lrVfI/6oP75Ebob5DJ2oOu2/vke0WkAv3Y5f7D 0+h33mKLsUYzKLHCIihMFizwIbZ3kAkRO/CaH8WDJT7eXKraSjWPfArp1tTnQF5zSst/ FU5uLk2e26ZnYAYHYmNfEuq4N642Qfp6oU1Gr5Y3Jm9SSG9yA9MUyIvLH64hUKh1KKi5 wFlg== X-Gm-Message-State: AOJu0YzXNj0DgACxK/pY2aU4d6eZswFi9RDMpJXtUD5yfMXKrMvRl16Y VUhe/HTL3mMaj/IfrjbfCpEyEFvyqxMgl3RcIbCpM/b5e6MoEFrsILzhr9/Wg5tYYyWl6Q7iFzw v3UCnIGtsoGGSuOFKqQ== X-Google-Smtp-Source: AGHT+IEZJBvYw1qzq4uRE90zzyP9SDmMM3hiNu0S/bDnCSQpnWfUSXPovqFcoBd7/KM2x+O8R+/KaraNHMCFF7Q= X-Received: from wrbgv17.prod.google.com ([2002:a05:6000:4611:b0:430:f5d7:f015]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:438a:b0:431:855:c798 with SMTP id ffacd0b85a97d-4324e4cba0amr64568193f8f.19.1767616968799; Mon, 05 Jan 2026 04:42:48 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:21 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1469; i=aliceryhl@google.com; h=from:subject:message-id; bh=Sq3fGgcU07h8oT77q1FdlkaJ3IdYOyIidruPx9dNhA4=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G7iPgWcezTWb1MwyDAE+VMdYNyCmE5nty5g 97NuKmpRUCJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxuwAKCRAEWL7uWMY5 RolbEACmBKncLY6uepUFAwTkw8aY+Dq846+YbPx4v+hpTPwR15MnRXq/iqZrwJNMN71yG6s0w+w RLBnbqI55BkMbEdIUu+sUOpBcQJdS6y4PEVr88xsaGbIpYuzJcGTfUOj583l+C7i5kBloeTxoPu 7Z3uFv+hx2uwdEt1n/pPehfElhchDOmoNDNfWnrN1IZLgoghuiaDBAO6hDfXAhFrusGeal+YSu1 trhG+fujoeWDZZxOb6fR4hUtEUPTz1anLf5THAgLq8hTiLygLo5gM56DdW8Nx8GWg0atkuFQw3O alWxutTiPI9mR/lgevnPAoFXB6+qiLC5F+ORZw+T99geGYrjvjZNawnou+yCPaaoXtO3h5bX8hU sWPkCdDk9X9fV3XjZt3LPUCww7qnyWGdzZ6cHLQAqcFqiP2vY2/aRKpW5CuVS+U2mEk0skChEED 9el+3IW0WTC91OhvDp3gwPmVbJOt3b5WHw2zjkoFg0AuNbhIfc63hMTJaVB9G9RfUPGwT2uQ4yc tZabDmfSKV7IDb0MPA25JJjdhorfV5NlyUaVjJdErwPYjINBn8S6lee1SECXaTTcH5JWs714gxB LS4KFovkIUczrFtJPtZhNGBNYr7+9RLPx6wIig4NutYTO3Y1O1xcrCTWx7n08KQv//ThzmEZ0NC P460cXuSVuc2j3g== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-8-51da5f454a67@google.com> Subject: [PATCH v2 08/27] 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 , Boqun Feng , Gary Guo Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 AD57333769A for ; Mon, 5 Jan 2026 12:42:51 +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=1767616973; cv=none; b=O484Yst5RIy8cm/jD4bNOUlFnJHhb8ER9DlB5q9LvXz5+cOv3jCy4YNb+6/NkeoHbH8RV69b5ZNf+vguYG8NdEiTsbv322hOqon8LJlJXwKllpeNpy+EtHYps+ip9J5JVt5QsOp+hIct3LocJQ+2ytNOGC0MVibEN1twfVve138= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616973; c=relaxed/simple; bh=ZtVeIpLbZbRHLv0qnvkpGpXOzl8W4beEW1S836HpcKs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=S7uuIgbXiCCbHPjpjYkLYhYD84uz5qtzCepKwWtNJKo4emEIudxILUrRAOLWCdXrYniw4mt8jFoDZWMcSx/aJHlpKoug4dOcbMk3ggpWooZqUR/51YBiRJ0VyjUkKH2dWlqZ4awjeNNB2UseWTFoLkeq/yuunMPcEP7uQibnYlg= 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=U7uS+Gix; 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="U7uS+Gix" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-430fdc1fff8so6969086f8f.3 for ; Mon, 05 Jan 2026 04:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616970; x=1768221770; 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=N/6p9+3zFT+pXOB5xIp5iscxGdhhlxgF1ZZ055O0bx4=; b=U7uS+GixZ0EXbsB2iZ1PS+Ny+tthf5a96XWtFBidXBVrVhx9CYc+ia02DTzG3Tkb3H Sss46pQ3ZvN/S/Y3j+5pV+VbCeMbC+LpCJhdjJciqDnVJzBnNeQRJqCf8mJjtbP1GrBY oKs88jPYShFxGHrTO+LT3oY7wV6cPv+UW5Wdd503ciJfsODpyRS76ZdINtjEshNpzhxr 7izGX2u4cP2td00i/H5MSqelRc5+mPjsLHYIKCzUxJbOXUCoQtKnqpdc+jQbCCwY+whO OclxWM8fLo5RH46rmrix+f/3KjZ3ptFF29pIpgFax6jPiaRnWhWeSbaXOFtyq9Y0DuUY ULhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616970; x=1768221770; 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=N/6p9+3zFT+pXOB5xIp5iscxGdhhlxgF1ZZ055O0bx4=; b=IRjt9i+EEBx0FWmZjIYyf37brQHGj+rtGxgyk2ndtMYdqC3pxlJXx9cTWCZ+2kEdcA oZ1kZOUO8L8hD6llCBa4JiEVdgAdbzwB6DGXkI+jviPJQEpFidfCW4/Wb9HqCg1JFZbd kyQ9Jek9S63dPN6q66SPCdM8uCNY+IDC400r31KNZrtxjp0WUY7/QB5/LbDNDIXuSKpm WFvApO+Fdptpm9UB0MUUIilWYd5sRsz9XzywbLAE5xrDgRoflm1ez1v5al5F/+luaNB8 oswhKNuGdkWScVDFRmUl9kuGDzSwd2uMLTfSX0Y3IRvxISO9CWwWMox2Iv4IIfa/ybnq DJlg== X-Gm-Message-State: AOJu0Yxt2DEdawHqn/RnHrTt5vr7Ez+sCBd+L3CIMc3s6R8+J9VWXzMz +pVHd+2OyfuD6IInxjDwC91i/RIsgKQbiuybFmiEu7zmpZPlIVAYbwjyikiLifk9CdnreQ3kj+q Bh2KjDkWiAI9HSger6A== X-Google-Smtp-Source: AGHT+IETa/hEWjMBhnF0d8WRBl40INbYkGYyHJlmgRMipa/f36ZHBxCi7TH7KrU7ORnLh3lKyY28tyx716Hp7LU= X-Received: from wmbgx15.prod.google.com ([2002:a05:600c:858f:b0:47a:8fa6:6a57]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:348a:b0:46e:1a5e:211 with SMTP id 5b1f17b1804b1-47d1958a755mr666630925e9.21.1767616970141; Mon, 05 Jan 2026 04:42:50 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:22 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1015; i=aliceryhl@google.com; h=from:subject:message-id; bh=ZtVeIpLbZbRHLv0qnvkpGpXOzl8W4beEW1S836HpcKs=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G7HHV1hOF1selWjLuapzFMt5JzyFUKOcHRi Cq9svoQWfqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxuwAKCRAEWL7uWMY5 Rn8HD/9JFPomOCnyNnaOJ4yutqOp78L87AVh5prWRZNaud7QdVjx8emnMRRVBjXNV+u/nx1eYre WsTFbpHIZE5W14ekKt8C0rtRC6vvVz0LTzGPV706KDJ8TkNsXSUz7kFikT9B3EmXrWjeYKT2Mld PyINeAr0Yv+39dr122h528kXEJm+1cEYsC1iaqZY3g5Pfvytd4e0n44NrJ4HE2LIrP2QYK5kvqx Lk4lsVXEQAvA2xZFiSnzysgYHOQPB5hkkMbbEFFCQT4PFFf0bPoWtKsLj+k8b1EbQC58lDqh6+5 NY6kwR24fCbCCu8W7/ctJl1dKz54J0aJ7qB9y3LLvVU9UiLSriAPUtbU2InYrxdDfcZmFlFWFjN uuatpK3SrnrQXp/OhtVRMePjmFEpCK0kxfoDCEPO2JHgeZ0tGukErnz6SR39vUoV0izSix2biOb Z1ip1WqJRLeuol1lQr/TRdwJEqNmpSYcYz+z4CBrapAVsHikEL1Lg65GuIMdy4PpBsS5uANuuvU SUBWPj7eDwjfho3sqkjzIcNx+ZRqy+02bm9swjiET581uiAO3e4leqkZNfa9dOY0OrGjXgVmbHE JuRZ748CUXWKdHVcf4PMou4BJ0m/cUdtilLHP4N2FWEHERDMuGwTNTvbFOVh6SWUlAHZRD3VQMn wEjIdWoZGaNaCYQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-9-51da5f454a67@google.com> Subject: [PATCH v2 09/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 BC1EA336EC2 for ; Mon, 5 Jan 2026 12:42:53 +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=1767616975; cv=none; b=IPsZ6tLGVk/UyBJFTDsDNEwcufkrldcugVcIFuEpGwziohqzkr2uRSD5xMGjrG4qt4WzfO1h8xxZXSDX4IRAl1UMqHDO2zsoMF0yHx3luGgwS0q7Q9zCX9pfcTSac1RQl8wX6getukrKBSKaCzp/1H62lOfKL/LBKIL+mL9+4Jg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616975; c=relaxed/simple; bh=eklUnMkjialDLjmOlCaGbwka3gC+QkgvK41klffYGdc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=piRb/uL+yXS48NEjpQRw0Qifwqmo4hVn83tZB1fi1D9x2dB01jlzdojrcNcxypEDNw6LQxZbchUhl1cD4uex/+XJ80UvVncA9ggEyBiSpczUFY/G4/s6SLo0CJJ6adE00gYXWrtg2iqtedj8OgS3s9pips08+tB84SVcVf7Ypx4= 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=CThAUFlN; 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="CThAUFlN" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47d28e7960fso91983515e9.0 for ; Mon, 05 Jan 2026 04:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616972; x=1768221772; 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=kPim/bnU8LvyeLR4IV1lC0pyB+pbiZT/fuxdT+3ZgLQ=; b=CThAUFlN1bqOAueNVlHhS4ufh1gfWQxUGBd1CwDc74gR/VqfvS8KL88FfUztNOI87e qkMYheZwOepptD9uqRrn7mgmc68YOdygV/Of4TmZ8CaI5Mb6biD4Lhqg3+Maq8q3vms+ qur7rSgdpxRuhzqn3pEBqIZRpfjmi1/6XIfSo/JnZwqvlm/lRmutJzCAPPDppBb91vQz GlXZnj37ER3Qu03XkV8wveGZW+FwSbAt/+NXIDOxC2iF/sYAranmbN1LY4mILTRqaaU+ 6P6lWDmT6/9Dsa7DGn6AdPs1AmI1DFNL2Cv8aWk/kc8e1084LngJyuYjohyYkyFbuoOA eNoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616972; x=1768221772; 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=kPim/bnU8LvyeLR4IV1lC0pyB+pbiZT/fuxdT+3ZgLQ=; b=jmR2Uue5Wj/HNYWBvKZBeM4T8ink3YVX5Ix5UL6zvrOZdz5cfKEvOE4WSlMN3bIhsb 71Y1HHfSjmiOMmNg0cobv3HwiKXDiPy4XYQkLJYVEhLyd8YF89la3HvSXDI8OPYfweuw r+8HDjK0WEc+Lv00Ohz5ZiDi3uKHbonBqR2xkdFut8WvSBilFCXeR5apsicE/rpo7O7S 5bOqt216zE6vGWr1yXZ7824JAqNjoTS+pdCIKJQfX2Lxufqkkg8LMpPeGw06nf7zq4Ub MYwUMN61LG1c2TxlgPP5b/in/sbeqTP9EMneCAHxYhQweqKk9yvuIJ4/eZES6ZkO9Ien KATQ== X-Gm-Message-State: AOJu0YwEgGjT7XxQEZDYBskxMI/DJyb8j0JhAwM6HI9mAvPjWtLcp3eC u8lLxvXbJZZy9adnbRX6Shy2jdJzq5gAgcLg9zifw6yRZ8+lGDn2Burd/KbwbxwOYDdBvcN83ID lMkFcaR7V5/c/hifV8w== X-Google-Smtp-Source: AGHT+IEKuUpjRUdDI18V8ybvVSN4B8FWVVfm5z9ZQIEQ5lcls4uthnO2XVm2jaCrQo1BFMS3SMRH4FDVz4X6uLg= X-Received: from wmco11.prod.google.com ([2002:a05:600c:a30b:b0:47d:47dc:d5d4]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:348f:b0:477:7925:f7fb with SMTP id 5b1f17b1804b1-47d1954a710mr546210275e9.10.1767616972235; Mon, 05 Jan 2026 04:42:52 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:23 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1092; i=aliceryhl@google.com; h=from:subject:message-id; bh=eklUnMkjialDLjmOlCaGbwka3gC+QkgvK41klffYGdc=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G75XlHGTbjrX5WBJdg8/f08EeV+yfpT5LCC Sst+D/4TVuJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxuwAKCRAEWL7uWMY5 RkiZEACa8ijtRTQzaOKuY5mDAmhbz7gVUxOYqZxuc56B8TEu2JchNUtPBzZmkNdhGGGxujg8/Z5 L+hPwjKzgXRUPgR2Gbu3faZyVMScMhM7NfZ27zAvVDpw1gH1qFAv8+GB5XRwoJ6yoImD1GsKas3 nOUGwYmOT28FOemvmP1AyljbngXLQkrkcVAo4CLQy07rj4e1x31K6ZaFPkaWaql+V+bOKBplBsY ESpdcidT5ob/77QaOLx3zzdtR7gsPhJcQ2yGkTJFuLHzGGjYA0GEz7m70B/O7qR6UoN+NE0RBW+ WBulY9rt17SZgDVI1H+SnpEYYv5heeJI6hWYeMM/n696NGml4h+3NB3/FMx7EZarJYvMZ/zTRCS 6QoRlqn+JZ+y5qHlC88lU5A9NzG2i0VKFfg9q4B6aLu1kt7e8DwZUazHnQWlrosV6YrZH4UCrcE epGQyjCywmOB1w/X9Nv4bYQ+h1EagE7nowm/nDRWVXuh1uJ/0RI+ObYfEorSBKLfUy2uzLelhtW 26wO3X7wDiOzSg/75MhFgjOPYSaDdk9RRhqqOp0skHB9ty3qo5WtWjKbO3c7LrRMsPm0M+37xjL IImDrGXslKfjgpFAcesWHy34XXR73csgHFrEkBXpf8ppGrCy5hXc+uQsP2ovrATpf7XmZ0Zvghd F/47bcS2Be51srA== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-10-51da5f454a67@google.com> Subject: [PATCH v2 10/27] 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 , Boqun Feng , Andrew Ballance , Gary Guo , Andrew Morton , "Liam R. Howlett" , 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. Reviewed-by: Boqun Feng Acked-by: Andrew Ballance Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Acked-by: Liam R. Howlett --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 47CEA339B2F for ; Mon, 5 Jan 2026 12:42:56 +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=1767616978; cv=none; b=VdxhFlV+4ztvBRueHVXBNZzQ42ZxFU4zKhl/S0ooE9tGeGrWCrxVFegfNfTnvLb6bgsWtp3cYBl2DV/m9ecrh/PSpdWUZwjw7zUAs0fPKyZVvtysCLcn8FCHocvAPkwvWA/y1PhzWo5AvQ4jhbH+ehioQRGOOUzqYJRRVM7VB0c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616978; c=relaxed/simple; bh=3/t+NkFQ/sfvXAgi16TNI6nieZ3WONZSXYBl7iU98Ls=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=eIqt+05jSxfaMsi4J/F7XUNcmhjnRPRHE5DcA0w+I8UxPotVKxrLxVK793KUe2jRo8K9t1ASLqfaULQ3dt2h96UW0v4hp63tSvg7ws7jG7WulxFY42B+mb1VaeVaEEvBKcc1Oe28EaOKRPgS4SirH04d8F6Hb7XRqzs2oxO5cUg= 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=fyeVEwNo; 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="fyeVEwNo" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477964c22e0so16229225e9.0 for ; Mon, 05 Jan 2026 04:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616974; x=1768221774; 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=s7HijWvoQg86kFapHPJ6xmOixNwXXnFawvbJlN+o/VM=; b=fyeVEwNoaREcBDehkHntq3Lkg+2t7F7elQaqUKjIpwBpDQ+6q6n4Vydmwrdif/2WMo sOiBNJ/ZjT1ijjEi/E9hqnKtn0uybp1vLo/tVyCw/vHC0MbZIFbk2N05mVAbwypu/6In 30R9YFYXgGH6Lm9AcufUn7xwBkNQ6l2EWO7XH1PXNDKOWfvTsN9p/xIN6ir8HeHiXkBe OJ0L0pvn/BgKBM7Y65iePL4AU4KPpW1jdlrOpzToQG+9BLT8MCNo+sA5Hw8InHx/f1h5 9RFwTHvL47xq/cTVyvqIEU7/GMRujLhRbDFTS8ZgXSqlJeDHxYmwegWOLx70aLxCSfG9 +8IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616974; x=1768221774; 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=s7HijWvoQg86kFapHPJ6xmOixNwXXnFawvbJlN+o/VM=; b=okrV3Wwa7Xf5hOkw60tyTDPVvwJozLZSOaDUVZNwlukvBVzGBnAun9oav1Th1csa9W 0Cxl6a9Zs2I/1tSTD1NaN+K4h6VikVM549qtjEeC4GLKYa4czjzOUhTiFqMEUgVJPu8Y y/hOtTk2jrNpxpZQqiB7IkIQ/ktwxpRxjg2WNw6nTQZsyLCQkdewJmTS1o5InVvi8Dcd rVfPciztRE9XHV5Yf5OI2kS7tRFJbY8EzpWriE5R7QZTE3OlExlvhPdwC1Lgz/1dL4ZS C3lHfmRcxSePh2/pUkQvXj9ZVhSsdE6wqn3ZCk0+2OTlAh5+l60v1ARr2qPEpwyM+Tra zWfg== X-Gm-Message-State: AOJu0Yx7Pc77QphdX/qk19538Fh+A4OeuStY2q2k7mscJqrZWFcIVxgQ gnaReRjqfWD/WDJoMfUVUIAEgsSDADtXC61McQq3HhVy8k6L8FElrZp5YRazwueDeXkpDLbbU+z JuLvbBcKkqlignVsMEQ== X-Google-Smtp-Source: AGHT+IGQAETQokUV/JmEC/jSfhuRPZE6uXyBIWU2Q87B+4EDRlagPdgjl1xTSF6npIccNEDFpslVc7TtC9mw1sQ= X-Received: from wmmu7.prod.google.com ([2002:a05:600c:c7:b0:47d:1e65:e8bb]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:6011:b0:477:a2f7:74de with SMTP id 5b1f17b1804b1-47d6ba7ab7dmr77941665e9.3.1767616974459; Mon, 05 Jan 2026 04:42:54 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:24 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=3941; i=aliceryhl@google.com; h=from:subject:message-id; bh=3/t+NkFQ/sfvXAgi16TNI6nieZ3WONZSXYBl7iU98Ls=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G7Ch1In0wVFnxCsygufoE0Pqht57tzU6qB1 YHQ1MVnmXuJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxuwAKCRAEWL7uWMY5 RvnCEACWTL2Y1XjPP/ZChNHZ14zqsEgGtEQdS94TPAkB19ro+4h8Vy0tsm/BkDEvSOXN6sWS/mP a4bNvB8id4ZNHcxQn8csjhzb72Oc5XH71W8k3tuDRM7FwTXPWLgifYc9XG5sAsJ8K/1uI56sYue vqpW6aXViP/AlaqktQ2iDHbU9BW3z+r4jL01UxG4UcwQM+kPy4MwgfmOr5UPAWqpq8FbR5vZof1 bALG3Nwpm6v4KmG/bloFL0Tqpig2QsUyBgR3qk7eiUpyI7hspT3HU/Bkw6HlsAJ8N5hxuaSub9F qhYsUJCx517xFWAxLx73L6tDT3Wng5Uz8VxRWqMwO6aZcbSs/ifGbRPx2esospC7LHVsiGveDTC lZzfvx4x+AM4cvk7Mo5LStJdmR5/hxClL8zXlMFxtDLK+6Liq9rqKCw953jdnqtdgARjGVwMUFx eCY8ni1buXBWyeBjln2bmTPpx9oX/C1E4G3o1jsH9X7SNuQF7uFoovwFkf+rWywe6GZ57qu/pB4 HbBMBxM9LFQf8cCmTX7Ay3squ/yQV6R+3RcbXakjX48exAQoE7ke8JgOwcAP+AvrCTzcADXXNdK YpwIRtLbq5E4+WfLTZmdztA2OlI+A6gC3Y2Wr6vRcPsnINEXlrjw/YwOyRcmC3lSZTFgvUkM5N9 dsPoRy3lSvPxVIQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-11-51da5f454a67@google.com> Subject: [PATCH v2 11/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Acked-by: Liam R. Howlett Reviewed-by: Lorenzo Stoakes --- 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 | 2 +- 3 files changed, 16 insertions(+), 15 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..326b030487a2b2199283b64b3b4= 27e57cf5fb14a 100644 --- a/rust/helpers/vmalloc.c +++ b/rust/helpers/vmalloc.c @@ -2,7 +2,7 @@ =20 #include =20 -void * __must_check __realloc_size(2) +__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) { --=20 2.52.0.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 3FBD533A005 for ; Mon, 5 Jan 2026 12:42:57 +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=1767616979; cv=none; b=dnQDHBm5ARBLSsgAsZPTPszuQJ3Wod81HzclmApIFin/Itb0KMHtxoyCGNNlNmpMPiHPAIcxcdZqHys2Q3SaAkF/FLFHEsitylLR2eDaW4uTMUJutNRKRxDbeBdrQcWFrvrLqjEBvcumm77KS9dF8grFgV0GZxhROyAosXIv5fM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616979; c=relaxed/simple; bh=4/oBY4WT7aE2jyTcFtNUVqaQpyXgwzMdfeb8dG9ZIe8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ts5X4aCF7mdrTFr4Vk5CO1OcZxXVXNifWHpDkCWqPC0p1NVi4VC0GRyfqeg4RlHIpEl4slOp321I0VgNXu+XHqLPtCSGcaSvxEN2r2sqRnAQ0ECOiendhKQctew/s98EQMBCRztZsH8cIDjDmnDcUDvanwwComPzL+tpI7OVSKw= 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=WfxIXlrT; 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="WfxIXlrT" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-432a9ef3d86so999168f8f.2 for ; Mon, 05 Jan 2026 04:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616975; x=1768221775; 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=pI5Vra+JsbB1uLqyeKVidrRHg37WdQzY+QroTb3rVuk=; b=WfxIXlrTX4J53biTs9lNusJD8UjxD4mOTR/LIhIAqInF3xFwajAN68MtiBP3ul1x7a vX265Bds01aOu1HXNm83OXXYx8Ims1iHnXvHdTUSmgiGx+WyjAq+N59wCN47ZUIxN2e2 Lb2cS9tHkhzOU3LxDj/Ul8j4bm83iGEnlC5NYKVlvZoK4OlJ83ZC7LBxJcfW43T7dXWQ uOIN86HeEBcCHr5NXdu1i47mgP/qMJwcSHjDBMkkzw4sfbOGg9Mft6vP0wxMXm8aIA+T eOAhs01kFQwfFeJnsPkpIMtwCreNnVECJE8AA1d5m+v9VCvD7vw/C4kRK1YiGxDrGNeS HRsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616975; x=1768221775; 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=pI5Vra+JsbB1uLqyeKVidrRHg37WdQzY+QroTb3rVuk=; b=vbnmLBmaNuS82c2NED+hkeaDu//nmeiWpOKt4eDjvzTZX5dfC9Isd//6htnp9VG9FF rfK0EV6QF8u7itCJwrAoR0hBW+p2XtyzWdpmi3GWvsiWTajhl4hDQ7IIQVpOWi5bmuMn 1A4fWVrqVLrYEjBGmy4ZELbzqAespzlRICKgp9NvcZVyhYnFpODq9BRH66yuuTs0DerJ PoTD3LWb1Zy7UeG9QudQ1neUMZncmPkQGGGnDuo2W1fn9BMvNyvdCgblmu5fgsjQvJwz 9aYfWjG0YpbaetG0KEFqjg2j3rFA2r5Sy+yygiHien8Sb6symLHqt/kWhmmbjR2rNadK +zCA== X-Gm-Message-State: AOJu0YyObASmqnCn8dqi/Qeij3vgqgUb8ZQ5TxJ6H6j9olCZDnD5YxRq v5Jwy+zo3PncJaPw+eOd2qEUU4eKYDfzUPlD/QWPrhs414T85SE4c/vlEqDcFTu5GzX/Au8Fk8N P3vwNQLm/I/C7rYd5ng== X-Google-Smtp-Source: AGHT+IFMkcXT4GQf67+ZbJYW4cTUhlnEP0jU3IFLvs3Uw49EFNn6oIhG4fHsXU7Ixu9cU6T58gWgCgWOb4rUH2M= X-Received: from wrbdr13.prod.google.com ([2002:a5d:5f8d:0:b0:42b:2f58:f220]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2c0a:b0:430:f742:fbc7 with SMTP id ffacd0b85a97d-4324e4cbcafmr69233261f8f.14.1767616975704; Mon, 05 Jan 2026 04:42:55 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:25 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=818; i=aliceryhl@google.com; h=from:subject:message-id; bh=4/oBY4WT7aE2jyTcFtNUVqaQpyXgwzMdfeb8dG9ZIe8=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G8x2QCj3mfCK5028s4PpTOP5pUFsUNtpTTS 1+h5bRMb/aJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 RlsCD/4lsT7mhuwlE+A9eri7m8sEeWstg0587MwNggZmKpYrWQ0vi5yZ/WbFZ/G/V0dUP9CkucG 5GrygJ4ABTEF+7P/uMP5NiM8Mx6qY+WgKORdot8Ym9sOmi2yDTP1i+N6NdyAWB+Dgw0rYUYkyiM tkIMWGFENh3rAdFhJ9lKd12SVS5Nh7onny6z3kGjxTQwDxEslD2w+RURn9UKsr0aq+B76wbbaAC qnL2SfbhVRV21N4BVzqcBMFqxIEO3Aq+o/lxqt+2P8P6rEq6RA0nltGiSrj2vX2VUXVi0yfLAMo jcMfMMjyFdEMBxh4+9OukGWVnC73HycQbgTIZmjaLCyo25rt2Y9gW2x7m8BJAt53hjmxj9yBy6+ SqvlMEYZqr8ZXeuzlPYSKosvqs3NRPfqKagtI1AaSDRaYyAW3HsQR+bPmF3woDDhEogTx8HMZZV LHm4DyDImlHlDhzX3JsqxgkXfrsC6GZu5ppKSav/r/mnBZzS7sKqFB9BE0z4ujFQ7jk21MXmXbo OYLtzzBVe5RIn/feTCAIF0GI/3FctLWa4Vg7zMnemzbUtIg/CPBM9dXrfzpocxwCeG7Eitoob57 MGHmPdkzgzKrRM0UqVFbbzfsKjH8NOkQ4WLm9D0jOW2R6BVgnitT7ImbwzuOapWrfqbfwO3ARci 0y6vY6/Kjj+QwpQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-12-51da5f454a67@google.com> Subject: [PATCH v2 12/27] 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 , Boqun Feng , Gary Guo , Rob Herring , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Acked-by: Rob Herring (Arm) --- Cc: Rob Herring 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 5606333A015 for ; Mon, 5 Jan 2026 12:42:58 +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=1767616980; cv=none; b=PV7EKIfQ/ZRyykv7Ow81rMFEnZH4gVNvODf+ggrO+Y/e7z8gFZPX3JZxElalD2eRwjn6Vs2sPj3ZjS346N8iwk5aEyTY7esDcoAYCwLu6N8E0Wr8S4Ps5vZ60YEmUPnKdE4PIHviyz6iF45Fxd/AoWMWE7fPv8l6muv1p9gGcOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616980; c=relaxed/simple; bh=BX4PuegKU7oLOCE5wiFJA5na7yprV+fKJdv3rgt7tFE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=reaLgYmTyRioKhk/vMSf7+HAYQlM+ENQ8ilyT+Cjhk+cy3jScukL7HgdaEp83ihNPoacaozlQpLhMi8b8LoydJ1yuZT/AmcF6gvhJVY9ferKzR36QjJDe5CpcddFo0OZCPtrYspFU0oS5gW81nNu9tIwV+rWs5Dx1e0354GdqVs= 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=jXFTePM4; 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="jXFTePM4" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-64d53a7817eso10962818a12.3 for ; Mon, 05 Jan 2026 04:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616977; x=1768221777; 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=/gJDodFkXOSNkvELLtuxSLcrrcD288q4L1KbsVQUEqA=; b=jXFTePM4Zr7recY58WwB0bgDeEoEctp7XFC4DlB5IiM25f9PnOEJr9VbcmYxafeVtN bITl9GQEB2SnYiJsC08763YxZo4NeeqLU3hnH5Yho6v2n/Xf2Mc8g8Vqf9Hr75flk8Up i9s0FheIufunddbQrwj6QvA+Vgw/B7c+og7QsKZH3KjZjWfsY/o3W8SbIlRZIkyo77Ly Owwfp49+JXFzZ2zJqklWaBrtyIPjqI+rAkw0w/S8a8pmp32jha9A2gENlggKBG3SB0/k 12qh6M+YGZTQKumvI89Btx9JuAmQtolsOf1GSMDTsF3HCwgSA2sKM2YFtgaaH7a1+6nZ e6zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616977; x=1768221777; 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=/gJDodFkXOSNkvELLtuxSLcrrcD288q4L1KbsVQUEqA=; b=SDfQTKxsA1YrnRK6w3+TVBjbEKlf37SFRIz6XdXE4H+NoNLY88+lUp9jdnF9tUuaEi 6Yzj4CmbteTmJiW2hYyD1EminaVgHRPERjzBOST9kOZKBdNas1E96uYUzOs/pL6N16OB JSmIzm9s/DUx5H3p2+MCuQB8BGShp0dJDQvyDPE8u41ts8+bxLlFE+in6FsRJRqaN8So LjXdvttfYP8JWt673b/N6PqI5DyIHGdTe3Vfe4gBHj4RDIlIGZlB1VgjALJ7z6hLJF68 +LqkDQRXIkbjU7avZWelh4nZRunnfeKXVrZchMvHoVHyxMHwJ5ugBHmY96fNDnY2fcrq 4yRQ== X-Gm-Message-State: AOJu0YwVVm8YOg0ZDfl6V7PjM+oGUCudiVHlDQgrWSam5p0zgY5e+fRw m5CiaJeMtIiJQBHGcsm+VvWUWe3auEc4pbyM2uFL771nOshXgCwrfXNYHmSY8mFKLzCwU/gwFCu D+XwofNFGP5qvWrEF7A== X-Google-Smtp-Source: AGHT+IH4+W1m7K9R6UQhNUgwUvJkQDSz0PygCwrolhpsUaAev3FcK4oxV0VVJvwHjfLaVQQ/0GriFGCKTgZ8LwQ= X-Received: from edbcf5.prod.google.com ([2002:a05:6402:b85:b0:64b:a72d:4712]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:3491:b0:649:9159:2432 with SMTP id 4fb4d7f45d1cf-64b8e94767emr49619947a12.3.1767616976717; Mon, 05 Jan 2026 04:42:56 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:26 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=900; i=aliceryhl@google.com; h=from:subject:message-id; bh=BX4PuegKU7oLOCE5wiFJA5na7yprV+fKJdv3rgt7tFE=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G8N/MMfWAQUaRb8EzZ55j27dutUYuOmUAb6 GvYbt/CmqqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 RlBZEACsG6FlA0XqF7HUX38QJ5IYTeXqRGHu++9MeEutwMAfufvXK8p8wNeFNxX7jBQGmJSAkFd PpvFm9Zv9NfLsVmdPjOdn6cZi2NXLjtYfMLi+L42tnB4LNGYiiqnoP4Y9QqO4xkB2j4pRd0i5am mQsseIbMp/6pijq3k+MjuGsDGW4BhL51B1VtUOElN1lS0UegX+ZI1vj+z8ElWDHzEk4ONRMfjKD BRUBWfq6mzeyzWQbOevXThJxTztRuiLErlSofbsJVL5PVbac4MKK5EtC1zXKfYKaNbQAdO+dnIL tidtModsJVIQKREVsd0p8bDkgN/OjfMDZFx4ty0lIrZ5mfoJ7DwqFLywaA8N5+ujzxKnV+II2bK nISwnxyjYkNpIZd4vRSNKd48dmgxAb7Vb7rkjhaRyAHHi2WeLhKoq0sPuRUimaiFHBnlej+JAMr 2ZiRs3fSVgO1N2Nu1v9Otfl8PrOuJp8ATqUUwo5d+55EGbsm0u/++nTy5Ym9HExk+XnYvlTBE9/ qV2xOWUw/Upc4dC/nNEz6nSVBSUvaMtgnzM5IavuRbou27A5LY7L62QaV4FaMFGdaMtU7gXtELO pB0e0kt0Kc4w0FfBrWBE6zJt9LU0NaUTTlDHcEKnbz6xzpED6TIVylBvhJRmEgzD/ejZaiHn5jI JhEMofYl0WUz+hA== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-13-51da5f454a67@google.com> Subject: [PATCH v2 13/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 758E1336EC2 for ; Mon, 5 Jan 2026 12:42:59 +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=1767616982; cv=none; b=oJE/8n79Gr5BqsikNkx2mkxfgzk8mtsyQq5lcSmyswxJLGpnqhTToFYYmm0WGdWOilL22p1dM0DrshPcQ/3UsiszvA/3kdrbIEEwo4HxX9SsuRfE9r2BmSTzJ6pL4f/MKDu9OKddUMwhFJPqxcpf0ruRWm9iumrEPcRdHH8Erfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616982; c=relaxed/simple; bh=UzGlplN9hMJBDEgRgsBJzDppIssf1wZDo7F7rlGIARA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Z5BTXwtoW4bF/2VCBvjOQsQ323+uUx+ui1tVYL64wj6wAuCGdqWeDTaIhi5VZsQLNlzQD4a5nRGlKgvpE76xqPzLyCqPZ5tB8lT1b00mrIvnX/cgw1PnDVq/IwkLU4H/KByl1qqMxRkc5JMdBIEnxSpQvFQaLw8LpB65tPoa9c0= 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=PijM/cFk; 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="PijM/cFk" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-4310062d97bso7944709f8f.0 for ; Mon, 05 Jan 2026 04:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616978; x=1768221778; 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=aU5hvVbSIZ+0CKzUQKGtwRWDP0tIUkA5YvtKwL6kBRY=; b=PijM/cFk5KEV6LXxJQ5vkiy+4oYB0AYL4llqaAC6RF5qIYCZ74o6hilM3RhfB7qg69 b/AH8zoHHbnALSw4sk6rLRPmdkuKuznm4GI6o5yJUzKl3eQ41Nd17i8ZTkIWm6HBvhNw fAzayed3FGr+q3zIL2HBPmz2VtC5jP3onR/aMU9qXR2ERtph9uJNrLF5Sr225o2P3xeU Iwpnsn9vuxd1FVUFJ/nXdy2a+lBxKmPWNrXnf8/DGYhCRGtGvUa7UQ7DtiZTguyhStg4 MUbWh2j4rjHESR/q2ccrx2GSOKAGgzB6E7T+PHitIme33uPpZTPLSDQAxVX+8052gUiB pb+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616978; x=1768221778; 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=aU5hvVbSIZ+0CKzUQKGtwRWDP0tIUkA5YvtKwL6kBRY=; b=JhFlwLf94m3i1MOR40nIFha+UOLObOoH0P0LweAy+NV1sLWcpCyAdflWcFPz0Q/2Iy 7Cq2xmZn/jAiuwBm0s2Vt0MeRBwovVp1qQOtJADUXbnlDW7sBqiKhEc21BfQdOQwMXwJ gRjZ/yzjG1X4nRielcpjzwoRZ6CKPVHcm+2a3Ex1fyo12Rj0p7aUtlUqimLtLfhM2TO7 n/9xZWgnCNrAc/qLzpfkCTuywkP6RW+WuWsZod5eYE38v9YZKeCDt2CzbdJDXADX3HtP MV5dTWXCZFqUl0uaKEYHWfsueA5CtlCRwTqMBWPfpufOsHDMBkoFwls1AOoG+6+KH/AO jFWg== X-Gm-Message-State: AOJu0YzscEsPGsOaXoJ02dCz4NVAMpwbQ8UCueJXG4yYrLa2BD/2S2Jk B8DqknDISsxh6fzLmII/WJnNk1pKNLXcrNDhoOcQhxYaigCUyDNyeku5t/aRpNXYagLV2iNS/YY apfqtcwcT9fQpfEvWeg== X-Google-Smtp-Source: AGHT+IGC6w/pncYw2GA0wKwKDg6s/d5lSicuB0c/4Zy4kh1qNN8MAXi3s6OoIeFHVOEuj0zDz1NwdbhAfJULML4= X-Received: from wrd29.prod.google.com ([2002:a05:6000:4a1d:b0:432:8535:4e3f]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:220c:b0:430:f58d:40cf with SMTP id ffacd0b85a97d-4324e4c9692mr55748817f8f.16.1767616977864; Mon, 05 Jan 2026 04:42:57 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:27 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1169; i=aliceryhl@google.com; h=from:subject:message-id; bh=UzGlplN9hMJBDEgRgsBJzDppIssf1wZDo7F7rlGIARA=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G8QUtoW9VTGtC8eS0Sh3JgTU5tkbqVimYdW 8eVSeCqjBSJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 Rg/tD/0Z8OiEdzydRZ/PQ+I7jFTjKmnYOtrj4ImZ0SJPK0WxCFQJR2irDOZfKhcYqanOp1ppg10 TYeYoS0TiXAHOUxsrgcg5aHgog3owE/bGdmY94UXz6s8mpVhh+TSDowlnKEWUhBIRZgU5A4zHqn aZNQYU/eG67r55/yJCVYHpPPPAvhACbAUYIm1JrsuKyTfOk35tVrJFZ3l94+zANiAqPaWPxHA/t WeyOd0XWPLRPQInzYEGAQ15YBzMvXYXmHjrhZwy9JPbtuGb02xu0hNxYNbs4MDt1OUOGRogNvS+ 7uwLByBgwluySmLE1SmIa3mYianWs0JJHBfhHZr9swyXnj0NlJLrZb+4GxNFSOfhpE5HpLku/m/ +18cJR0Uu4iL2G8yctT3guJ8Q+xQ6PKN9P7Zx5KdyP6vnT7D87He2HbDxTLtoOoOowDz7dfGElB vDO+dWPNff+p0FUPtIrP+d6KjQLSrQNjVQV3fpvwUBgjndvk2ir21zEqyn0ObTNYrtyjg6hPQAE KHe0QiQdO4tWt+DaZG7Th4LwOIsIn78TUeDNKRhZBkHQ9T+TQhiSzv0ISkfvQ4v5J0m4WCjgbsN S8V2ygd9v0uljg+4lQNzrckqb9Aa7277ijkiXW8aCtL9JON+ZX6gYnOFNCfKrMahLnKbzh7VC4i lPFfo6Y+k1Szhfg== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-14-51da5f454a67@google.com> Subject: [PATCH v2 14/27] rust: pwm: add __rust_helper to helpers From: Alice Ryhl To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alice Ryhl , Michal Wilczynski , linux-pwm@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 Acked-by: Michal Wilczynski --- Cc: Michal Wilczynski Cc: linux-pwm@vger.kernel.org --- rust/helpers/pwm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/helpers/pwm.c b/rust/helpers/pwm.c index d75c588863685d3990b525bb1b84aa4bc35ac397..eb24d2ea8e748364f3e17dccbb6= a92fd7f2514c0 100644 --- a/rust/helpers/pwm.c +++ b/rust/helpers/pwm.c @@ -4,17 +4,17 @@ =20 #include =20 -struct device *rust_helper_pwmchip_parent(const struct pwm_chip *chip) +__rust_helper struct device *rust_helper_pwmchip_parent(const struct pwm_c= hip *chip) { return pwmchip_parent(chip); } =20 -void *rust_helper_pwmchip_get_drvdata(struct pwm_chip *chip) +__rust_helper void *rust_helper_pwmchip_get_drvdata(struct pwm_chip *chip) { return pwmchip_get_drvdata(chip); } =20 -void rust_helper_pwmchip_set_drvdata(struct pwm_chip *chip, void *data) +__rust_helper void rust_helper_pwmchip_set_drvdata(struct pwm_chip *chip, = void *data) { pwmchip_set_drvdata(chip, data); } --=20 2.52.0.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 587B733A6F9 for ; Mon, 5 Jan 2026 12:43:00 +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=1767616982; cv=none; b=R5Dy8H0yNS+io8yfkz5ydG8M8B00QXqgLAYCUNSusEcMC3yyb9JC9eaahY8M5YEj4+KlEdeQDFDbaf4Roh5I9mcv98mHRLKbhpFakikoVKratcyxA2KQfNRSkYBQ9whgxLKYkDi9TN3UzN0NBpVt5/6998XJU04I99c2Er1AZAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616982; c=relaxed/simple; bh=znz1eMkO+eoWuuPORIL751u0DpDjzRrKVphFIAoNV6U=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=rQ29hV4CXELihXDqT2APfhzWnYvNjXO8BfZjQgNiyyc/jybiYi7HQciJZ3u/V4cY5oJRjc83qtw5mTsnYN8kux0/kLhmJXlDSqqYvrpgPkNtSkGnUTmwWTrgu1HDbLZasfpYDhu0jo9vxEiVT6UNqH66iP7T42DhtkrImyjIgD0= 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=hBqR7+4f; 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="hBqR7+4f" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477964c22e0so16229785e9.0 for ; Mon, 05 Jan 2026 04:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616979; x=1768221779; 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=zDIgzvnX05pjgA4uq+hdSDSDYKaxyTKYQJRYJ/KEb64=; b=hBqR7+4f2RCGqx9gYMXxIBOz7Uo3qFxpRsb6ouU1nWKXh3i3g/mhMSJkWd63zbr5Z6 lpEd/+/0D0OgGWnXXjexecHz6zSeQHj7X1BVlUSSTA9I8RuZ8ZJ/YqkRVMKejgBnOsDj xmttP2x5z9b3NSyuZrVIxeRINbGhjM0NI3nxHpSHJpSdiKoX3RLe0dBkSIzVpvqKxADQ RefVhj4L4/A8PfyMCoRb7WBUk3VrsimHWSCNrlMuX4EN1eoBOOIy++SP5+MAvTCXzeH+ N86ud9Zvfv69PJ/YqwOp8clhQOry7U6HtCz5D8P4RdCOBmCMXyeFbxwWUD6JjAdPsN/1 +8sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616979; x=1768221779; 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=zDIgzvnX05pjgA4uq+hdSDSDYKaxyTKYQJRYJ/KEb64=; b=TJ15BVFVg8HS1GewG3Vx9rbf+oAuZVOB/iJ61fgab7M6p8OpVPOUF4/AsG5wQQC/li 0lKcoRB4pW67LTPNgo2rxaWuY/7HQ9wgLt66ZO4Jw+3LRAeWYBHnRV9SScs3hKfjBkWN ItB01UaRse3EHauNcW9M5YCu3XcFvqpNw9sbjr9rGIwxBnRZuBbtzp5Nkrgz41ONLnlI EhO5uJHCXOERjtxDOcoqeC9euYY6Z0g7VQJJXNAPq01rO7pjqnzDYrlSnPQ0CM6+YccQ N637rrJ+oYDOdgpf48CW0ykZTyJviOkgcLoax5VI+5zL/lWMxB+zkxFP4AX7tL6IslIZ ZiKQ== X-Gm-Message-State: AOJu0YzuwuL2ixno5xDxMjx8wHz6I/n1xq9m1wnneQgdIXktMKf7qyMp 7PU/mQiX6QT9gPDxC9XVlfCRyM3GvqH1SjCv5fWIAAazR9rXcYIc9m8zZ7RJpqrD3Y95FJc3hJV nPiPZdKl7UsegqDRPHQ== X-Google-Smtp-Source: AGHT+IGOwQBnJbDKjMATxuhzOSNzV+/iWdd/3aDXm+gozWAlA/94Aw3WV2rp6v5FPDzX0gBFUzEmxvQ94WXnC3k= X-Received: from wmxb6-n2.prod.google.com ([2002:a05:600d:8446:20b0:47a:9289:c5d8]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4704:b0:46f:a2ba:581f with SMTP id 5b1f17b1804b1-47d6ba8900dmr109295785e9.16.1767616978968; Mon, 05 Jan 2026 04:42:58 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:28 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1267; i=aliceryhl@google.com; h=from:subject:message-id; bh=znz1eMkO+eoWuuPORIL751u0DpDjzRrKVphFIAoNV6U=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G8QRsbM7ZhqTwDhncizZbgJxK3vCc4GcAap SCLty/325+JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 RhrDD/9STi/WPvoVN78zQ4124zylngHDLdegU73W2SNzf3eFvoSj7IusULeNgcADl/S7gh+Lez7 3Ome2LWRqz2nJvG4OqJ4N19FUMK8HKnps3LfZbliwOCzFm/5xgYSFMICNpl4SCj62YyzR8ATwBn I2pZhUqpM7pzIuDDUyj6/I4gpFPHeV2Remdq443hFeNzZUITCGuuxGlPhvYt9GxWQvbsWYIDZ9M 26/dqCigRL1zOaY/sv0W0BjUDhfvcYnP4GrXlFfntetsWK48Caoi9LdxW7IlqCl3ppxVIaPS4Ba n9qDQaaq3jxUDnyzEr+3mNeeWKhXCBznETAiZU90hWkh5UFj7fkFE5pNh9vaauVAFyQpjL4FmSG CI0RUrNsA3/R81XH/R/mZhbDQy5kfWEOPI++kXxKG695iqiing9SfzWGkP+luwu4Bc9HsaA4RTo 7dc1K/bMsV7Dvj1paYTvIn08dTdc/+0CfshuLsGJhxod45mnbWTC75Hx7Fsij/sk5Z+RN2qVcBy redYGydHbx6gElpRDtlk+66wicgPmLid4gHLcIzkia5CBuElfYJKgmAwLtrDqfHK1qbcoHV5EDp RGTfw7AznBtCtk6WZE58lLIWGEk+mMBSdd+JCH0qHuFIvquyuwTO0Fte7flaNa300b5w36WjMZm dxpL6c2ozOuoUdg== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-15-51da5f454a67@google.com> Subject: [PATCH v2 15/27] 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 , Boqun Feng , Gary Guo Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- rust/helpers/rbtree.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rust/helpers/rbtree.c b/rust/helpers/rbtree.c index 2a0eabbb41603b0200e051ac5c091a870bd7346c..a85defb22ff7c6d5104a503f445= 6294bfc2b4756 100644 --- a/rust/helpers/rbtree.c +++ b/rust/helpers/rbtree.c @@ -2,18 +2,19 @@ =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 -struct rb_node *rust_helper_rb_first(const struct rb_root *root) +__rust_helper struct rb_node *rust_helper_rb_first(const struct rb_root *r= oot) { return rb_first(root); } =20 -struct rb_node *rust_helper_rb_last(const struct rb_root *root) +__rust_helper struct rb_node *rust_helper_rb_last(const struct rb_root *ro= ot) { return rb_last(root); } --=20 2.52.0.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 E1EE633A9CB for ; Mon, 5 Jan 2026 12:43: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=1767616984; cv=none; b=acDz2YkfayVNCpCyRLb28AKOnmw3JvF8henAI6n4nUrbkz1tEeL+U539diHFp72BFyq5oBJ15CXNQA1hS5firvI+XjxzNgoT5w1mqgC+4C+W171qOB8kOCBqvVYrH0Am4lnwQOs/xqJjv7zBdbZj7rMX1H50V1TYEq0VSlzGKyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616984; c=relaxed/simple; bh=FGf5TitsuCIz8KGi2Bpi+wkc295BjgenmyozEMleR4o=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=GV1r/FDoblIkv4EBpR0e/Cp54VZ4DMFBpWpZ4PM8mbsHrFdAu3ivsIskhsB+55xFBMxQXXEf0peNf4S9T55p79DAO6XwneU5SlBWqNziR79GtUKQcmSLdKwk15YYPlcWmo8AiY3l9GofB75dQjaWm1Nf5IOmyf4J7nYrwjvNM7U= 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=FnKdnMVc; 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="FnKdnMVc" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47d28e7960fso91984335e9.0 for ; Mon, 05 Jan 2026 04:43:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616980; x=1768221780; 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=7t7KDHljyK/sic72GXX7lUQ+DJiATraWRrWBCTnABgo=; b=FnKdnMVcP8Tb4CPr1urWFTvA/kobCDM8eeMUozL3Y0rTbWmE9PkPeJhxRY6I0WAS67 sVnAtBxxzm/T2pXf084azttlfaBXEDffN13zKz6qCUaHWrzYs3imlNgYo66nkI4UBrU/ xu38070Gk6YtDG4Ci6Vj3ANHqLb3Z4uLqcDQdmlK4GfgDYK8UACyc3m++hkpCYQtTnvu OPc+AwvyN5yEtwCHgY2QsUcZ1ukRwH2eZRRu7gO+L7pjWvWsAG+DXjLtUB3eMuzZFk/1 +SoKg4AH+bSI2AHCq5JTm42sH6Kbdw4hWEc1zHMEoztIz9a0q2EghQyxnIpMKhN1Y1un L41w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616980; x=1768221780; 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=7t7KDHljyK/sic72GXX7lUQ+DJiATraWRrWBCTnABgo=; b=dcQF85PmrF7CZZz0nQU/Ulp1SwAQV53OPQX0GZ5bkfQsk44hux7vUjT3DKUD7IylDL Y7Ay4s+8ok5uGoheA2tblTfzpmNn3/ylXLf9U5GIG3LPWI4pfDZAxp2Mu/B6RLZJqb77 0J40NamFi9ipXlpmS1m4fYAsobU5reDiH7xPuxp/zLSZMV9ovfhGL04Wt/9OhGPCe9KA kO3Y07CMhz/y2pfihKYFdEoToqWA67v2VBzB0r5VJT1fYCab6PukukHwu2LAN5ZHPPyw Df44sFlnWmc/t7r+JcSv4MigWY0LUiM1VNtsKr5PHPi5GJcnNGK9AemD7PZ3aN/Mi3zA qXRg== X-Gm-Message-State: AOJu0YwiJng4QZZV+y+qyC1+atQ0li8Wy/cbcPKZII6fzcbWfh95pi+M 4MV9YA+H1UOnnTkK8s/ezsT3br9LrC0JR3be6reNPQC/SLIgLIq23deYuCPMl5d79ILqUWWf9kF aEejJ/ofmqoLKYhFKBQ== X-Google-Smtp-Source: AGHT+IHg1tiBcOrQitMvHuwpbRsE/0LlTWdft24XBVdcCbUxxz09Y9eVB5o0o5seEbWotyhUbJHrsxbsjq9sd5E= X-Received: from wmbjh12.prod.google.com ([2002:a05:600c:a08c:b0:47a:9505:f0b6]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:a413:b0:46e:53cb:9e7f with SMTP id 5b1f17b1804b1-47d1cec8f39mr473625575e9.18.1767616980283; Mon, 05 Jan 2026 04:43:00 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:29 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@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=FGf5TitsuCIz8KGi2Bpi+wkc295BjgenmyozEMleR4o=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G8PwK1nwyas6YUKFOxu1jkaetUmUBtBEZSw kTitvWLiNKJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 RjHQD/9lu43fZv1LfUsKMyBz5ryvjEbdSWL2DdQYVvE0XT2iJx7lAu2p21xL67N4HSr5sOle91K czNFieyrGUqA5GLcU3r9sqskvrlqpaU0N1pwxMWn/EoKwkc6NZ6cnAaugdI+TZYM8KciNdZ1EtB Ehzukt34Hmpk3fejH0t4fY7r9qgSq8KYrLOgudCCF1FkkY/QOF6pxLlzctTEn6jPWRKOn11EQQN /wpCsAzkbVueWiRIS0oXAPS7yWk3OQ3fLi3mV7He8Eqa9GzFl3Xbe7rCHRN3eFYnw4M8ONDit+a PGc/ALrc0QZeJ97FRlY7rhRSm9FSqDqmlQ2rR7TdU3HYibS5Xh0vc6SFTI4g6eVs5eqvf3EE1ZT 8yNwwo/IQKdcr+3e5om6/8K8CGRssZAHTcUfwMcAffCx3fIpKlYeyYteKPUkYMSCjIjZwQmhXS4 XNPHCzjZF16fUypUsbxt0vgI8SvHlRvrwr+Cd5y7JKTXPsjOMBvgD3cbtAsXem1L6xuToQbvLBz VkVvPv1oGORAPKCBP73AbEQPVvvCXxhnrq5BvNJaumv/broTWinmGg5wZcSOdC9WiqDqWdjYMQN HiOkbb8aXMQANo+lqWXJxrAPXII+CxDU7WjD6vsmy0kUXPav5pK6j2Gie0eL+LAfnN/qHbSQu68 /FVKWm0f8Ors5WA== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-16-51da5f454a67@google.com> Subject: [PATCH v2 16/27] 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 , Boqun Feng , Gary Guo , "Paul E. McKenney" , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Reviewed-by: Joel Fernandes (NVIDIA) --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 4C66A33AD9C for ; Mon, 5 Jan 2026 12:43:03 +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=1767616985; cv=none; b=KDDm8N7pKoc8B8QwD4Z2ekTk3koL47ZNTpwjxhBVmt+wKRIA9nR3+RbAM8wwtH6IvIHp7f2An+FnUqjTqa/o/eBW8LzzZS9NO+//i+kx0cH7KM30H8a7rhFaqxc+5jcDWexq+XL8SitESk+x8HsyfWwmXAX6DjvhZOzEGUaZR0c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616985; c=relaxed/simple; bh=JcYQ1omeY6gJv6l+RACx70Ju3nHpWHznVfksxuSUcYk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=V/1rn9IgPwTUFcGLWGoY2L6bKNWFFGU41CrSvF6vrvm4BUKpFOorBspFIJySxCKhLjUDDBGW4EAPAXPKcL7bSymL8HaamDn/SYyq27lv7o9X/hkz87WEHUMxUVowK97U929c4Vr7Lsk7A74BXljCB3SL64mwVicg04cUSvtW5WY= 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=ZI5Un5Sz; 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="ZI5Un5Sz" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-b801784f406so1436224966b.0 for ; Mon, 05 Jan 2026 04:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616981; x=1768221781; 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=2uiDz9ykHuG/rMfuTRKUmorkVYWdMOdX6papOab2pSA=; b=ZI5Un5Sz5h6G/OosqrOGmjJMddyNmsa5W1bpaIVuOKG1+dohB33EYYNlaHJWi96UYs kRi9DuFvXxtiUZ++a4CKN7oGwy0Sq3uzWvRHpd+DlnOYMIXbd8h2LsbemcUNjVgX6Ip6 xR8vx/+zqeWWneyp3LwCnJwe5ypsnSfihoD7gWk2JNFTV7WYyXoOma0UwWShuzGwttbb GFLVnosBuxn0hmtpxhq9qGIw0Q4nkIJCoBWPxcQB1CJzfo5Jo2viZ7JLITzdOFCpAuVz y0aX10LhFiiByyeFWIN1bWcs2UC/iTQgpmsNN/iYBJvsHm0XXB2VIlse+8VuzzN1CVKY 5/8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616981; x=1768221781; 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=2uiDz9ykHuG/rMfuTRKUmorkVYWdMOdX6papOab2pSA=; b=vS829dYs1WstJqIcSNRIOSsbaBw2zoXE/nGPNLvsmN8YffhsHcT/QVlx/46KT+ED+N 6JpQxsiRF6WXGgsOCKe+7eftpyF++Yz1p2rNzpBCOQPe8RZTuQWt8TAaU8L6JQI+CY+6 PFCxGecSu16hKrSn5UtHOC2sAZ1afsYFS3LNDMBLglgk1xvABCOBICbBLLSNaoGjeS2x i55v/TmM6tBsB6QMoZiwZzS6K5SC2g0MUL6IQy0de4not6ZaPNLA0canHF+ZSen1vc+r KMdNEZ1EKmuOGm6C3Jh9t8xNlioAsgvI/P7pSQvtxL4i7b0kHfuoqsKHxIAVemXpCwOe ed4Q== X-Gm-Message-State: AOJu0Yx5iGfsLGF9/3xxr6r9F/XjWxNbvf//TkSkAEOAN0WNpTMY7ebw uDQSiuFhPyBTRXt8s7bbGsg3HJMlQZ0kvAQg4vA836xRZXj1RlWLoeFgFmcFk192Xf6uQ4EDbOn NJjf+0MFIYgVulfG70A== X-Google-Smtp-Source: AGHT+IEVHIDdB7yliuGbqSlS5enlFT6fAyIS/QRlFDzV15rkzjy74HKakPNSqSZH6zNk61ODtZr2WP6TVk59mZ4= X-Received: from ejcvx1.prod.google.com ([2002:a17:907:a781:b0:b80:fa2:42e3]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:da2:b0:b80:1348:226e with SMTP id a640c23a62f3a-b80371a2bc2mr5313078166b.33.1767616981603; Mon, 05 Jan 2026 04:43:01 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:30 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1600; i=aliceryhl@google.com; h=from:subject:message-id; bh=JcYQ1omeY6gJv6l+RACx70Ju3nHpWHznVfksxuSUcYk=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G84ONv1K3k7ysWcmV40CkzmkbJD+CDIXOPD owSL02oVxWJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 Rl3QEACP03W8+przBhcRFQG5g0TM+aEI7zoQRW8kSqTNbOCUxhckUbMFfWLjCyoMFUrofGhQapj 9p/AoDpxuW2x0qfBeuKqUhwjCHj+eP2fwRLFAgqz+FKQR0TMmHRZuKGLgkmzMAGL50XnlHS8fz+ 5eMNHdMYcG8+0uEYVFIdKV/ReiX3x1EXz4l+98Gqmiv6EDdU0/JMNejcqJf4thVnTpjLvaj5GGr sW/Lgz3EjfriZN5Ty1hKkHY5Y7liNd6Sw+O9vLn1wMOxo5yCrr1JTXfCPoJisO2iBHF1pYoZetO bBtLKMMWfDaqWhqfmPJrxiRjX8vr1xuWlLQqclChSgEa5JSrdKYjbqDjRnMdouXR1NV640elZbO /ET17g/M/i6Ay+8A1NmCuCYJbh2VO4WYk3nVhgbZGVrmBFBmsgqK2XgHreekmliiPulCrpYP01c gp1tZQtLgASg3zeWMmvDbqFJNPcpM0ZiwBXL49iIwZXX9tRtec+f2v5UgXUyU0Kd9CYogQCHcCV aa/WyOrECLT6ZxClV04i6o0Jms8/bWMQEjeS3onvsYGbPbKtfS+BF3pcid0zEmewJdescA3XXPJ MVaRZ+IEGd8zc6eeqkYuiLcck7z6zFFzgJGE1kurHbEzZVIFLLjdg7Pv5X/rjv8T4qKku5SnTnz 5Vj7iVFBz2e6EzQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-17-51da5f454a67@google.com> Subject: [PATCH v2 17/27] 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 , Gary Guo , Will Deacon , Peter Zijlstra , Fiona Behrens , Benno Lossin Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 A201033B6D1 for ; Mon, 5 Jan 2026 12:43:04 +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=1767616987; cv=none; b=TeH7d/nSq5zIARrepr9RGyNWZ/U5FETxsgE0pXivzBHsDjDRbJ/1R8lGVVaBbcYBBTx45tLUjK6CiKwdoUv1O4nSGyHz4et4LPJO1isxodLe+7n6+7/F561rLtE6X7iiPSXDYCGEeHNZJjouTsAhplWZ30hgDXwji2WoBq9+Dto= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616987; c=relaxed/simple; bh=XJDth+sPXzvDab8A/vMoxX7pf/G+eV6NUOZcGtDeoCo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Gy6/S8Ha8kDOiu7luZctmYMnfPQoLtz/Wi5R8K62V9B+G0zAyCzTNkRpVT9FLNPo+jXWEJgz/GDSonkm7m+fdM7pqmb+lWVA+GNNwcBjSbvs6Hv2hPp6du9xuUlToO23RMfTpoSHl4oX/AUBhmxK5JZM44NLCZFVuL9sJuwdNkA= 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=TxHiEG3t; 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="TxHiEG3t" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-47d3ba3a49cso93271395e9.2 for ; Mon, 05 Jan 2026 04:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616983; x=1768221783; 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=Frdd68Pz1CT1ixXQcGAA+0dj7YFabKIGS7lflaVt9eo=; b=TxHiEG3tCuicGM5l4fc4yh7ulKIjWjKMR28ey+AfaY7g5FEcg+AewCsTVBdxveTTEU VARfJjBjr765o1SHjLe73FMLi/sqZv5ZCGRFH8oJpXma5tu8frYo3UqazaoniD4j1NyZ zthACvE/0Dc+OkDzq/Vn87CgxeFjQAcRAzsCpUA4n/IgeFzHXpVY5mTQERvbhf3IjpDh GNiVK4185Iwq60pjJuSe+ExxJ2cY8iFonQMPwClbKo5dCVettobPIAXwJ9SIRNkq3Z/t SrFqvEpsGmdLLYjEj/5b0KA96XjZHoTZQV8tXo7IZOWi7zY/eCyEOmjYKRO/n1Xee7mc 0Kig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616983; x=1768221783; 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=Frdd68Pz1CT1ixXQcGAA+0dj7YFabKIGS7lflaVt9eo=; b=ppImBCa4g4H4L3Q6yRLBjRo87O/OzFS29cwE+NR5zHo6qyBK7HIFeccG2GM1d5jGjB uiUbs3oqtLsD/PwR9VcTBqx8mMetvH1Qh6jWh4z8oAKivvLcfaID6/Xg1M1Nn7mh92ON 2qS82ulNTXDNABRnYGAw+5pp4Hc8t8V2p11zxyNOdVR0ZQFxzS5ybVa8g9tyH52vZv2r wTyTuqLx33GH6zAYByi2kq4WL8gPK6V+790EK1pjMSpKKgo4zIojWhg0F/TqR8iEqCWB cvu/reMOZl31qjPbsr67IkArLbcK86XnHCcb8anfDSbpk72Q12baXRtLOrXICLdN2MRx ZPOA== X-Gm-Message-State: AOJu0Yx9MZEI9eUUNG8BBEibOEJwPL1H04A0H40Keec96/HdRaeYQUG4 CJEs8z83friXKFkK5zr48EyL9ViyQwhOXZPtovtkYSa1mM/0MB2uZXyXlkAHndoctR5irBIymlf wYhDQK0s2mgMdeOyRCg== X-Google-Smtp-Source: AGHT+IElABs2fu4mBasa4gNBDtT7xHmiBhL9gcdCCxp3ToshdVXpOHPns0gIRzLgWj3whcaar++xDr69z43i+qs= X-Received: from wmdd17.prod.google.com ([2002:a05:600c:a211:b0:477:a0e9:dc85]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8718:b0:479:1a0a:ebbe with SMTP id 5b1f17b1804b1-47d25082cc8mr555397845e9.14.1767616982737; Mon, 05 Jan 2026 04:43:02 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:31 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2604; i=aliceryhl@google.com; h=from:subject:message-id; bh=XJDth+sPXzvDab8A/vMoxX7pf/G+eV6NUOZcGtDeoCo=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G8insy9uiAoqQQgCfqVrdjL3I1134oJ0Qis /W8qmTNGNqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 Rh35EACbQV0euux11CERYl55eWlBL+CofVnpPsFMaPyQ/VQoZhzbyGz0/AuS24aBUrIXZsfSBhr tQP2ejSIFrqw4RgFPLR/+HH6HPtkIYR6yvAH7LXpM4GrX7lYj/1zF5+yioEf0KQpQqmlW/syYUN aIdG2cvGS8UpDtuZHA+2yvSOz02Y13oZ+rSr4BXTP7+/o3bKjaxLaB5zilnyA95XGAmpFpaLWU/ 1TT7xwMAByqOF/0Mi7OEV4iO7LU7vNVtc/8cRwqFAW1Uoffv+c/1+R908FcCAzkqneRenz/F87E prT0thQNyB0YdXGQHzdS059VU44IfffzC8Hkw8kucllk6KxY06UJSDpBu9390WtRXU0D3yxl3tt 06m/lB5ucLuiuMT1TqlzH56pOnG1+Ur7qx6LKGlhMkrTV/Iq2emsrK2AudHkxExKIpZuClqVJXZ k/fHM4xve+f764qlO0fs2FyRdx59aBkiuweL8JZR0oMUeEjd8ZfHbTLx93SJcXvcthW7Ew5MJiS eyKDEsar5NpTxQiG7Rx/vzhj85UytVhoG0X/jV22JOtVVLDxivua9gSD2xVVM87Ub14WWjME/lL G1XOJ9VLnPq0Ddn3oyROUmVPicKY9AryASX7lRYXg2C+i+2flLaS9bgIOmoU5EKR5dGL3C8NfiJ KkDHiCAfYfErKag== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-18-51da5f454a67@google.com> Subject: [PATCH v2 18/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 BF8DD33B6DB for ; Mon, 5 Jan 2026 12:43:05 +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=1767616987; cv=none; b=h9+umSPeRGIVKqGeDb8UzMJJyta9BzVjfTg/dSYNVijqOeUApJkK3t/lO4WFiwdVQXH+kG57li5mVRfVwUswCvEJ+H0vf4ZMySywSo1y6YLqkaLxwJzQdEYX4tmM3Sv8TtpMFl3xCCIZOlqstiuFO/30SWtoSIfHl96TXmJnaRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616987; c=relaxed/simple; bh=qyf0wLqvyn+zk6WB03kFSGlGF0MlVf9aF3acrw3ZIyc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=VK7ulWwF+MA/mRxpSZiHpDkSsWMNZZGGgkY2xqrDwE5YVg7WhYKW4stnnLR9A93kC7MXQL8jlubl7GwSoLl5X/RHU6QbnVNfdLnVtgv6awmHMKZ6jwOe4p3IjDYmYIsb99QCDYz0xdk4zwSn35ufPP3xB7F34LV4rtVUv/UQbm4= 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=jeFnqpey; 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="jeFnqpey" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-430fb8d41acso7320290f8f.1 for ; Mon, 05 Jan 2026 04:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616984; x=1768221784; 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=On+1RbTF6HcF+1VDooKrSy2gO7UJOg/A5CNCVs7TB70=; b=jeFnqpey52I2hMEJRixpyuVLwxKhgkf/uMl4RFzi0NwBCRovguzYTv1BF+dVHZ2pU8 Wx58xWPUUNvGBFFcnz3H14UQ+Iv78NB89d0B/XOUh2IZnYT1IPS4kj/xY1rsT3IQQ7w4 rkGvi813ybllMYGFBVHom+ljkviIxJUEQYCCiFmM5lY4ToFvc/ipWVr0pBlEtskw7mbV XlK9jwtAG18m6pfdvAMtTlT2L8yKcGHJg+OHrgp7cDlK4WRbgNOcGfbY5/ZPaRCD47XG rLrSJYGHWBjdlX5Zao+IPRM7yB3A9ZdYGSHyRMJlqEwuEt8bkZ+9gn2hJpFEK7xdG35p Mxww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616984; x=1768221784; 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=On+1RbTF6HcF+1VDooKrSy2gO7UJOg/A5CNCVs7TB70=; b=JoCDPoTTuP2afUVstoFqL3bqyctYdU1Fc/LTeloaA8SpEoB9rZiUoCqaDuV17jv4TT wyDv02T+RZ0I7iuUzu4V5jdmnwco05fV7ni5orVZbL8P/OkFRR4Y1NHC5rOJW55iEAFM qaMOBY4HY7nc/m9HbpzrTapzg+SqNW5gNOUC1kGXf0fJ4t6aSoc++NOd/yImqrpPE2bz crRjJ7PgJR2ahryO50WnQZlag9AzR7xh9iFIQ9BXxifm2Ql3G2zIamKGSGtHkILuBZ5N BdQyHWlguqzL50hIFEqhEfcoa/myykBGh8TtAp2MmmOk94KZ4sd0s5C/9C49XSb7/QtI i4bw== X-Gm-Message-State: AOJu0Yx3IxbJt6xVp9z5/7DX6SFoz6qdB3FEHb7/0bd0u57s0Bj9e7rs X30GENre7FYQlnkV8SpQCKdsppTJYCrB3Nd6kMgFqtGoh89/5PTR5DyIQPqbTGsUcmm2PEnfXzm XhfglCLL8G3WimLve4g== X-Google-Smtp-Source: AGHT+IF71QstugUaxLNkQQ8i3V0wKaCpHcTsBX9edl73omyP9c7CJW/LEDOfqYoiRu3CoubJ7GFNOkVVwbZRdCo= X-Received: from wrs12.prod.google.com ([2002:a05:6000:64c:b0:42f:bb46:77bd]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:610:b0:430:f58d:40e5 with SMTP id ffacd0b85a97d-4324e4fb259mr61294692f8f.30.1767616984235; Mon, 05 Jan 2026 04:43:04 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:32 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1335; i=aliceryhl@google.com; h=from:subject:message-id; bh=qyf0wLqvyn+zk6WB03kFSGlGF0MlVf9aF3acrw3ZIyc=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G8CMoydJ/p60V1Q9TMKPQhgtVEqYa8R4zst jLsslLPts2JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvAAKCRAEWL7uWMY5 RjY/D/95vJXJOQU9HhNI4/6ONFJEwZZefbxW6DyuEIdYe+4w4F2FBOPrWqTsFKCLQ7dvFqK4GiQ u6KNp/6CSS4xWm9y7P0LSqz/e2kNva6MIpejsLWWsaQ7hhRaspgPWYDNfIXrM4ukWPu1mZ5cben AJHzxKky8hw+m9W1S1IzOA16h7BjqLMQCjeIZQnze0CbXlPv675BUjLzvroFYOZwgI6SazHGao9 MCUfPYw1BXtEBV7u6DmkRkmaeX++EIDCOxdO1B47yYRKtd/jz1rIx8Dxxi9Uht2vH9XIDz+KK+X 65QVxKSqInLKSUgPF8FWgujUh4s9F25w8Ggg1kJgJrN3gRKOGcJ44JFDRIFitmeuTeX+62Ewalx kjAEBODl93bFMfUXv8G2becvM29ZTiGrC0iejVUG9QOyFRUsiJsxN+NgvVdnvqIzJFU2pn4XA/6 mAXJdIcRbmp/qo13p9MAnTPpOZhd8wl5tSPC/DVzQc6mzG+ta2t2yvUrpF+37kPfBKnC4zqK+LV OqQOB1WP3fUoXI7wQ6z4fD8xxbfUM8M5L9iAO/xW/f54xmgbnCoUWiBteY27B4oms0x7awGmFoK jyKSOqCoKmvyad9wAIaLslHMZxgqcP0c9H9AbdIbifgG2rj9j+COaP+c1Xoq7eRhgzQ4BzDs4Ci VS+9PEImVvJge5w== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-19-51da5f454a67@google.com> Subject: [PATCH v2 19/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Acked-by: Danilo Krummrich --- Cc: Vlastimil Babka Cc: Andrew Morton Cc: Christoph Lameter Cc: David Rientjes Cc: Vitaly Wool Cc: Danilo Krummrich --- rust/helpers/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/helpers/slab.c b/rust/helpers/slab.c index 7fac958907b0a7cbb28ef3a8a56e0cc10d39288f..9279f082467d896381e34c43334= 92a92d626da2e 100644 --- a/rust/helpers/slab.c +++ b/rust/helpers/slab.c @@ -2,14 +2,14 @@ =20 #include =20 -void * __must_check __realloc_size(2) +__rust_helper 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) { return krealloc_node_align(objp, new_size, align, flags, node); } =20 -void * __must_check __realloc_size(2) +__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) { --=20 2.52.0.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 50F1233B970 for ; Mon, 5 Jan 2026 12:43: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=1767616990; cv=none; b=QNRrZDrTqfbd9OUWSv+4K8IHFRdUbd3rcNDpdcOrpr0+rYwUh0FDubj2E5T+dAz22rfGkuvDnkJgM+1UJeJvs7Emw2UDY9xQz+E0/ZedQM64mgWUfMiNYNoKqTQGHtwUEgK5FBAdqizkbQW1OHaNMZ4wsX3dXgduhoSEWi07p08= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616990; c=relaxed/simple; bh=MiqyH+rkPNCl8g5063kvcwsyFJ5g45e9rJr0o4ETO/8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=sYdH3Z25yuV/SRiiLqILNncBFi+dIFlGkPUdWf9ZvwDZcYM5dWoeUUQReCbUGbgXjZAaRorDm1p1obrFhGLBRGSv11dGNU08nCmSsLTSwZVND9ZaJiBkCpw03pf638sq2QNKkFsWe4vAhxbJUERZjQTxL0eJ65V79jOrbZAenkE= 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=aDxeZghY; 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="aDxeZghY" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-432488a0ce8so10923753f8f.2 for ; Mon, 05 Jan 2026 04:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616987; x=1768221787; 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=nTIoQaEnog9WD66pJsq6VxxlR/KCBsI4t9oYkfofaxI=; b=aDxeZghY4poXEMnXXNErzplsnia+Gfu3+lKTJUK8Iksh3bRkT6jkloykUXT/bvjDEX YxaifShAtjyPAHELznEq8NkY4t22BBEqGwAIj80Ei99YU5ef/bb+EhWB5yTmjaAh6bck nbUPJPMA+HRC+/HO9y5F+KTzPr6OH9rPnEJlneC1tdg36bvGOTBx3DEqIH/2ipNFo8M3 ALwA1UxzzGA/wFqYTC4I0y1a61Jm5ZdJCXd02FhhqQCOT+c2fnzw6PMa8P/NCwIwtqXz EKT1oRFl/aJQaguhPX/AAPuHTf+HegKVBICh0h/VIcOyVc62ZpDbg/G/6pdO43PLj6Bq qNYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616987; x=1768221787; 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=nTIoQaEnog9WD66pJsq6VxxlR/KCBsI4t9oYkfofaxI=; b=w1/P+dfIFRm0wUsu4IcDKQd1r0y/hs4U09gLcTLmN5YwD/CrCruIUzWkphexeUe7YG fBttqnSd0wkHV+JUnjcaUmm/p5FTbh4RIn6TdkyUIu+Du+nSrg8vFuAEpN08HADQyBYc 2+nqbqy34CW1C25tTYojxtZNjW56BWB27SLcXgZ513XdvV9Uq51ncV1FU9hvwg8xxNTB r2fZm+m75taGCPzVb4watuPUOMCzkgzOSlsrXwVSa9qDtcci8k/YBTApzS5QUy+IfZG6 86B2vnmqSr9oYa9HVaCt2rcuSYHiJwI+sQRI8Q0FGRQPulxmiVsdXphTwt3tqQapHS9a DcyQ== X-Gm-Message-State: AOJu0YzsxTtIGt7gtkoSN0V+sZ5tK0SFc5knXscGwJYnX9yxQ3LAYX3u W5Jg7QZs8ByVlgKyHT08h84RQMnTeE43oOz8bg3Pfcg8EauekveL4fU42IyejeHNVaU9c5C1cyY nv6wtVn7TAchbVRRDGw== X-Google-Smtp-Source: AGHT+IHUtIcXtQ90BbZJ5bLyfIZ6RT6K+jZHmCXbUV+wMcYP7ltmZI6aFNS9LkiV88dg6NGvWhDFVNUlOaNMPLw= X-Received: from wrig10.prod.google.com ([2002:a5d:64ea:0:b0:431:3b0:d1fe]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2c01:b0:431:92e:1d44 with SMTP id ffacd0b85a97d-4324e4cbc63mr57747274f8f.20.1767616986764; Mon, 05 Jan 2026 04:43:06 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:33 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=3844; i=aliceryhl@google.com; h=from:subject:message-id; bh=MiqyH+rkPNCl8g5063kvcwsyFJ5g45e9rJr0o4ETO/8=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G93m1K7h7qTz6d0Iqe0RvvIqF+lEQO4z03o V2rDhsHoWCJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 RuGCD/9jqGVfJNTuUpjAxXuBBo0MIZvorxYUdtZ0z2YXWkuWmka7fiDyesLytHRSM3+koqFIz67 pd8ft4TI9YnFsac7QQrRO4NTFmVNrfgTbsXqB83R7BaUCaAbQVgqCJIAAsJqbi4ivraD1H4tQ3/ qCGk51fFDaNauFe7ewikFdIZ4iATd6u9w3wCXbeKY+VgHCj8k44TkL+B4SHOFX09+Vwt88QIPxp e1MNXbdXy0WIWDfuKeLeodnHHZ+2/BHKBJZRg57I+FO1yeyRC1W7Rjr7zSe5xVIv50GBxxZPnZy SPO5mLb80f6nVa0fC3ERA7nzrQMH7hXoTLiASuOWNl+aSfQ0tOqTKaC42yPWj3CN7GgpXsDjFDe CHVK2191cLf/nVn/83XbW3K/qgJnSUVaY/JinZWUOpmuiL19peF8cKzWtwxYcJ1mPwqRDrT1JT6 m+i4fkcmWUOnDl5whjZ4yxtq3yj2em4e05dusiW/JHWcu+qeRxrcNTXikHnDYbfL9nLKYgZDcnF k9n49gCarVV4fnHueHK4FB7I/p5rZDJjSnlMLdMWGbYO/Gq6CXv+zy1+x5qnpKce6USWC+aeoxh OYMsQyVIm3Lviog+PfO2KLAjaK/LehwxcFxOXAWIjMBgiD+MYX5aJUCR1rxCoHR7+Dwp7ENCX2b kHDWYYQI/lRrV/A== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-20-51da5f454a67@google.com> Subject: [PATCH v2 20/27] 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 , Boqun Feng , Gary Guo , Peter Zijlstra , Ingo Molnar , Will Deacon , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 A4BE533C1B4 for ; Mon, 5 Jan 2026 12:43:09 +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=1767616992; cv=none; b=XH/9KXFztz/EY1LHN0KPViGbRD6UNutd72K6+Y1P3A7ezWh0Vxtj6QzPb3xWe3oyxJMnWxKXfvvMQ6QItrnzLhdAGAqV5KrjvWuiaGFN7CIDIrY1Ys9IOHv0ldJfCvZ4pSv6bGCNJGmLlIAFUDRsHwqj1LfYQJzmiw+i9Ordq7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616992; c=relaxed/simple; bh=e4nrrm5xbcyZMzUpYLNjE75lZ2UOHD77VLTTOG+eLGE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=IahOUkAr7AZnmBaiP9+WWdsY9hG2esKu1B8ZoOYnTwsbncV20HRwep2oVVB0p9W1ug5emnbbZjaLBnRkTYHtZ4T2foWZqw2i23KoeF/NC+MMpbbrn0ZagWO7auyvNEL+FM68Q3ZKzU5/toEYGUMniyvYmkXLIxOD4JkCzkhX1G0= 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=YVGfnjy4; 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="YVGfnjy4" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477a1e2b372so113694255e9.2 for ; Mon, 05 Jan 2026 04:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616988; x=1768221788; 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=OYzWwgmAliEwfQEPHrauC5nD+rAzF1GQXy4sVPk7+lg=; b=YVGfnjy4imT54+zFjvwgkAbEINE1ZGIXOycI7QiAYEHicBFQ+OIqwtmG43r5yJHOAC JMYfEB+OPud1ABH4jc11mrBF1kEsErnmSDQWuiLzu8I5JybTJlXyGEEy8g3ncL3dqVlg uJsE1ll8s5W7DbqxXtSWGkrbUYk0ApS96LiiRKFNZpKPRn2zHJ1t1oEfXUnU1AfWON73 M5UX8U6/u0Cvxtx+euBEo0m/0eqrDhDxGBTPrbqHsTRncxSwjYIoRzktEEXtV6jzbjRj ZC/O1gQBTozbGNf7o/R9r2nulQh4EhUfB3UYUGUXYCaV6G+jBjxYdXYRpMUiiIKc3WSh 6Q+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616988; x=1768221788; 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=OYzWwgmAliEwfQEPHrauC5nD+rAzF1GQXy4sVPk7+lg=; b=EU7DMsdvO4EODHBRkCsM0aE6t8y5zNgS/J/+HPkKMDnzs9b7dIuPt7qNpRP1e8yrEv ESqUEyfm/Z2Gr96lGjVjYTp0B8swU6TWbZ8ZUcUianRdnwq/xgn+Kh74pkE91oLnsEfC SsFHXUKJL2X7qavg6resvijLJmMq5Ngwz2zEO3mwWyouTSV6QwOiILRdVKu8XJjZyQO2 HE1W6Ko/xRD2w//7rsiIzvKtqoxfzaVy6xnbZ8f4b4/vWHJzYJIeSVTritvk4SyxJItd AkxMXiESjlQvlInoK60kV//IJoiPHIACALAyxde7isWtbmbKkK1XEkvA3CvrbhYZb5cl gB3g== X-Gm-Message-State: AOJu0YxBn2zYoqKPIrMSVBIYsbxIWh2ovmHaGpKgzAGYK+awTqDanht8 enGIc9yHm15Xrv3836++49t8pACxskmRUNS7G8KJpEcKS1l1Iy1I8O06rFiusXZxnHnrbbAjuMt 7Mkvgy0NmIKsZoFTxbw== X-Google-Smtp-Source: AGHT+IGDqrgAr5Z4MQA8RIWhocXuGBP5+eed7VhAoVwELBrQWnPlaU+/SaKT+l0gBAl6Qgp78Sk+dWYi3fCN08U= X-Received: from wmby2.prod.google.com ([2002:a05:600c:c042:b0:477:165e:7e2a]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:5493:b0:46e:7247:cbc0 with SMTP id 5b1f17b1804b1-47d19595fa9mr541367195e9.18.1767616987981; Mon, 05 Jan 2026 04:43:07 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:34 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=3086; i=aliceryhl@google.com; h=from:subject:message-id; bh=e4nrrm5xbcyZMzUpYLNjE75lZ2UOHD77VLTTOG+eLGE=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G9p4uCEFC397NTuGfU1oBczrREYrVE2w2RL DtKwR5WcR+JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 RgHHD/9MbsXH2qKm6d9XPnZqN1nMhXxq1bfN4YyliMKl2mIo8yU3R4/99/yARD+V/Minjnvdx9t MDcQmyaXDY/XWs7iZspiJw/HiWmPwBw/WZH2pT3amtX53DmiUZXIGN1t2MVjd1yMqK9Eyvlu+q1 o3A8oGg7KBGtbDVry9nqUgXlxLJ/VdWVOP41rU554GfU+C+SKgt9qSjpuUDJppyITGtWfC6ObJP POfMe0KArzR7SC/IHaIMjXJMcbkUMqvpbG5pzImLfdah+BPDtIp6sZjAraiDwFuQ9OTGMWDIDjz p+FXQlHPoKV2uSu0UYEh8Quu5J+hHBARUrW08S/Mrr9Xkic94H4wtZordEZa2+jW/u3/tMEA5t/ mnZ83OLp9j6+7k/5MEa+jZ4ubhdXwpzN7Li1vrd0zXPGE8lxzCAMbZ0ZRKBZ6ObKf91gnvTyAGL WGfiPO0Zl2YKTEMwu/ZQpNRg0Ow1FYc6DnS5TEOnfEi7h1R0UEDRjV6ywfi7cfBfGIuRaMK44Re KnenMhGUM477eaWUgPFg7ouv93voGNDQfD2cvSTJlkcIOoXVJ7cPlSRt+Eiif5mwA4X+H1uXdu5 jZhLpmQsy+o+BQwlSmf1BkHcX51s/y+0pxdwPqKiVn0PolQHRsggNjWXnDzmYNuRR8ngvTcftFx pmOi3CX6AJQJbXQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-21-51da5f454a67@google.com> Subject: [PATCH v2 21/27] 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 , Gary Guo , FUJITA Tomonori Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 B9CDA33B6D1 for ; Mon, 5 Jan 2026 12:43:10 +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=1767616993; cv=none; b=WGuv7qayGBvlU0Tu79BBo82ndeDLqEpFvwqeiDh+QljEuWFd/BpJ3tfcrWPRPx08oAhcKbtW3UKpCPrF8gtoZJR6vdxlsoKrsm6jW4pGaErerqEMpzwKO/Cz0y/H+VD8T1lqEyJRrC6U0rkrvyGTODS6f+Kx6xn9dLUonIEioho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616993; c=relaxed/simple; bh=eIFTMJvvIG8WnTx/bh2M+JnarWwYg5CBU8VbbqLKFuw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=gJhz6jVWnERJ1jq3NYEIn+u94RvMYvbksnGSff2qJNUS8GoCJWOvArTf1KjjEEGqzccvnDMXZBgXvhmCwo97HIFV/i6s/w7inkU2sMcX3sNs5ho3elKteb/uauHIYnknluiQ+KTbf2NKAl4xuDfsgH/cZFVo2Ft6K7lwBxw/1hc= 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=VfNY4SqI; 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="VfNY4SqI" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b7d28772a67so1390134866b.1 for ; Mon, 05 Jan 2026 04:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616989; x=1768221789; 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=vZ1w17uWB1ETJtgqP9MglCAj+wjV3dPqqThIMVoGXnk=; b=VfNY4SqIudjD8r5SHcdfQOJlEWrz65z/QqXgOhguAbqv9ki/0Wcd4Qc3doXc+zGS47 zpnSVjtrc8MSHDzmhkk6CbtFnqroGYcebxKpQM6oN0VpM5124rnpiaRtygQf6/jsRZri RHcuv/IuvFuHsmb2PDhFiI6GZPNvhcSJD2mjJpm9fkRkFaxxksVw+l9pgP++2YMRgbzM 2Zwh7tsogtK6BWjM4tnWR0cEastWVBGHYN7MSRUod44f2gU7mt4UoFojznZHrYW7fiiy n7lNYMmWyngg3PmjYUztKOxe5uEWMr4PV9perBo4VUb0o4MnaKV9LEHehecVi5J3SiMf w3Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616989; x=1768221789; 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=vZ1w17uWB1ETJtgqP9MglCAj+wjV3dPqqThIMVoGXnk=; b=EaIijD4Jhl00O5skPrr+DuKEj2fid64adrDzHEd1o9m50xfonPsQmuRs3HZLbUp/W7 juz8U29Df89OODtYhf/cT3FA3bLQiIOu43LaHOXgT3/f4bJ4+xwEfaVjI0AajwykT0+3 t714xj++7R023jD23DH68TowtusWt9Rkmt8a6OdYgy9cBn51wxgwfMcbRMZNckarT98P 67v/DlkTf7XqxlomhPfi5pF0anc38R6visVkGk3rosz0okj9rQuJrbs+81PCK+EGOtUs p/rbNOhywtq27lfB7kDJ0wYSSo9HS7jhIVtVhJXFAsJRQH50AXauBSrFBONKaTbg3/2l qA3w== X-Gm-Message-State: AOJu0YxG3kRS4zBvaVP7HMSqdEY6MQxKrjTqG+DncYn2AYW16c0UkgPd 4Obx8qdzMd2eusZLjxJkV47F0fT6aLJ9IHj8pTS9hf8WngHUWKJfIsrninGuj1NNzeWFfgEgC8d uNj4xcpNHASZGFf8r9Q== X-Google-Smtp-Source: AGHT+IEfs7Tj1awy8z2piQbyZvKQSdOb3vhusJoHwVFvSNLuo27yZEsGUMNqh4ty+o1Y1P3euU/d7I+UrdqSx6w= X-Received: from ejcrg14.prod.google.com ([2002:a17:907:6b8e:b0:b79:f6f7:595d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:6eac:b0:b73:6b24:14a0 with SMTP id a640c23a62f3a-b8036f10e30mr5119035066b.18.1767616989208; Mon, 05 Jan 2026 04:43:09 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:35 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2084; i=aliceryhl@google.com; h=from:subject:message-id; bh=eIFTMJvvIG8WnTx/bh2M+JnarWwYg5CBU8VbbqLKFuw=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G9V1HIWnFSpQ0uxJw7pLlxRqHWjqHEfsI2P GM2lc+y/tqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 Rv/wD/9dlO73AM8tUctSY75Ii5NfrQqeu2TgC61ONBspIlSFpXHlQ8Q+fesBtpDtlHTf9wa8lnC k81INDC1kRFs+SEutxbUq/l5EG9+q/Q2IVL7gTk4lNdIl7FLw3O9NdeAoB/sJbZicS0KkkFkpVk CnTJuJ/+xVuXQSqSk3IJeoCOP9sdyzPr5RjWJKYdsBXkB1h8/fTeQBhH2bc07fHyUr6gj7F3Usr ANy5bC8k7vmQ4tpj6YHQy0RljOydMVwT1l2riWXXOdoD2/AOC7ZJiARjneTxAJs2+jK9lyEs2/G CbVVUbQBYc7yeLxRmMWQ5Sb3WjCDgmr5wTeGUpwPJUfLVBaZTXo6yOMmp5gtaiYAWRQabMx5SnR Fm9zca8yl3biGM3bpQsc8+Nv6J0jtVIq0TObCwHjqcgsJEvvLU7CzhBBvIqX9hopzg/D67r7cM4 +b3Dn4vAdMhEDehMjqZ4YR9Q3R6uOMeMt5ixDBW10ozYAAb6D9c3r355ogLeWChflTXlDemVssY jNBlb5eXlyEB99uJ06KMBybjTRralEW5+9056vJ1lxep4kLA54JzkKjEUJ4+4x50PmLSt9VukJD MOgEGNmWQxL6e6obJfeWx+JThgdDjJ/DDEZ8xU94XE4ooXMougH1iXDFHvMpQhrE8bNLAIyENwo fX8xpOl8o9BAjNQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-22-51da5f454a67@google.com> Subject: [PATCH v2 22/27] 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 , Boqun Feng , Gary Guo , Andreas Hindborg , FUJITA Tomonori , Frederic Weisbecker , Lyude Paul , Thomas Gleixner , Anna-Maria Behnsen , John Stultz , Stephen Boyd , Fiona Behrens Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rust/helpers/time.c b/rust/helpers/time.c index 67a36ccc3ec48379bc5983e58b1567947c5dcace..32f4959704939c0691bca03bad4= 8b95becf21d10 100644 --- a/rust/helpers/time.c +++ b/rust/helpers/time.c @@ -4,37 +4,37 @@ #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 -void rust_helper_udelay(unsigned long usec) +__rust_helper void rust_helper_udelay(unsigned long usec) { udelay(usec); } --=20 2.52.0.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 30C3F33BBD5 for ; Mon, 5 Jan 2026 12:43:12 +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=1767616993; cv=none; b=msKn9aOZGcRGwAU9Y7zeQLBN1lAAAoiqdbp4lTVGWm6jVWS+YvMn0U/FaM5C8aMmcKApl6cZIKhnuxeo3UcjhDrvcOYMOyEh7OcWJigrD9aQLDdeQsV+6MYhQEgJWKZ6OG1L8GIc18JoKx43ROjfkooJpYLTl7cboeEnWjaX7kU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616993; c=relaxed/simple; bh=j5GFWYSr1AZNSSJjCDOI7L4RZxER0Bd+jyzxlwm+3/k=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=W0+xtRF1o26yPAAIsAtMvjCgNqRPZuIn9G7cGwrhW6K2tpEqkEud3jqihskURxQv+fqoeIrh1OIvLOp/tOwS/bnYO1XSQWNPpVKzRleBuWV5rRozUYbjwmTM6zKYQ2GAI3B4KFL1fephUJ/Zw1wAGeliVVoCGI0TJ+bCXWktGjA= 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=QWNAElKg; 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="QWNAElKg" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-430fdaba167so7490738f8f.3 for ; Mon, 05 Jan 2026 04:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616990; x=1768221790; 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=EDKiZPDps4gNzrUXu4aY63b2fH6dAH2WTND4GKu2FgE=; b=QWNAElKgflC5pYDE/LBKMsP13KmTyRZhCTcGU+r8ioalzHnHXCeloyBszZZzYk3Dfc NtaZPpA/vGdho8ffFJs8mltRjDw3UrrkNujXBQcuT4FxDwWqccPFBTRhRU7ILQPk8knM mL8yrCU4pLvY0GeZDL8NiZ7k3thhzV2SEJOmJ00/UJrBYiRYccnbl0dGMAkqh7wdfhns 3Wuh8gFEFg9Kaank9JQ4e5KEb/FdJExsLfthuWvPDoMZWNcTgWxHK8LXerMvICN/YdoA XzE4Jr+ldcMxZfyyxUi+iuKOZAlgtSvdY8oSdad7yLCI9GGVh0V2R1y4Ttb5B9Dt5qcS 75kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616990; x=1768221790; 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=EDKiZPDps4gNzrUXu4aY63b2fH6dAH2WTND4GKu2FgE=; b=O7V/ztzv9AZkZ8BOBdEuTqz0+bn6uVd7zPjwjQfxwq3tPl6LgE8e5Kjc3GBtKsQAwL 5JNQ8RDH7VrFoTfYn9wDH19z4s3+X4O4j6VdMSSOQwIdh3bXZHp+JIn4gEnSHnKcijW9 2rT/V0lCgjTV4/x09ILDWoHf8wN4Dz0guEs+tOi5qfoqHoRrarXBXGcv/f5swVpi3jAf JT7lXaJsn+5I9MNDyBTs8abLZbYF2aVkXrZctkDm/pFzA4t2vaO4sT4M1jwaiF+BCx2U /gUYVy+GwBehvPVKEnvIBl+un6H0Tu9TXOOFNgvoW82q+hL4H7UHNAyHFv7v/HBHqKRw sIFQ== X-Gm-Message-State: AOJu0YzB83S+vi9G9nUvKdvo98jYv108+92jUgBkZqzS/NI8ls4O9gk6 mhqQ9A34wSsHgpa9wu0H2lehZcs4dV6FCeiQdSZYQkTofdNvQSp5omrVl4x+oKx0N0CBFEKgbp3 HCOvshURUnyZ2co4itA== X-Google-Smtp-Source: AGHT+IHmToTb2zkA1izcI2KXzu8TzW83VYafNzp9rHd91uy9++9pECi7GCfHtDlLZ/wd/+rvdP1Yc2IWgXXX5VY= X-Received: from wro1.prod.google.com ([2002:a05:6000:41c1:b0:432:5bfc:a788]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2585:b0:432:857d:e425 with SMTP id ffacd0b85a97d-432857de5c6mr33370290f8f.30.1767616990587; Mon, 05 Jan 2026 04:43:10 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:36 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1550; i=aliceryhl@google.com; h=from:subject:message-id; bh=j5GFWYSr1AZNSSJjCDOI7L4RZxER0Bd+jyzxlwm+3/k=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G9IsveeCqz2ptVxecNVTkOxYX65e1L5otsx X7jVN9WyzmJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 RnS+D/0SKDwlQOCJzRdK1RBnQGz/w++oe95AeWN07A2/++XSJ0of/WxMdyFD0EFtoDau6X7jli3 Y1wfrBnAtQFxdr2mMEGZ4RP/6u+Jm1PBb9lPpAy9WLz1fSvVl8bIz0bR180zgfq5TMdGT90Gs/r Rwhrpm/DJZDYq02C+W6tsFCIYBuKA3L1Ov04GrLpG3jomrmjTQque1YAKyT6CsXjzBsvLea5TyE KjVr3I6k7Kd8MY4Mels0yUVz345LRdY+xCbo5PvHrDCD8HKWqoPR5Kki9aT3Vlnft9RmDIZkNhB iBZWt7Ou5KfDkzy9enU7EUc7dkVYyDQxR1ug3ZyJIGpdzaG29ShdxsBsyy4a+yiioaRY6DCOVFQ CsTbKPJQZ+RNGl+L5WGeNEvZPDsL+sAUbBzWSrfsLysEQZoNEtZsCQdwLQ7dUpuc+n07wukDt6x fE4WAZEyjDTXukXzwm1E0gP4STqAR08ucSw/0424VrzN1FJum/bk/O5zUhffR+DXit38JOVsE4p AshgaNjJr8naKNyxW+oJDkWplTG2OufNGNK4q6I4ZhWlEUpNNzbN03Ysufk96ddQwy3jxHE7eFv PIHZR3xkBU3UKLxffovO6QB+f8Rw+fkkV+dt/IiqQwj5tnSfHUXdhN+ZRUzb0fSdEFzWKKsS9gE ehjZRBVpPJr4cZQ== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-23-51da5f454a67@google.com> Subject: [PATCH v2 23/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- Cc: Greg Kroah-Hartman --- rust/helpers/uaccess.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rust/helpers/uaccess.c b/rust/helpers/uaccess.c index 4629b2d15529abf20d02352d587808b621749c61..d9625b9ee04669777e01af05034= af35218557050 100644 --- a/rust/helpers/uaccess.c +++ b/rust/helpers/uaccess.c @@ -2,24 +2,26 @@ =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 #ifdef INLINE_COPY_FROM_USER +__rust_helper unsigned long rust_helper__copy_from_user(void *to, const void __user *fro= m, unsigned long n) { return _inline_copy_from_user(to, from, n); } =20 +__rust_helper unsigned long rust_helper__copy_to_user(void __user *to, const void *from,= unsigned long n) { return _inline_copy_to_user(to, from, n); --=20 2.52.0.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 1368733CE92 for ; Mon, 5 Jan 2026 12:43:13 +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=1767616995; cv=none; b=Rf7rAxWV1PU4BEkz8BAzKgi4xrjJ2gEqPR5Jk+g9MC3Y8g9bw7UB7FA0LIMVbPPEMlRMgJmNIWWKmEGqZry+UfxpScpv//uxk50Wq0goc+x++OL8P/YcoM6Asq/tSuxjT0PKnR8nxgJm424vFRZO5O95w2Or1c7K9Y2IS22B4ug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616995; c=relaxed/simple; bh=B0MohqxbCI1xTkiB4+VB9WUTW3/7Lcw24CWoxffFhss=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=k01VKNwTFXwbBloaMBaO7VEp9CwezTtiOTc5coiN9/0aOz32nDTVAaJ0suPqxRX8NnVFz3ewf36mTtlvom5twb3QNMmCrugueR+NLvvrW0W6B5FkNVc+pK2YsM17VU9b0hLt9DgRGpQpityyVFGBtVRkTipVCaCiQ730eY7t1Z8= 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=AHbIohl4; 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="AHbIohl4" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4775d110fabso123517755e9.1 for ; Mon, 05 Jan 2026 04:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616991; x=1768221791; 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=JmgFkrV+p7IPs0w7DRe6C0kHZv7GtilwGuTKSjHcuPE=; b=AHbIohl4Tjvh71bstdJO32eLMV7qymLo02EzdYQAFFrJ6smu/gTTfC8r/FzQWrTQXi y1phsYWSPQPJTfh+slMaApT0iXuJsY4osls1XDOTLKc97e9rwVOEH5gVMcZEePYNdbv0 gVTKlLWpU9DcAn2XMqVNr6vawcisJblP4Vl5ipQgv+ABWZ5FNNVLA085tu01MnACcAIU 4MJ6O8/e/TLC8w91tEXr0jVFigtFf5Hop1PW6DIACPhHkeaN6hEPlgJKfmvaXks+w9MR PDb1GobirXcYJaGQKnLaMWsNDm6/SKrtV5dpz6rpHRNGZZ4084mvVy549AfcNC3Z0FUj tbsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616991; x=1768221791; 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=JmgFkrV+p7IPs0w7DRe6C0kHZv7GtilwGuTKSjHcuPE=; b=U3/hItG0qCsAeYSyN56RjzRzFjSqkcOLT1Zmkp68mbw5x4w+GIpZZnSOJaAB6MA5yG VN7CBFtVqg1UYUUieUTv4OvVoTgOKjugnFVXEtXJD6xX8GOOhqrpp1NgB0MMq8PM8XA4 u8ZKUEW/LGi46eKwj7zCGAUZupprsLAcOCYNkZIVQ9lr89VQYttc2fwr8rOUVi/NBt9X 9SuqJlnU7B4Ei+ISKQIxIQXxFan4Ii1isrZg/uUFVsXqs9r4kmxM2K/iyhWN5qfwaA1W EO+3D59KeTHtFI4Uvez/SL7MfwpNtV6md285JFZuc/hJGf/AExIygoP5KDPGgmvUtk+3 enbA== X-Gm-Message-State: AOJu0YyKOuPqDB7hCmMXdOuU0OoUkZjH3tfoYAdOZtcT+3xCY/2sE5us BXaNjop0blWQ/xKrmJH6g5HnE7Hb6RZD8UU/mEMNVupV8ZjEEeKU95qwB5m16z+dxyizWkHLSYe KV6QlJeyRnDPWfKaThA== X-Google-Smtp-Source: AGHT+IGd0e6KVaNU7yKaJNmfg+LVDSD8ZTaNCVkdFCCmBxQPqIAvE4LsH/9LstZQvjjFZZIDWSoUtoQGBk0gRj4= X-Received: from wmlu14.prod.google.com ([2002:a05:600c:210e:b0:47a:916c:e045]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3b8f:b0:475:e09c:960e with SMTP id 5b1f17b1804b1-47d19593d0dmr790735885e9.32.1767616991722; Mon, 05 Jan 2026 04:43:11 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:37 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=934; i=aliceryhl@google.com; h=from:subject:message-id; bh=B0MohqxbCI1xTkiB4+VB9WUTW3/7Lcw24CWoxffFhss=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G9nnDphlnEHAacIORi0SP1Wt7Lg49jqi1FY 20FIkOEQlqJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 RiTfD/4yebLqWfLaXDE2OIbogSUDyVLIkDSvS2ibQ/81QGqtSo9zuf+JF7Wis0pAfk+i8e/2oyL RvQU3KwltdboZ+Kb9afEunqYR4jdYoFwTazNt/Bhd6oV6RBAGK4rRG3i90Ut5Sz8XKN/gxsVx0B a/XYBx6nzJvec0N/Y9naXBja2cgku+ohWp83EhM4yO2/j/WUMCLQYv5hH1TQWo/vG+i9nPoja0R 4sXyVWAm2Xcgv4llNJX/VDAPappJcDLzq6e6NAl8OUr5LD/ctF7PcOvobYBP2cio6Gjn9Y2+wax u4G3aCLwXWiCYb0MOOKW0Cx0LiC8F1e4qyzhPjsU7eNVOed0uTk36HHLcs+ObMimvcaN8P8V32v ewQecA6+KOGzDWDrXEQy5s7PniD/4EG/t85nBKqIcxFcj5mt7Rzf3N+gV19UwSEzYet9nOdpmtO P1A83TBsJyl936AqKAH7nLBMAJ0F+xZEoNzVqtekFk+OEHUyPsC8BFlaAT5r1IVQ7Vs2lavkU/t 7mjEIcbAP1T3pxQOLBXn2ck9rZoED/z/JltLbwQk5lSUtJSRjR6TBfUIJwYrfd+PVkUdeZuRAA4 I3dzeO3ghmo7e2gNaEtElOsiyxC7fPQSZTxXhV/mh+dDjD2AarTGHsVvA2dGDZVmAatTRitqWS+ uKtBoCadNGhdM9Q== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-24-51da5f454a67@google.com> Subject: [PATCH v2 24/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 C73CF33D6C2 for ; Mon, 5 Jan 2026 12:43:14 +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=1767616998; cv=none; b=Uxun8kHfHa6EkobFogcpEqrSFBMoIuqfM7fO2Xb8xwehDzUUIbJt6oM/fqM8OsXMNe3+4S9x4xg1m7sKdbGB+iHXRM+miCNZqGpYJstXCO6421ezMHGhZgc/i8O+5w9NI7XAKQl8nfY+JeiE/Ytk4TuLeUCFUd9VG9v2jQgf+6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616998; c=relaxed/simple; bh=v1+EGq7D4jBRtSbDav0cm8Io+YgiouC55ft1trA0hnI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=t0YAPf4MzUZ8ktteXXSkEH3yMxU/mxnbZoJGS2cOK/w6h486fi1e1omHy1LcVhs/X2i44b+/mhviY64I3R9NEca7TeudBnRRQnhNqjfrWMetxp28/dCrU5J5edjPVP95YjCP9A77m2k8d3hUprolTD20pvStHOYnQ9UuKdJBiKM= 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=y4pRt/QB; 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="y4pRt/QB" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-432a9ef3d86so999323f8f.2 for ; Mon, 05 Jan 2026 04:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616993; x=1768221793; 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=UoOGxHp5c3LEQKMG4m1RO/3O4mh51Ss+p/K+zAd3xOM=; b=y4pRt/QB74VdIxI0oN/UYSnHu7n4TpMQgqhH7UVv8kDVKcGSUOmiQmAjzoyWw8QVV+ C1SevA1oUPmoGAPo97omWkMIjvznJulOpNGAVOuK1cSLghwl/zgzu71GcCumemGWlAZM m58RP1+rSVoeKCpiGbIb+VcNdsIgfDkxnieCO5bx9UFjwgEd3iuOTlduMfL2iJH7bjBb mJrXeNebYQc+zSJ8IHMNM6ILmR3Y04iIM26wEJdiEcqfe0Mtk/B52kJjzm5CeH+Q8hp0 JpVddftgMKzoyQT8yEit2aTkKFf32vFDHFK9MHZpb8E64crEUeknMWkWPFoFSdeMkeTT V3gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616993; x=1768221793; 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=UoOGxHp5c3LEQKMG4m1RO/3O4mh51Ss+p/K+zAd3xOM=; b=SfJffFB/EJAMn/ulOvz5nXU2xpZy4x7sINiW5Lan7c1l+/rdtpDWd0cNGa6BT58UO2 +05eGpxCYtowdbhrXZcoJqp2elcWyish8QVdNGwO75J8UPOEDne2ZKutVIIUWjCmg3hP /AOU4aWFO9ExhLkCLzYXWRtw/jGdfYAiHjhckkiOTr0D0RoLROE+c5MX2iipSq81kyni bycvxYw/omyTpSwX8UFyC8fInoxd9PCOT5JFnoGhNdbnCSBq8Omi52131DSWjYYMoJg5 lJQy+M8eJ77qkHUTcNS+p4EP+oM/GiQeHJk2jjUM1KVLjVNa6Mc+pG9mWeZfJ7NCFhsf dD0g== X-Gm-Message-State: AOJu0YzbJOtIv9AuW5CaLCc3UpbgrijhtmxC8Ya3dE86UBc77+eoE+cg 5zOcKUY+nSE9vaqos9/UYZZQZI4AMitbdbKigWqn22+vBSXhbpIQw5Y007oVc609FFgeVOG/3pi HY5qBFTyQ2D8mb6THhA== X-Google-Smtp-Source: AGHT+IHUqYez+/iMUKUQaXmY3dj1NztkTOdgU5SWcotZqbcXuu/PfaeGxO1uUbkNHg77sp/JLWLDlwlxygWUrsI= X-Received: from wrd20.prod.google.com ([2002:a05:6000:4a14:b0:42f:b8b5:4f90]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:290b:b0:430:8583:d189 with SMTP id ffacd0b85a97d-4324e4fb659mr67711072f8f.39.1767616993102; Mon, 05 Jan 2026 04:43:13 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:38 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@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=v1+EGq7D4jBRtSbDav0cm8Io+YgiouC55ft1trA0hnI=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G9RJLag7sgQFYM2+zmNQHG2YhqOjZ+yP3Bv jkRNBCma/qJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 Rk6nD/47ClWL4ZDSbjrwT0ZKbTJcQ1y6ejbZVI0gtlj47H90obYr/O/wMcPcTu6gEP3OfyN4YDw ME5G3NXw6oCI3Ouznq8QGl33J3vWxJzxjaRcYxAK3Gcj8pdE2cAsK9s9BbVp/eFBBEppZWfgX6t Fi/gqACeb5zEtsNrUTgbE8s8LIVeOaypdJju0iE5697oMG6cztsxss/o8frB1XkLVj7kKKAJQTv Q3TBGkObc9jsJduGZGfwi86XHl+HsTVfleJhF5hOZNrvKEwAQhe08CJ2DTAbUDmzwN5NSKciSYV RjHtikHVjvGLSkWryJ3Oqo/vmzAxjvG7g/uCPzmQw9MHRHLW2N0Jq+td2BEgiUGyskBJG0wPCLA hqi3zvDn/3q2NMHZb16hD8tuNOt8SvA4v8+UeZLa+l4CXUizxGPSRJHNVl85Wa0U+3dOG7e9OU4 G0fOOIgPpsKolI2QL+3TVn34vaOwbbgXv3kyFOAlNpmavY4iAcwylwezWNOvqTwnlPJde4tacae EWcBGI/HhuCjwS5od25UJnTzLPcb1bY0eP24xdd4tgT7QOW6+ltxE3IPb+ITPaRNc5IczRW+7yq Hrhf0JLBkG3btJH2rBMQkMHVBVLmQqQHDhxLQE8WG203VgciA4gnksTvEtW8AmOinclmKXldjS7 RPUjYiUBWz8oXBw== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-25-51da5f454a67@google.com> Subject: [PATCH v2 25/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 D9F4133D6CA for ; Mon, 5 Jan 2026 12:43:15 +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=1767616998; cv=none; b=a+BJFiVE0DZnLsnJU/yiYVCRBQZgXe225Whxk7W64ecX+GIrGvdLJ9v2vY8oRUlmW8OgJFEHrxN1NQVRt6d6b5/NbKZfL7cVkCl598oFxoCUzIOEuSdFlDKwL0cvvmTjJGNoQ0nWBMo+Xl186Ky2TkLF7TCFPdHoZ4fLupAI+30= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616998; c=relaxed/simple; bh=otlLyVDzkUAMP1OY4eKzeJJxqAkaXTV7lyQMF4Eovo0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Dg1OkFKupWk1YjWyRN78paoLYhhIco8wwxcbh36mASzzX1/l75BJ/vMEZktJ5l6Dd1ZgZWknb8E7qn9IyIVE84KAIFP7jFQvDp7dZkKQ0eIFB7tvFTRe4/IfxEE/ysrZErYNJwwGoHOmICBqR3d46/LiG86uNgSSW7uPprmWy7g= 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=vsLloxDR; 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="vsLloxDR" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-43009df5ab3so8030496f8f.1 for ; Mon, 05 Jan 2026 04:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616994; x=1768221794; 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=b5q2QBFaDvD9xVwt2eaS2BVLwfihwB5o+cPHw/9/HFE=; b=vsLloxDRk/tYjW2jYZy6bxl5GChD6xTtMJ8HBs/MKHBaxi+PTN6fdzbuDab7eef+Os ylaJOCQlcNaC82JR34+xl1pyPpiWKl0HAO0V/HWWj75XLHzLoZSWwKmzYgOIDANE0O6h KSqOyz7DueT6zn/LgYYaZPRXZELRKZdD7z964TBs4V9SaVReRJ+vwX39HyYhZZtH+HPd 1trTLKDrABKI/SHSFoEfnXSnYcyMSlZIo+XQGkWUzWCuuzH7cTe9TWOmw9I3qTRhV2cM tl/f4p6+dZbJPwmg8YJPlGWtF2xmsEFfvg63Ul3FD46/LkoNTcPhRJrAD54y4jpWzX5c LJhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616994; x=1768221794; 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=b5q2QBFaDvD9xVwt2eaS2BVLwfihwB5o+cPHw/9/HFE=; b=A4RydM3CBM/3vd8/GKP49qlJs6a6vMTKCmBEKkuFPUBzF3OwZwgu6r5/FFb8ufcZtw ++ZZ0mNOp5Ua74Wbw6NhiOMNcUHERNAEbKf7abvljBO80aeBcnhMinTGQZJSJpJhJD5v UonBUWKHZ/JcKKDapnbs4tPyNi8/MwyL1lXQGMAnMQEJ+DIRzNEv/Ntwl5TvIB4/Fzsk tgBZ9wiVo+fp8MtNbaQUwV1wvaOf6vaDBBqRbO2LOo9yo/GtdJhHBZgapwwtiwDcaKdJ 4fDCnMx86oQq2/8lx6knJSPozrnxjyCPtZ/51A+1OiKOQ9Uofl08DiQy75n/lTDl+5S1 M8cw== X-Gm-Message-State: AOJu0Yxr/AuT8k1z1q3MzudV2fd0SH/uQji/JR10J47V/7BjDiOmg63O 7gLzMcUklwvPPzuq9c/bpCtZIxOzbj36fyF9sM9bPlJohDnohUkzrtvvjalQ9IjxpKbiHg1QOKz 0TOlgVT73xfsWVQSJMQ== X-Google-Smtp-Source: AGHT+IHvT+4kWABn3Eh+LHad9nDDqTFKF0l5xVSN4Y9Wh0iG7+6TinVrYeEt5ejaUF7Ddyt4mcnwEsUj3zP97m8= X-Received: from wrbhb22.prod.google.com ([2002:a05:6000:4916:b0:42f:bc24:1400]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a5d:5f49:0:b0:42b:3dfb:644c with SMTP id ffacd0b85a97d-4324e4c157fmr61721326f8f.10.1767616994341; Mon, 05 Jan 2026 04:43:14 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:39 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1135; i=aliceryhl@google.com; h=from:subject:message-id; bh=otlLyVDzkUAMP1OY4eKzeJJxqAkaXTV7lyQMF4Eovo0=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G9AiPaalsh8VyetdgUVJX3ZWsDcS2ZyJrt/ pybQx87ASiJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 RiuhD/0cWzw0lQAKBxeEUw0KJboUbHK2MKPtSDoZ+fXMzzYS/OAFSJPn12BT3DkpyuiR+SL3ESX ltnmcSfJZyN/bSDulT8k2BXkD72nku0nYI0eN1oldnL3zh2+pX0Pp3XysZGiFk85hDovO/WgxDn TAIUYGGWnbldayMGTrOUAC+L6y+oiGX20VqkNoc0p5AP313LgcXZcaeg+3/coQuY/qpPrxmXmJq GpAzGmPiPfWW9+GEifB4FpqSgW2WPqvs+FN0/iRoL1oJSWMerdv3hHDR15D5fNleUiAKQs/F4XS jyw1N3a56KMg1AcTnzIcX6qfZHbnubtCvXfbn8ih2kk93nkSQ98H/fJISf8zh0pCP9yg4ZCeLbC QZDVmiUxvADWkXOqVaMXqrkLqnLVReeKOAUlKvQH/CyWiO46IKH3z19u1rald8EIqGcSP9Q815E 6Mni3V4LVeCvVp//wJxE2O1YR7HoqOxBD3MxmuwFBPSCFt/53/Gg7XjyFUdLg6gJH4xTy3lUb14 YUHwZhvpFFSsW30z8u5KTh2W+o43V2/ULc04gMBPk43Pc1vKnZO6i3DpcCLq+qHOv2MdLHIySvp jBXq6RCiozuSE1W8KT5hM644FGEiRd7B2Pk4B29L/MWZnlV85vkoiIlMCGAXQRrP6VVnjRO/sw0 LDOD09ufz9Feu8A== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-26-51da5f454a67@google.com> Subject: [PATCH v2 26/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog From nobody Sat Feb 7 14:15:54 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 4940D33D6E3 for ; Mon, 5 Jan 2026 12:43:17 +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=1767616999; cv=none; b=p2jzhKHHDZBrm7z3auj32HcQSBVapWgI5bD5Hj24AT00NrrtQszKmmSJ8CWgB5PHnNMNVKk7yyN6ZoVWzEICedY0ZHmCos9lh7Lf3Rd9vQU2jbSqPzsY5P1Z+jz7NgaFy4jyaxFqPW2nIZST9sH6dFeGx3rJWJjCg+cO4rGi6jk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767616999; c=relaxed/simple; bh=NxiYW0CbqWZmci++RKJimpvk5ApS8tJULtdHUF0b2gE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=tuuAqDSn7tahthn45jnyvZY1jIpNdhj6yfu8yK1ug8UmDCPJX5+ZYvL7nIaA1VOOSTtP8blcqfyJ4Zc2PtNg+onQKG7T8OgVdpek7OwFo19uXiDbT6Sk5satBV2dpR8NSeVEDS5EWToDrW/xL9VOi1sersoPAwk66lMG1KRiP9A= 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=O67FtXIz; 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="O67FtXIz" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477771366cbso112458105e9.0 for ; Mon, 05 Jan 2026 04:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767616996; x=1768221796; 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=Z46BFumMsZupou+yyaDDz+IWIkSi27BbE4HeuL18C6o=; b=O67FtXIz/OTHYT9INQlKRoSoZBsvhjpm7cRieCg+bEhJfhNuipV0ogzqOE8Djp6z4k R7Lp+RHvKRHtNnIzhQMxAvLmN8z4Nt8+ttwjV8jIN8eAGOqCcyXGwGXMf1MbtTpNG8fN LX+NKTVtB6ayIYTBaN7F/Mj6LtQUdPgg6phuT2vanUI+eGiihoE4DKJG1V2NG+Eiaczs HPlALBOeI6d1hthGNqKbprlt68L4iTFO2iZwbjlCpTPagIGGpDj7W7IZtBuhOhKcqsDJ a3Uysqv1ApNDAcRxrdqv0aJSzTOYxam/kM9J/Ul6OtZtqebUYIMUuDl6iPEvjNgwyKaS 7BEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767616996; x=1768221796; 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=Z46BFumMsZupou+yyaDDz+IWIkSi27BbE4HeuL18C6o=; b=H8XPKWomGZ7pUYCcfbWgqYYEVEog083XAMpnnGdPh0673UdJfCI9DuGS+9kWdqSKWE KXg7BJWHAEIcoJdeqZUTeKXDMicqfLEQB95Pss5k87RJcrH4fIQ50Di0ZS8MA9DeCPZb WgqOG3tNrF2t0yULnM3Qi5strRwB8iHcqfzmyZXPWkEzTUVpjW8sAtNOLVMVRe44qXlI lh5Abp5bndEhLbuDWJmuZAZY/UgFBgd6xYUZpcYDcgaHz/C1JAO5wI8Dow8Jt9bSZ/Ta hzjJqDbUShtb7CADTtJhgQspW56AUPUGcL46qjYuZSwlEShSW2aDXbqXTbSoE4tSk5Mp 1kzA== X-Gm-Message-State: AOJu0Yzu35rKm2XzjmvL/49dZIshQKgZB1PGhrWxASWaFp3CCmI0doPE VJMJO8WMQSn57t/9XsC3/9veJpOOmf876AahjFds+o1a6t8w6K/EDuI+aCRg6Ya0OSUjoUI963+ 6hwy5FAcvTZi1YwQ//g== X-Google-Smtp-Source: AGHT+IHb4FXR8+6IReKURWCDo1GDROcS9nS8ZK0U/BuzFCFRx4UyIi4H/RGJplSPzQ8aQkM5GOyc9gt0PQUHWiI= X-Received: from wmdd17.prod.google.com ([2002:a05:600c:a211:b0:477:a0e9:dc85]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:470e:b0:475:da1a:53f9 with SMTP id 5b1f17b1804b1-47d1954778dmr560627315e9.14.1767616995744; Mon, 05 Jan 2026 04:43:15 -0800 (PST) Date: Mon, 05 Jan 2026 12:42:40 +0000 In-Reply-To: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260105-define-rust-helper-v2-0-51da5f454a67@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1586; i=aliceryhl@google.com; h=from:subject:message-id; bh=NxiYW0CbqWZmci++RKJimpvk5ApS8tJULtdHUF0b2gE=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpW7G9HcM8jXB7EhJZmxhOVXBkfAqJJ6TRQSLuj qqOtSRahV2JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaVuxvQAKCRAEWL7uWMY5 RmBiD/wM+sYNoJCxxvFtNBv5ZQEVMGut4EMMHuoEp+cxz9iETUHnUKV2WdfWAv6Di6pElayIQDs Xmhu8IWGphqcOrROZon8pQ/ru5idMHqBNRM2+dM8RBKllHE7h894KMd18tczyyVkW3pOf27fQ6q xWpaxOVrUUU1Hs5PLZLA/g5rHishlixFGSXGcgZuD1gaBpy5wPSuKXj7PZpruci2BADDp/AdRpn 2veLunxvPaX7qJ3993M5PhhCJbKLKVe8dmRygNk3XLQWcR6aWc9FYpPOLQUJktuYKeO/nRdJRgp xxZcsm8Y/O5i1wAVyJkziZGoV2PMvt+I9/GHmNcv2qtRCKW+YZ8SwmfaUaEcAC89U/77imhlsIa 7/NzPNXI2eYehM13QdD9pZ+HSTMPFvr5mxzaK8Az2J9/kOUfcNL1u06cVBDlg/SiA5U5oBhsHHc tx1BOy6XuvTw/0nWHO4bvywYt/tr9BCfP4D8hWUk5EWzTw0sILLeY6IFRNFmkE7kzLos7IXwWQu 6APiigknaMWoc7VxpFylvh+5HkBDbmtRUpCPdNN4tcmyE+qE4CVNmRE2Hfu6N550AqSo7hW4A/R x7YiCjYiJxt9Lg6gri95NC+QF2aN9O0vXpASyjJJ6OCIssdU85AHDq+TzO3r/7Hu0BWtrm56Y9F rIrBJAV/P58bS3g== X-Mailer: b4 0.14.2 Message-ID: <20260105-define-rust-helper-v2-27-51da5f454a67@google.com> Subject: [PATCH v2 27/27] 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 , Boqun Feng , Gary Guo , 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. Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- 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.351.gbe84eed79e-goog