hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/include/asm/sparsemem.h
....@@ -10,26 +10,32 @@
1010 * field of the struct page
1111 *
1212 * SECTION_SIZE_BITS 2^n: size of each section
13
- * MAX_PHYSADDR_BITS 2^n: max size of physical address space
14
- * MAX_PHYSMEM_BITS 2^n: how much memory we can have in that space
13
+ * MAX_PHYSMEM_BITS 2^n: max size of physical address space
1514 *
1615 */
1716
1817 #ifdef CONFIG_X86_32
1918 # ifdef CONFIG_X86_PAE
2019 # define SECTION_SIZE_BITS 29
21
-# define MAX_PHYSADDR_BITS 36
2220 # define MAX_PHYSMEM_BITS 36
2321 # else
2422 # define SECTION_SIZE_BITS 26
25
-# define MAX_PHYSADDR_BITS 32
2623 # define MAX_PHYSMEM_BITS 32
2724 # endif
2825 #else /* CONFIG_X86_32 */
2926 # define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */
30
-# define MAX_PHYSADDR_BITS (pgtable_l5_enabled() ? 52 : 44)
3127 # define MAX_PHYSMEM_BITS (pgtable_l5_enabled() ? 52 : 46)
3228 #endif
3329
3430 #endif /* CONFIG_SPARSEMEM */
31
+
32
+#ifndef __ASSEMBLY__
33
+#ifdef CONFIG_NUMA_KEEP_MEMINFO
34
+extern int phys_to_target_node(phys_addr_t start);
35
+#define phys_to_target_node phys_to_target_node
36
+extern int memory_add_physaddr_to_nid(u64 start);
37
+#define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
38
+#endif
39
+#endif /* __ASSEMBLY__ */
40
+
3541 #endif /* _ASM_X86_SPARSEMEM_H */