Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2914347lqp; Mon, 25 Mar 2024 12:56:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKkrz6fF21wR3nlUbJcFO6hv156eOeOstRPkopT4bQH1UzNI9UzyWv363Q8XqZwBCcaVkqhnKobK3MFwiEN3VyEXcLVQKSOmbjnkBsKg== X-Google-Smtp-Source: AGHT+IEUUOVtllHLWpr9mvtqgfznefoPIgm/LT/hKfy3tok/kJK7PvklheWveNjwnHTBt2nxBQ8G X-Received: by 2002:a05:6a20:7344:b0:1a3:c4ea:f528 with SMTP id v4-20020a056a20734400b001a3c4eaf528mr4802986pzc.43.1711396565909; Mon, 25 Mar 2024 12:56:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711396565; cv=pass; d=google.com; s=arc-20160816; b=ryB5ymnCynnGaneF8PYlR2jWB9DpsOkxLl8tbfUSRcOS95x/kCSMeZKJNkgxjrKz87 yMzr29l5nzwfMtzJXN0T4tfRJbc/V4kFaYucS+P0WMBAkud2RAQbFBDbZt8+vaBaP0DL LLamK/W2nMpv8DikFxoS4O6eMuIRmqVNyfwD75EIpJion4SDCoY9Tz+1Qu/STNCcnxRm EkSXYKvv6oS2jwjfK1KwOSUM/d9L1hiOnrusYHu0gQjqX6t4N0l6vws8iCS1x6q2XsCS TyBFaSfLdG4jWJQZXfVfiO00kxNeLZ5JGijKjD1er4VlZDA7T3DXcpmiPjOm7Isjdl+c VL3g== 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=AgHz15mlWM4+DZVymxJpfr8CXeyi7j4eOLGjc7/vyUQ=; fh=qjbSv7DBXyb95TLuAREEezVwYfpAlrFuwq01MbjkHtE=; b=eObS8uOhjJscH/EiAfXXt8JUjdwSxk8axtwhRW0KM3UgG+o3kzVEFDBsT0J/so6S1Z LsN4okqUEvKr7GWDB6nHJ+iyAMssVemUYUH01bgQe83V0kyc860n+jkpdf3EMGGfp0Q5 kCi8xkLMVADOZuFsO5IVuKCRI42fzQx9rbxN2wRoIBC2mZN7NdJZSF+z9nD0lWmFamAu OHnnbPzyPzt3QzNGarl4FKwd0TZFbz6fjzunnnYymG60ZtfPkCq++KhYzKnqVCpqNT// 47KysT4hxOLDTCkq5ObIY8dYX204ulTKWKL6QuRhACGudcsqbcmXX8GAKTdmgmyfivTw sJJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NQxYp07q; 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-117862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q96-20020a17090a17e900b0029bc35ddf0dsi11701917pja.24.2024.03.25.12.56.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 12:56:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NQxYp07q; 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-117862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117862-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5A8E62E7BF7 for ; Mon, 25 Mar 2024 19:55:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 779824C637; Mon, 25 Mar 2024 19:54:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NQxYp07q" Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (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 464AC18AF4; Mon, 25 Mar 2024 19:54:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711396493; cv=none; b=UfgcBYEC0sUmhtxAxQDa7CitBJn+7asK4sP3dAHywdSQIRLobpDjUrs5eoj3gEDVkQDTNwa1oX/AGUna/dny9jMOR9dcYcCiociUiJ3bEniK6TaRVtydBjbwWsXz9E/cfvhHu1Qs+qWO/K1LKB0ieTn857NuC+A87B9Iww640qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711396493; c=relaxed/simple; bh=bfOTbnixtHhC5VsxDkz9OVrGjslHLL+7UZtqMBMeX48=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XEmm/K7V3nhFb4Pg/u3/om6NkD+J0lJaZsBh64M74v6Kqs4TnOQtIV9/FaqW/s135Gz1pXb6O5bPZDybqxWaXBjbQIbmFAFaq5CQWxgrlAes/l9CthaNepHcvAOdubZ4EDGjIeToFeNH+HSiK6PdGheyH9KR8PTc8AifL2ODwWk= 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=NQxYp07q; arc=none smtp.client-ip=209.85.215.179 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-pg1-f179.google.com with SMTP id 41be03b00d2f7-5ce07cf1e5dso2603863a12.2; Mon, 25 Mar 2024 12:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711396492; x=1712001292; 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=AgHz15mlWM4+DZVymxJpfr8CXeyi7j4eOLGjc7/vyUQ=; b=NQxYp07qhXmEzX6CCJw/ZVm217Sbe2tpZ+fsdvEmIPVGwwQqC7ro2+lng2Dw7QCRI+ fVD+9d+acoaLUoLJw0Wys+0iLYXO4wb6zuI7VJiTpYi94Td4KJaVRlHaGJXscBXVXhr2 GGx3jeNedqCEn1NqwwnMwnlop8qW4UMRZ/NupQaHWkbHiXLqpmXH0SQEjczqFxF6pWuF bvJmAI6gZ7N1wgnwRcHhf6WCGI8ZBLTZ0XAl/0fWK8hJh5fJIlRYrYS3yTXQPULQUiHB 16iZRfoDBZlFl9EKl8FlkC6zheQbm43/ZXqH7Dv22SZrR+/UCmpG8I9E+B1i6notWQz/ mmhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711396492; x=1712001292; 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=AgHz15mlWM4+DZVymxJpfr8CXeyi7j4eOLGjc7/vyUQ=; b=rE3FNI+FQ/VP1luzwpwHQ69v0jtQHrGwai17MPOtmBQYK8FnnEKJDQiiVQ0FMbk6PB 4J0fCGmylJJxuaxi5nj/VHShIEuySZNeMXhm8LWXjJ65vWqEOObGd0q53b1Nscm5z3WG T1bRT4Rc975LrbCgSuPfRH9bQRkFFmYBNXtNz8oA3VOHPZ0dd6C53rfWLu3qS1v0YzTc 1xLZ7lXwzhYbbGLiZ8RauVs1YiaTirxKQC5kQg2OMiQ3f551uFoh+cnx/fGBPW95vktC wcqu054wUqI6BuIFa53KeaeuHYvUdNGstmzHtJMJso9TlLnmr1Wc2j/AFYkvEplq05uw xnKQ== X-Forwarded-Encrypted: i=1; AJvYcCU/LgoKMyVGuaZy1hsyrHYLnuyIZpvTrNPrWU0mySwjS2AW+7zSJZ3So7MZm+Lq2gXoQ3fcrHAyBc95ByXzBjFWnNQXOtWJh43j7S9W X-Gm-Message-State: AOJu0YyOC+fPjtAFhOITXHIVWmtw3/WuFSaik5ND5lp23T/omNd6IX4P 5QAZbk1YEpLigTVrpoOUgLRq4EmAHFSnxQ2fAwWeL56s1u2uN7+GdYGguDFa X-Received: by 2002:a17:902:daca:b0:1e0:d9da:b126 with SMTP id q10-20020a170902daca00b001e0d9dab126mr1490031plx.15.1711396491576; Mon, 25 Mar 2024 12:54:51 -0700 (PDT) Received: from wedsonaf-dev.home.lan ([189.124.190.154]) by smtp.googlemail.com with ESMTPSA id q1-20020a170902dac100b001e06c1eee22sm5099585plx.74.2024.03.25.12.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 12:54:51 -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 01/10] rust: kernel: move `allocator` module under `alloc` Date: Mon, 25 Mar 2024 16:54:09 -0300 Message-Id: <20240325195418.166013-2-wedsonaf@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240325195418.166013-1-wedsonaf@gmail.com> References: <20240325195418.166013-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). 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..ccd4149932c3 --- /dev/null +++ b/rust/kernel/alloc.rs @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! Allocation support. + +#[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