Kconfig 13.6 KB
Newer Older
1
# SPDX-License-Identifier: GPL-2.0-only
2 3 4 5 6 7
#
# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
#

config ARC
	def_bool y
8
	select ARC_TIMERS
9
	select ARCH_HAS_DMA_PREP_COHERENT
V
Vineet Gupta 已提交
10
	select ARCH_HAS_PTE_SPECIAL
11
	select ARCH_HAS_SETUP_DMA_OPS
12 13
	select ARCH_HAS_SYNC_DMA_FOR_CPU
	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
14
	select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
15
	select ARCH_32BIT_OFF_T
16
	select BUILDTIME_TABLE_SORT
17
	select CLONE_BACKWARDS
18
	select COMMON_CLK
19
	select DMA_DIRECT_REMAP
20
	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
21 22 23 24
	select GENERIC_CLOCKEVENTS
	select GENERIC_FIND_FIRST_BIT
	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
	select GENERIC_IRQ_SHOW
J
Joao Pinto 已提交
25
	select GENERIC_PCI_IOMAP
26
	select GENERIC_PENDING_IRQ if SMP
27
	select GENERIC_SCHED_CLOCK
28
	select GENERIC_SMP_IDLE_THREAD
M
Mischa Jonker 已提交
29
	select HAVE_ARCH_KGDB
V
Vineet Gupta 已提交
30
	select HAVE_ARCH_TRACEHOOK
V
Vineet Gupta 已提交
31
	select HAVE_DEBUG_STACKOVERFLOW
E
Eugeniy Paltsev 已提交
32
	select HAVE_DEBUG_KMEMLEAK
V
Vineet Gupta 已提交
33
	select HAVE_FUTEX_CMPXCHG if FUTEX
34
	select HAVE_IOREMAP_PROT
V
Vineet Gupta 已提交
35 36
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZMA
V
Vineet Gupta 已提交
37 38
	select HAVE_KPROBES
	select HAVE_KRETPROBES
39
	select HAVE_MOD_ARCH_SPECIFIC
V
Vineet Gupta 已提交
40
	select HAVE_OPROFILE
41
	select HAVE_PERF_EVENTS
42
	select HANDLE_DOMAIN_IRQ
V
Vineet Gupta 已提交
43
	select IRQ_DOMAIN
44
	select MODULES_USE_ELF_RELA
V
Vineet Gupta 已提交
45 46
	select OF
	select OF_EARLY_FLATTREE
47
	select PCI_SYSCALL if PCI
48
	select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
49
	select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
50

51 52 53
config ARCH_HAS_CACHE_LINE_SIZE
	def_bool y

54 55 56 57 58 59
config TRACE_IRQFLAGS_SUPPORT
	def_bool y

config LOCKDEP_SUPPORT
	def_bool y

60 61 62 63 64 65
config SCHED_OMIT_FRAME_POINTER
	def_bool y

config GENERIC_CSUM
	def_bool y

66
config ARCH_DISCONTIGMEM_ENABLE
67
	def_bool n
68

69 70 71 72 73 74
config ARCH_FLATMEM_ENABLE
	def_bool y

config MMU
	def_bool y

75
config NO_IOPORT_MAP
76 77 78 79 80 81 82 83
	def_bool y

config GENERIC_CALIBRATE_DELAY
	def_bool y

config GENERIC_HWEIGHT
	def_bool y

84 85 86 87
config STACKTRACE_SUPPORT
	def_bool y
	select STACKTRACE

V
Vineet Gupta 已提交
88 89 90 91
config HAVE_ARCH_TRANSPARENT_HUGEPAGE
	def_bool y
	depends on ARC_MMU_V4

92 93
menu "ARC Architecture Configuration"

94
menu "ARC Platform/SoC/Board"
95

96
source "arch/arc/plat-tb10x/Kconfig"
97
source "arch/arc/plat-axs10x/Kconfig"
98
#New platform adds here
99
source "arch/arc/plat-eznps/Kconfig"
100
source "arch/arc/plat-hsdk/Kconfig"
101

102
endmenu
103

