From patchwork Thu Aug 1 06:08:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13749641 Return-Path: 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 9FBDBC3DA64 for ; Thu, 1 Aug 2024 06:11:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A0786B00A6; Thu, 1 Aug 2024 02:11:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34FA16B00A8; Thu, 1 Aug 2024 02:11:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F1356B00A9; Thu, 1 Aug 2024 02:11:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id F3A096B00A6 for ; Thu, 1 Aug 2024 02:11:13 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B0E81808BF for ; Thu, 1 Aug 2024 06:11:13 +0000 (UTC) X-FDA: 82402654026.06.D7ED697 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf15.hostedemail.com (Postfix) with ESMTP id 6FE78A0035 for ; Thu, 1 Aug 2024 06:11:11 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iwZjfAqj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722492626; a=rsa-sha256; cv=none; b=bB+RznFqKzc4k9/x4JxV9JeDQhamOimXR5sEonuWodkAxuoi+1Jy54Mev2SFqHk1g2QPb7 sM4xMM+n/ye/uLVus7p6rLz8BWlNCPA/jlbDEi8G658rEbnGCQX1GAtKYBRAA8Gzz9X8N+ 9ZLxs6tsx+t/d8FDSHx2J+IX5aKBkEI= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iwZjfAqj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722492626; 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=FXTtpuhAk1W5RAY6zK1ECo7Ks/o7/Q//k+GQA+MwvtU=; b=RZMeKxfsYpqLEJYDD98X0ih5ODEIuCs3AyCDPzZ+Xm34njqzqAKIWfiSTj5C8mK4/fUMn6 5QM29LKOm3+KlL9UGTOFacXE+GV0Sm7GoiLX8eI5kDq17JSYmQiN5ADTzF0j6AYfLUwL/C /okjZyg5bwmOm9EDXaWQf3CsT/nnU9o= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 36A1ECE186A; Thu, 1 Aug 2024 06:11:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D0B8C4AF0D; Thu, 1 Aug 2024 06:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722492667; bh=9xX4GW03Y9jnCjd61LosuHfHXAjDKwtO3hWmKCiBLr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iwZjfAqjYFuWiVOPXvynm6SGM1EFpAukZfMkt6R9F4SwhI5QT+Xp7QvTIEpuLE3KP FplaU//xDRQisqOHnlLu39H26TkCIv4PZzSU7MGzz+2/p27FJxqLasq83v+lxsZ6ea av9mDrJ0bQ/+h0XBKELeakt837vrywc0WgoES31rQbqguhIQv2Q9CYKxTRYKhvXSh8 TqOn+l7L0Cq4ZpG2bGce/4xmpyaLmDwwj54B+YZmwJPikT33fFp9LO1Kxo0BHwZAkT tXbllQKTbH1zDS3xF3bDHNztoODZx7SzsEmXyCACl4y9jaMcCs8hkhJ07v0t5vyk/L xXtMTp3EUhJaw== 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" , Davidlohr Bueso , Greg Kroah-Hartman , Heiko Carstens , Huacai Chen , Ingo Molnar , Jiaxun Yang , John Paul Adrian Glaubitz , Jonathan Cameron , Jonathan Corbet , Michael Ellerman , Mike Rapoport , Palmer Dabbelt , "Rafael J. Wysocki" , Rob Herring , Samuel Holland , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Will Deacon , Zi Yan , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, nvdimm@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org, Jonathan Cameron Subject: [PATCH v3 12/26] x86/numa: move FAKE_NODE_* defines to numa_emu Date: Thu, 1 Aug 2024 09:08:12 +0300 Message-ID: <20240801060826.559858-13-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240801060826.559858-1-rppt@kernel.org> References: <20240801060826.559858-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 6FE78A0035 X-Stat-Signature: aobjbntbbeuaetm961iyptm3o1d95oma X-Rspam-User: X-HE-Tag: 1722492671-686689 X-HE-Meta: U2FsdGVkX18gWQa5emVhX4Ou1sylvuY63x9E5nSgIwWjYi0MhrrHSGdNtjdAuoLH0z6tW9OnBHwtScg3f+fyeJd3MRxe8a0ccq0I0cQ2RYIWDdKSOCT7Qb5FwtkHJTBdTZO/O0WvjeW0WU3kDraAMbabIPw/qpMv3NXWMD2/MM8r21pQKbf7vj+6SBNO2bSrYvmJrNzTb4Se9ho6rA/NmBvWB8FtxJ+l+5OXoVovumWrfFv06GiWTAfB6O6XS7r64EAQkk9CUc13s8sV70Y83t3sojLAeJ/bcM4KHkbOc3VSsBDRY/eT8aKgH6Q641UxcC69fstxBle+XEfug21Wdt4yitU5PC7XzO68riYENhJxV4LhMnRA1ZCyyvwuRceoGSEUWrvCm75ZVFLIUuW/5VjN5U5pmgF3l2ECDb4JuyRBkkyphckOWkT8wpLQ27ItgZWD5RF+MyD0MfcPilxq2WdZnJ+oeY3m8vK7X91xeLHIyQgfln/y7WGffRja9gnIUx3S7n7OfcKe6G5PzTX8WeT6Iaw2kOEQbH7gpKiklRoSdvsb3leclacJIML0cIi2F6r9Hr6OHnILZpH1KQEESnm49v/7Yo9xU/YSxf46onVlVp5ml5OzObuNW5TaAIq4nNBb11oFX6VF9uUWgyvy9N0u3PVENgzQsXciXzq1bxEj84KhhzB/4b+NWxClNOWWfQdnmFlasR9LrY6ez8SK4We9H7nYIR9Fii+avCc0C3C+6Rocac8i75jt7k6anrpUARyse/aY9OzpJJTi4xbxM5oxh0+NmxS2kQUk7N25iQzRrwpRPLB9/9gQJtNCaBx5xG+kUlgTcG/afF2Soo/hjWI/soLrWgmtut7YSJxi0hoopllsiTb0s9V+uNJ2ah/PNIbG2lxi0HkmvuFCXJ3IsdnjQeraowULcFC7cPN+nujxGUFV3rN8/Ot7zEO486e6LYaXAa/pn5AVuvHNbDw dQ2sAI2c TE7AS6FbzoXtsUDfZJVBBzF9iC41C/5yoALDONvgaquJig3W+b9FNfBplrVyIH/yAZeHOIP+uIpuzwNlF511E5pyWB+nF20uMPUHORXqrD6J9ZdYacoKT6J0mtY7vdHZqjWNvqVCCVB30UxVvlzzqq/hA2NyS0LUtPhDtr2wUsqmMyqsS8HlH8hWvIEBdlzzOf10WPE5lRfuGNb/djcienqwy8d8cd/1EqCEonBAZhXyBsJKz0R0DgbygTSnw/MaLDr3q+CmCyKmmrBaSMUg/W0Cs4GATaTHKn258EIXGJPfjk9S742H7xQ0y5AjlaaWfY/O4l5JoYofraD1XLYT7BhwCtWvDmHRfYWow93VcBpV9QqXCfTQcaSYm4g== 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: List-Subscribe: List-Unsubscribe: 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 Tested-by: Zi Yan # for x86_64 and arm64 Acked-by: David Hildenbrand --- 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;