Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / loongarch / include / asm / sparsemem.h
blob8d4af6aff8a8f1e149f59b4a9b34b80bf7197db2
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LOONGARCH_SPARSEMEM_H
3 #define _LOONGARCH_SPARSEMEM_H
5 #ifdef CONFIG_SPARSEMEM
7 /*
8 * SECTION_SIZE_BITS 2^N: how big each section will be
9 * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space
11 #define SECTION_SIZE_BITS 29 /* 2^29 = Largest Huge Page Size */
12 #define MAX_PHYSMEM_BITS 48
14 #ifdef CONFIG_SPARSEMEM_VMEMMAP
15 #define VMEMMAP_SIZE (sizeof(struct page) * (1UL << (cpu_pabits + 1 - PAGE_SHIFT)))
16 #endif
18 #endif /* CONFIG_SPARSEMEM */
20 #ifndef VMEMMAP_SIZE
21 #define VMEMMAP_SIZE 0 /* 1, For FLATMEM; 2, For SPARSEMEM without VMEMMAP. */
22 #endif
24 #ifdef CONFIG_MEMORY_HOTPLUG
25 int memory_add_physaddr_to_nid(u64 addr);
26 #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
27 #endif
29 #define INIT_MEMBLOCK_RESERVED_REGIONS (INIT_MEMBLOCK_REGIONS + NR_CPUS)
31 #endif /* _LOONGARCH_SPARSEMEM_H */