104 105
choice
	prompt "ARC Instruction Set"
106
	default ISA_ARCV2
107 108 109

config ISA_ARCOMPACT
	bool "ARCompact ISA"
110
	select CPU_NO_EFFICIENT_FFS
111 112 113
	help
	  The original ARC ISA of ARC600/700 cores

114 115
config ISA_ARCV2
	bool "ARC ISA v2"
116
	select ARC_TIMERS_64BIT
117 118
	help
	  ISA for the Next Generation ARC-HS cores
119 120 121

endchoice

122 123 124 125
menu "ARC CPU Configuration"

choice
	prompt "ARC Core"
126 127 128 129
	default ARC_CPU_770 if ISA_ARCOMPACT
	default ARC_CPU_HS if ISA_ARCV2

if ISA_ARCOMPACT
130 131 132

config ARC_CPU_750D
	bool "ARC750D"
133
	select ARC_CANT_LLSC
134 135 136 137 138
	help
	  Support for ARC750 core

config ARC_CPU_770
	bool "ARC770"
139
	select ARC_HAS_SWAPE
140 141 142 143
	help
	  Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
	  This core has a bunch of cool new features:
	  -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
144
	           Shared Address Spaces (for sharing TLB entries in MMU)
145 146 147
	  -Caches: New Prog Model, Region Flush
	  -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr

148
endif #ISA_ARCOMPACT
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168

config ARC_CPU_HS
	bool "ARC-HS"
	depends on ISA_ARCV2
	help
	  Support for ARC HS38x Cores based on ARCv2 ISA
	  The notable features are:
	    - SMP configurations of upto 4 core with coherency
	    - Optional L2 Cache and IO-Coherency
	    - Revised Interrupt Architecture (multiple priorites, reg banks,
	        auto stack switch, auto regfile save/restore)
	    - MMUv4 (PIPT dcache, Huge Pages)
	    - Instructions for
		* 64bit load/store: LDD, STD
		* Hardware assisted divide/remainder: DIV, REM
		* Function prologue/epilogue: ENTER_S, LEAVE_S
		* IRQ enable/disable: CLRI, SETI
		* pop count: FFS, FLS
		* SETcc, BMSKN, XBFU...

169 170 171 172 173 174 175
endchoice

config CPU_BIG_ENDIAN
	bool "Enable Big Endian Mode"
	help
	  Build kernel for Big Endian Mode of ARC CPU

V
Vineet Gupta 已提交
176
config SMP
177 178
	bool "Symmetric Multi-Processing"
	select ARC_MCIP if ISA_ARCV2
V
Vineet Gupta 已提交
179
	help
180
	  This enables support for systems with more than one CPU.
V
Vineet Gupta 已提交
181 182 183 184

if SMP

config NR_CPUS
N
Noam Camus 已提交
185 186
	int "Maximum number of CPUs (2-4096)"
	range 2 4096
187 188
	default "4"

189 190 191 192 193 194 195 196 197
config ARC_SMP_HALT_ON_RESET
	bool "Enable Halt-on-reset boot mode"
	help
	  In SMP configuration cores can be configured as Halt-on-reset
	  or they could all start at same time. For Halt-on-reset, non
	  masters are parked until Master kicks them so they can start of
	  at designated entry point. For other case, all jump to common
	  entry point and spin wait for Master's signal.

198
endif #SMP
V
Vineet Gupta 已提交
199

200 201 202 203 204 205 206 207 208
config ARC_MCIP
	bool "ARConnect Multicore IP (MCIP) Support "
	depends on ISA_ARCV2
	default y if SMP
	help
	  This IP block enables SMP in ARC-HS38 cores.
	  It provides for cross-core interrupts, multi-core debug
	  hardware semaphores, shared memory,....

209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
menuconfig ARC_CACHE
	bool "Enable Cache Support"
	default y

if ARC_CACHE

config ARC_CACHE_LINE_SHIFT
	int "Cache Line Length (as power of 2)"
	range 5 7
	default "6"
	help
	  Starting with ARC700 4.9, Cache line length is configurable,
	  This option specifies "N", with Line-len = 2 power N
	  So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
	  Linux only supports same line lengths for I and D caches.

