0001
0002 #ifndef _ASM_X86_SPARSEMEM_H
0003 #define _ASM_X86_SPARSEMEM_H
0004
0005 #ifdef CONFIG_SPARSEMEM
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifdef CONFIG_X86_32
0018 # ifdef CONFIG_X86_PAE
0019 # define SECTION_SIZE_BITS 29
0020 # define MAX_PHYSMEM_BITS 36
0021 # else
0022 # define SECTION_SIZE_BITS 26
0023 # define MAX_PHYSMEM_BITS 32
0024 # endif
0025 #else
0026 # define SECTION_SIZE_BITS 27
0027 # define MAX_PHYSMEM_BITS (pgtable_l5_enabled() ? 52 : 46)
0028 #endif
0029
0030 #endif
0031
0032 #ifndef __ASSEMBLY__
0033 #ifdef CONFIG_NUMA_KEEP_MEMINFO
0034 extern int phys_to_target_node(phys_addr_t start);
0035 #define phys_to_target_node phys_to_target_node
0036 extern int memory_add_physaddr_to_nid(u64 start);
0037 #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
0038 #endif
0039 #endif
0040
0041 #endif