lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240809-mips-numa-v1-4-568751803bf8@flygoat.com>
Date: Fri, 09 Aug 2024 20:25:04 +0100
From: Jiaxun Yang <jiaxun.yang@...goat.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Arnd Bergmann <arnd@...db.de>, 
 Thomas Bogendoerfer <tsbogend@...ha.franken.de>, 
 Huacai Chen <chenhuacai@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org, 
 linux-mips@...r.kernel.org, Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: [PATCH 4/7] MIPS: mm: init: Prepare for arch_numa

Opt-in various mm initailise routines for NUMA platforms
with arch_numa enabled.

Loongson64 & IP27 have their own implementations but arch_numa
is fine with the generic implementation.

Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
---
 arch/mips/mm/init.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 4583d1a2a73e..4d7d5e817939 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -401,7 +401,7 @@ void maar_init(void)
 	}
 }
 
-#ifndef CONFIG_NUMA
+#if !defined(CONFIG_NUMA) || defined(CONFIG_GENERIC_ARCH_NUMA)
 void __init paging_init(void)
 {
 	unsigned long max_zone_pfns[MAX_NR_ZONES];
@@ -424,14 +424,14 @@ void __init paging_init(void)
 		       (highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10));
 		max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn;
 
-		max_mapnr = max_low_pfn;
+		set_max_mapnr(max_low_pfn);
 	} else if (highend_pfn) {
-		max_mapnr = highend_pfn;
+		set_max_mapnr(highend_pfn);
 	} else {
-		max_mapnr = max_low_pfn;
+		set_max_mapnr(max_low_pfn);
 	}
 #else
-	max_mapnr = max_low_pfn;
+	set_max_mapnr(max_low_pfn);
 #endif
 	high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
@@ -482,7 +482,7 @@ void __init mem_init(void)
 				0x80000000 - 4, KCORE_TEXT);
 #endif
 }
-#endif /* !CONFIG_NUMA */
+#endif
 
 void free_init_pages(const char *what, unsigned long begin, unsigned long end)
 {
@@ -519,7 +519,7 @@ void __ref free_initmem(void)
 		free_initmem_default(POISON_FREE_INITMEM);
 }
 
-#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
+#if defined(CONFIG_NUMA) && !defined(CONFIG_GENERIC_ARCH_NUMA)
 unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
 EXPORT_SYMBOL(__per_cpu_offset);
 

-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