config ARC_HAS_ICACHE
	bool "Use Instruction Cache"
	default y

config ARC_HAS_DCACHE
	bool "Use Data Cache"
	default y

config ARC_CACHE_PAGES
	bool "Per Page Cache Control"
	default y
	depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
	help
	  This can be used to over-ride the global I/D Cache Enable on a
	  per-page basis (but only for pages accessed via MMU such as
	  Kernel Virtual address or User Virtual Address)
	  TLB entries have a per-page Cache Enable Bit.
	  Note that Global I/D ENABLE + Per Page DISABLE works but corollary
	  Global DISABLE + Per Page ENABLE won't work

245 246
config ARC_CACHE_VIPT_ALIASING
	bool "Support VIPT Aliasing D$"
247
	depends on ARC_HAS_DCACHE && ISA_ARCOMPACT
248

249
endif #ARC_CACHE
250

251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
config ARC_HAS_ICCM
	bool "Use ICCM"
	help
	  Single Cycle RAMS to store Fast Path Code

config ARC_ICCM_SZ
	int "ICCM Size in KB"
	default "64"
	depends on ARC_HAS_ICCM

config ARC_HAS_DCCM
	bool "Use DCCM"
	help
	  Single Cycle RAMS to store Fast Path Data

config ARC_DCCM_SZ
	int "DCCM Size in KB"
	default "64"
	depends on ARC_HAS_DCCM

config ARC_DCCM_BASE
	hex "DCCM map address"
	default "0xA0000000"
	depends on ARC_HAS_DCCM

276
choice
277
	prompt "MMU Version"
278 279
	default ARC_MMU_V3 if ARC_CPU_770
	default ARC_MMU_V2 if ARC_CPU_750D
280
	default ARC_MMU_V4 if ARC_CPU_HS
281

282 283
if ISA_ARCOMPACT

284 285 286 287 288 289 290 291
config ARC_MMU_V1
	bool "MMU v1"
	help
	  Orig ARC700 MMU

config ARC_MMU_V2
	bool "MMU v2"
	help
M
Masanari Iida 已提交
292
	  Fixed the deficiency of v1 - possible thrashing in memcpy scenario
293 294 295 296 297 298 299 300 301 302
	  when 2 D-TLB and 1 I-TLB entries index into same 2way set.

config ARC_MMU_V3
	bool "MMU v3"
	depends on ARC_CPU_770
	help
	  Introduced with ARC700 4.10: New Features
	  Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
	  Shared Address Spaces (SASID)

303 304
endif

305 306 307 308
config ARC_MMU_V4
	bool "MMU v4"
	depends on ISA_ARCV2

309 310 311 312 313 314 315 316 317 318 319 320 321 322
endchoice


choice
	prompt "MMU Page Size"
	default ARC_PAGE_SIZE_8K

config ARC_PAGE_SIZE_8K
	bool "8KB"
	help
	  Choose between 8k vs 16k

config ARC_PAGE_SIZE_16K
	bool "16KB"
323
	depends on ARC_MMU_V3 || ARC_MMU_V4
324 325 326

config ARC_PAGE_SIZE_4K
	bool "4KB"
327
	depends on ARC_MMU_V3 || ARC_MMU_V4
328 329 330

endchoice

331 332 333 334 335 336 337 338 339 340 341 342 343
choice
	prompt "MMU Super Page Size"
	depends on ISA_ARCV2 && TRANSPARENT_HUGEPAGE
	default ARC_HUGEPAGE_2M

config ARC_HUGEPAGE_2M
	bool "2MB"

config ARC_HUGEPAGE_16M
	bool "16MB"

endchoice

344 345
config NODES_SHIFT
	int "Maximum NUMA Nodes (as a power of 2)"
346 347
	default "0" if !DISCONTIGMEM
	default "1" if DISCONTIGMEM
348 349 350 351 352
	depends on NEED_MULTIPLE_NODES
	---help---
	  Accessing memory beyond 1GB (with or w/o PAE) requires 2 memory
	  zones.

