Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp38274lqe; Tue, 26 Mar 2024 19:36:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9EAzqO4ur1QZ5UoPhMuSEeG5Qo3ozD1t6CyfAHqiXuN51uj0ax7zE5r8EQuopymJEZP0O+vCjAx1K4/YxNuKf/EQkX999On8m0TzdBg== X-Google-Smtp-Source: AGHT+IHJplSt+IUmMM1qeqBVjZwyIiKxAaSsY771TOJJraBEg3P1mTDYGToWoulcSqhRIcWF1M17 X-Received: by 2002:a81:6d4f:0:b0:611:2373:9d39 with SMTP id i76-20020a816d4f000000b0061123739d39mr1576413ywc.0.1711506976304; Tue, 26 Mar 2024 19:36:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711506976; cv=pass; d=google.com; s=arc-20160816; b=a7pSwqasB6xwH6meXqhnniBKmbq0y/OMzOkXJxgpDoZeCsQGg3UiDeFaY3QqvadX5l n93C+h1ZwaIPKpLvOrv9uSDscl9o+dpWxsPfIVKjPDxbFqY9C2meZl5L59lBbBjdEi40 zls6W61K9OE0V5kATnZFgYAjZoIvo971tAvn6OHb2EG8VvXDatYpdhBPTZWZixtcWRmk LXASAL7PksGjB7zWmtwrajRwAKhuwSURLE8F8cqx+DctTuwfoUnDAmmxI404vKYE0OiM fnBuu50pQf9bYwAd61bzQ+mp7itCcRSc5olTqn3076BsUpH3o4CQ9sm/kSInVjRdDw7C CK2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Zwgi78elLsZLyoWMFT63z+tSr2IF4Xl0SkbNI7is8B0=; fh=iw4N/Jyk2+iRiQnC8TfMsiOq0dL0sZmSj40/ECMzlaw=; b=DNMZxMwaodTPjZyajZWvuDPPFJlHtgMszKrJiaL0J56wGkPqqmBq3rpLCd7wVQl9lb ZHTbTGVatyxckTneLCh45DuT4PD9aD3fUn7TrO1dgLOVdOe5ue3RWem2Yhe9A53Xfjuv yCkt3AqQt1n3v1ys0KiRE07qr5OUDcJWxgAK8dLMt22s+AFkrFsckqdUvOlv1Dej2Ise SrmV5tLnXXisfNfniUhdQGJYDQ/WSSiWaZv00gd/LFDitA8wZbObYwYwPHNmW9a007Y+ x6e6u5Djr6Mqck1fowKhJaE3Q7RkG3h55hx+6zR4hKUIGQqXtLuskb2e8WpTRGIwn1dn vfKA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mhZkIM7s; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-120223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d2-20020a05622a15c200b004317ca86c81si846834qty.423.2024.03.26.19.36.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 19:36:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mhZkIM7s; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-120223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 00DB71C24702 for ; Wed, 27 Mar 2024 02:36:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73A6F225CE; Wed, 27 Mar 2024 02:35:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mhZkIM7s" Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (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 533CE21A0B; Wed, 27 Mar 2024 02:35:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711506955; cv=none; b=sn5KhMHQ4wqYqBJt/dokxywB3IO4WcJ7H8TAM3OnPCqfaHhyKokA3ieCTFDGLVbjqHhATeMB+gIv7cviDxZJFOs7SqIx4NvYS1THa8yg5/60caSLbgGPKUfB1tu3VB9qj+XqP+b21RZIsxe8hITd+B2B6U02zBABMQQYmj5OK/A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711506955; c=relaxed/simple; bh=NFBI89hBxJyJdmj/crSHiXYAE5GVZ0Qr9b1Phi95F0A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R2H/zsGwcPOqeeoXfT9stGIXev3IJ9LN6OJKfwCU5Q1K9ctZa8tnwdoo7qJN5mx0B583n7ibds06ywE+j0jVo9e15tmns0yNzTN5PaiyHRqq5T+6HL6mO26zo6ePRabogfCxusOramx/uSU1ZDxAFSzzFQTk1XczFYM8HgDPx60= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mhZkIM7s; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6e6b54a28d0so4187307b3a.2; Tue, 26 Mar 2024 19:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711506953; x=1712111753; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Zwgi78elLsZLyoWMFT63z+tSr2IF4Xl0SkbNI7is8B0=; b=mhZkIM7sOXsvZo3o5j+OgiP22YxFXtvt90ZgXrBH3nDatoBhiFXMCHuYw9KK0/HGoS iJGgs9nqPatzXyjp1NZtuwWEXbj6Ciegj3n5Rg5FTHwxiGJtU0POf88Ab2ptlubn0i+C gkerO0ydJ6v6ciVvkYBkqW5h2hCF4BKhHhTb4W85Me8Gw6DE95iHu6ZthETzIEbe7Qt+ Jfwb3++KW97M1MExsy0C6/Mh5ismlYn5wjS+kQGMAgpEwutTRgcLQyytPRDIQfzz1Htx 4jEupeFZ9rDX7FCNZLjZt/o2Deb8A8E6tzpUC+xQ7dk9utL6hmK42amICeYlZ+hmoM9R 01Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711506953; x=1712111753; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zwgi78elLsZLyoWMFT63z+tSr2IF4Xl0SkbNI7is8B0=; b=vj0jx0uIggMby7hyPWh4Cxlp1XEU6JHkxgegPOvdsMo7Psp0bhDTsZ8+SkQgB/4pRv FnK88H+y5ZRVoPybdYjG08nwgIzuoWOwlUNPPTIFRLPmhj12JPHfzk3rTXrtb2MFGz0A bOUlEyy08nXRrYRgR8JbGCY04Roy2wnRNV9aWVcmZ+e4u77oHHQdb0XrM1ax7m5cGPyR XQZoUBOmyDi2VEJxrD9HcnFSf3h6cys/l5Sdpc2rTRJM5MdUM+YCOdyKe/J1gse1OPDI uSnke8OyTKcpJ+WHd9qJUTIOC8qHpiiN/FROpIr8SNdeluvEgO5orI/DPdlDvhrG/wed vK6Q== X-Forwarded-Encrypted: i=1; AJvYcCVMYeP9bk2aY8KM4z96hKfr59AgdiHz0vhjhJCOL5tfg5U6fC67c6FuWRXXC1tIpf4x+enFHsRHBGswI1Om6IHr9b/dL6bFSaZReh4O X-Gm-Message-State: AOJu0YzXlc4NskKtMDbuMXHwnhrgnNPXyS6vwBK4HSKk8hz0/IZw0iFP lijJXpAg1Tni6YLbUMR+m34bQiMVYPKGxNyCPAjdV6uNtb52x9zGnEiIOWJP X-Received: by 2002:a05:6a20:f03:b0:1a3:638f:4fbe with SMTP id fl3-20020a056a200f0300b001a3638f4fbemr1251552pzb.42.1711506953609; Tue, 26 Mar 2024 19:35:53 -0700 (PDT) Received: from wedsonaf-dev.home.lan ([189.124.190.154]) by smtp.googlemail.com with ESMTPSA id l20-20020a17090a409400b0029b2e5bc1b9sm347441pjg.23.2024.03.26.19.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 19:35:53 -0700 (PDT) From: Wedson Almeida Filho To: rust-for-linux@vger.kernel.org Cc: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , linux-kernel@vger.kernel.org, Wedson Almeida Filho Subject: [PATCH v2 01/10] rust: kernel: move `allocator` module under `alloc` Date: Tue, 26 Mar 2024 23:35:22 -0300 Message-Id: <20240327023531.187880-2-wedsonaf@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327023531.187880-1-wedsonaf@gmail.com> References: <20240327023531.187880-1-wedsonaf@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Wedson Almeida Filho We will add more to the `alloc` module in subsequent patches (e.g., allocation flags and extension traits). Reviewed-by: Benno Lossin Signed-off-by: Wedson Almeida Filho --- rust/kernel/alloc.rs | 7 +++++++ rust/kernel/{ => alloc}/allocator.rs | 0 rust/kernel/lib.rs | 4 +--- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 rust/kernel/alloc.rs rename rust/kernel/{ => alloc}/allocator.rs (100%) diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs new file mode 100644 index 000000000000..9aa5077d4a4c --- /dev/null +++ b/rust/kernel/alloc.rs @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! Extensions to the [`alloc`] crate. + +#[cfg(not(test))] +#[cfg(not(testlib))] +mod allocator; diff --git a/rust/kernel/allocator.rs b/rust/kernel/alloc/allocator.rs similarity index 100% rename from rust/kernel/allocator.rs rename to rust/kernel/alloc/allocator.rs diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index be68d5e567b1..51f30e55bd00 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -28,9 +28,7 @@ // Allow proc-macros to refer to `::kernel` inside the `kernel` crate (this crate). extern crate self as kernel; -#[cfg(not(test))] -#[cfg(not(testlib))] -mod allocator; +pub mod alloc; mod build_assert; pub mod error; pub mod init; -- 2.34.1