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: 13734334 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 3EB37C3DA60 for ; Tue, 16 Jul 2024 11:15:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C67F76B009D; Tue, 16 Jul 2024 07:15:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFB516B009E; Tue, 16 Jul 2024 07:15:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB8036B009F; Tue, 16 Jul 2024 07:15:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8EF7B6B009D for ; Tue, 16 Jul 2024 07:15:23 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3777D1604A2 for ; Tue, 16 Jul 2024 11:15:23 +0000 (UTC) X-FDA: 82345359726.22.23F7AA3 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf30.hostedemail.com (Postfix) with ESMTP id EEBF180009 for ; Tue, 16 Jul 2024 11:15:20 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RcsB2+p5; spf=pass (imf30.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=1721128484; 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=8N1xO2TuVSKANfO1WO0x6Q2I49YoU0BQfNYjAuSOBuA=; b=Ii4QjLPWjh3Z3VzcSWc4lb71XZv+URH9i2eSP0qndyYbvvcKNcvF+hY56f5IVL8NRLcnz1 p2NBQP/F5vnGqDEt6V2rO9G+pYGGq/e5SWwEXkdfR8HXIgizbxMji7BsxUhwtHlfH3RgzC ydrCQ6Yi96mGjinmRia6+Qr8fn+txeU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721128484; a=rsa-sha256; cv=none; b=HZyfw3agWiapXdRyPdYGOGFl5oin92FkAT+2sJKd2PSd3TGBxIziungNvf58fH+0GTtupB ca6vqZOd+A6iDFqy4e/42/m4nL6Rgdx6pWL6b9tvUb7cF/H0pvM3qw7F3PFh87iU2+hci8 nl5gZJmRmVZ9LJWm5iL6FAsfUEq9SuE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RcsB2+p5; spf=pass (imf30.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 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1DCEDCE12E4; Tue, 16 Jul 2024 11:15:18 +0000 (UTC) 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> MIME-Version: 1.0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Qdnu6QRrA6lY1kcP0Az/l8z 86dwVKg3 UTc18ZU19oCwuH+XOjevmjUsOj2ay+fmHreaPejeytKxyMeQrBgZlFS6nI+HzMDz2G0FM1Pn8y20qfyojH2U/ctP7oOhiz3h7NQUQIQoAf7NDiJFvDFCWzfJZBjumCEwPlMpjpGjEnmVqFkfLV9Iy+CC+q5AVyC8+e2xv3bKcN+1mYxQ/YBpX3m1tR1EERMrwdG+Qx7VHlDioaTvPxtP1PxlCvYJ0tffrStlS/a9dtygeiiNxhd1j96emQl6yNoJ+SPJDg/Y5AKKrhg9iaxD0yKwKTOMiA2r+jcWu 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;