353 354
if ISA_ARCOMPACT

355
config ARC_COMPACT_IRQ_LEVELS
356
	bool "Setup Timer IRQ as high Priority"
V
Vineet Gupta 已提交
357
	# if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
358
	depends on !SMP
359

360 361 362
config ARC_FPU_SAVE_RESTORE
	bool "Enable FPU state persistence across context switch"
	help
M
Masanari Iida 已提交
363
	  Double Precision Floating Point unit had dedicated regs which
364 365 366 367 368 369
	  need to be saved/restored across context-switch.
	  Note that ARC FPU is overly simplistic, unlike say x86, which has
	  hardware pieces to allow software to conditionally save/restore,
	  based on actual usage of FPU by a task. Thus our implemn does
	  this for all tasks in system.

370
endif #ISA_ARCOMPACT
371

372 373 374
config ARC_CANT_LLSC
	def_bool n

375 376 377
config ARC_HAS_LLSC
	bool "Insn: LLOCK/SCOND (efficient atomic ops)"
	default y
378
	depends on !ARC_CANT_LLSC
379 380 381 382 383

config ARC_HAS_SWAPE
	bool "Insn: SWAPE (endian-swap)"
	default y

384 385
if ISA_ARCV2

386 387 388 389 390 391 392 393 394
config ARC_USE_UNALIGNED_MEM_ACCESS
	bool "Enable unaligned access in HW"
	default y
	select HAVE_EFFICIENT_UNALIGNED_ACCESS
	help
	  The ARC HS architecture supports unaligned memory access
	  which is disabled by default. Enable unaligned access in
	  hardware and use software to use it

395 396 397 398 399 400 401 402
config ARC_HAS_LL64
	bool "Insn: 64bit LDD/STD"
	help
	  Enable gcc to generate 64-bit load/store instructions
	  ISA mandates even/odd registers to allow encoding of two
	  dest operands with 2 possible source operands.
	default y

403 404 405 406
config ARC_HAS_DIV_REM
	bool "Insn: div, divu, rem, remu"
	default y

407 408
config ARC_HAS_ACCL_REGS
	bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)"
409
	default y
410 411 412 413 414
	help
	  Depending on the configuration, CPU can contain accumulator reg-pair
	  (also referred to as r58:r59). These can also be used by gcc as GPR so
	  kernel needs to save/restore per process

415 416 417 418 419 420 421 422
config ARC_IRQ_NO_AUTOSAVE
	bool "Disable hardware autosave regfile on interrupts"
	default n
	help
	  On HS cores, taken interrupt auto saves the regfile on stack.
	  This is programmable and can be optionally disabled in which case
	  software INTERRUPT_PROLOGUE/EPILGUE do the needed work

423
endif # ISA_ARCV2
424

425 426 427
endmenu   # "ARC CPU Configuration"

config LINUX_LINK_BASE
428
	hex "Kernel link address"
429 430 431 432 433 434 435 436 437 438
	default "0x80000000"
	help
	  ARC700 divides the 32 bit phy address space into two equal halves
	  -Lower 2G (0 - 0x7FFF_FFFF ) is user virtual, translated by MMU
	  -Upper 2G (0x8000_0000 onwards) is untranslated, for kernel
	  Typically Linux kernel is linked at the start of untransalted addr,
	  hence the default value of 0x8zs.
	  However some customers have peripherals mapped at this addr, so
	  Linux needs to be scooted a bit.
	  If you don't know what the above means, leave this setting alone.
439
	  This needs to match memory start address specified in Device Tree
440

441 442 443 444 445 446 447 448
config LINUX_RAM_BASE
	hex "RAM base address"
	default LINUX_LINK_BASE
	help
	  By default Linux is linked at base of RAM. However in some special
	  cases (such as HSDK), Linux can't be linked at start of DDR, hence
	  this option.

449 450
config HIGHMEM
	bool "High Memory Support"
451
	select ARCH_DISCONTIGMEM_ENABLE
