Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp146411lqh; Wed, 27 Mar 2024 18:36:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWssLdpzEk9Dv9OXbPX5cmaLZ0L6/zImuMWFAQE8bZP8vkdcnqSgkIieT1Zo6JFGA3CBnIOfL5UZ4zMFdF17B3OCnoSRWjV9HoJ/v/cng== X-Google-Smtp-Source: AGHT+IFp9FC1DRxwIyJTTZ9ebH6I0vXN+/sc8biU2ruvTRjR0cDZ9Unvru44SEN0Uq4a87lLkZTg X-Received: by 2002:a05:620a:5e17:b0:78a:62e2:d49 with SMTP id xz23-20020a05620a5e1700b0078a62e20d49mr1318123qkn.9.1711589803578; Wed, 27 Mar 2024 18:36:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711589803; cv=pass; d=google.com; s=arc-20160816; b=UeeWegTxcLkXD11EJn4IbZW+YTloLks6y7T23lQd/OerLJ6jeE/ONAsgQRsWa1AXBs NrLf8br2ee03h+7j1lXh0u80c2v4TzldxYHU3Q+zwzHXAmqVOR1lRVT7qUmxke0H/Zg8 FPGtzAMZUuwA8SZwQoB5QlW0KY6Sbcd3TEu7qYtBPOoMNdDhduYEATyStRPYmoEFIwf4 PgddDB0aMpIpqemsuxfVuGvbD7OQjB9ry8nBEUOoPAED5UPjlH5AkXnnQoU5zxtGR4Ee SRwFnRQObjFy3GO2NC23xoPY+GZ9FVdKY20D71dJWTeX1hpU2p0m5Q4VO8bwxrJnQlFO 6WMQ== 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=tuwXC7IKz/XonkwF4EWe0uo2ZAzTkwa7WS4l/St8f5M=; b=QOQXGtptDlJvdbVJJHnsltZGJII1Y1TeyzFWgWh6TFq1PS1WyJ6eNLdPnu6Ol6/cVw XQt1tXeShXpXCVOKgiX8WekBUanGjM1iAyTz78UZlru+AUdrpUXU8oXN9FwyipnJ6zND 7ZYxEowOnbOggk9XFFsl0MVM72z8gM9VkmmBIz6ZWl3zxm7zIMtJwOZKGgjimyW429dJ l76xXECZas+S8rekznE+rzbIdVz/NE4pYFeDVa8BuknJboXmsrVn9cI66nZZWdWYK+my N4ySxTDtcjeWgL34n/+ONEc6B1d4rRDfw8cfPKxLzFrg4B4UzPvtITdineWUKASv4BJG jj3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ASEzMmIp; 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-122288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122288-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 vw19-20020a05620a565300b00789f0afcbbcsi471662qkn.57.2024.03.27.18.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:36:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122288-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=ASEzMmIp; 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-122288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122288-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 015F21C2F339 for ; Thu, 28 Mar 2024 01:36:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0FC724B34; Thu, 28 Mar 2024 01:36:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ASEzMmIp" Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 B18092263A; Thu, 28 Mar 2024 01:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589783; cv=none; b=fbyY6x62Hi4CPucwSRgwXd+h+B9oS1s1aUpkD0zov8nhSmn4g5erT61eAmrWjenIZX9dFGg7zVa/W2ftXBYvBk96a2iM3HeGRRW+254luUHMyBwjIMi08RhRJ/az+cDpYqGS3LkiYllEw0Ns+ZAF3FuLbFb4MHHTU8rnrRA2ylI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589783; c=relaxed/simple; bh=NFBI89hBxJyJdmj/crSHiXYAE5GVZ0Qr9b1Phi95F0A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DSX6wOEzAmzll4unrRw+SFZxpo4B3TlwH+fwpou4u87x/OX8ceS7M3HAn04lfhE8EJ5jebQlzfQiclZLV26g+gxEdUdUM+Pb7XQm4cZiLpxfQ75UJci+byA3B3uTKncwR3yCEJWyTHQT9TTfA+mjcD44V//b1UvpuOugZWim17o= 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=ASEzMmIp; arc=none smtp.client-ip=209.85.214.169 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-pl1-f169.google.com with SMTP id d9443c01a7336-1e0511a4383so4182585ad.2; Wed, 27 Mar 2024 18:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589781; x=1712194581; 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=ASEzMmIpKaAcAn+YqIqgFE7MwN754z34Z770b4avn6AeTPXZH4COycShICOVlgh1WL ejFjSIT8JTXJCZgquL/h6BVz4K43KThXH8keZV1kHVKiIuzjdnif4L2rp6qDQ7e6TM0t LXbE/dQf8ZXKEQazIFQhL1B0SSuA73hulsH/PgGTmwEpnwVS2f34GlV/G24ILpZNK9HB UNekA9iHFgGP12fbtlX/S9g01f9fFNsT9QJX6LzTMmCU3mg4Rvfx3LwSZ/Z4R1gIGf7O QrgLpqXEJmdyUrPXy8fF7k+GAtfmmZxFPHFDiPOcNA6BpoP0AnzkeYnMiIOFwvgJl3US kfLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711589781; x=1712194581; 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=D47k27x7QfciwRviIVk1ZfXN+p/UbUQrGC2Dp9lmS0V8PtGdbe2+y96XreygdmLwpB 2UoxMYDGoFSK0kFTw/SpUMQuS/9dM98vnKh0k1NLg0SmsARwCCuex6TamdgyDw4NrD5S 9GOkQX65/PJQSltlRPKgw8F4bNFWMt6TzYDBgfz0k3zFcPAtSQqjQX3BjibBrOV2KvX1 HTZQtW5NWvBAU7QxEjMO6B8JpRaG4ol4y3AJeObYLUI/NXkPt7GScCPsvMYgJL04cImq MR6V/vl9KVe7akY7yYERMKH94a+sFomv0Nszd9Rb51pHGNT1vVutm2GJ2Ik/DbLaSoQg DRxQ== X-Forwarded-Encrypted: i=1; AJvYcCWZtVe6ylZLlhhpUSHPAODz1IUDu2ThL9w+Q14wvO7OOB7o5RL7vfL6PcwkLVHuYZ0MzqhUf74Z/Eh9oL7tbdBhGxlvmYsqtgaLry3X X-Gm-Message-State: AOJu0Yw6Maw/VYS01auASKOxdtorE3ut46h1i8ker+DzN1YFJTIbMuQd cNimbNJZWLjFKjDNZgfDDz3We1/aVKeHcqJCa/eGhDvP3loE4uCYOt0SwZKE X-Received: by 2002:a17:902:eb87:b0:1dd:df6a:5e5f with SMTP id q7-20020a170902eb8700b001dddf6a5e5fmr1702789plg.10.1711589780910; Wed, 27 Mar 2024 18:36:20 -0700 (PDT) Received: from wedsonaf-dev.home.lan ([189.124.190.154]) by smtp.googlemail.com with ESMTPSA id p16-20020a170902e75000b001dd7a97a266sm189144plf.282.2024.03.27.18.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:36:20 -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 v3 01/10] rust: kernel: move `allocator` module under `alloc` Date: Wed, 27 Mar 2024 22:35:54 -0300 Message-Id: <20240328013603.206764-2-wedsonaf@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240328013603.206764-1-wedsonaf@gmail.com> References: <20240328013603.206764-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