xref: /linux-6.15/arch/arc/Kconfig (revision 3b7f793a)
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
95c0541e1SZi Yan	select ARCH_HAS_CPU_CACHE_ALIASING
10c2280be8SAnshuman Khandual	select ARCH_HAS_CACHE_LINE_SIZE
11399145f9SAnshuman Khandual	select ARCH_HAS_DEBUG_VM_PGTABLE
12f73c9045SChristoph Hellwig	select ARCH_HAS_DMA_PREP_COHERENT
13c27d0e90SVineet Gupta	select ARCH_HAS_PTE_SPECIAL
14347cb6afSChristoph Hellwig	select ARCH_HAS_SETUP_DMA_OPS
156c3e71ddSChristoph Hellwig	select ARCH_HAS_SYNC_DMA_FOR_CPU
166c3e71ddSChristoph Hellwig	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
17f2519d4dSPaul E. McKenney	select ARCH_NEED_CMPXCHG_1_EMU
182a440168SVineet Gupta	select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
19942fa985SYury Norov	select ARCH_32BIT_OFF_T
2010916706SShile Zhang	select BUILDTIME_TABLE_SORT
21*3b7f793aSMasahiro Yamada	select GENERIC_BUILTIN_DTB
224adeefe1SVineet Gupta	select CLONE_BACKWARDS
2369fbd098SNoam Camus	select COMMON_CLK
24f73c9045SChristoph Hellwig	select DMA_DIRECT_REMAP
25ce636527SVineet Gupta	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
26cfdbc2e1SVineet Gupta	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
27cfdbc2e1SVineet Gupta	select GENERIC_IRQ_SHOW
28c1678ffcSJoao Pinto	select GENERIC_PCI_IOMAP
29cfdbc2e1SVineet Gupta	select GENERIC_SCHED_CLOCK
30bf287607SAlexey Brodkin	select GENERIC_SMP_IDLE_THREAD
31cfdbc2e1SVineet Gupta	select GENERIC_IOREMAP
3206dfae39SBaoquan He	select GENERIC_STRNCPY_FROM_USER if MMU
33f798f91eSVineet Gupta	select GENERIC_STRNLEN_USER if MMU
34f798f91eSVineet Gupta	select HAVE_ARCH_KGDB
35f46121bdSMischa Jonker	select HAVE_ARCH_TRACEHOOK
36547f1125SVineet Gupta	select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARC_MMU_V4
37e8003bf6SAnshuman Khandual	select HAVE_DEBUG_STACKOVERFLOW
38c27d0e90SVineet Gupta	select HAVE_DEBUG_KMEMLEAK
399fbea0b7SEugeniy Paltsev	select HAVE_IOREMAP_PROT
404368902bSGilad Ben-Yossef	select HAVE_KERNEL_GZIP
41c27d0e90SVineet Gupta	select HAVE_KERNEL_LZMA
42c27d0e90SVineet Gupta	select HAVE_KPROBES
434d86dfbbSVineet Gupta	select HAVE_KRETPROBES
444d86dfbbSVineet Gupta	select HAVE_REGS_AND_STACK_ACCESS_API
45b3bbf6a7SSergey Matyukevich	select HAVE_MOD_ARCH_SPECIFIC
46eb1357d9SVineet Gupta	select HAVE_PERF_EVENTS
479c57564eSVineet Gupta	select HAVE_SYSCALL_TRACEPOINTS
48fb0b5490SSergey Matyukevich	select IRQ_DOMAIN
49999159a5SVineet Gupta	select LOCK_MM_AND_FIND_VMA
50a050ba1eSLinus Torvalds	select MODULES_USE_ELF_RELA
51cfdbc2e1SVineet Gupta	select OF
52999159a5SVineet Gupta	select OF_EARLY_FLATTREE
53999159a5SVineet Gupta	select PCI_SYSCALL if PCI
5420f1b79dSChristoph Hellwig	select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
55f091d5a4SEugeniy Paltsev	select TRACE_IRQFLAGS_SUPPORT
564aae683fSMasahiro Yamada	select HAVE_EBPF_JIT if ISA_ARCV2
57f122668dSShahab Vahedi
580dafafc3SVineet Guptaconfig LOCKDEP_SUPPORT
590dafafc3SVineet Gupta	def_bool y
600dafafc3SVineet Gupta
610dafafc3SVineet Guptaconfig SCHED_OMIT_FRAME_POINTER
62cfdbc2e1SVineet Gupta	def_bool y
63cfdbc2e1SVineet Gupta
64cfdbc2e1SVineet Guptaconfig GENERIC_CSUM
65cfdbc2e1SVineet Gupta	def_bool y
66cfdbc2e1SVineet Gupta
67cfdbc2e1SVineet Guptaconfig ARCH_FLATMEM_ENABLE
68cfdbc2e1SVineet Gupta	def_bool y
69cfdbc2e1SVineet Gupta
70cfdbc2e1SVineet Guptaconfig MMU
71cfdbc2e1SVineet Gupta	def_bool y
72cfdbc2e1SVineet Gupta
73cfdbc2e1SVineet Guptaconfig NO_IOPORT_MAP
74ce816fa8SUwe Kleine-König	def_bool y
75cfdbc2e1SVineet Gupta
76cfdbc2e1SVineet Guptaconfig GENERIC_CALIBRATE_DELAY
77cfdbc2e1SVineet Gupta	def_bool y
78cfdbc2e1SVineet Gupta
79cfdbc2e1SVineet Guptaconfig GENERIC_HWEIGHT
80cfdbc2e1SVineet Gupta	def_bool y
81cfdbc2e1SVineet Gupta
82cfdbc2e1SVineet Guptaconfig STACKTRACE_SUPPORT
8344c8bb91SVineet Gupta	def_bool y
8444c8bb91SVineet Gupta	select STACKTRACE
8544c8bb91SVineet Gupta
8644c8bb91SVineet Guptamenu "ARC Architecture Configuration"
87cfdbc2e1SVineet Gupta
88cfdbc2e1SVineet Guptamenu "ARC Platform/SoC/Board"
8993ad700dSVineet Gupta
90cfdbc2e1SVineet Guptasource "arch/arc/plat-tb10x/Kconfig"
91072eb693SChristian Ruppertsource "arch/arc/plat-axs10x/Kconfig"
92556cc1c5SAlexey Brodkinsource "arch/arc/plat-hsdk/Kconfig"
93a518d637SAlexey Brodkin
9493ad700dSVineet Guptaendmenu
9553d98958SVineet Gupta
96cfdbc2e1SVineet Guptachoice
971f6ccfffSVineet Gupta	prompt "ARC Instruction Set"
981f6ccfffSVineet Gupta	default ISA_ARCV2
99b7cc40c3SKevin Hilman
1001f6ccfffSVineet Guptaconfig ISA_ARCOMPACT
1011f6ccfffSVineet Gupta	bool "ARCompact ISA"
1021f6ccfffSVineet Gupta	select CPU_NO_EFFICIENT_FFS
103fff7fb0bSZhaoxiu Zeng	help
1041f6ccfffSVineet Gupta	  The original ARC ISA of ARC600/700 cores
1051f6ccfffSVineet Gupta
1061f6ccfffSVineet Guptaconfig ISA_ARCV2
10765bfbcdfSVineet Gupta	bool "ARC ISA v2"
10865bfbcdfSVineet Gupta	select ARC_TIMERS_64BIT
109c4c9a040SVineet Gupta	help
11065bfbcdfSVineet Gupta	  ISA for the Next Generation ARC-HS cores
11165bfbcdfSVineet Gupta
1121f6ccfffSVineet Guptaendchoice
1131f6ccfffSVineet Gupta
1141f6ccfffSVineet Guptamenu "ARC CPU Configuration"
115cfdbc2e1SVineet Gupta
116cfdbc2e1SVineet Guptachoice
117cfdbc2e1SVineet Gupta	prompt "ARC Core"
118cfdbc2e1SVineet Gupta	default ARC_CPU_770 if ISA_ARCOMPACT
1191f6ccfffSVineet Gupta	default ARC_CPU_HS if ISA_ARCV2
1201f6ccfffSVineet Gupta
1211f6ccfffSVineet Guptaconfig ARC_CPU_770
122cfdbc2e1SVineet Gupta	bool "ARC770"
123cfdbc2e1SVineet Gupta	depends on ISA_ARCOMPACT
124767a697eSVineet Gupta	select ARC_HAS_SWAPE
125742f8af6SVineet Gupta	help
126cfdbc2e1SVineet Gupta	  Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
127cfdbc2e1SVineet Gupta	  This core has a bunch of cool new features:
128cfdbc2e1SVineet Gupta	  -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
129cfdbc2e1SVineet Gupta	           Shared Address Spaces (for sharing TLB entries in MMU)
1307c2020c3SColin Ian King	  -Caches: New Prog Model, Region Flush
131cfdbc2e1SVineet Gupta	  -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
132cfdbc2e1SVineet Gupta
133cfdbc2e1SVineet Guptaconfig ARC_CPU_HS
1341f6ccfffSVineet Gupta	bool "ARC-HS"
1351f6ccfffSVineet Gupta	depends on ISA_ARCV2
1361f6ccfffSVineet Gupta	help
1371f6ccfffSVineet Gupta	  Support for ARC HS38x Cores based on ARCv2 ISA
1381f6ccfffSVineet Gupta	  The notable features are:
1391f6ccfffSVineet Gupta	    - SMP configurations of up to 4 cores with coherency
140a5760db2SRandy Dunlap	    - Optional L2 Cache and IO-Coherency
1411f6ccfffSVineet Gupta	    - Revised Interrupt Architecture (multiple priorites, reg banks,
1421f6ccfffSVineet Gupta	        auto stack switch, auto regfile save/restore)
1431f6ccfffSVineet Gupta	    - MMUv4 (PIPT dcache, Huge Pages)
1441f6ccfffSVineet Gupta	    - Instructions for
1451f6ccfffSVineet Gupta		* 64bit load/store: LDD, STD
1461f6ccfffSVineet Gupta		* Hardware assisted divide/remainder: DIV, REM
1471f6ccfffSVineet Gupta		* Function prologue/epilogue: ENTER_S, LEAVE_S
1481f6ccfffSVineet Gupta		* IRQ enable/disable: CLRI, SETI
1491f6ccfffSVineet Gupta		* pop count: FFS, FLS
1501f6ccfffSVineet Gupta		* SETcc, BMSKN, XBFU...
1511f6ccfffSVineet Gupta
1521f6ccfffSVineet Guptaendchoice
153cfdbc2e1SVineet Gupta
154cfdbc2e1SVineet Guptaconfig ARC_TUNE_MCPU
1550bdd6e74SEugeniy Paltsev	string "Override default -mcpu compiler flag"
1560bdd6e74SEugeniy Paltsev	default ""
1570bdd6e74SEugeniy Paltsev	help
1580bdd6e74SEugeniy Paltsev	  Override default -mcpu=xxx compiler flag (which is set depending on
1590bdd6e74SEugeniy Paltsev	  the ISA version) with the specified value.
1600bdd6e74SEugeniy Paltsev	  NOTE: If specified flag isn't supported by current compiler the
1610bdd6e74SEugeniy Paltsev	  ISA default value will be used as a fallback.
1620bdd6e74SEugeniy Paltsev
1630bdd6e74SEugeniy Paltsevconfig CPU_BIG_ENDIAN
164cfdbc2e1SVineet Gupta	bool "Enable Big Endian Mode"
165cfdbc2e1SVineet Gupta	help
166cfdbc2e1SVineet Gupta	  Build kernel for Big Endian Mode of ARC CPU
167cfdbc2e1SVineet Gupta
168cfdbc2e1SVineet Guptaconfig SMP
16941195d23SVineet Gupta	bool "Symmetric Multi-Processing"
17082fea5a1SVineet Gupta	select ARC_MCIP if ISA_ARCV2
17182fea5a1SVineet Gupta	help
17241195d23SVineet Gupta	  This enables support for systems with more than one CPU.
17382fea5a1SVineet Gupta
17441195d23SVineet Guptaif SMP
17541195d23SVineet Gupta
17641195d23SVineet Guptaconfig NR_CPUS
17741195d23SVineet Gupta	int "Maximum number of CPUs (2-4096)"
1783aa4f80eSNoam Camus	range 2 4096
1793aa4f80eSNoam Camus	default "4"
18082fea5a1SVineet Gupta
18182fea5a1SVineet Guptaconfig ARC_SMP_HALT_ON_RESET
1823971cdc2SVineet Gupta	bool "Enable Halt-on-reset boot mode"
1833971cdc2SVineet Gupta	help
1843971cdc2SVineet Gupta	  In SMP configuration cores can be configured as Halt-on-reset
1853971cdc2SVineet Gupta	  or they could all start at same time. For Halt-on-reset, non
1863971cdc2SVineet Gupta	  masters are parked until Master kicks them so they can start off
187a5760db2SRandy Dunlap	  at designated entry point. For other case, all jump to common
1883971cdc2SVineet Gupta	  entry point and spin wait for Master's signal.
1893971cdc2SVineet Gupta
1903971cdc2SVineet Guptaendif #SMP
19182fea5a1SVineet Gupta
19241195d23SVineet Guptaconfig ARC_MCIP
1933ce0fefcSVineet Gupta	bool "ARConnect Multicore IP (MCIP) Support "
1943ce0fefcSVineet Gupta	depends on ISA_ARCV2
1953ce0fefcSVineet Gupta	default y if SMP
1963ce0fefcSVineet Gupta	help
1973ce0fefcSVineet Gupta	  This IP block enables SMP in ARC-HS38 cores.
1983ce0fefcSVineet Gupta	  It provides for cross-core interrupts, multi-core debug
1993ce0fefcSVineet Gupta	  hardware semaphores, shared memory,....
2003ce0fefcSVineet Gupta
2013ce0fefcSVineet Guptamenuconfig ARC_CACHE
202cfdbc2e1SVineet Gupta	bool "Enable Cache Support"
203cfdbc2e1SVineet Gupta	default y
204cfdbc2e1SVineet Gupta
205cfdbc2e1SVineet Guptaif ARC_CACHE
206cfdbc2e1SVineet Gupta
207cfdbc2e1SVineet Guptaconfig ARC_CACHE_LINE_SHIFT
208cfdbc2e1SVineet Gupta	int "Cache Line Length (as power of 2)"
209cfdbc2e1SVineet Gupta	range 5 7
210cfdbc2e1SVineet Gupta	default "6"
211cfdbc2e1SVineet Gupta	help
212cfdbc2e1SVineet Gupta	  Starting with ARC700 4.9, Cache line length is configurable,
213cfdbc2e1SVineet Gupta	  This option specifies "N", with Line-len = 2 power N
214cfdbc2e1SVineet Gupta	  So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
215cfdbc2e1SVineet Gupta	  Linux only supports same line lengths for I and D caches.
216cfdbc2e1SVineet Gupta
217cfdbc2e1SVineet Guptaconfig ARC_HAS_ICACHE
218cfdbc2e1SVineet Gupta	bool "Use Instruction Cache"
219cfdbc2e1SVineet Gupta	default y
220cfdbc2e1SVineet Gupta
221cfdbc2e1SVineet Guptaconfig ARC_HAS_DCACHE
222cfdbc2e1SVineet Gupta	bool "Use Data Cache"
223cfdbc2e1SVineet Gupta	default y
224cfdbc2e1SVineet Gupta
225cfdbc2e1SVineet Guptaconfig ARC_CACHE_PAGES
226cfdbc2e1SVineet Gupta	bool "Per Page Cache Control"
227cfdbc2e1SVineet Gupta	default y
228cfdbc2e1SVineet Gupta	depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
229cfdbc2e1SVineet Gupta	help
230cfdbc2e1SVineet Gupta	  This can be used to over-ride the global I/D Cache Enable on a
231cfdbc2e1SVineet Gupta	  per-page basis (but only for pages accessed via MMU such as
232cfdbc2e1SVineet Gupta	  Kernel Virtual address or User Virtual Address)
233cfdbc2e1SVineet Gupta	  TLB entries have a per-page Cache Enable Bit.
234cfdbc2e1SVineet Gupta	  Note that Global I/D ENABLE + Per Page DISABLE works but corollary
235cfdbc2e1SVineet Gupta	  Global DISABLE + Per Page ENABLE won't work
236cfdbc2e1SVineet Gupta
237cfdbc2e1SVineet Guptaendif #ARC_CACHE
238cfdbc2e1SVineet Gupta
239cfdbc2e1SVineet Guptaconfig ARC_HAS_ICCM
2408b5850f8SVineet Gupta	bool "Use ICCM"
2418b5850f8SVineet Gupta	help
2428b5850f8SVineet Gupta	  Single Cycle RAMS to store Fast Path Code
2438b5850f8SVineet Gupta
2448b5850f8SVineet Guptaconfig ARC_ICCM_SZ
2458b5850f8SVineet Gupta	int "ICCM Size in KB"
2468b5850f8SVineet Gupta	default "64"
2478b5850f8SVineet Gupta	depends on ARC_HAS_ICCM
2488b5850f8SVineet Gupta
2498b5850f8SVineet Guptaconfig ARC_HAS_DCCM
2508b5850f8SVineet Gupta	bool "Use DCCM"
2518b5850f8SVineet Gupta	help
2528b5850f8SVineet Gupta	  Single Cycle RAMS to store Fast Path Data
2538b5850f8SVineet Gupta
2548b5850f8SVineet Guptaconfig ARC_DCCM_SZ
2558b5850f8SVineet Gupta	int "DCCM Size in KB"
2568b5850f8SVineet Gupta	default "64"
2578b5850f8SVineet Gupta	depends on ARC_HAS_DCCM
2588b5850f8SVineet Gupta
2598b5850f8SVineet Guptaconfig ARC_DCCM_BASE
2608b5850f8SVineet Gupta	hex "DCCM map address"
2618b5850f8SVineet Gupta	default "0xA0000000"
2628b5850f8SVineet Gupta	depends on ARC_HAS_DCCM
2638b5850f8SVineet Gupta
2648b5850f8SVineet Guptachoice
265cfdbc2e1SVineet Gupta	prompt "MMU Version"
2661f6ccfffSVineet Gupta	default ARC_MMU_V3 if ISA_ARCOMPACT
267288ff7deSVineet Gupta	default ARC_MMU_V4 if ISA_ARCV2
268288ff7deSVineet Gupta
269cfdbc2e1SVineet Guptaconfig ARC_MMU_V3
270cfdbc2e1SVineet Gupta	bool "MMU v3"
271cfdbc2e1SVineet Gupta	depends on ISA_ARCOMPACT
272288ff7deSVineet Gupta	help
273cfdbc2e1SVineet Gupta	  Introduced with ARC700 4.10: New Features
274cfdbc2e1SVineet Gupta	  Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
275cfdbc2e1SVineet Gupta	  Shared Address Spaces (SASID)
276cfdbc2e1SVineet Gupta
277cfdbc2e1SVineet Guptaconfig ARC_MMU_V4
278d7a512bfSVineet Gupta	bool "MMU v4"
279d7a512bfSVineet Gupta	depends on ISA_ARCV2
280d7a512bfSVineet Gupta
281d7a512bfSVineet Guptaendchoice
282cfdbc2e1SVineet Gupta
283cfdbc2e1SVineet Gupta
284cfdbc2e1SVineet Guptachoice
285cfdbc2e1SVineet Gupta	prompt "MMU Page Size"
286cfdbc2e1SVineet Gupta	default ARC_PAGE_SIZE_8K
287cfdbc2e1SVineet Gupta
288cfdbc2e1SVineet Guptaconfig ARC_PAGE_SIZE_8K
289cfdbc2e1SVineet Gupta	bool "8KB"
290cfdbc2e1SVineet Gupta	select HAVE_PAGE_SIZE_8KB
291d3e5bab9SArnd Bergmann	help
292cfdbc2e1SVineet Gupta	  Choose between 8k vs 16k
293cfdbc2e1SVineet Gupta
294cfdbc2e1SVineet Guptaconfig ARC_PAGE_SIZE_16K
295cfdbc2e1SVineet Gupta	select HAVE_PAGE_SIZE_16KB
296d3e5bab9SArnd Bergmann	bool "16KB"
297cfdbc2e1SVineet Gupta
298cfdbc2e1SVineet Guptaconfig ARC_PAGE_SIZE_4K
299cfdbc2e1SVineet Gupta	bool "4KB"
300cfdbc2e1SVineet Gupta	select HAVE_PAGE_SIZE_4KB
301d3e5bab9SArnd Bergmann
302cfdbc2e1SVineet Guptaendchoice
303cfdbc2e1SVineet Gupta
304cfdbc2e1SVineet 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
31737eda9dfSVineet Guptaconfig PGTABLE_LEVELS
3182dde02abSVineet Gupta	int "Number of Page table levels"
3192dde02abSVineet Gupta	default 2
3202dde02abSVineet Gupta
3212dde02abSVineet Guptaconfig ARC_COMPACT_IRQ_LEVELS
3224788a594SVineet Gupta	depends on ISA_ARCOMPACT
323f45ba2bdSVineet Gupta	bool "Setup Timer IRQ as high Priority"
32460f2b4b8SVineet Gupta	# if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
32541195d23SVineet Gupta	depends on !SMP
32660f2b4b8SVineet Gupta
3274788a594SVineet Guptaconfig ARC_FPU_SAVE_RESTORE
328cfdbc2e1SVineet Gupta	bool "Enable FPU state persistence across context switch"
329cfdbc2e1SVineet Gupta	help
330cfdbc2e1SVineet 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.
334f45ba2bdSVineet Gupta
3351f6ccfffSVineet Guptaconfig ARC_CANT_LLSC
336fbf8e13dSVineet Gupta	def_bool n
337fbf8e13dSVineet Gupta
338fbf8e13dSVineet Guptaconfig ARC_HAS_LLSC
339cfdbc2e1SVineet Gupta	bool "Insn: LLOCK/SCOND (efficient atomic ops)"
340cfdbc2e1SVineet Gupta	default y
341cfdbc2e1SVineet Gupta	depends on !ARC_CANT_LLSC
34214a0abfcSVineet Gupta
343cfdbc2e1SVineet Guptaconfig ARC_HAS_SWAPE
344cfdbc2e1SVineet Gupta	bool "Insn: SWAPE (endian-swap)"
345cfdbc2e1SVineet Gupta	default y
346cfdbc2e1SVineet Gupta
347cfdbc2e1SVineet Guptaif ISA_ARCV2
3481f6ccfffSVineet Gupta
3491f6ccfffSVineet Guptaconfig 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
35876551468SEugeniy Paltsevconfig 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
3661f6ccfffSVineet Guptaconfig ARC_HAS_DIV_REM
367d05a76abSAlexey Brodkin	bool "Insn: div, divu, rem, remu"
368d05a76abSAlexey Brodkin	default y
369d05a76abSAlexey Brodkin
370d05a76abSAlexey Brodkinconfig ARC_HAS_ACCL_REGS
3713d5e8012SVineet Gupta	bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6 and/or DSP)"
3724827d0cfSEugeniy Paltsev	default y
373af1fc5baSVineet 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
3783d5e8012SVineet Guptaconfig ARC_DSP_HANDLED
3794827d0cfSEugeniy Paltsev	def_bool n
3804827d0cfSEugeniy Paltsev
3814827d0cfSEugeniy Paltsevconfig ARC_DSP_SAVE_RESTORE_REGS
3827321e2eaSEugeniy Paltsev	def_bool n
3837321e2eaSEugeniy Paltsev
3847321e2eaSEugeniy 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).
3904827d0cfSEugeniy Paltsev	  Below are options describing how to handle these registers in
39181e82fa5SColin Ian King	  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
4064827d0cfSEugeniy 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
4157321e2eaSEugeniy 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
424f09d3174SEugeniy Paltsevendchoice
4254827d0cfSEugeniy Paltsev
4264827d0cfSEugeniy Paltsevconfig 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
434e494239aSVineet Guptaconfig 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
44010011f7dSEugeniy Paltsevendif # ISA_ARCV2
4411f6ccfffSVineet Gupta
4421f6ccfffSVineet Guptaendmenu   # "ARC CPU Configuration"
443cfdbc2e1SVineet Gupta
444cfdbc2e1SVineet Guptaconfig LINUX_LINK_BASE
445cfdbc2e1SVineet Gupta	hex "Kernel link address"
4469ed68785SEugeniy Paltsev	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.
456cfdbc2e1SVineet Gupta	  This needs to match memory start address specified in Device Tree
457ff1c0b6aSVineet Gupta
458cfdbc2e1SVineet Guptaconfig 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
4669ed68785SEugeniy Paltsevconfig HIGHMEM
46745890f6dSVineet Gupta	bool "High Memory Support"
46845890f6dSVineet Gupta	select HAVE_ARCH_PFN_VALID
469050b2da2SMike Rapoport	select KMAP_LOCAL
47039cac191SThomas Gleixner	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
47545890f6dSVineet Guptaconfig ARC_HAS_PAE40
4765a364c2aSVineet Gupta	bool "Support for the 40-bit Physical Address Extension"
4775a364c2aSVineet Gupta	depends on ARC_MMU_V4
478dd2b2302SLukas Bulwahn	depends on !ARC_PAGE_SIZE_4K
4798871331bSVineet Gupta	select HIGHMEM
480cf4100d1SAlexey Brodkin	select PHYS_ADDR_T_64BIT
481d4a451d5SChristoph Hellwig	help
4825a364c2aSVineet Gupta	  Enable access to physical memory beyond 4G, only supported on
4835a364c2aSVineet Gupta	  ARC cores with 40 bit Physical Addressing support
4845a364c2aSVineet Gupta
4855a364c2aSVineet Guptaconfig ARC_KVADDR_SIZE
48615ca68a9SNoam Camus	int "Kernel Virtual Address Space size (MB)"
48783fc61a5SMasanari Iida	range 0 512
48815ca68a9SNoam Camus	default "256"
48915ca68a9SNoam Camus	help
49015ca68a9SNoam Camus	  The kernel address space is carved out of 256MB of translated address
49115ca68a9SNoam Camus	  space for catering to vmalloc, modules, pkmap, fixmap. This however may
49215ca68a9SNoam Camus	  not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
49315ca68a9SNoam Camus	  this to be stretched to 512 MB (by extending into the reserved
49415ca68a9SNoam Camus	  kernel-user gutter)
49515ca68a9SNoam Camus
49615ca68a9SNoam Camusconfig ARC_CURR_IN_REG
497080c3747SVineet Gupta	bool "cache current task pointer in gp"
498cfca4b5aSVineet Gupta	default y
499080c3747SVineet Gupta	help
500080c3747SVineet Gupta	  This reserves gp register to point to Current Task in
501cfca4b5aSVineet Gupta	  kernel mode eliding memory access for each access
502cfca4b5aSVineet Gupta
503080c3747SVineet Gupta
5042e651ea1SVineet Guptaconfig ARC_EMUL_UNALIGNED
5051736a56fSVineet Gupta	bool "Emulate unaligned memory access (userspace only)"
5062e651ea1SVineet Gupta	select SYSCTL_ARCH_UNALIGN_NO_WARN
5072e651ea1SVineet Gupta	select SYSCTL_ARCH_UNALIGN_ALLOW
5082e651ea1SVineet Gupta	depends on ISA_ARCOMPACT
5091f6ccfffSVineet Gupta	help
5102e651ea1SVineet Gupta	  This enables misaligned 16 & 32 bit memory access from user space.
5112e651ea1SVineet Gupta	  Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
5122e651ea1SVineet Gupta	  potential bugs in code
5132e651ea1SVineet Gupta
5142e651ea1SVineet Guptaconfig HZ
515cfdbc2e1SVineet Gupta	int "Timer Frequency"
516cfdbc2e1SVineet Gupta	default 100
517cfdbc2e1SVineet Gupta
518cfdbc2e1SVineet Guptaconfig ARC_METAWARE_HLINK
519cbe056f7SVineet Gupta	bool "Support for Metaware debugger assisted Host access"
520cbe056f7SVineet Gupta	help
521cbe056f7SVineet Gupta	  This options allows a Linux userland apps to directly access
522cbe056f7SVineet Gupta	  host file system (open/creat/read/write etc) with help from
523cbe056f7SVineet Gupta	  Metaware Debugger. This can come in handy for Linux-host communication
524cbe056f7SVineet Gupta	  when there is no real usable peripheral such as EMAC.
525cbe056f7SVineet Gupta
526cbe056f7SVineet Guptamenuconfig ARC_DBG
527cfdbc2e1SVineet Gupta	bool "ARC debugging"
528cfdbc2e1SVineet Gupta	default y
529cfdbc2e1SVineet Gupta
530cfdbc2e1SVineet Guptaif ARC_DBG
531aa6083edSVineet Gupta
532aa6083edSVineet Guptaconfig ARC_DW2_UNWIND
533854a0d95SVineet Gupta	bool "Enable DWARF specific kernel stack unwind"
534854a0d95SVineet Gupta	default y
535854a0d95SVineet Gupta	select KALLSYMS
536854a0d95SVineet Gupta	help
537854a0d95SVineet Gupta	  Compiles the kernel with DWARF unwind information and can be used
538854a0d95SVineet Gupta	  to get stack backtraces.
539854a0d95SVineet Gupta
540854a0d95SVineet Gupta	  If you say Y here the resulting kernel image will be slightly larger
541854a0d95SVineet Gupta	  but not slower, and it will give very useful debugging information.
542854a0d95SVineet Gupta	  If you don't debug the kernel, you can say N, but we may not be able
543854a0d95SVineet Gupta	  to solve problems without frame unwind information
544854a0d95SVineet Gupta
545854a0d95SVineet Guptaconfig ARC_DBG_JUMP_LABEL
546f091d5a4SEugeniy Paltsev	bool "Paranoid checks in Static Keys (jump labels) code"
547f091d5a4SEugeniy Paltsev	depends on JUMP_LABEL
548f091d5a4SEugeniy Paltsev	default y if STATIC_KEYS_SELFTEST
549f091d5a4SEugeniy Paltsev	help
550f091d5a4SEugeniy Paltsev	  Enable paranoid checks and self-test of both ARC-specific and generic
551f091d5a4SEugeniy Paltsev	  part of static keys (jump labels) related code.
552f091d5a4SEugeniy Paltsevendif
553aa6083edSVineet Gupta
554aa6083edSVineet Guptaconfig BUILTIN_DTB_NAME
555*3b7f793aSMasahiro Yamada	string "Built in DTB"
556999159a5SVineet Gupta	default "nsim_700"
557*3b7f793aSMasahiro Yamada	help
558999159a5SVineet Gupta	  Set the name of the DTB to embed in the vmlinux binary.
559*3b7f793aSMasahiro Yamada
560999159a5SVineet Guptaendmenu	 # "ARC Architecture Configuration"
561cfdbc2e1SVineet Gupta
562cfdbc2e1SVineet Guptaconfig ARCH_FORCE_MAX_ORDER
5630192445cSZi Yan	int "Maximum zone order"
56437eda9dfSVineet Gupta	default "11" if ARC_HUGEPAGE_16M
56523baf831SKirill A. Shutemov	default "10"
56623baf831SKirill A. Shutemov
56737eda9dfSVineet Guptasource "kernel/power/Kconfig"
568996bad6cSAlexey Brodkin