From mboxrd@z Thu Jan 1 00:00:00 1970 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 CE682134AB for ; Sat, 3 Aug 2024 18:42:46 +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=1722710566; cv=none; b=n6FNKuhZl5yPE4WEA18VsYlDqB56uV0fQB7vOCGk6AYAgd8909K5YyTGq8RIFhwci14uwTnfzZaeuz4VaI3tzFktWO96uUrdhNPb1AYYNn2fBhb1b5QEkMiBbXsDvY+BRi+AT0npSbJcMnfoC1GjhQ6I3mzvg92skHMr/W6X5XE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722710566; c=relaxed/simple; bh=nhVGxX27kLmYbW0KposKUJ9kmWZSDPI8XiZswO9nIBY=; h=Date:To:From:Subject:Message-Id; b=bSQxfQ+7ZBXZBLRPuirX06ObnKa5vl2cke6QGRVox+fYvWslxbE5KeLGKYAKRmLm4cE2XaEnyvzPiwXy8VukuwVA+7GDdjpnKRXUx4BFtR+sIh/AhXSqSN661lDaqtfE8TdC+n5oDrUpYqOC1v3Ty3UP7d5TM8F9lal69taKE9E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=s4XmvRl5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="s4XmvRl5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C823C116B1; Sat, 3 Aug 2024 18:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1722710566; bh=nhVGxX27kLmYbW0KposKUJ9kmWZSDPI8XiZswO9nIBY=; h=Date:To:From:Subject:From; b=s4XmvRl5DZfqeKOhIngSFDTJMoiHUByQNl4sqkifMNEmhQ4V5Q6hbH0I5iMo9zutN j+EIMp3tMGBlRfUNuTebdowkO/gLQv4Lxw8Nurbb4bMxX9MiczDP9Cl9CcmeIpv1oH ADUt0di5oP8b+f6LQvsu8hYSvZjIiTxoZC0/XGnA= Date: Sat, 03 Aug 2024 11:42:46 -0700 To: mm-commits@vger.kernel.org,ziy@nvidia.com,will@kernel.org,tsbogend@alpha.franken.de,tglx@linutronix.de,samuel.holland@sifive.com,robh@kernel.org,rafael@kernel.org,palmer@dabbelt.com,mpe@ellerman.id.au,mingo@redhat.com,Jonathan.Cameron@huawei.com,jiaxun.yang@flygoat.com,hca@linux.ibm.com,gregkh@linuxfoundation.org,gor@linux.ibm.com,glaubitz@physik.fu-berlin.de,david@redhat.com,dave@stgolabs.net,davem@davemloft.net,dave.hansen@linux.intel.com,dan.j.williams@intel.com,corbet@lwn.net,christophe.leroy@csgroup.eu,chenhuacai@kernel.org,catalin.marinas@arm.com,bp@alien8.de,arnd@arndb.de,andreas@gaisler.com,agordeev@linux.ibm.com,rppt@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: + x86-numa_emu-use-a-helper-function-to-get-max_dma32_pfn.patch added to mm-unstable branch Message-Id: <20240803184246.9C823C116B1@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: x86/numa_emu: use a helper function to get MAX_DMA32_PFN has been added to the -mm mm-unstable branch. Its filename is x86-numa_emu-use-a-helper-function-to-get-max_dma32_pfn.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/x86-numa_emu-use-a-helper-function-to-get-max_dma32_pfn.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: "Mike Rapoport (Microsoft)" Subject: x86/numa_emu: use a helper function to get MAX_DMA32_PFN Date: Thu, 1 Aug 2024 09:08:15 +0300 This is required to make numa emulation code architecture independent so that it can be moved to generic code in following commits. Link: https://lkml.kernel.org/r/20240801060826.559858-16-rppt@kernel.org Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron Tested-by: Jonathan Cameron [arm64 + CXL via QEMU] Tested-by: Zi Yan [x86_64 and arm64] Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christophe Leroy Cc: Dan Williams Cc: Dave Hansen Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiaxun Yang Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Rafael J. Wysocki Cc: Rob Herring (Arm) Cc: Samuel Holland Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton --- arch/x86/include/asm/numa.h | 1 + arch/x86/mm/numa.c | 5 +++++ arch/x86/mm/numa_emulation.c | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/numa.h~x86-numa_emu-use-a-helper-function-to-get-max_dma32_pfn +++ a/arch/x86/include/asm/numa.h @@ -74,6 +74,7 @@ void debug_cpumask_set_cpu(int cpu, int int numa_emu_cmdline(char *str); void __init numa_emu_update_cpu_to_node(int *emu_nid_to_phys, unsigned int nr_emu_nids); +u64 __init numa_emu_dma_end(void); #else /* CONFIG_NUMA_EMU */ static inline int numa_emu_cmdline(char *str) { --- a/arch/x86/mm/numa.c~x86-numa_emu-use-a-helper-function-to-get-max_dma32_pfn +++ a/arch/x86/mm/numa.c @@ -868,6 +868,11 @@ void __init numa_emu_update_cpu_to_node( __apicid_to_node[i] = j < nr_emu_nids ? j : 0; } } + +u64 __init numa_emu_dma_end(void) +{ + return PFN_PHYS(MAX_DMA32_PFN); +} #endif /* CONFIG_NUMA_EMU */ #ifdef CONFIG_NUMA_KEEP_MEMINFO --- a/arch/x86/mm/numa_emulation.c~x86-numa_emu-use-a-helper-function-to-get-max_dma32_pfn +++ a/arch/x86/mm/numa_emulation.c @@ -128,7 +128,7 @@ static int __init split_nodes_interleave */ while (!nodes_empty(physnode_mask)) { for_each_node_mask(i, physnode_mask) { - u64 dma32_end = PFN_PHYS(MAX_DMA32_PFN); + u64 dma32_end = numa_emu_dma_end(); u64 start, limit, end; int phys_blk; @@ -275,7 +275,7 @@ static int __init split_nodes_size_inter */ while (!nodes_empty(physnode_mask)) { for_each_node_mask(i, physnode_mask) { - u64 dma32_end = PFN_PHYS(MAX_DMA32_PFN); + u64 dma32_end = numa_emu_dma_end(); u64 start, limit, end; int phys_blk; _ Patches currently in -mm which might be from rppt@kernel.org are mm-move-kernel-numac-to-mm.patch mips-sgi-ip27-make-node_data-the-same-as-on-all-other-architectures.patch mips-sgi-ip27-ensure-node_possible_map-only-contains-valid-nodes.patch mips-sgi-ip27-drop-have_arch_nodedata_extension.patch mips-loongson64-rename-__node_data-to-node_data.patch mips-loongson64-drop-have_arch_nodedata_extension.patch mm-drop-config_have_arch_nodedata_extension.patch arch-mm-move-definition-of-node_data-to-generic-code.patch arch-mm-pull-out-allocation-of-node_data-to-generic-code.patch x86-numa-simplify-numa_distance-allocation.patch x86-numa-use-get_pfn_range_for_nid-to-verify-that-node-spans-memory.patch x86-numa-move-fake_node_-defines-to-numa_emu.patch x86-numa_emu-simplify-allocation-of-phys_dist.patch x86-numa_emu-split-__apicid_to_node-update-to-a-helper-function.patch x86-numa_emu-use-a-helper-function-to-get-max_dma32_pfn.patch x86-numa-numa_addremove_cpu-make-cpu-parameter-unsigned.patch mm-introduce-numa_memblks.patch mm-move-numa_distance-and-related-code-from-x86-to-numa_memblks.patch mm-introduce-numa_emulation.patch mm-numa_memblks-introduce-numa_memblks_init.patch mm-numa_memblks-make-several-functions-and-variables-static.patch mm-numa_memblks-use-memblock_startend_of_dram-when-sanitizing-meminfo.patch of-numa-return-einval-when-no-numa-node-id-is-found.patch arch_numa-switch-over-to-numa_memblks.patch mm-make-range-to-target_node-lookup-facility-a-part-of-numa_memblks.patch docs-move-numa=fake-description-to-kernel-parameterstxt.patch