xref: /openbmc/linux/arch/arc/Kconfig (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1d2912cb1SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
2cfdbc2e1SVineet Gupta#
3cfdbc2e1SVineet Gupta# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4cfdbc2e1SVineet Gupta#
5cfdbc2e1SVineet Gupta
6cfdbc2e1SVineet Guptaconfig ARC
7cfdbc2e1SVineet Gupta	def_bool y
8c4c9a040SVineet Gupta	select ARC_TIMERS
9c2280be8SAnshuman Khandual	select ARCH_HAS_CACHE_LINE_SIZE
10399145f9SAnshuman Khandual	select ARCH_HAS_DEBUG_VM_PGTABLE
11f73c9045SChristoph Hellwig	select ARCH_HAS_DMA_PREP_COHERENT
12c27d0e90SVineet Gupta	select ARCH_HAS_PTE_SPECIAL
13347cb6afSChristoph Hellwig	select ARCH_HAS_SETUP_DMA_OPS
146c3e71ddSChristoph Hellwig	select ARCH_HAS_SYNC_DMA_FOR_CPU
156c3e71ddSChristoph Hellwig	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
162a440168SVineet Gupta	select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
17942fa985SYury Norov	select ARCH_32BIT_OFF_T
1810916706SShile Zhang	select BUILDTIME_TABLE_SORT
194adeefe1SVineet Gupta	select CLONE_BACKWARDS
2069fbd098SNoam Camus	select COMMON_CLK
21f73c9045SChristoph Hellwig	select DMA_DIRECT_REMAP
22ce636527SVineet Gupta	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
23cfdbc2e1SVineet Gupta	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
24cfdbc2e1SVineet Gupta	select GENERIC_IRQ_SHOW
25c1678ffcSJoao Pinto	select GENERIC_PCI_IOMAP
26cfdbc2e1SVineet Gupta	select GENERIC_PENDING_IRQ if SMP
27bf287607SAlexey Brodkin	select GENERIC_SCHED_CLOCK
28cfdbc2e1SVineet Gupta	select GENERIC_SMP_IDLE_THREAD
29*06dfae39SBaoquan He	select GENERIC_IOREMAP
30f798f91eSVineet Gupta	select GENERIC_STRNCPY_FROM_USER if MMU
31f798f91eSVineet Gupta	select GENERIC_STRNLEN_USER if MMU
32f46121bdSMischa Jonker	select HAVE_ARCH_KGDB
33547f1125SVineet Gupta	select HAVE_ARCH_TRACEHOOK
34e8003bf6SAnshuman Khandual	select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARC_MMU_V4
35c27d0e90SVineet Gupta	select HAVE_DEBUG_STACKOVERFLOW
369fbea0b7SEugeniy Paltsev	select HAVE_DEBUG_KMEMLEAK
374368902bSGilad Ben-Yossef	select HAVE_IOREMAP_PROT
38c27d0e90SVineet Gupta	select HAVE_KERNEL_GZIP
39c27d0e90SVineet Gupta	select HAVE_KERNEL_LZMA
404d86dfbbSVineet Gupta	select HAVE_KPROBES
414d86dfbbSVineet Gupta	select HAVE_KRETPROBES
42b3bbf6a7SSergey Matyukevich	select HAVE_REGS_AND_STACK_ACCESS_API
43eb1357d9SVineet Gupta	select HAVE_MOD_ARCH_SPECIFIC
449c57564eSVineet Gupta	select HAVE_PERF_EVENTS
45fb0b5490SSergey Matyukevich	select HAVE_SYSCALL_TRACEPOINTS
46999159a5SVineet Gupta	select IRQ_DOMAIN
47a050ba1eSLinus Torvalds	select LOCK_MM_AND_FIND_VMA
48cfdbc2e1SVineet Gupta	select MODULES_USE_ELF_RELA
49999159a5SVineet Gupta	select OF
50999159a5SVineet Gupta	select OF_EARLY_FLATTREE
5120f1b79dSChristoph Hellwig	select PCI_SYSCALL if PCI
5282385732SVineet Gupta	select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
53f091d5a4SEugeniy Paltsev	select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
544aae683fSMasahiro Yamada	select TRACE_IRQFLAGS_SUPPORT
550dafafc3SVineet Gupta
560dafafc3SVineet Guptaconfig LOCKDEP_SUPPORT
570dafafc3SVineet Gupta	def_bool y
580dafafc3SVineet Gupta
59cfdbc2e1SVineet Guptaconfig SCHED_OMIT_FRAME_POINTER
60cfdbc2e1SVineet Gupta	def_bool y
61cfdbc2e1SVineet Gupta
62cfdbc2e1SVineet Guptaconfig GENERIC_CSUM
63cfdbc2e1SVineet Gupta	def_bool y
64cfdbc2e1SVineet Gupta
65cfdbc2e1SVineet Guptaconfig ARCH_FLATMEM_ENABLE
66cfdbc2e1SVineet Gupta	def_bool y
67cfdbc2e1SVineet Gupta
68cfdbc2e1SVineet Guptaconfig MMU
69cfdbc2e1SVineet Gupta	def_bool y
70cfdbc2e1SVineet Gupta
71ce816fa8SUwe Kleine-Königconfig NO_IOPORT_MAP
72cfdbc2e1SVineet Gupta	def_bool y
73cfdbc2e1SVineet Gupta
74cfdbc2e1SVineet Guptaconfig GENERIC_CALIBRATE_DELAY
75cfdbc2e1SVineet Gupta	def_bool y
76cfdbc2e1SVineet Gupta
77cfdbc2e1SVineet Guptaconfig GENERIC_HWEIGHT
78cfdbc2e1SVineet Gupta	def_bool y
79cfdbc2e1SVineet Gupta
8044c8bb91SVineet Guptaconfig STACKTRACE_SUPPORT
8144c8bb91SVineet Gupta	def_bool y
8244c8bb91SVineet Gupta	select STACKTRACE
8344c8bb91SVineet Gupta
84cfdbc2e1SVineet Guptamenu "ARC Architecture Configuration"
85cfdbc2e1SVineet Gupta
8693ad700dSVineet Guptamenu "ARC Platform/SoC/Board"
87cfdbc2e1SVineet Gupta
88072eb693SChristian Ruppertsource "arch/arc/plat-tb10x/Kconfig"
89556cc1c5SAlexey Brodkinsource "arch/arc/plat-axs10x/Kconfig"
90a518d637SAlexey Brodkinsource "arch/arc/plat-hsdk/Kconfig"
9193ad700dSVineet Gupta
9253d98958SVineet Guptaendmenu
93cfdbc2e1SVineet Gupta
941f6ccfffSVineet Guptachoice
951f6ccfffSVineet Gupta	prompt "ARC Instruction Set"
96b7cc40c3SKevin Hilman	default ISA_ARCV2
971f6ccfffSVineet Gupta
981f6ccfffSVineet Guptaconfig ISA_ARCOMPACT
991f6ccfffSVineet Gupta	bool "ARCompact ISA"
100fff7fb0bSZhaoxiu Zeng	select CPU_NO_EFFICIENT_FFS
1011f6ccfffSVineet Gupta	help
1021f6ccfffSVineet Gupta	  The original ARC ISA of ARC600/700 cores
1031f6ccfffSVineet Gupta
10465bfbcdfSVineet Guptaconfig ISA_ARCV2
10565bfbcdfSVineet Gupta	bool "ARC ISA v2"
106c4c9a040SVineet Gupta	select ARC_TIMERS_64BIT
10765bfbcdfSVineet Gupta	help
10865bfbcdfSVineet Gupta	  ISA for the Next Generation ARC-HS cores
1091f6ccfffSVineet Gupta
1101f6ccfffSVineet Guptaendchoice
1111f6ccfffSVineet Gupta
112cfdbc2e1SVineet Guptamenu "ARC CPU Configuration"
113cfdbc2e1SVineet Gupta
114cfdbc2e1SVineet Guptachoice
115cfdbc2e1SVineet Gupta	prompt "ARC Core"
1161f6ccfffSVineet Gupta	default ARC_CPU_770 if ISA_ARCOMPACT
1171f6ccfffSVineet Gupta	default ARC_CPU_HS if ISA_ARCV2
1181f6ccfffSVineet Gupta
119cfdbc2e1SVineet Guptaconfig ARC_CPU_770
120cfdbc2e1SVineet Gupta	bool "ARC770"
121767a697eSVineet Gupta	depends on ISA_ARCOMPACT
122742f8af6SVineet Gupta	select ARC_HAS_SWAPE
123cfdbc2e1SVineet Gupta	help
124cfdbc2e1SVineet Gupta	  Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
125cfdbc2e1SVineet Gupta	  This core has a bunch of cool new features:
126cfdbc2e1SVineet Gupta	  -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
1277c2020c3SColin Ian King	           Shared Address Spaces (for sharing TLB entries in MMU)
128cfdbc2e1SVineet Gupta	  -Caches: New Prog Model, Region Flush
129cfdbc2e1SVineet Gupta	  -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
130cfdbc2e1SVineet Gupta
1311f6ccfffSVineet Guptaconfig ARC_CPU_HS
1321f6ccfffSVineet Gupta	bool "ARC-HS"
1331f6ccfffSVineet Gupta	depends on ISA_ARCV2
1341f6ccfffSVineet Gupta	help
1351f6ccfffSVineet Gupta	  Support for ARC HS38x Cores based on ARCv2 ISA
1361f6ccfffSVineet Gupta	  The notable features are:
137a5760db2SRandy Dunlap	    - SMP configurations of up to 4 cores with coherency
1381f6ccfffSVineet Gupta	    - Optional L2 Cache and IO-Coherency
1391f6ccfffSVineet Gupta	    - Revised Interrupt Architecture (multiple priorites, reg banks,
1401f6ccfffSVineet Gupta	        auto stack switch, auto regfile save/restore)
1411f6ccfffSVineet Gupta	    - MMUv4 (PIPT dcache, Huge Pages)
1421f6ccfffSVineet Gupta	    - Instructions for
1431f6ccfffSVineet Gupta		* 64bit load/store: LDD, STD
1441f6ccfffSVineet Gupta		* Hardware assisted divide/remainder: DIV, REM
1451f6ccfffSVineet Gupta		* Function prologue/epilogue: ENTER_S, LEAVE_S
1461f6ccfffSVineet Gupta		* IRQ enable/disable: CLRI, SETI
1471f6ccfffSVineet Gupta		* pop count: FFS, FLS
1481f6ccfffSVineet Gupta		* SETcc, BMSKN, XBFU...
1491f6ccfffSVineet Gupta
150cfdbc2e1SVineet Guptaendchoice
151cfdbc2e1SVineet Gupta
1520bdd6e74SEugeniy Paltsevconfig ARC_TUNE_MCPU
1530bdd6e74SEugeniy Paltsev	string "Override default -mcpu compiler flag"
1540bdd6e74SEugeniy Paltsev	default ""
1550bdd6e74SEugeniy Paltsev	help
1560bdd6e74SEugeniy Paltsev	  Override default -mcpu=xxx compiler flag (which is set depending on
1570bdd6e74SEugeniy Paltsev	  the ISA version) with the specified value.
1580bdd6e74SEugeniy Paltsev	  NOTE: If specified flag isn't supported by current compiler the
1590bdd6e74SEugeniy Paltsev	  ISA default value will be used as a fallback.
1600bdd6e74SEugeniy Paltsev
161cfdbc2e1SVineet Guptaconfig CPU_BIG_ENDIAN
162cfdbc2e1SVineet Gupta	bool "Enable Big Endian Mode"
163cfdbc2e1SVineet Gupta	help
164cfdbc2e1SVineet Gupta	  Build kernel for Big Endian Mode of ARC CPU
165cfdbc2e1SVineet Gupta
16641195d23SVineet Guptaconfig SMP
16782fea5a1SVineet Gupta	bool "Symmetric Multi-Processing"
16882fea5a1SVineet Gupta	select ARC_MCIP if ISA_ARCV2
16941195d23SVineet Gupta	help
17082fea5a1SVineet Gupta	  This enables support for systems with more than one CPU.
17141195d23SVineet Gupta
17241195d23SVineet Guptaif SMP
17341195d23SVineet Gupta
17441195d23SVineet Guptaconfig NR_CPUS
1753aa4f80eSNoam Camus	int "Maximum number of CPUs (2-4096)"
1763aa4f80eSNoam Camus	range 2 4096
17782fea5a1SVineet Gupta	default "4"
17882fea5a1SVineet Gupta
1793971cdc2SVineet Guptaconfig ARC_SMP_HALT_ON_RESET
1803971cdc2SVineet Gupta	bool "Enable Halt-on-reset boot mode"
1813971cdc2SVineet Gupta	help
1823971cdc2SVineet Gupta	  In SMP configuration cores can be configured as Halt-on-reset
1833971cdc2SVineet Gupta	  or they could all start at same time. For Halt-on-reset, non
184a5760db2SRandy Dunlap	  masters are parked until Master kicks them so they can start off
1853971cdc2SVineet Gupta	  at designated entry point. For other case, all jump to common
1863971cdc2SVineet Gupta	  entry point and spin wait for Master's signal.
1873971cdc2SVineet Gupta
18882fea5a1SVineet Guptaendif #SMP
18941195d23SVineet Gupta
1903ce0fefcSVineet Guptaconfig ARC_MCIP
1913ce0fefcSVineet Gupta	bool "ARConnect Multicore IP (MCIP) Support "
1923ce0fefcSVineet Gupta	depends on ISA_ARCV2
1933ce0fefcSVineet Gupta	default y if SMP
1943ce0fefcSVineet Gupta	help
1953ce0fefcSVineet Gupta	  This IP block enables SMP in ARC-HS38 cores.
1963ce0fefcSVineet Gupta	  It provides for cross-core interrupts, multi-core debug
1973ce0fefcSVineet Gupta	  hardware semaphores, shared memory,....
1983ce0fefcSVineet Gupta
199cfdbc2e1SVineet Guptamenuconfig ARC_CACHE
200cfdbc2e1SVineet Gupta	bool "Enable Cache Support"
201cfdbc2e1SVineet Gupta	default y
202cfdbc2e1SVineet Gupta
203cfdbc2e1SVineet Guptaif ARC_CACHE
204cfdbc2e1SVineet Gupta
205cfdbc2e1SVineet Guptaconfig ARC_CACHE_LINE_SHIFT
206cfdbc2e1SVineet Gupta	int "Cache Line Length (as power of 2)"
207cfdbc2e1SVineet Gupta	range 5 7
208cfdbc2e1SVineet Gupta	default "6"
209cfdbc2e1SVineet Gupta	help
210cfdbc2e1SVineet Gupta	  Starting with ARC700 4.9, Cache line length is configurable,
211cfdbc2e1SVineet Gupta	  This option specifies "N", with Line-len = 2 power N
212cfdbc2e1SVineet Gupta	  So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
213cfdbc2e1SVineet Gupta	  Linux only supports same line lengths for I and D caches.
214cfdbc2e1SVineet Gupta
215cfdbc2e1SVineet Guptaconfig ARC_HAS_ICACHE
216cfdbc2e1SVineet Gupta	bool "Use Instruction Cache"
217cfdbc2e1SVineet Gupta	default y
218cfdbc2e1SVineet Gupta
219cfdbc2e1SVineet Guptaconfig ARC_HAS_DCACHE
220cfdbc2e1SVineet Gupta	bool "Use Data Cache"
221cfdbc2e1SVineet Gupta	default y
222cfdbc2e1SVineet Gupta
223cfdbc2e1SVineet Guptaconfig ARC_CACHE_PAGES
224cfdbc2e1SVineet Gupta	bool "Per Page Cache Control"
225cfdbc2e1SVineet Gupta	default y
226cfdbc2e1SVineet Gupta	depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
227cfdbc2e1SVineet Gupta	help
228cfdbc2e1SVineet Gupta	  This can be used to over-ride the global I/D Cache Enable on a
229cfdbc2e1SVineet Gupta	  per-page basis (but only for pages accessed via MMU such as
230cfdbc2e1SVineet Gupta	  Kernel Virtual address or User Virtual Address)
231cfdbc2e1SVineet Gupta	  TLB entries have a per-page Cache Enable Bit.
232cfdbc2e1SVineet Gupta	  Note that Global I/D ENABLE + Per Page DISABLE works but corollary
233cfdbc2e1SVineet Gupta	  Global DISABLE + Per Page ENABLE won't work
234cfdbc2e1SVineet Gupta
2354102b533SVineet Guptaconfig ARC_CACHE_VIPT_ALIASING
2364102b533SVineet Gupta	bool "Support VIPT Aliasing D$"
237d1f317d8SVineet Gupta	depends on ARC_HAS_DCACHE && ISA_ARCOMPACT
2384102b533SVineet Gupta
239cfdbc2e1SVineet Guptaendif #ARC_CACHE
240cfdbc2e1SVineet Gupta
2418b5850f8SVineet Guptaconfig ARC_HAS_ICCM
2428b5850f8SVineet Gupta	bool "Use ICCM"
2438b5850f8SVineet Gupta	help
2448b5850f8SVineet Gupta	  Single Cycle RAMS to store Fast Path Code
2458b5850f8SVineet Gupta
2468b5850f8SVineet Guptaconfig ARC_ICCM_SZ
2478b5850f8SVineet Gupta	int "ICCM Size in KB"
2488b5850f8SVineet Gupta	default "64"
2498b5850f8SVineet Gupta	depends on ARC_HAS_ICCM
2508b5850f8SVineet Gupta
2518b5850f8SVineet Guptaconfig ARC_HAS_DCCM
2528b5850f8SVineet Gupta	bool "Use DCCM"
2538b5850f8SVineet Gupta	help
2548b5850f8SVineet Gupta	  Single Cycle RAMS to store Fast Path Data
2558b5850f8SVineet Gupta
2568b5850f8SVineet Guptaconfig ARC_DCCM_SZ
2578b5850f8SVineet Gupta	int "DCCM Size in KB"
2588b5850f8SVineet Gupta	default "64"
2598b5850f8SVineet Gupta	depends on ARC_HAS_DCCM
2608b5850f8SVineet Gupta
2618b5850f8SVineet Guptaconfig ARC_DCCM_BASE
2628b5850f8SVineet Gupta	hex "DCCM map address"
2638b5850f8SVineet Gupta	default "0xA0000000"
2648b5850f8SVineet Gupta	depends on ARC_HAS_DCCM
2658b5850f8SVineet Gupta
266cfdbc2e1SVineet Guptachoice
2671f6ccfffSVineet Gupta	prompt "MMU Version"
268288ff7deSVineet Gupta	default ARC_MMU_V3 if ISA_ARCOMPACT
269288ff7deSVineet Gupta	default ARC_MMU_V4 if ISA_ARCV2
270cfdbc2e1SVineet Gupta
271cfdbc2e1SVineet Guptaconfig ARC_MMU_V3
272cfdbc2e1SVineet Gupta	bool "MMU v3"
273288ff7deSVineet Gupta	depends on ISA_ARCOMPACT
274cfdbc2e1SVineet Gupta	help
275cfdbc2e1SVineet Gupta	  Introduced with ARC700 4.10: New Features
276cfdbc2e1SVineet Gupta	  Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
277cfdbc2e1SVineet Gupta	  Shared Address Spaces (SASID)
278cfdbc2e1SVineet Gupta
279d7a512bfSVineet Guptaconfig ARC_MMU_V4
280d7a512bfSVineet Gupta	bool "MMU v4"
281d7a512bfSVineet Gupta	depends on ISA_ARCV2
282d7a512bfSVineet Gupta
283cfdbc2e1SVineet Guptaendchoice
284cfdbc2e1SVineet Gupta
285cfdbc2e1SVineet Gupta
286cfdbc2e1SVineet Guptachoice
287cfdbc2e1SVineet Gupta	prompt "MMU Page Size"
288cfdbc2e1SVineet Gupta	default ARC_PAGE_SIZE_8K
289cfdbc2e1SVineet Gupta
290cfdbc2e1SVineet Guptaconfig ARC_PAGE_SIZE_8K
291cfdbc2e1SVineet Gupta	bool "8KB"
292cfdbc2e1SVineet Gupta	help
293cfdbc2e1SVineet Gupta	  Choose between 8k vs 16k
294cfdbc2e1SVineet Gupta
295cfdbc2e1SVineet Guptaconfig ARC_PAGE_SIZE_16K
296cfdbc2e1SVineet Gupta	bool "16KB"
297cfdbc2e1SVineet Gupta
298cfdbc2e1SVineet Guptaconfig ARC_PAGE_SIZE_4K
299cfdbc2e1SVineet Gupta	bool "4KB"
300450ed0dbSAlexey Brodkin	depends on ARC_MMU_V3 || ARC_MMU_V4
301cfdbc2e1SVineet Gupta
302cfdbc2e1SVineet Guptaendchoice
303cfdbc2e1SVineet Gupta
30437eda9dfSVineet Guptachoice
30537eda9dfSVineet Gupta	prompt "MMU Super Page Size"
30637eda9dfSVineet Gupta	depends on ISA_ARCV2 && TRANSPARENT_HUGEPAGE
30737eda9dfSVineet Gupta	default ARC_HUGEPAGE_2M
30837eda9dfSVineet Gupta
30937eda9dfSVineet Guptaconfig ARC_HUGEPAGE_2M
31037eda9dfSVineet Gupta	bool "2MB"
31137eda9dfSVineet Gupta
31237eda9dfSVineet Guptaconfig ARC_HUGEPAGE_16M
31337eda9dfSVineet Gupta	bool "16MB"
31437eda9dfSVineet Gupta
31537eda9dfSVineet Guptaendchoice
31637eda9dfSVineet Gupta
3172dde02abSVineet Guptaconfig PGTABLE_LEVELS
3182dde02abSVineet Gupta	int "Number of Page table levels"
3192dde02abSVineet Gupta	default 2
3202dde02abSVineet Gupta
3214788a594SVineet Guptaconfig ARC_COMPACT_IRQ_LEVELS
322f45ba2bdSVineet Gupta	depends on ISA_ARCOMPACT
32360f2b4b8SVineet Gupta	bool "Setup Timer IRQ as high Priority"
32441195d23SVineet Gupta	# if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
32560f2b4b8SVineet Gupta	depends on !SMP
3264788a594SVineet Gupta
327cfdbc2e1SVineet Guptaconfig ARC_FPU_SAVE_RESTORE
328cfdbc2e1SVineet Gupta	bool "Enable FPU state persistence across context switch"
329cfdbc2e1SVineet Gupta	help
330f45ba2bdSVineet Gupta	  ARCompact FPU has internal registers to assist with Double precision
331f45ba2bdSVineet Gupta	  Floating Point operations. There are control and stauts registers
332f45ba2bdSVineet Gupta	  for floating point exceptions and rounding modes. These are
333f45ba2bdSVineet Gupta	  preserved across task context switch when enabled.
3341f6ccfffSVineet Gupta
335fbf8e13dSVineet Guptaconfig ARC_CANT_LLSC
336fbf8e13dSVineet Gupta	def_bool n
337fbf8e13dSVineet Gupta
338cfdbc2e1SVineet Guptaconfig ARC_HAS_LLSC
339cfdbc2e1SVineet Gupta	bool "Insn: LLOCK/SCOND (efficient atomic ops)"
340cfdbc2e1SVineet Gupta	default y
34114a0abfcSVineet Gupta	depends on !ARC_CANT_LLSC
342cfdbc2e1SVineet Gupta
343cfdbc2e1SVineet Guptaconfig ARC_HAS_SWAPE
344cfdbc2e1SVineet Gupta	bool "Insn: SWAPE (endian-swap)"
345cfdbc2e1SVineet Gupta	default y
346cfdbc2e1SVineet Gupta
3471f6ccfffSVineet Guptaif ISA_ARCV2
3481f6ccfffSVineet Gupta
34976551468SEugeniy Paltsevconfig ARC_USE_UNALIGNED_MEM_ACCESS
35076551468SEugeniy Paltsev	bool "Enable unaligned access in HW"
35176551468SEugeniy Paltsev	default y
35276551468SEugeniy Paltsev	select HAVE_EFFICIENT_UNALIGNED_ACCESS
35376551468SEugeniy Paltsev	help
35476551468SEugeniy Paltsev	  The ARC HS architecture supports unaligned memory access
35576551468SEugeniy Paltsev	  which is disabled by default. Enable unaligned access in
35676551468SEugeniy Paltsev	  hardware and use software to use it
35776551468SEugeniy Paltsev
3581f6ccfffSVineet Guptaconfig ARC_HAS_LL64
3591f6ccfffSVineet Gupta	bool "Insn: 64bit LDD/STD"
3601f6ccfffSVineet Gupta	help
3611f6ccfffSVineet Gupta	  Enable gcc to generate 64-bit load/store instructions
3621f6ccfffSVineet Gupta	  ISA mandates even/odd registers to allow encoding of two
3631f6ccfffSVineet Gupta	  dest operands with 2 possible source operands.
3641f6ccfffSVineet Gupta	default y
3651f6ccfffSVineet Gupta
366d05a76abSAlexey Brodkinconfig ARC_HAS_DIV_REM
367d05a76abSAlexey Brodkin	bool "Insn: div, divu, rem, remu"
368d05a76abSAlexey Brodkin	default y
369d05a76abSAlexey Brodkin
3703d5e8012SVineet Guptaconfig ARC_HAS_ACCL_REGS
3714827d0cfSEugeniy Paltsev	bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6 and/or DSP)"
372af1fc5baSVineet Gupta	default y
3733d5e8012SVineet Gupta	help
3743d5e8012SVineet Gupta	  Depending on the configuration, CPU can contain accumulator reg-pair
3753d5e8012SVineet Gupta	  (also referred to as r58:r59). These can also be used by gcc as GPR so
3763d5e8012SVineet Gupta	  kernel needs to save/restore per process
3773d5e8012SVineet Gupta
3784827d0cfSEugeniy Paltsevconfig ARC_DSP_HANDLED
3794827d0cfSEugeniy Paltsev	def_bool n
3804827d0cfSEugeniy Paltsev
3817321e2eaSEugeniy Paltsevconfig ARC_DSP_SAVE_RESTORE_REGS
3827321e2eaSEugeniy Paltsev	def_bool n
3837321e2eaSEugeniy Paltsev
3844827d0cfSEugeniy Paltsevchoice
3854827d0cfSEugeniy Paltsev	prompt "DSP support"
3864827d0cfSEugeniy Paltsev	default ARC_DSP_NONE
3874827d0cfSEugeniy Paltsev	help
3884827d0cfSEugeniy Paltsev	  Depending on the configuration, CPU can contain DSP registers
3894827d0cfSEugeniy Paltsev	  (ACC0_GLO, ACC0_GHI, DSP_BFLY0, DSP_CTRL, DSP_FFT_CTRL).
39081e82fa5SColin Ian King	  Below are options describing how to handle these registers in
3914827d0cfSEugeniy Paltsev	  interrupt entry / exit and in context switch.
3924827d0cfSEugeniy Paltsev
3934827d0cfSEugeniy Paltsevconfig ARC_DSP_NONE
3944827d0cfSEugeniy Paltsev	bool "No DSP extension presence in HW"
3954827d0cfSEugeniy Paltsev	help
3964827d0cfSEugeniy Paltsev	  No DSP extension presence in HW
3974827d0cfSEugeniy Paltsev
3984827d0cfSEugeniy Paltsevconfig ARC_DSP_KERNEL
3994827d0cfSEugeniy Paltsev	bool "DSP extension in HW, no support for userspace"
4004827d0cfSEugeniy Paltsev	select ARC_HAS_ACCL_REGS
4014827d0cfSEugeniy Paltsev	select ARC_DSP_HANDLED
4024827d0cfSEugeniy Paltsev	help
4034827d0cfSEugeniy Paltsev	  DSP extension presence in HW, no support for DSP-enabled userspace
4044827d0cfSEugeniy Paltsev	  applications. We don't save / restore DSP registers and only do
4054827d0cfSEugeniy Paltsev	  some minimal preparations so userspace won't be able to break kernel
4067321e2eaSEugeniy Paltsev
4077321e2eaSEugeniy Paltsevconfig ARC_DSP_USERSPACE
4087321e2eaSEugeniy Paltsev	bool "Support DSP for userspace apps"
4097321e2eaSEugeniy Paltsev	select ARC_HAS_ACCL_REGS
4107321e2eaSEugeniy Paltsev	select ARC_DSP_HANDLED
4117321e2eaSEugeniy Paltsev	select ARC_DSP_SAVE_RESTORE_REGS
4127321e2eaSEugeniy Paltsev	help
4137321e2eaSEugeniy Paltsev	  DSP extension presence in HW, support save / restore DSP registers to
4147321e2eaSEugeniy Paltsev	  run DSP-enabled userspace applications
415f09d3174SEugeniy Paltsev
416f09d3174SEugeniy Paltsevconfig ARC_DSP_AGU_USERSPACE
417f09d3174SEugeniy Paltsev	bool "Support DSP with AGU for userspace apps"
418f09d3174SEugeniy Paltsev	select ARC_HAS_ACCL_REGS
419f09d3174SEugeniy Paltsev	select ARC_DSP_HANDLED
420f09d3174SEugeniy Paltsev	select ARC_DSP_SAVE_RESTORE_REGS
421f09d3174SEugeniy Paltsev	help
422f09d3174SEugeniy Paltsev	  DSP and AGU extensions presence in HW, support save / restore DSP
423f09d3174SEugeniy Paltsev	  and AGU registers to run DSP-enabled userspace applications
4244827d0cfSEugeniy Paltsevendchoice
4254827d0cfSEugeniy Paltsev
426e494239aSVineet Guptaconfig ARC_IRQ_NO_AUTOSAVE
427e494239aSVineet Gupta	bool "Disable hardware autosave regfile on interrupts"
428e494239aSVineet Gupta	default n
429e494239aSVineet Gupta	help
430e494239aSVineet Gupta	  On HS cores, taken interrupt auto saves the regfile on stack.
431e494239aSVineet Gupta	  This is programmable and can be optionally disabled in which case
432e494239aSVineet Gupta	  software INTERRUPT_PROLOGUE/EPILGUE do the needed work
433e494239aSVineet Gupta
43410011f7dSEugeniy Paltsevconfig ARC_LPB_DISABLE
43510011f7dSEugeniy Paltsev	bool "Disable loop buffer (LPB)"
43610011f7dSEugeniy Paltsev	help
43710011f7dSEugeniy Paltsev	  On HS cores, loop buffer (LPB) is programmable in runtime and can
43810011f7dSEugeniy Paltsev	  be optionally disabled.
43910011f7dSEugeniy Paltsev
4401f6ccfffSVineet Guptaendif # ISA_ARCV2
4411f6ccfffSVineet Gupta
442cfdbc2e1SVineet Guptaendmenu   # "ARC CPU Configuration"
443cfdbc2e1SVineet Gupta
444cfdbc2e1SVineet Guptaconfig LINUX_LINK_BASE
4459ed68785SEugeniy Paltsev	hex "Kernel link address"
446cfdbc2e1SVineet Gupta	default "0x80000000"
447cfdbc2e1SVineet Gupta	help
448cfdbc2e1SVineet Gupta	  ARC700 divides the 32 bit phy address space into two equal halves
449cfdbc2e1SVineet Gupta	  -Lower 2G (0 - 0x7FFF_FFFF ) is user virtual, translated by MMU
450cfdbc2e1SVineet Gupta	  -Upper 2G (0x8000_0000 onwards) is untranslated, for kernel
451cfdbc2e1SVineet Gupta	  Typically Linux kernel is linked at the start of untransalted addr,
452cfdbc2e1SVineet Gupta	  hence the default value of 0x8zs.
453cfdbc2e1SVineet Gupta	  However some customers have peripherals mapped at this addr, so
454cfdbc2e1SVineet Gupta	  Linux needs to be scooted a bit.
455cfdbc2e1SVineet Gupta	  If you don't know what the above means, leave this setting alone.
456ff1c0b6aSVineet Gupta	  This needs to match memory start address specified in Device Tree
457cfdbc2e1SVineet Gupta
4589ed68785SEugeniy Paltsevconfig LINUX_RAM_BASE
4599ed68785SEugeniy Paltsev	hex "RAM base address"
4609ed68785SEugeniy Paltsev	default LINUX_LINK_BASE
4619ed68785SEugeniy Paltsev	help
4629ed68785SEugeniy Paltsev	  By default Linux is linked at base of RAM. However in some special
4639ed68785SEugeniy Paltsev	  cases (such as HSDK), Linux can't be linked at start of DDR, hence
4649ed68785SEugeniy Paltsev	  this option.
4659ed68785SEugeniy Paltsev
46645890f6dSVineet Guptaconfig HIGHMEM
46745890f6dSVineet Gupta	bool "High Memory Support"
468050b2da2SMike Rapoport	select HAVE_ARCH_PFN_VALID
46939cac191SThomas Gleixner	select KMAP_LOCAL
47045890f6dSVineet Gupta	help
47145890f6dSVineet Gupta	  With ARC 2G:2G address split, only upper 2G is directly addressable by
47245890f6dSVineet Gupta	  kernel. Enable this to potentially allow access to rest of 2G and PAE
47345890f6dSVineet Gupta	  in future
47445890f6dSVineet Gupta
4755a364c2aSVineet Guptaconfig ARC_HAS_PAE40
4765a364c2aSVineet Gupta	bool "Support for the 40-bit Physical Address Extension"
4775a364c2aSVineet Gupta	depends on ISA_ARCV2
478cf4100d1SAlexey Brodkin	select HIGHMEM
479d4a451d5SChristoph Hellwig	select PHYS_ADDR_T_64BIT
4805a364c2aSVineet Gupta	help
4815a364c2aSVineet Gupta	  Enable access to physical memory beyond 4G, only supported on
4825a364c2aSVineet Gupta	  ARC cores with 40 bit Physical Addressing support
4835a364c2aSVineet Gupta
48415ca68a9SNoam Camusconfig ARC_KVADDR_SIZE
48583fc61a5SMasanari Iida	int "Kernel Virtual Address Space size (MB)"
48615ca68a9SNoam Camus	range 0 512
48715ca68a9SNoam Camus	default "256"
48815ca68a9SNoam Camus	help
48915ca68a9SNoam Camus	  The kernel address space is carved out of 256MB of translated address
49015ca68a9SNoam Camus	  space for catering to vmalloc, modules, pkmap, fixmap. This however may
49115ca68a9SNoam Camus	  not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
49215ca68a9SNoam Camus	  this to be stretched to 512 MB (by extending into the reserved
49315ca68a9SNoam Camus	  kernel-user gutter)
49415ca68a9SNoam Camus
495080c3747SVineet Guptaconfig ARC_CURR_IN_REG
496cfca4b5aSVineet Gupta	bool "cache current task pointer in gp"
497080c3747SVineet Gupta	default y
498080c3747SVineet Gupta	help
499cfca4b5aSVineet Gupta	  This reserves gp register to point to Current Task in
500cfca4b5aSVineet Gupta	  kernel mode eliding memory access for each access
501080c3747SVineet Gupta
5022e651ea1SVineet Gupta
5031736a56fSVineet Guptaconfig ARC_EMUL_UNALIGNED
5042e651ea1SVineet Gupta	bool "Emulate unaligned memory access (userspace only)"
5052e651ea1SVineet Gupta	select SYSCTL_ARCH_UNALIGN_NO_WARN
5062e651ea1SVineet Gupta	select SYSCTL_ARCH_UNALIGN_ALLOW
5071f6ccfffSVineet Gupta	depends on ISA_ARCOMPACT
5082e651ea1SVineet Gupta	help
5092e651ea1SVineet Gupta	  This enables misaligned 16 & 32 bit memory access from user space.
5102e651ea1SVineet Gupta	  Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
5112e651ea1SVineet Gupta	  potential bugs in code
5122e651ea1SVineet Gupta
513cfdbc2e1SVineet Guptaconfig HZ
514cfdbc2e1SVineet Gupta	int "Timer Frequency"
515cfdbc2e1SVineet Gupta	default 100
516cfdbc2e1SVineet Gupta
517cbe056f7SVineet Guptaconfig ARC_METAWARE_HLINK
518cbe056f7SVineet Gupta	bool "Support for Metaware debugger assisted Host access"
519cbe056f7SVineet Gupta	help
520cbe056f7SVineet Gupta	  This options allows a Linux userland apps to directly access
521cbe056f7SVineet Gupta	  host file system (open/creat/read/write etc) with help from
522cbe056f7SVineet Gupta	  Metaware Debugger. This can come in handy for Linux-host communication
523cbe056f7SVineet Gupta	  when there is no real usable peripheral such as EMAC.
524cbe056f7SVineet Gupta
525cfdbc2e1SVineet Guptamenuconfig ARC_DBG
526cfdbc2e1SVineet Gupta	bool "ARC debugging"
527cfdbc2e1SVineet Gupta	default y
528cfdbc2e1SVineet Gupta
529aa6083edSVineet Guptaif ARC_DBG
530aa6083edSVineet Gupta
531854a0d95SVineet Guptaconfig ARC_DW2_UNWIND
532854a0d95SVineet Gupta	bool "Enable DWARF specific kernel stack unwind"
533854a0d95SVineet Gupta	default y
534854a0d95SVineet Gupta	select KALLSYMS
535854a0d95SVineet Gupta	help
536854a0d95SVineet Gupta	  Compiles the kernel with DWARF unwind information and can be used
537854a0d95SVineet Gupta	  to get stack backtraces.
538854a0d95SVineet Gupta
539854a0d95SVineet Gupta	  If you say Y here the resulting kernel image will be slightly larger
540854a0d95SVineet Gupta	  but not slower, and it will give very useful debugging information.
541854a0d95SVineet Gupta	  If you don't debug the kernel, you can say N, but we may not be able
542854a0d95SVineet Gupta	  to solve problems without frame unwind information
543854a0d95SVineet Gupta
544f091d5a4SEugeniy Paltsevconfig ARC_DBG_JUMP_LABEL
545f091d5a4SEugeniy Paltsev	bool "Paranoid checks in Static Keys (jump labels) code"
546f091d5a4SEugeniy Paltsev	depends on JUMP_LABEL
547f091d5a4SEugeniy Paltsev	default y if STATIC_KEYS_SELFTEST
548f091d5a4SEugeniy Paltsev	help
549f091d5a4SEugeniy Paltsev	  Enable paranoid checks and self-test of both ARC-specific and generic
550f091d5a4SEugeniy Paltsev	  part of static keys (jump labels) related code.
551aa6083edSVineet Guptaendif
552aa6083edSVineet Gupta
553999159a5SVineet Guptaconfig ARC_BUILTIN_DTB_NAME
554999159a5SVineet Gupta	string "Built in DTB"
555999159a5SVineet Gupta	help
556999159a5SVineet Gupta	  Set the name of the DTB to embed in the vmlinux binary
557999159a5SVineet Gupta	  Leaving it blank selects the minimal "skeleton" dtb
558999159a5SVineet Gupta
559cfdbc2e1SVineet Guptaendmenu	 # "ARC Architecture Configuration"
560cfdbc2e1SVineet Gupta
5610192445cSZi Yanconfig ARCH_FORCE_MAX_ORDER
56237eda9dfSVineet Gupta	int "Maximum zone order"
56323baf831SKirill A. Shutemov	default "11" if ARC_HUGEPAGE_16M
56423baf831SKirill A. Shutemov	default "10"
56537eda9dfSVineet Gupta
566996bad6cSAlexey Brodkinsource "kernel/power/Kconfig"
567