arc: Use generic idle loop
[firefly-linux-kernel-4.4.55.git] / arch / arc / Kconfig
1 #
2 # Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 2 as
6 # published by the Free Software Foundation.
7 #
8
9 config ARC
10         def_bool y
11         select CLONE_BACKWARDS
12         # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev
13         select DEVTMPFS if !INITRAMFS_SOURCE=""
14         select GENERIC_ATOMIC64
15         select GENERIC_CLOCKEVENTS
16         select GENERIC_FIND_FIRST_BIT
17         select GENERIC_IDLE_LOOP
18         # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
19         select GENERIC_IRQ_SHOW
20         select GENERIC_KERNEL_EXECVE
21         select GENERIC_KERNEL_THREAD
22         select GENERIC_PENDING_IRQ if SMP
23         select GENERIC_SMP_IDLE_THREAD
24         select HAVE_ARCH_KGDB
25         select HAVE_ARCH_TRACEHOOK
26         select HAVE_GENERIC_HARDIRQS
27         select HAVE_IOREMAP_PROT
28         select HAVE_KPROBES
29         select HAVE_KRETPROBES
30         select HAVE_MEMBLOCK
31         select HAVE_MOD_ARCH_SPECIFIC if ARC_DW2_UNWIND
32         select HAVE_OPROFILE
33         select HAVE_PERF_EVENTS
34         select IRQ_DOMAIN
35         select MODULES_USE_ELF_RELA
36         select NO_BOOTMEM
37         select OF
38         select OF_EARLY_FLATTREE
39         select PERF_USE_VMALLOC
40
41 config SCHED_OMIT_FRAME_POINTER
42         def_bool y
43
44 config GENERIC_CSUM
45         def_bool y
46
47 config RWSEM_GENERIC_SPINLOCK
48         def_bool y
49
50 config ARCH_FLATMEM_ENABLE
51         def_bool y
52
53 config MMU
54         def_bool y
55
56 config NO_IOPORT
57         def_bool y
58
59 config GENERIC_CALIBRATE_DELAY
60         def_bool y
61
62 config GENERIC_HWEIGHT
63         def_bool y
64
65 config BINFMT_ELF
66         def_bool y
67
68 config STACKTRACE_SUPPORT
69         def_bool y
70         select STACKTRACE
71
72 config HAVE_LATENCYTOP_SUPPORT
73         def_bool y
74
75 config NO_DMA
76         def_bool n
77
78 source "init/Kconfig"
79 source "kernel/Kconfig.freezer"
80
81 menu "ARC Architecture Configuration"
82
83 menu "ARC Platform/SoC/Board"
84
85 source "arch/arc/plat-arcfpga/Kconfig"
86 #New platform adds here
87
88 endmenu
89
90 menu "ARC CPU Configuration"
91
92 choice
93         prompt "ARC Core"
94         default ARC_CPU_770
95
96 config ARC_CPU_750D
97         bool "ARC750D"
98         help
99           Support for ARC750 core
100
101 config ARC_CPU_770
102         bool "ARC770"
103         select ARC_CPU_REL_4_10
104         help
105           Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
106           This core has a bunch of cool new features:
107           -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
108                    Shared Address Spaces (for sharing TLB entires in MMU)
109           -Caches: New Prog Model, Region Flush
110           -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
111
112 endchoice
113
114 config CPU_BIG_ENDIAN
115         bool "Enable Big Endian Mode"
116         default n
117         help
118           Build kernel for Big Endian Mode of ARC CPU
119
120 # If a platform can't work with 0x8000_0000 based dma_addr_t
121 config ARC_PLAT_NEEDS_CPU_TO_DMA
122         bool
123
124 config SMP
125         bool "Symmetric Multi-Processing (Incomplete)"
126         default n
127         select USE_GENERIC_SMP_HELPERS
128         help
129           This enables support for systems with more than one CPU. If you have
130           a system with only one CPU, like most personal computers, say N. If
131           you have a system with more than one CPU, say Y.
132
133 if SMP
134
135 config ARC_HAS_COH_CACHES
136         def_bool n
137
138 config ARC_HAS_COH_LLSC
139         def_bool n
140
141 config ARC_HAS_COH_RTSC
142         def_bool n
143
144 config ARC_HAS_REENTRANT_IRQ_LV2
145         def_bool n
146
147 endif
148
149 config NR_CPUS
150         int "Maximum number of CPUs (2-32)"
151         range 2 32
152         depends on SMP
153         default "2"
154
155 menuconfig ARC_CACHE
156         bool "Enable Cache Support"
157         default y
158         # if SMP, cache enabled ONLY if ARC implementation has cache coherency
159         depends on !SMP || ARC_HAS_COH_CACHES
160
161 if ARC_CACHE
162
163 config ARC_CACHE_LINE_SHIFT
164         int "Cache Line Length (as power of 2)"
165         range 5 7
166         default "6"
167         help
168           Starting with ARC700 4.9, Cache line length is configurable,
169           This option specifies "N", with Line-len = 2 power N
170           So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
171           Linux only supports same line lengths for I and D caches.
172
173 config ARC_HAS_ICACHE
174         bool "Use Instruction Cache"
175         default y
176
177 config ARC_HAS_DCACHE
178         bool "Use Data Cache"
179         default y
180
181 config ARC_CACHE_PAGES
182         bool "Per Page Cache Control"
183         default y
184         depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
185         help
186           This can be used to over-ride the global I/D Cache Enable on a
187           per-page basis (but only for pages accessed via MMU such as
188           Kernel Virtual address or User Virtual Address)
189           TLB entries have a per-page Cache Enable Bit.
190           Note that Global I/D ENABLE + Per Page DISABLE works but corollary
191           Global DISABLE + Per Page ENABLE won't work
192
193 endif   #ARC_CACHE
194
195 config ARC_HAS_ICCM
196         bool "Use ICCM"
197         help
198           Single Cycle RAMS to store Fast Path Code
199         default n
200
201 config ARC_ICCM_SZ
202         int "ICCM Size in KB"
203         default "64"
204         depends on ARC_HAS_ICCM
205
206 config ARC_HAS_DCCM
207         bool "Use DCCM"
208         help
209           Single Cycle RAMS to store Fast Path Data
210         default n
211
212 config ARC_DCCM_SZ
213         int "DCCM Size in KB"
214         default "64"
215         depends on ARC_HAS_DCCM
216
217 config ARC_DCCM_BASE
218         hex "DCCM map address"
219         default "0xA0000000"
220         depends on ARC_HAS_DCCM
221
222 config ARC_HAS_HW_MPY
223         bool "Use Hardware Multiplier (Normal or Faster XMAC)"
224         default y
225         help
226           Influences how gcc generates code for MPY operations.
227           If enabled, MPYxx insns are generated, provided by Standard/XMAC
228           Multipler. Otherwise software multipy lib is used
229
230 choice
231         prompt "ARC700 MMU Version"
232         default ARC_MMU_V3 if ARC_CPU_770
233         default ARC_MMU_V2 if ARC_CPU_750D
234
235 config ARC_MMU_V1
236         bool "MMU v1"
237         help
238           Orig ARC700 MMU
239
240 config ARC_MMU_V2
241         bool "MMU v2"
242         help
243           Fixed the deficiency of v1 - possible thrashing in memcpy sceanrio
244           when 2 D-TLB and 1 I-TLB entries index into same 2way set.
245
246 config ARC_MMU_V3
247         bool "MMU v3"
248         depends on ARC_CPU_770
249         help
250           Introduced with ARC700 4.10: New Features
251           Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
252           Shared Address Spaces (SASID)
253
254 endchoice
255
256
257 choice
258         prompt "MMU Page Size"
259         default ARC_PAGE_SIZE_8K
260
261 config ARC_PAGE_SIZE_8K
262         bool "8KB"
263         help
264           Choose between 8k vs 16k
265
266 config ARC_PAGE_SIZE_16K
267         bool "16KB"
268         depends on ARC_MMU_V3
269
270 config ARC_PAGE_SIZE_4K
271         bool "4KB"
272         depends on ARC_MMU_V3
273
274 endchoice
275
276 config ARC_COMPACT_IRQ_LEVELS
277         bool "ARCompact IRQ Priorities: High(2)/Low(1)"
278         default n
279         # Timer HAS to be high priority, for any other high priority config
280         select ARC_IRQ3_LV2
281         # if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
282         depends on !SMP || ARC_HAS_REENTRANT_IRQ_LV2
283
284 if ARC_COMPACT_IRQ_LEVELS
285
286 config ARC_IRQ3_LV2
287         bool
288
289 config ARC_IRQ5_LV2
290         bool
291
292 config ARC_IRQ6_LV2
293         bool
294
295 endif
296
297 config ARC_FPU_SAVE_RESTORE
298         bool "Enable FPU state persistence across context switch"
299         default n
300         help
301           Double Precision Floating Point unit had dedictaed regs which
302           need to be saved/restored across context-switch.
303           Note that ARC FPU is overly simplistic, unlike say x86, which has
304           hardware pieces to allow software to conditionally save/restore,
305           based on actual usage of FPU by a task. Thus our implemn does
306           this for all tasks in system.
307
308 menuconfig ARC_CPU_REL_4_10
309         bool "Enable support for Rel 4.10 features"
310         default n
311         help
312           -ARC770 (and dependent features) enabled
313           -ARC750 also shares some of the new features with 770
314
315 config ARC_HAS_LLSC
316         bool "Insn: LLOCK/SCOND (efficient atomic ops)"
317         default y
318         depends on ARC_CPU_770
319         # if SMP, enable LLSC ONLY if ARC implementation has coherent atomics
320         depends on !SMP || ARC_HAS_COH_LLSC
321
322 config ARC_HAS_SWAPE
323         bool "Insn: SWAPE (endian-swap)"
324         default y
325         depends on ARC_CPU_REL_4_10
326
327 config ARC_HAS_RTSC
328         bool "Insn: RTSC (64-bit r/o cycle counter)"
329         default y
330         depends on ARC_CPU_REL_4_10
331         # if SMP, enable RTSC only if counter is coherent across cores
332         depends on !SMP || ARC_HAS_COH_RTSC
333
334 endmenu   # "ARC CPU Configuration"
335
336 config LINUX_LINK_BASE
337         hex "Linux Link Address"
338         default "0x80000000"
339         help
340           ARC700 divides the 32 bit phy address space into two equal halves
341           -Lower 2G (0 - 0x7FFF_FFFF ) is user virtual, translated by MMU
342           -Upper 2G (0x8000_0000 onwards) is untranslated, for kernel
343           Typically Linux kernel is linked at the start of untransalted addr,
344           hence the default value of 0x8zs.
345           However some customers have peripherals mapped at this addr, so
346           Linux needs to be scooted a bit.
347           If you don't know what the above means, leave this setting alone.
348
349 config ARC_CURR_IN_REG
350         bool "Dedicate Register r25 for current_task pointer"
351         default y
352         help
353           This reserved Register R25 to point to Current Task in
354           kernel mode. This saves memory access for each such access
355
356
357 config ARC_MISALIGN_ACCESS
358         bool "Emulate unaligned memory access (userspace only)"
359         default N
360         select SYSCTL_ARCH_UNALIGN_NO_WARN
361         select SYSCTL_ARCH_UNALIGN_ALLOW
362         help
363           This enables misaligned 16 & 32 bit memory access from user space.
364           Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
365           potential bugs in code
366
367 config ARC_STACK_NONEXEC
368         bool "Make stack non-executable"
369         default n
370         help
371           To disable the execute permissions of stack/heap of processes
372           which are enabled by default.
373
374 config HZ
375         int "Timer Frequency"
376         default 100
377
378 config ARC_METAWARE_HLINK
379         bool "Support for Metaware debugger assisted Host access"
380         default n
381         help
382           This options allows a Linux userland apps to directly access
383           host file system (open/creat/read/write etc) with help from
384           Metaware Debugger. This can come in handy for Linux-host communication
385           when there is no real usable peripheral such as EMAC.
386
387 menuconfig ARC_DBG
388         bool "ARC debugging"
389         default y
390
391 config ARC_DW2_UNWIND
392         bool "Enable DWARF specific kernel stack unwind"
393         depends on ARC_DBG
394         default y
395         select KALLSYMS
396         help
397           Compiles the kernel with DWARF unwind information and can be used
398           to get stack backtraces.
399
400           If you say Y here the resulting kernel image will be slightly larger
401           but not slower, and it will give very useful debugging information.
402           If you don't debug the kernel, you can say N, but we may not be able
403           to solve problems without frame unwind information
404
405 config ARC_DBG_TLB_PARANOIA
406         bool "Paranoia Checks in Low Level TLB Handlers"
407         depends on ARC_DBG
408         default n
409
410 config ARC_DBG_TLB_MISS_COUNT
411         bool "Profile TLB Misses"
412         default n
413         select DEBUG_FS
414         depends on ARC_DBG
415         help
416           Counts number of I and D TLB Misses and exports them via Debugfs
417           The counters can be cleared via Debugfs as well
418
419 config CMDLINE
420         string "Kernel command line to built-in"
421         default "print-fatal-signals=1"
422         help
423           The default command line which will be appended to the optional
424           u-boot provided command line (see below)
425
426 config CMDLINE_UBOOT
427         bool "Support U-boot kernel command line passing"
428         default n
429         help
430           If you are using U-boot (www.denx.de) and wish to pass the kernel
431           command line from the U-boot environment to the Linux kernel then
432           switch this option on.
433           ARC U-boot will setup the cmdline in RAM/flash and set r2 to point
434           to it. kernel startup code will copy the string into cmdline buffer
435           and also append CONFIG_CMDLINE.
436
437 config ARC_BUILTIN_DTB_NAME
438         string "Built in DTB"
439         help
440           Set the name of the DTB to embed in the vmlinux binary
441           Leaving it blank selects the minimal "skeleton" dtb
442
443 source "kernel/Kconfig.preempt"
444
445 endmenu  # "ARC Architecture Configuration"
446
447 source "mm/Kconfig"
448 source "net/Kconfig"
449 source "drivers/Kconfig"
450 source "fs/Kconfig"
451 source "arch/arc/Kconfig.debug"
452 source "security/Kconfig"
453 source "crypto/Kconfig"
454 source "lib/Kconfig"