Linux 4.16-rc2
[linux-2.6-block.git] / arch / metag / mm / Kconfig
1 # SPDX-License-Identifier: GPL-2.0
2 menu "Memory management options"
3
4 config 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.
10 endmenu
11
12 config 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
19 choice
20         prompt "User page size"
21         default PAGE_SIZE_4K
22
23 config PAGE_SIZE_4K
24         bool "4kB"
25         help
26           This is the default page size used by all Meta cores.
27
28 config 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
34 config 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
40 endchoice
41
42 config 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
52 config 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
70 config 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
81 config NODES_SHIFT
82         int
83         default "1"
84         depends on NEED_MULTIPLE_NODES
85
86 config ARCH_FLATMEM_ENABLE
87         def_bool y
88         depends on !NUMA
89
90 config ARCH_SPARSEMEM_ENABLE
91         def_bool y
92         select SPARSEMEM_STATIC
93
94 config ARCH_SPARSEMEM_DEFAULT
95         def_bool y
96
97 config ARCH_SELECT_MEMORY_MODEL
98         def_bool y
99
100 config SYS_SUPPORTS_HUGETLBFS
101         def_bool y
102         depends on METAG_META21_MMU
103
104 choice
105         prompt "HugeTLB page size"
106         depends on METAG_META21_MMU && HUGETLB_PAGE
107         default HUGETLB_PAGE_SIZE_1M
108
109 config HUGETLB_PAGE_SIZE_8K
110         bool "8kB"
111         depends on PAGE_SIZE_4K
112
113 config HUGETLB_PAGE_SIZE_16K
114         bool "16kB"
115         depends on PAGE_SIZE_4K || PAGE_SIZE_8K
116
117 config HUGETLB_PAGE_SIZE_32K
118         bool "32kB"
119
120 config HUGETLB_PAGE_SIZE_64K
121         bool "64kB"
122
123 config HUGETLB_PAGE_SIZE_128K
124         bool "128kB"
125
126 config HUGETLB_PAGE_SIZE_256K
127         bool "256kB"
128
129 config HUGETLB_PAGE_SIZE_512K
130         bool "512kB"
131
132 config HUGETLB_PAGE_SIZE_1M
133         bool "1MB"
134
135 config HUGETLB_PAGE_SIZE_2M
136         bool "2MB"
137
138 config HUGETLB_PAGE_SIZE_4M
139         bool "4MB"
140
141 endchoice
142
143 config METAG_COREMEM
144         bool
145         default y if SUSPEND
146
147 source "mm/Kconfig"