452 453 454 455 456
	help
	  With ARC 2G:2G address split, only upper 2G is directly addressable by
	  kernel. Enable this to potentially allow access to rest of 2G and PAE
	  in future

V
Vineet Gupta 已提交
457 458 459
config ARC_HAS_PAE40
	bool "Support for the 40-bit Physical Address Extension"
	depends on ISA_ARCV2
460
	select HIGHMEM
461
	select PHYS_ADDR_T_64BIT
V
Vineet Gupta 已提交
462 463 464 465
	help
	  Enable access to physical memory beyond 4G, only supported on
	  ARC cores with 40 bit Physical Addressing support

N
Noam Camus 已提交
466
config ARC_KVADDR_SIZE
M
Masanari Iida 已提交
467
	int "Kernel Virtual Address Space size (MB)"
N
Noam Camus 已提交
468 469 470 471 472 473 474 475 476
	range 0 512
	default "256"
	help
	  The kernel address space is carved out of 256MB of translated address
	  space for catering to vmalloc, modules, pkmap, fixmap. This however may
	  not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
	  this to be stretched to 512 MB (by extending into the reserved
	  kernel-user gutter)

477 478 479 480 481 482 483
config ARC_CURR_IN_REG
	bool "Dedicate Register r25 for current_task pointer"
	default y
	help
	  This reserved Register R25 to point to Current Task in
	  kernel mode. This saves memory access for each such access

V
Vineet Gupta 已提交
484

485
config ARC_EMUL_UNALIGNED
V
Vineet Gupta 已提交
486 487 488
	bool "Emulate unaligned memory access (userspace only)"
	select SYSCTL_ARCH_UNALIGN_NO_WARN
	select SYSCTL_ARCH_UNALIGN_ALLOW
489
	depends on ISA_ARCOMPACT
V
Vineet Gupta 已提交
490 491 492 493 494
	help
	  This enables misaligned 16 & 32 bit memory access from user space.
	  Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
	  potential bugs in code

495 496 497 498
config HZ
	int "Timer Frequency"
	default 100

499 500 501 502 503 504 505 506
config ARC_METAWARE_HLINK
	bool "Support for Metaware debugger assisted Host access"
	help
	  This options allows a Linux userland apps to directly access
	  host file system (open/creat/read/write etc) with help from
	  Metaware Debugger. This can come in handy for Linux-host communication
	  when there is no real usable peripheral such as EMAC.

507 508 509 510
menuconfig ARC_DBG
	bool "ARC debugging"
	default y

511 512
if ARC_DBG

513 514 515 516 517 518 519 520 521 522 523 524 525
config ARC_DW2_UNWIND
	bool "Enable DWARF specific kernel stack unwind"
	default y
	select KALLSYMS
	help
	  Compiles the kernel with DWARF unwind information and can be used
	  to get stack backtraces.

	  If you say Y here the resulting kernel image will be slightly larger
	  but not slower, and it will give very useful debugging information.
	  If you don't debug the kernel, you can say N, but we may not be able
	  to solve problems without frame unwind information

526 527 528
config ARC_DBG_TLB_PARANOIA
	bool "Paranoia Checks in Low Level TLB Handlers"

529 530 531 532 533 534 535
config ARC_DBG_JUMP_LABEL
	bool "Paranoid checks in Static Keys (jump labels) code"
	depends on JUMP_LABEL
	default y if STATIC_KEYS_SELFTEST
	help
	  Enable paranoid checks and self-test of both ARC-specific and generic
	  part of static keys (jump labels) related code.
536 537
endif

V
Vineet Gupta 已提交
538 539 540 541 542 543
config ARC_BUILTIN_DTB_NAME
	string "Built in DTB"
	help
	  Set the name of the DTB to embed in the vmlinux binary
	  Leaving it blank selects the minimal "skeleton" dtb

544 545
endmenu	 # "ARC Architecture Configuration"

546 547 548 549 550
config FORCE_MAX_ZONEORDER
	int "Maximum zone order"
	default "12" if ARC_HUGEPAGE_16M
	default "11"

A
Alexey Brodkin 已提交
551
source "kernel/power/Kconfig"