From patchwork Tue Jul 16 11:13:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13734378 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A780D1991D8; Tue, 16 Jul 2024 11:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721128517; cv=none; b=JnYHZmNlex28p6h2cR4F8ex03Zo/pnavg53/P3ZoPorNbpcL52J0YVb+On3kXil5YiVLMqBsWWGnw52TJHH51HC0e/qEz341iUfjdAmclWskGB06N52e2G3n4ji+fBvAH05cI356E66YAzW0MQ0vq82HjkAvgJR5Zwg+WCdi4ng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721128517; c=relaxed/simple; bh=xrJFUSIui5+3tWKM7Qfe5mEbY1VRxe1m5uYa78xjxbs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sE6zWOQZ2h0Uln1wjZCQx7TUheGWqcD/Wke17p7BFDrmeY8AvQnFyCvj5mnHLt97aQfyXcjsPSv6yrUSIUA9lGrVpGWQeaSZa6FvHNAjuS/7H+VoSX4+CWGu/PU3/aaX75GKPLzgetotKerOSn9CZHLVqhx2DPZq/8UCbspW/Jk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RcsB2+p5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RcsB2+p5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD63DC4AF0E; Tue, 16 Jul 2024 11:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721128517; bh=xrJFUSIui5+3tWKM7Qfe5mEbY1VRxe1m5uYa78xjxbs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RcsB2+p5QHBap1vUNzky7TEU4+Tn5z4k+AWvpXJWK7FJN1CZhMEKfjUb0nM48ukl5 i8gN4HNW516pgCT0OD2NQGIKEhZpQCmvW+FnncHa+T2rZ4KUCYsxX54ArgLBbRccvW /M4/82T1OQbmPY6lAIvDiNuYTgsZDmRyYwZFvrDAfzZEhTXQ7LmI1Uo9xig4RDhIVe 8umplX4XAEATc0RUK6AVqsoePJFhu07FX3c1e1566RQ0tcb/MaNe5IdDa9j4GrGdjD S8M0nenFB/BUBHnEHESMvZVA1n1kLJWjGQP1MwZdrCrNt3LpuQ9gp1Eu/ZbsxcO864 i7FoOB9zttDRg== From: Mike Rapoport To: linux-kernel@vger.kernel.org Cc: Alexander Gordeev , Andreas Larsson , Andrew Morton , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dan Williams , Dave Hansen , David Hildenbrand , "David S. Miller" , Greg Kroah-Hartman , Heiko Carstens , Huacai Chen , Ingo Molnar , Jiaxun Yang , John Paul Adrian Glaubitz , Jonathan Cameron , Michael Ellerman , Mike Rapoport , Palmer Dabbelt , "Rafael J. Wysocki" , Rob Herring , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Will Deacon , linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, devicetree@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Subject: [PATCH 07/17] x86/numa: move FAKE_NODE_* defines to numa_emu Date: Tue, 16 Jul 2024 14:13:36 +0300 Message-ID: <20240716111346.3676969-8-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240716111346.3676969-1-rppt@kernel.org> References: <20240716111346.3676969-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-sh@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Mike Rapoport (Microsoft)" The definitions of FAKE_NODE_MIN_SIZE and FAKE_NODE_MIN_HASH_MASK are only used by numa emulation code, make them local to arch/x86/mm/numa_emulation.c Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron --- arch/x86/include/asm/numa.h | 2 -- arch/x86/mm/numa_emulation.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h index ef2844d69173..2dab1ada96cf 100644 --- a/arch/x86/include/asm/numa.h +++ b/arch/x86/include/asm/numa.h @@ -71,8 +71,6 @@ void debug_cpumask_set_cpu(int cpu, int node, bool enable); #endif #ifdef CONFIG_NUMA_EMU -#define FAKE_NODE_MIN_SIZE ((u64)32 << 20) -#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) int numa_emu_cmdline(char *str); #else /* CONFIG_NUMA_EMU */ static inline int numa_emu_cmdline(char *str) diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index 9a9305367fdd..1ce22e315b80 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c @@ -10,6 +10,9 @@ #include "numa_internal.h" +#define FAKE_NODE_MIN_SIZE ((u64)32 << 20) +#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) + static int emu_nid_to_phys[MAX_NUMNODES]; static char *emu_cmdline __initdata;