riscv: select DMA_DIRECT_OPS instead of redefining it
[linux-2.6-microblaze.git] / arch / riscv / Kconfig
1 #
2 # For a description of the syntax of this configuration file,
3 # see Documentation/kbuild/kconfig-language.txt.
4 #
5
6 config RISCV
7         def_bool y
8         select OF
9         select OF_EARLY_FLATTREE
10         select OF_IRQ
11         select ARCH_WANT_FRAME_POINTERS
12         select CLONE_BACKWARDS
13         select COMMON_CLK
14         select DMA_DIRECT_OPS
15         select GENERIC_CLOCKEVENTS
16         select GENERIC_CPU_DEVICES
17         select GENERIC_IRQ_SHOW
18         select GENERIC_PCI_IOMAP
19         select GENERIC_STRNCPY_FROM_USER
20         select GENERIC_STRNLEN_USER
21         select GENERIC_SMP_IDLE_THREAD
22         select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A
23         select HAVE_MEMBLOCK
24         select HAVE_MEMBLOCK_NODE_MAP
25         select HAVE_DMA_API_DEBUG
26         select HAVE_DMA_CONTIGUOUS
27         select HAVE_GENERIC_DMA_COHERENT
28         select IRQ_DOMAIN
29         select NO_BOOTMEM
30         select RISCV_ISA_A if SMP
31         select SPARSE_IRQ
32         select SYSCTL_EXCEPTION_TRACE
33         select HAVE_ARCH_TRACEHOOK
34         select MODULES_USE_ELF_RELA if MODULES
35         select THREAD_INFO_IN_TASK
36         select RISCV_TIMER
37         select GENERIC_IRQ_MULTI_HANDLER
38
39 config MMU
40         def_bool y
41
42 # even on 32-bit, physical (and DMA) addresses are > 32-bits
43 config ARCH_PHYS_ADDR_T_64BIT
44         def_bool y
45
46 config ZONE_DMA32
47         bool
48         default y
49
50 config ARCH_DMA_ADDR_T_64BIT
51         def_bool y
52
53 config PAGE_OFFSET
54         hex
55         default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB
56         default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
57         default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
58
59 config STACKTRACE_SUPPORT
60         def_bool y
61
62 config TRACE_IRQFLAGS_SUPPORT
63         def_bool y
64
65 config RWSEM_GENERIC_SPINLOCK
66         def_bool y
67
68 config GENERIC_BUG
69         def_bool y
70         depends on BUG
71         select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
72
73 config GENERIC_BUG_RELATIVE_POINTERS
74         bool
75
76 config GENERIC_CALIBRATE_DELAY
77         def_bool y
78
79 config GENERIC_CSUM
80         def_bool y
81
82 config GENERIC_HWEIGHT
83         def_bool y
84
85 config PGTABLE_LEVELS
86         int
87         default 3 if 64BIT
88         default 2
89
90 config HAVE_KPROBES
91         def_bool n
92
93 menu "Platform type"
94
95 choice
96         prompt "Base ISA"
97         default ARCH_RV64I
98         help
99           This selects the base ISA that this kernel will traget and must match
100           the target platform.
101
102 config ARCH_RV32I
103         bool "RV32I"
104         select CPU_SUPPORTS_32BIT_KERNEL
105         select 32BIT
106         select GENERIC_ASHLDI3
107         select GENERIC_ASHRDI3
108         select GENERIC_LSHRDI3
109
110 config ARCH_RV64I
111         bool "RV64I"
112         select CPU_SUPPORTS_64BIT_KERNEL
113         select 64BIT
114         select HAVE_FUNCTION_TRACER
115         select HAVE_FUNCTION_GRAPH_TRACER
116         select HAVE_FTRACE_MCOUNT_RECORD
117         select HAVE_DYNAMIC_FTRACE
118         select HAVE_DYNAMIC_FTRACE_WITH_REGS
119
120 endchoice
121
122 # We must be able to map all physical memory into the kernel, but the compiler
123 # is still a bit more efficient when generating code if it's setup in a manner
124 # such that it can only map 2GiB of memory.
125 choice
126         prompt "Kernel Code Model"
127         default CMODEL_MEDLOW if 32BIT
128         default CMODEL_MEDANY if 64BIT
129
130         config CMODEL_MEDLOW
131                 bool "medium low code model"
132         config CMODEL_MEDANY
133                 bool "medium any code model"
134 endchoice
135
136 config MODULE_SECTIONS
137         bool
138         select HAVE_MOD_ARCH_SPECIFIC
139
140 choice
141         prompt "Maximum Physical Memory"
142         default MAXPHYSMEM_2GB if 32BIT
143         default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
144         default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
145
146         config MAXPHYSMEM_2GB
147                 bool "2GiB"
148         config MAXPHYSMEM_128GB
149                 depends on 64BIT && CMODEL_MEDANY
150                 select MODULE_SECTIONS if MODULES
151                 bool "128GiB"
152 endchoice
153
154
155 config SMP
156         bool "Symmetric Multi-Processing"
157         help
158           This enables support for systems with more than one CPU.  If
159           you say N here, the kernel will run on single and
160           multiprocessor machines, but will use only one CPU of a
161           multiprocessor machine. If you say Y here, the kernel will run
162           on many, but not all, single processor machines. On a single
163           processor machine, the kernel will run faster if you say N
164           here.
165
166           If you don't know what to do here, say N.
167
168 config NR_CPUS
169         int "Maximum number of CPUs (2-32)"
170         range 2 32
171         depends on SMP
172         default "8"
173
174 config CPU_SUPPORTS_32BIT_KERNEL
175         bool
176 config CPU_SUPPORTS_64BIT_KERNEL
177         bool
178
179 choice
180         prompt "CPU Tuning"
181         default TUNE_GENERIC
182
183 config TUNE_GENERIC
184         bool "generic"
185
186 endchoice
187
188 config RISCV_ISA_C
189         bool "Emit compressed instructions when building Linux"
190         default y
191         help
192            Adds "C" to the ISA subsets that the toolchain is allowed to emit
193            when building Linux, which results in compressed instructions in the
194            Linux binary.
195
196            If you don't know what to do here, say Y.
197
198 config RISCV_ISA_A
199         def_bool y
200
201 endmenu
202
203 menu "Kernel type"
204
205 choice
206         prompt "Kernel code model"
207         default 64BIT
208
209 config 32BIT
210         bool "32-bit kernel"
211         depends on CPU_SUPPORTS_32BIT_KERNEL
212         help
213           Select this option to build a 32-bit kernel.
214
215 config 64BIT
216         bool "64-bit kernel"
217         depends on CPU_SUPPORTS_64BIT_KERNEL
218         help
219           Select this option to build a 64-bit kernel.
220
221 endchoice
222
223 source "mm/Kconfig"
224
225 source "kernel/Kconfig.preempt"
226
227 source "kernel/Kconfig.hz"
228
229 endmenu
230
231 menu "Bus support"
232
233 config PCI
234         bool "PCI support"
235         select PCI_MSI
236         help
237           This feature enables support for PCI bus system. If you say Y
238           here, the kernel will include drivers and infrastructure code
239           to support PCI bus devices.
240
241           If you don't know what to do here, say Y.
242
243 config PCI_DOMAINS
244         def_bool PCI
245
246 config PCI_DOMAINS_GENERIC
247         def_bool PCI
248
249 source "drivers/pci/Kconfig"
250
251 endmenu
252
253 source "init/Kconfig"
254
255 source "kernel/Kconfig.freezer"
256
257 menu "Executable file formats"
258
259 source "fs/Kconfig.binfmt"
260
261 endmenu
262
263 menu "Power management options"
264
265 source kernel/power/Kconfig
266
267 endmenu
268
269 source "net/Kconfig"
270
271 source "drivers/Kconfig"
272
273 source "fs/Kconfig"
274
275 menu "Kernel hacking"
276
277 config CMDLINE_BOOL
278         bool "Built-in kernel command line"
279         help
280           For most platforms, it is firmware or second stage bootloader
281           that by default specifies the kernel command line options.
282           However, it might be necessary or advantageous to either override
283           the default kernel command line or add a few extra options to it.
284           For such cases, this option allows hardcoding command line options
285           directly into the kernel.
286
287           For that, choose 'Y' here and fill in the extra boot parameters
288           in CONFIG_CMDLINE.
289
290           The built-in options will be concatenated to the default command
291           line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
292           command line will be ignored and replaced by the built-in string.
293
294 config CMDLINE
295         string "Built-in kernel command string"
296         depends on CMDLINE_BOOL
297         default ""
298         help
299           Supply command-line options at build time by entering them here.
300
301 config CMDLINE_FORCE
302         bool "Built-in command line overrides bootloader arguments"
303         depends on CMDLINE_BOOL
304         help
305           Set this option to 'Y' to have the kernel ignore the bootloader
306           or firmware command line.  Instead, the built-in command line
307           will be used exclusively.
308
309           If you don't know what to do here, say N.
310
311 config EARLY_PRINTK
312         def_bool y
313
314 source "lib/Kconfig.debug"
315
316 config CMDLINE_BOOL
317         bool
318 endmenu
319
320 source "security/Kconfig"
321
322 source "crypto/Kconfig"
323
324 source "lib/Kconfig"