From patchwork Tue Jul 23 06:41:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13739439 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 832B6C3DA63 for ; Tue, 23 Jul 2024 06:44:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 129E16B00A5; Tue, 23 Jul 2024 02:44:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B36C6B00A6; Tue, 23 Jul 2024 02:44:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E956D6B00A7; Tue, 23 Jul 2024 02:44:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C57A86B00A5 for ; Tue, 23 Jul 2024 02:44:42 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 847B01A1AEA for ; Tue, 23 Jul 2024 06:44:42 +0000 (UTC) X-FDA: 82370079204.23.1292D30 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf28.hostedemail.com (Postfix) with ESMTP id 3E60CC0004 for ; Tue, 23 Jul 2024 06:44:39 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DMH+LIu7; spf=pass (imf28.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721717044; 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=f+JVIr9xEeM7sp1vfI+gj8t5P9Zrkmgh4No5kG8fOs8=; b=MQ9HdQWP3nPTnxrKmdxfTnT/zxudIMWzQWDnhCBsGvin2xwaQgV5ewI5EmOnEAw92u8xhy iXUdP4Q1qAPQLvbD3D8LAPua0qRUaqREDJaUfzA2Q2k64LxSPYbB2To/M8G+4bXbWxJrW/ Z6AJXveuMs95TKz53aMYHQtE8ohspUA= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DMH+LIu7; spf=pass (imf28.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721717044; a=rsa-sha256; cv=none; b=To52XHhvmFI1TD16ACC09w2Ud+OLAK9hQBZXtZmT0E+hUzGRILVyEj+JOAAGIU4MjUPFHw yRIA+z+3cAYp7AzMhjnsXndxhFPDEnSaRbycjaK03Px2vjox9bg0CZbnM+p+OPRoRgNLUX eluEMd+DKuQGSa2wkmM4/XxR8zTiztk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9B68FCE0CF9; Tue, 23 Jul 2024 06:44:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A897DC4AF11; Tue, 23 Jul 2024 06:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721717076; bh=8rGMU6H0xpSW1PfNkpG5PW55rGb66bFUqmPdcr4x6rM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DMH+LIu7U+aon+ordBnOP9y/4e/JQcPrdrU4wjutvSLDDvXOc1ys6wuHbI4hKieQR /xgRhOakm6RQTdiw2VvUZ5E+G5+8InucFZSJ4L/WpYdF2KBpwnJhzL2X3blwUIsPHF BNsuUV6DrXa0kDav1NpSJD8RWtLixsQL95KrNLHU/bpdX+V8avSWLrtUxamv6XP6Ji Wy8f6yiSPuW67CGtqy45Wu7qsOcxty7IMCR7Ls2bWyZ9yB4JzsDY3BvA9clRGF07K6 TvjJ9DmJQksoZos1626QbyJJRVE6drznFrXoiqAYFhoYqZXLw0uPhlOK3FS/vUJ5rC SWsVGk9Lql1nw== 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 v2 12/25] x86/numa: move FAKE_NODE_* defines to numa_emu Date: Tue, 23 Jul 2024 09:41:43 +0300 Message-ID: <20240723064156.4009477-13-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240723064156.4009477-1-rppt@kernel.org> References: <20240723064156.4009477-1-rppt@kernel.org> MIME-Version: 1.0 X-Stat-Signature: yx8wm18utomyp6d9rnq6xazatzez8ur5 X-Rspam-User: X-Rspamd-Queue-Id: 3E60CC0004 X-Rspamd-Server: rspam02 X-HE-Tag: 1721717079-811366 X-HE-Meta: U2FsdGVkX18/+DQe+sk9XNkEuSnd1awsCLxNS+e/D1c76krqoE3FD4csiv3gIkAdxIPyp6DcyVSaJy2idHj+gXF5K+ZJOmVzgVEHGZrfiF7n7ZWrk3LnizbaD/OQeiql0X5QEdCG+4YX3sAtnl5dBSufOheEvDUqDnVFCoyPkuXrW4IG5XHqOE1ErNZZW/sGgvtqGh4oQFciCf0qx9SJlualJsiDhtgr/vwDJtvj2DIQCzZ+nM2XWnNxlzHtca7fmehUaG4M8RD7vAKtnJ2HATXOUCapsUCvj5O3KhAtTtmZ4/UDKKoTrRbiYHK21OYF0/wzv6NX1DIm2W8XTv5Efe162mg4Yo1GCZHUFyqI1fCXFXUFBAIB+pMWFRDPSiglwZCoUt9mhOlZGMCPb3/WztwfYuiclTBGqcpt7rQP+4EaKYITEqCuJzHQp2XJYPmAA8/xq7JDljMNQQS58iTjQa0pwHDi7jKcnck2x32DHu7ub+yTiFB6Faz4Bd8i6HFPVzDU7YscCnI0BsUwg8z644DytXdBWJE19Dk6QdgsfPMLcE77wW9fUDBTe2YFEOQyc5eB9lm63yZIvY56rr9HKErX5WY35gWhOrUzzgX+FAb9zrXGuGmeQ71/iSmIX67pCfLq+oZfLy0pMT5AfirJyxswEEybKPlTRu0NKdwtgE9GvRg2H9wZv/6vU+kTKHo+8J+Qk+2xuoy/Mm/py8+iI0otXS3cBgcyDZCXFg/5WadOwSjrvSpkoFf8on+TiHi8S61Dk14SZ7O+cv5LCmEG6g8pVUd7wkiiA/Ph/W/gK+rB2BOnubpX2DwXhUbqjg4KizgS2B3CiI2Gi92Cdw5/ZbeMnF5VwGL0e95gjROQhQ0nCpq+ogfWogDU0Vx/Et8PMiHMRbaNy9oN2Gx2xtnGkOASEGhtCCNBVDirCnVVbCRGSFfSD7Ya5XnqZWNZgQSA0MDG9fv5X+7HKpQ19yH 6M+xV43y 5v4Br23IXJrdQn1O4iWMzQSmWTG7youmdqSMUUwmeVsFoc/nmB1OrJ3QxclatvCVndmLjJeOotAVXxi15LCjIasSyNrTGn3stwb1Ozoz2p+vW4xoeD9fxKe5a9fLt1itytj+e8WyJpBu0zTKR64bSwdY1aiLlgcXB2h1EqKdd0JWYF/aTnEcjjr0WnnIdFDwI1M4UHkI/TR+pTStwaM6ef6XlZ7He2q6I661Tr64RpGADITboyL3rK9Ei0l6mtdCu2vzcnlJqU95FLZ5alqKItJHXBWvI9BF1xDiy/DCJ2PUzYwoRF8QaVF6sPMYzJck04YCNK6XoA4WzpLGeGRkMFbdNKJjbC0pUj7CY 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 --- 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;