1# SPDX-License-Identifier: GPL-2.0 2menu "Memory management options" 3 4config PAGE_OFFSET 5 hex "Kernel page offset address" 6 default "0x40000000" 7 help 8 This option allows you to set the virtual address at which the 9 kernel will be mapped to. 10endmenu 11 12config KERNEL_4M_PAGES 13 bool "Map kernel with 4MB pages" 14 depends on METAG_META21_MMU 15 default y 16 help 17 Map the kernel with large pages to reduce TLB pressure. 18 19choice 20 prompt "User page size" 21 default PAGE_SIZE_4K 22 23config PAGE_SIZE_4K 24 bool "4kB" 25 help 26 This is the default page size used by all Meta cores. 27 28config PAGE_SIZE_8K 29 bool "8kB" 30 depends on METAG_META21_MMU 31 help 32 This enables 8kB pages as supported by Meta 2.x and later MMUs. 33 34config PAGE_SIZE_16K 35 bool "16kB" 36 depends on METAG_META21_MMU 37 help 38 This enables 16kB pages as supported by Meta 2.x and later MMUs. 39 40endchoice 41 42config NUMA 43 bool "Non Uniform Memory Access (NUMA) Support" 44 select ARCH_WANT_NUMA_VARIABLE_LOCALITY 45 help 46 Some Meta systems have MMU-mappable on-chip memories with 47 lower latencies than main memory. This enables support for 48 these blocks by binding them to nodes and allowing 49 memory policies to be used for prioritizing and controlling 50 allocation behaviour. 51 52config FORCE_MAX_ZONEORDER 53 int "Maximum zone order" 54 range 10 32 55 default "10" 56 help 57 The kernel memory allocator divides physically contiguous memory 58 blocks into "zones", where each zone is a power of two number of 59 pages. This option selects the largest power of two that the kernel 60 keeps in the memory allocator. If you need to allocate very large 61 blocks of physically contiguous memory, then you may need to 62 increase this value. 63 64 This config option is actually maximum order plus one. For example, 65 a value of 11 means that the largest free memory block is 2^10 pages. 66 67 The page size is not necessarily 4KB. Keep this in mind 68 when choosing a value for this option. 69 70config METAG_L2C 71 bool "Level 2 Cache Support" 72 depends on METAG_META21 73 help 74 Press y here to enable support for the Meta Level 2 (L2) cache. This 75 will enable the cache at start up if it hasn't already been enabled 76 by the bootloader. 77 78 If the bootloader enables the L2 you must press y here to ensure the 79 kernel takes the appropriate actions to keep the cache coherent. 80 81config NODES_SHIFT 82 int 83 default "1" 84 depends on NEED_MULTIPLE_NODES 85 86config ARCH_FLATMEM_ENABLE 87 def_bool y 88 depends on !NUMA 89 90config ARCH_SPARSEMEM_ENABLE 91 def_bool y 92 select SPARSEMEM_STATIC 93 94config ARCH_SPARSEMEM_DEFAULT 95 def_bool y 96 97config ARCH_SELECT_MEMORY_MODEL 98 def_bool y 99 100config SYS_SUPPORTS_HUGETLBFS 101 def_bool y 102 depends on METAG_META21_MMU 103 104choice 105 prompt "HugeTLB page size" 106 depends on METAG_META21_MMU && HUGETLB_PAGE 107 default HUGETLB_PAGE_SIZE_1M 108 109config HUGETLB_PAGE_SIZE_8K 110 bool "8kB" 111 depends on PAGE_SIZE_4K 112 113config HUGETLB_PAGE_SIZE_16K 114 bool "16kB" 115 depends on PAGE_SIZE_4K || PAGE_SIZE_8K 116 117config HUGETLB_PAGE_SIZE_32K 118 bool "32kB" 119 120config HUGETLB_PAGE_SIZE_64K 121 bool "64kB" 122 123config HUGETLB_PAGE_SIZE_128K 124 bool "128kB" 125 126config HUGETLB_PAGE_SIZE_256K 127 bool "256kB" 128 129config HUGETLB_PAGE_SIZE_512K 130 bool "512kB" 131 132config HUGETLB_PAGE_SIZE_1M 133 bool "1MB" 134 135config HUGETLB_PAGE_SIZE_2M 136 bool "2MB" 137 138config HUGETLB_PAGE_SIZE_4M 139 bool "4MB" 140 141endchoice 142 143config METAG_COREMEM 144 bool 145 default y if SUSPEND 146 147source "mm/Kconfig" 148