Message ID | 20241001150008.183102-11-dakr@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE2BACEACD5 for <linux-mm@archiver.kernel.org>; Tue, 1 Oct 2024 15:01:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5709068000D; Tue, 1 Oct 2024 11:01:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 51E91280068; Tue, 1 Oct 2024 11:01:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E60468000D; Tue, 1 Oct 2024 11:01:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id BA8F2280068 for <linux-mm@kvack.org>; Tue, 1 Oct 2024 11:01:13 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5D3E1C15ED for <linux-mm@kvack.org>; Tue, 1 Oct 2024 15:01:13 +0000 (UTC) X-FDA: 82625346426.11.5242181 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf05.hostedemail.com (Postfix) with ESMTP id 81041100015 for <linux-mm@kvack.org>; Tue, 1 Oct 2024 15:01:11 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="eX/pCXoP"; spf=pass (imf05.hostedemail.com: domain of dakr@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=dakr@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727794807; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZDarUeJtIOZtgw3vVOZFHi4KS4Nr8i9TiefmdjI2B94=; b=IT1suGGGOgkLyJr50Zsa+YbWxYWwYEUb6xbDNkb6exqi6DrQFG6jNuLE8+bhTjTmZonphI d3ysEMXpaLOv3XTlMQGhE4PPoEam8tdaXbGGHXBoxG2b9lhizL8qOCGmnIbJtrDScnRGTT k86QUU32iHyBN1Fm58jf6amQw50dyP4= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="eX/pCXoP"; spf=pass (imf05.hostedemail.com: domain of dakr@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=dakr@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727794807; a=rsa-sha256; cv=none; b=sL71CXMENV39sY44ScG8gyPlKCqlpFUqmr9tpgblzjiHvSgrf2UkH4/K4DoTbcXiv0HGuS roYP0SPQToTunXZNu1drMzJGinZGQD4Qx/gVIMl53sFQCSLUWlBSfp18E71nqZWJgRzrRh U/oh8qwvYoV+0PTH91YW162gYRxs1Kc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 6C8C5A40104; Tue, 1 Oct 2024 15:01:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C0C2C4CEC7; Tue, 1 Oct 2024 15:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727794870; bh=k3fbnNVumq3p6Zkau+316hxp1LWKMWboxrOE8MJqOiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eX/pCXoPRhyOmXYyOPVzht3yy9z5YJVXCN4wjr6d0yZ3yRhqbVpOK25ffqa0UL8Iy f3jGHRHK+mesXMDFknMJiYadA36F0PrGV7JQzdGjGpdOiuR0/AXauGiCWavvjZzAu0 XBlwh/zdQtHtokWbfzMxPkdizphnoHAedrV+PhPp60PdVsRQaESFMf6+b5Aib0o2+2 XS1Qg16naWyV26GPvVV96HcRXkKXbiNvgNLvtYgqiCR4ezElSU/ZJ3cdL6YA4xUVM+ o+ZWGeatWYieA1tRRrkYnBwQiaL7zro2CFal/Ere6tpWcsfasea0dqtxywBDrgo1mo VH97ydCLtiWeA== From: Danilo Krummrich <dakr@kernel.org> To: ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, benno.lossin@proton.me, a.hindborg@samsung.com, aliceryhl@google.com, akpm@linux-foundation.org Cc: daniel.almeida@collabora.com, faith.ekstrand@collabora.com, boris.brezillon@collabora.com, lina@asahilina.net, mcanal@igalia.com, zhiw@nvidia.com, cjia@nvidia.com, jhubbard@nvidia.com, airlied@redhat.com, ajanulgu@redhat.com, lyude@redhat.com, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-mm@kvack.org, Danilo Krummrich <dakr@kernel.org> Subject: [PATCH v8 10/29] rust: alloc: add __GFP_NOWARN to `Flags` Date: Tue, 1 Oct 2024 16:59:45 +0200 Message-ID: <20241001150008.183102-11-dakr@kernel.org> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241001150008.183102-1-dakr@kernel.org> References: <20241001150008.183102-1-dakr@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 81041100015 X-Stat-Signature: rarm75zwzrpejhshcuc6m7ea6htikewo X-HE-Tag: 1727794871-320925 X-HE-Meta: U2FsdGVkX19lvhTUlyqPdMDnS2BO9+s65k3+PKlqB1z/UyyufMYb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ctJsVS++FyWzVH2HIsJVO3n8CoSxQbwVhwiMHMhshYIHrvKZrfQ7IDtHR6A+B/hqndSw9wvHBzhXlj0GKjlGIQqgHVVg4rjbN6wVoaZo/3CIXTEe51cDUwiIK4YmcqSzezQuj5MV9LDw/aavTiNm+HLAhqNQspfczb68XP9kJ16A6K4gExkDEUsI0vFs5+618GTCteFu/TgSgLRwqToGEyWA+cz22XWUhLiSQpk9LGdpu+VjrzploFXCx66bUsNAGS/tZvuAJo5Ncbmr/Pb4Q6myDmXdKJGRvcBUAVKy+fjDqkq9w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Generic `Allocator` support for Rust
|
expand
|
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index ae82e9c941af..a80783fcbe04 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -31,4 +31,5 @@ const gfp_t RUST_CONST_HELPER_GFP_KERNEL_ACCOUNT = GFP_KERNEL_ACCOUNT; const gfp_t RUST_CONST_HELPER_GFP_NOWAIT = GFP_NOWAIT; const gfp_t RUST_CONST_HELPER___GFP_ZERO = __GFP_ZERO; const gfp_t RUST_CONST_HELPER___GFP_HIGHMEM = ___GFP_HIGHMEM; +const gfp_t RUST_CONST_HELPER___GFP_NOWARN = ___GFP_NOWARN; const blk_features_t RUST_CONST_HELPER_BLK_FEAT_ROTATIONAL = BLK_FEAT_ROTATIONAL; diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs index f8ddc8d96da9..97defee1d6a1 100644 --- a/rust/kernel/alloc.rs +++ b/rust/kernel/alloc.rs @@ -91,6 +91,11 @@ pub mod flags { /// use any filesystem callback. It is very likely to fail to allocate memory, even for very /// small allocations. pub const GFP_NOWAIT: Flags = Flags(bindings::GFP_NOWAIT); + + /// Suppresses allocation failure reports. + /// + /// This is normally or'd with other flags. + pub const __GFP_NOWARN: Flags = Flags(bindings::__GFP_NOWARN); } /// The kernel's [`Allocator`] trait.