blob: bc8d6aecfbbdc8b55758b58d47568bd2751ec244 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001# SPDX-License-Identifier: GPL-2.0-only
Vineet Guptacfdbc2e2013-01-18 15:12:20 +05302#
3# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4#
Vineet Guptacfdbc2e2013-01-18 15:12:20 +05305
6config ARC
7 def_bool y
Vineet Guptac4c9a042016-10-31 13:46:38 -07008 select ARC_TIMERS
Anshuman Khandual399145f2020-06-04 16:47:15 -07009 select ARCH_HAS_DEBUG_VM_PGTABLE
Christoph Hellwigf73c9042019-06-14 16:26:41 +020010 select ARCH_HAS_DMA_PREP_COHERENT
Vineet Guptac27d0e92018-08-16 10:20:33 -070011 select ARCH_HAS_PTE_SPECIAL
Christoph Hellwig347cb6a2019-01-07 13:36:20 -050012 select ARCH_HAS_SETUP_DMA_OPS
Christoph Hellwig6c3e71d2018-05-18 15:41:32 +020013 select ARCH_HAS_SYNC_DMA_FOR_CPU
14 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
Vineet Gupta2a440162015-08-08 17:51:58 +053015 select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
Yury Norov942fa982018-05-16 11:18:49 +030016 select ARCH_32BIT_OFF_T
Shile Zhang10916702019-12-04 08:46:31 +080017 select BUILDTIME_TABLE_SORT
Vineet Gupta4adeefe2013-01-18 15:12:18 +053018 select CLONE_BACKWARDS
Noam Camus69fbd092016-01-14 12:20:08 +053019 select COMMON_CLK
Christoph Hellwigf73c9042019-06-14 16:26:41 +020020 select DMA_DIRECT_REMAP
Vineet Guptace636522015-07-27 17:23:28 +053021 select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053022 select GENERIC_FIND_FIRST_BIT
23 # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
24 select GENERIC_IRQ_SHOW
Joao Pintoc1678ff2016-03-10 14:44:13 -060025 select GENERIC_PCI_IOMAP
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053026 select GENERIC_PENDING_IRQ if SMP
Alexey Brodkinbf287602018-11-19 14:29:17 +030027 select GENERIC_SCHED_CLOCK
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053028 select GENERIC_SMP_IDLE_THREAD
Mischa Jonkerf46121b2013-01-18 15:12:24 +053029 select HAVE_ARCH_KGDB
Vineet Gupta547f1122013-01-18 15:12:22 +053030 select HAVE_ARCH_TRACEHOOK
Vineet Guptac27d0e92018-08-16 10:20:33 -070031 select HAVE_DEBUG_STACKOVERFLOW
Eugeniy Paltsev9fbea0b2019-11-19 18:26:15 +030032 select HAVE_DEBUG_KMEMLEAK
Vineet Gupta5464d032017-09-29 14:46:50 -070033 select HAVE_FUTEX_CMPXCHG if FUTEX
Gilad Ben-Yossef43689022013-01-22 16:48:45 +053034 select HAVE_IOREMAP_PROT
Vineet Guptac27d0e92018-08-16 10:20:33 -070035 select HAVE_KERNEL_GZIP
36 select HAVE_KERNEL_LZMA
Vineet Gupta4d86dfb2013-01-22 17:03:59 +053037 select HAVE_KPROBES
38 select HAVE_KRETPROBES
Vineet Guptaeb1357d2017-01-16 10:48:09 -080039 select HAVE_MOD_ARCH_SPECIFIC
Vineet Gupta9c575642013-01-18 15:12:24 +053040 select HAVE_PERF_EVENTS
Vineet Gupta1b0ccb82016-01-01 15:12:54 +053041 select HANDLE_DOMAIN_IRQ
Vineet Gupta999159a2013-01-22 17:00:52 +053042 select IRQ_DOMAIN
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053043 select MODULES_USE_ELF_RELA
Vineet Gupta999159a2013-01-22 17:00:52 +053044 select OF
45 select OF_EARLY_FLATTREE
Christoph Hellwig20f1b792018-11-15 20:05:34 +010046 select PCI_SYSCALL if PCI
Vineet Gupta82385732016-09-28 11:53:17 -070047 select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
Eugeniy Paltsevf091d5a2019-11-08 19:20:22 +030048 select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
Christoph Hellwig5e6e9852020-09-03 16:22:35 +020049 select SET_FS
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053050
Eugeniy Paltseveb277732018-07-26 16:15:43 +030051config ARCH_HAS_CACHE_LINE_SIZE
52 def_bool y
53
Vineet Gupta0dafafc2013-09-06 14:18:17 +053054config TRACE_IRQFLAGS_SUPPORT
55 def_bool y
56
57config LOCKDEP_SUPPORT
58 def_bool y
59
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053060config SCHED_OMIT_FRAME_POINTER
61 def_bool y
62
63config GENERIC_CSUM
64 def_bool y
65
Vineet Gupta26f9d5f2016-04-18 10:49:56 +053066config ARCH_DISCONTIGMEM_ENABLE
Vineet Guptad140b9b2016-05-31 11:46:47 +053067 def_bool n
Mike Rapoport050b2da2020-12-14 19:10:04 -080068 depends on BROKEN
Vineet Gupta26f9d5f2016-04-18 10:49:56 +053069
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053070config ARCH_FLATMEM_ENABLE
71 def_bool y
72
73config MMU
74 def_bool y
75
Uwe Kleine-Königce816fa2014-04-07 15:39:19 -070076config NO_IOPORT_MAP
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053077 def_bool y
78
79config GENERIC_CALIBRATE_DELAY
80 def_bool y
81
82config GENERIC_HWEIGHT
83 def_bool y
84
Vineet Gupta44c8bb92013-01-18 15:12:23 +053085config STACKTRACE_SUPPORT
86 def_bool y
87 select STACKTRACE
88
Vineet Guptafe6c1b82014-07-08 18:43:47 +053089config HAVE_ARCH_TRANSPARENT_HUGEPAGE
90 def_bool y
91 depends on ARC_MMU_V4
92
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053093menu "ARC Architecture Configuration"
94
Vineet Gupta93ad7002013-01-22 16:51:50 +053095menu "ARC Platform/SoC/Board"
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053096
Christian Ruppert072eb692013-04-12 08:40:59 +020097source "arch/arc/plat-tb10x/Kconfig"
Alexey Brodkin556cc1c2014-01-27 14:51:34 +010098source "arch/arc/plat-axs10x/Kconfig"
Alexey Brodkina518d632017-08-15 21:13:55 +030099source "arch/arc/plat-hsdk/Kconfig"
Vineet Gupta93ad7002013-01-22 16:51:50 +0530100
Vineet Gupta53d98952013-01-18 15:12:25 +0530101endmenu
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530102
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530103choice
104 prompt "ARC Instruction Set"
Kevin Hilmanb7cc40c2018-11-30 15:51:56 +0300105 default ISA_ARCV2
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530106
107config ISA_ARCOMPACT
108 bool "ARCompact ISA"
Zhaoxiu Zengfff7fb02016-05-20 17:03:57 -0700109 select CPU_NO_EFFICIENT_FFS
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530110 help
111 The original ARC ISA of ARC600/700 cores
112
Vineet Gupta65bfbcd2015-03-09 14:01:08 +0530113config ISA_ARCV2
114 bool "ARC ISA v2"
Vineet Guptac4c9a042016-10-31 13:46:38 -0700115 select ARC_TIMERS_64BIT
Vineet Gupta65bfbcd2015-03-09 14:01:08 +0530116 help
117 ISA for the Next Generation ARC-HS cores
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530118
119endchoice
120
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530121menu "ARC CPU Configuration"
122
123choice
124 prompt "ARC Core"
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530125 default ARC_CPU_770 if ISA_ARCOMPACT
126 default ARC_CPU_HS if ISA_ARCV2
127
128if ISA_ARCOMPACT
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530129
130config ARC_CPU_750D
131 bool "ARC750D"
Vineet Gupta14a0abf2015-06-26 12:42:53 +0530132 select ARC_CANT_LLSC
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530133 help
134 Support for ARC750 core
135
136config ARC_CPU_770
137 bool "ARC770"
Vineet Gupta742f8af2013-11-07 14:47:16 +0530138 select ARC_HAS_SWAPE
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530139 help
140 Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
141 This core has a bunch of cool new features:
142 -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
Enrico Weigelt, metux IT consult9a18b5a2019-03-11 14:57:59 +0100143 Shared Address Spaces (for sharing TLB entries in MMU)
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530144 -Caches: New Prog Model, Region Flush
145 -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
146
Enrico Weigelt, metux IT consult9a18b5a2019-03-11 14:57:59 +0100147endif #ISA_ARCOMPACT
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530148
149config ARC_CPU_HS
150 bool "ARC-HS"
151 depends on ISA_ARCV2
152 help
153 Support for ARC HS38x Cores based on ARCv2 ISA
154 The notable features are:
Randy Dunlapa5760db2020-01-31 17:49:33 -0800155 - SMP configurations of up to 4 cores with coherency
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530156 - Optional L2 Cache and IO-Coherency
157 - Revised Interrupt Architecture (multiple priorites, reg banks,
158 auto stack switch, auto regfile save/restore)
159 - MMUv4 (PIPT dcache, Huge Pages)
160 - Instructions for
161 * 64bit load/store: LDD, STD
162 * Hardware assisted divide/remainder: DIV, REM
163 * Function prologue/epilogue: ENTER_S, LEAVE_S
164 * IRQ enable/disable: CLRI, SETI
165 * pop count: FFS, FLS
166 * SETcc, BMSKN, XBFU...
167
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530168endchoice
169
Eugeniy Paltsev0bdd6e72020-06-04 20:39:24 +0300170config ARC_TUNE_MCPU
171 string "Override default -mcpu compiler flag"
172 default ""
173 help
174 Override default -mcpu=xxx compiler flag (which is set depending on
175 the ISA version) with the specified value.
176 NOTE: If specified flag isn't supported by current compiler the
177 ISA default value will be used as a fallback.
178
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530179config CPU_BIG_ENDIAN
180 bool "Enable Big Endian Mode"
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530181 help
182 Build kernel for Big Endian Mode of ARC CPU
183
Vineet Gupta41195d22013-01-18 15:12:23 +0530184config SMP
Vineet Gupta82fea5a2014-09-10 19:05:38 +0530185 bool "Symmetric Multi-Processing"
Vineet Gupta82fea5a2014-09-10 19:05:38 +0530186 select ARC_MCIP if ISA_ARCV2
Vineet Gupta41195d22013-01-18 15:12:23 +0530187 help
Vineet Gupta82fea5a2014-09-10 19:05:38 +0530188 This enables support for systems with more than one CPU.
Vineet Gupta41195d22013-01-18 15:12:23 +0530189
190if SMP
191
Vineet Gupta41195d22013-01-18 15:12:23 +0530192config NR_CPUS
Noam Camus3aa4f802013-06-03 15:19:59 +0300193 int "Maximum number of CPUs (2-4096)"
194 range 2 4096
Vineet Gupta82fea5a2014-09-10 19:05:38 +0530195 default "4"
196
Vineet Gupta3971cdc2015-10-09 11:26:12 +0530197config ARC_SMP_HALT_ON_RESET
198 bool "Enable Halt-on-reset boot mode"
Vineet Gupta3971cdc2015-10-09 11:26:12 +0530199 help
200 In SMP configuration cores can be configured as Halt-on-reset
201 or they could all start at same time. For Halt-on-reset, non
Randy Dunlapa5760db2020-01-31 17:49:33 -0800202 masters are parked until Master kicks them so they can start off
Vineet Gupta3971cdc2015-10-09 11:26:12 +0530203 at designated entry point. For other case, all jump to common
204 entry point and spin wait for Master's signal.
205
Enrico Weigelt, metux IT consult9a18b5a2019-03-11 14:57:59 +0100206endif #SMP
Vineet Gupta41195d22013-01-18 15:12:23 +0530207
Vineet Gupta3ce0fef2016-09-29 10:00:14 -0700208config ARC_MCIP
209 bool "ARConnect Multicore IP (MCIP) Support "
210 depends on ISA_ARCV2
211 default y if SMP
212 help
213 This IP block enables SMP in ARC-HS38 cores.
214 It provides for cross-core interrupts, multi-core debug
215 hardware semaphores, shared memory,....
216
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530217menuconfig ARC_CACHE
218 bool "Enable Cache Support"
219 default y
220
221if ARC_CACHE
222
223config ARC_CACHE_LINE_SHIFT
224 int "Cache Line Length (as power of 2)"
225 range 5 7
226 default "6"
227 help
228 Starting with ARC700 4.9, Cache line length is configurable,
229 This option specifies "N", with Line-len = 2 power N
230 So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
231 Linux only supports same line lengths for I and D caches.
232
233config ARC_HAS_ICACHE
234 bool "Use Instruction Cache"
235 default y
236
237config ARC_HAS_DCACHE
238 bool "Use Data Cache"
239 default y
240
241config ARC_CACHE_PAGES
242 bool "Per Page Cache Control"
243 default y
244 depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
245 help
246 This can be used to over-ride the global I/D Cache Enable on a
247 per-page basis (but only for pages accessed via MMU such as
248 Kernel Virtual address or User Virtual Address)
249 TLB entries have a per-page Cache Enable Bit.
250 Note that Global I/D ENABLE + Per Page DISABLE works but corollary
251 Global DISABLE + Per Page ENABLE won't work
252
Vineet Gupta4102b532013-05-09 21:54:51 +0530253config ARC_CACHE_VIPT_ALIASING
254 bool "Support VIPT Aliasing D$"
Vineet Guptad1f317d2015-04-06 17:23:57 +0530255 depends on ARC_HAS_DCACHE && ISA_ARCOMPACT
Vineet Gupta4102b532013-05-09 21:54:51 +0530256
Enrico Weigelt, metux IT consult9a18b5a2019-03-11 14:57:59 +0100257endif #ARC_CACHE
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530258
Vineet Gupta8b5850f2013-01-18 15:12:25 +0530259config ARC_HAS_ICCM
260 bool "Use ICCM"
261 help
262 Single Cycle RAMS to store Fast Path Code
Vineet Gupta8b5850f2013-01-18 15:12:25 +0530263
264config ARC_ICCM_SZ
265 int "ICCM Size in KB"
266 default "64"
267 depends on ARC_HAS_ICCM
268
269config ARC_HAS_DCCM
270 bool "Use DCCM"
271 help
272 Single Cycle RAMS to store Fast Path Data
Vineet Gupta8b5850f2013-01-18 15:12:25 +0530273
274config ARC_DCCM_SZ
275 int "DCCM Size in KB"
276 default "64"
277 depends on ARC_HAS_DCCM
278
279config ARC_DCCM_BASE
280 hex "DCCM map address"
281 default "0xA0000000"
282 depends on ARC_HAS_DCCM
283
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530284choice
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530285 prompt "MMU Version"
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530286 default ARC_MMU_V3 if ARC_CPU_770
287 default ARC_MMU_V2 if ARC_CPU_750D
Vineet Guptad7a512b2015-04-06 17:22:39 +0530288 default ARC_MMU_V4 if ARC_CPU_HS
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530289
Vineet Guptac583ee4f2015-09-29 16:01:13 +0530290if ISA_ARCOMPACT
291
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530292config ARC_MMU_V1
293 bool "MMU v1"
294 help
295 Orig ARC700 MMU
296
297config ARC_MMU_V2
298 bool "MMU v2"
299 help
Masanari Iida83fc61a2017-09-26 12:47:59 +0900300 Fixed the deficiency of v1 - possible thrashing in memcpy scenario
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530301 when 2 D-TLB and 1 I-TLB entries index into same 2way set.
302
303config ARC_MMU_V3
304 bool "MMU v3"
305 depends on ARC_CPU_770
306 help
307 Introduced with ARC700 4.10: New Features
308 Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
309 Shared Address Spaces (SASID)
310
Vineet Guptac583ee4f2015-09-29 16:01:13 +0530311endif
312
Vineet Guptad7a512b2015-04-06 17:22:39 +0530313config ARC_MMU_V4
314 bool "MMU v4"
315 depends on ISA_ARCV2
316
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530317endchoice
318
319
320choice
321 prompt "MMU Page Size"
322 default ARC_PAGE_SIZE_8K
323
324config ARC_PAGE_SIZE_8K
325 bool "8KB"
326 help
327 Choose between 8k vs 16k
328
329config ARC_PAGE_SIZE_16K
330 bool "16KB"
Alexey Brodkin450ed0d2015-07-16 21:45:17 +0300331 depends on ARC_MMU_V3 || ARC_MMU_V4
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530332
333config ARC_PAGE_SIZE_4K
334 bool "4KB"
Alexey Brodkin450ed0d2015-07-16 21:45:17 +0300335 depends on ARC_MMU_V3 || ARC_MMU_V4
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530336
337endchoice
338
Vineet Gupta37eda9d2016-02-10 06:52:07 +0530339choice
340 prompt "MMU Super Page Size"
341 depends on ISA_ARCV2 && TRANSPARENT_HUGEPAGE
342 default ARC_HUGEPAGE_2M
343
344config ARC_HUGEPAGE_2M
345 bool "2MB"
346
347config ARC_HUGEPAGE_16M
348 bool "16MB"
349
350endchoice
351
Vineet Gupta26f9d5f2016-04-18 10:49:56 +0530352config NODES_SHIFT
353 int "Maximum NUMA Nodes (as a power of 2)"
Noam Camus3528f842016-09-21 13:51:48 +0300354 default "0" if !DISCONTIGMEM
355 default "1" if DISCONTIGMEM
Vineet Gupta26f9d5f2016-04-18 10:49:56 +0530356 depends on NEED_MULTIPLE_NODES
Masahiro Yamadaa7f7f622020-06-14 01:50:22 +0900357 help
Vineet Gupta26f9d5f2016-04-18 10:49:56 +0530358 Accessing memory beyond 1GB (with or w/o PAE) requires 2 memory
359 zones.
360
Vineet Gupta4788a592013-01-18 15:12:22 +0530361config ARC_COMPACT_IRQ_LEVELS
Vineet Guptaf45ba2b2020-01-17 15:04:03 -0800362 depends on ISA_ARCOMPACT
Vineet Gupta60f2b4b2016-05-30 19:21:22 +0530363 bool "Setup Timer IRQ as high Priority"
Vineet Gupta41195d22013-01-18 15:12:23 +0530364 # if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
Vineet Gupta60f2b4b2016-05-30 19:21:22 +0530365 depends on !SMP
Vineet Gupta4788a592013-01-18 15:12:22 +0530366
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530367config ARC_FPU_SAVE_RESTORE
368 bool "Enable FPU state persistence across context switch"
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530369 help
Vineet Guptaf45ba2b2020-01-17 15:04:03 -0800370 ARCompact FPU has internal registers to assist with Double precision
371 Floating Point operations. There are control and stauts registers
372 for floating point exceptions and rounding modes. These are
373 preserved across task context switch when enabled.
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530374
Vineet Guptafbf8e132013-03-30 15:07:47 +0530375config ARC_CANT_LLSC
376 def_bool n
377
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530378config ARC_HAS_LLSC
379 bool "Insn: LLOCK/SCOND (efficient atomic ops)"
380 default y
Vineet Gupta14a0abf2015-06-26 12:42:53 +0530381 depends on !ARC_CANT_LLSC
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530382
383config ARC_HAS_SWAPE
384 bool "Insn: SWAPE (endian-swap)"
385 default y
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530386
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530387if ISA_ARCV2
388
Eugeniy Paltsev76551462019-01-30 19:32:41 +0300389config ARC_USE_UNALIGNED_MEM_ACCESS
390 bool "Enable unaligned access in HW"
391 default y
392 select HAVE_EFFICIENT_UNALIGNED_ACCESS
393 help
394 The ARC HS architecture supports unaligned memory access
395 which is disabled by default. Enable unaligned access in
396 hardware and use software to use it
397
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530398config ARC_HAS_LL64
399 bool "Insn: 64bit LDD/STD"
400 help
401 Enable gcc to generate 64-bit load/store instructions
402 ISA mandates even/odd registers to allow encoding of two
403 dest operands with 2 possible source operands.
404 default y
405
Alexey Brodkind05a76a2015-07-16 21:45:38 +0300406config ARC_HAS_DIV_REM
407 bool "Insn: div, divu, rem, remu"
408 default y
409
Vineet Gupta3d5e8012017-04-20 15:36:51 -0700410config ARC_HAS_ACCL_REGS
Eugeniy Paltsev4827d0c2020-03-05 23:02:50 +0300411 bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6 and/or DSP)"
Vineet Guptaaf1fc5b2018-07-17 15:21:56 -0700412 default y
Vineet Gupta3d5e8012017-04-20 15:36:51 -0700413 help
414 Depending on the configuration, CPU can contain accumulator reg-pair
415 (also referred to as r58:r59). These can also be used by gcc as GPR so
416 kernel needs to save/restore per process
417
Eugeniy Paltsev4827d0c2020-03-05 23:02:50 +0300418config ARC_DSP_HANDLED
419 def_bool n
420
Eugeniy Paltsev7321e2e2020-03-05 23:02:51 +0300421config ARC_DSP_SAVE_RESTORE_REGS
422 def_bool n
423
Eugeniy Paltsev4827d0c2020-03-05 23:02:50 +0300424choice
425 prompt "DSP support"
426 default ARC_DSP_NONE
427 help
428 Depending on the configuration, CPU can contain DSP registers
429 (ACC0_GLO, ACC0_GHI, DSP_BFLY0, DSP_CTRL, DSP_FFT_CTRL).
430 Bellow is options describing how to handle these registers in
431 interrupt entry / exit and in context switch.
432
433config ARC_DSP_NONE
434 bool "No DSP extension presence in HW"
435 help
436 No DSP extension presence in HW
437
438config ARC_DSP_KERNEL
439 bool "DSP extension in HW, no support for userspace"
440 select ARC_HAS_ACCL_REGS
441 select ARC_DSP_HANDLED
442 help
443 DSP extension presence in HW, no support for DSP-enabled userspace
444 applications. We don't save / restore DSP registers and only do
445 some minimal preparations so userspace won't be able to break kernel
Eugeniy Paltsev7321e2e2020-03-05 23:02:51 +0300446
447config ARC_DSP_USERSPACE
448 bool "Support DSP for userspace apps"
449 select ARC_HAS_ACCL_REGS
450 select ARC_DSP_HANDLED
451 select ARC_DSP_SAVE_RESTORE_REGS
452 help
453 DSP extension presence in HW, support save / restore DSP registers to
454 run DSP-enabled userspace applications
Eugeniy Paltsevf09d3172020-03-05 23:02:52 +0300455
456config ARC_DSP_AGU_USERSPACE
457 bool "Support DSP with AGU for userspace apps"
458 select ARC_HAS_ACCL_REGS
459 select ARC_DSP_HANDLED
460 select ARC_DSP_SAVE_RESTORE_REGS
461 help
462 DSP and AGU extensions presence in HW, support save / restore DSP
463 and AGU registers to run DSP-enabled userspace applications
Eugeniy Paltsev4827d0c2020-03-05 23:02:50 +0300464endchoice
465
Vineet Guptae4942392018-06-06 10:20:37 -0700466config ARC_IRQ_NO_AUTOSAVE
467 bool "Disable hardware autosave regfile on interrupts"
468 default n
469 help
470 On HS cores, taken interrupt auto saves the regfile on stack.
471 This is programmable and can be optionally disabled in which case
472 software INTERRUPT_PROLOGUE/EPILGUE do the needed work
473
Eugeniy Paltsev10011f72020-06-04 20:39:25 +0300474config ARC_LPB_DISABLE
475 bool "Disable loop buffer (LPB)"
476 help
477 On HS cores, loop buffer (LPB) is programmable in runtime and can
478 be optionally disabled.
479
Enrico Weigelt, metux IT consult9a18b5a2019-03-11 14:57:59 +0100480endif # ISA_ARCV2
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530481
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530482endmenu # "ARC CPU Configuration"
483
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530484config LINUX_LINK_BASE
Eugeniy Paltsev9ed68782017-08-15 21:13:54 +0300485 hex "Kernel link address"
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530486 default "0x80000000"
487 help
488 ARC700 divides the 32 bit phy address space into two equal halves
489 -Lower 2G (0 - 0x7FFF_FFFF ) is user virtual, translated by MMU
490 -Upper 2G (0x8000_0000 onwards) is untranslated, for kernel
491 Typically Linux kernel is linked at the start of untransalted addr,
492 hence the default value of 0x8zs.
493 However some customers have peripherals mapped at this addr, so
494 Linux needs to be scooted a bit.
495 If you don't know what the above means, leave this setting alone.
Vineet Guptaff1c0b62015-12-15 13:57:16 +0530496 This needs to match memory start address specified in Device Tree
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530497
Eugeniy Paltsev9ed68782017-08-15 21:13:54 +0300498config LINUX_RAM_BASE
499 hex "RAM base address"
500 default LINUX_LINK_BASE
501 help
502 By default Linux is linked at base of RAM. However in some special
503 cases (such as HSDK), Linux can't be linked at start of DDR, hence
504 this option.
505
Vineet Gupta45890f62015-03-09 18:53:49 +0530506config HIGHMEM
507 bool "High Memory Support"
Mike Rapoport050b2da2020-12-14 19:10:04 -0800508 select HAVE_ARCH_PFN_VALID
Thomas Gleixner39cac192020-11-03 10:27:21 +0100509 select KMAP_LOCAL
Vineet Gupta45890f62015-03-09 18:53:49 +0530510 help
511 With ARC 2G:2G address split, only upper 2G is directly addressable by
512 kernel. Enable this to potentially allow access to rest of 2G and PAE
513 in future
514
Vineet Gupta5a364c22015-02-06 18:44:57 +0300515config ARC_HAS_PAE40
516 bool "Support for the 40-bit Physical Address Extension"
Vineet Gupta5a364c22015-02-06 18:44:57 +0300517 depends on ISA_ARCV2
Alexey Brodkincf4100d2017-05-05 23:20:29 +0300518 select HIGHMEM
Christoph Hellwigd4a451d2018-04-03 16:24:20 +0200519 select PHYS_ADDR_T_64BIT
Vineet Gupta5a364c22015-02-06 18:44:57 +0300520 help
521 Enable access to physical memory beyond 4G, only supported on
522 ARC cores with 40 bit Physical Addressing support
523
Noam Camus15ca68a2014-09-07 22:52:33 +0300524config ARC_KVADDR_SIZE
Masanari Iida83fc61a2017-09-26 12:47:59 +0900525 int "Kernel Virtual Address Space size (MB)"
Noam Camus15ca68a2014-09-07 22:52:33 +0300526 range 0 512
527 default "256"
528 help
529 The kernel address space is carved out of 256MB of translated address
530 space for catering to vmalloc, modules, pkmap, fixmap. This however may
531 not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
532 this to be stretched to 512 MB (by extending into the reserved
533 kernel-user gutter)
534
Vineet Gupta080c3742013-02-11 19:52:57 +0530535config ARC_CURR_IN_REG
536 bool "Dedicate Register r25 for current_task pointer"
537 default y
538 help
539 This reserved Register R25 to point to Current Task in
540 kernel mode. This saves memory access for each such access
541
Vineet Gupta2e651ea2013-01-23 16:30:36 +0530542
Vineet Gupta1736a562014-09-08 11:18:15 +0530543config ARC_EMUL_UNALIGNED
Vineet Gupta2e651ea2013-01-23 16:30:36 +0530544 bool "Emulate unaligned memory access (userspace only)"
Vineet Gupta2e651ea2013-01-23 16:30:36 +0530545 select SYSCTL_ARCH_UNALIGN_NO_WARN
546 select SYSCTL_ARCH_UNALIGN_ALLOW
Vineet Gupta1f6ccff2013-05-13 18:30:41 +0530547 depends on ISA_ARCOMPACT
Vineet Gupta2e651ea2013-01-23 16:30:36 +0530548 help
549 This enables misaligned 16 & 32 bit memory access from user space.
550 Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
551 potential bugs in code
552
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530553config HZ
554 int "Timer Frequency"
555 default 100
556
Vineet Guptacbe056f2013-01-18 15:12:25 +0530557config ARC_METAWARE_HLINK
558 bool "Support for Metaware debugger assisted Host access"
Vineet Guptacbe056f2013-01-18 15:12:25 +0530559 help
560 This options allows a Linux userland apps to directly access
561 host file system (open/creat/read/write etc) with help from
562 Metaware Debugger. This can come in handy for Linux-host communication
563 when there is no real usable peripheral such as EMAC.
564
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530565menuconfig ARC_DBG
566 bool "ARC debugging"
567 default y
568
Vineet Guptaaa6083e2014-11-07 10:45:28 +0530569if ARC_DBG
570
Vineet Gupta854a0d92013-01-22 17:03:19 +0530571config ARC_DW2_UNWIND
572 bool "Enable DWARF specific kernel stack unwind"
Vineet Gupta854a0d92013-01-22 17:03:19 +0530573 default y
574 select KALLSYMS
575 help
576 Compiles the kernel with DWARF unwind information and can be used
577 to get stack backtraces.
578
579 If you say Y here the resulting kernel image will be slightly larger
580 but not slower, and it will give very useful debugging information.
581 If you don't debug the kernel, you can say N, but we may not be able
582 to solve problems without frame unwind information
583
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530584config ARC_DBG_TLB_PARANOIA
585 bool "Paranoia Checks in Low Level TLB Handlers"
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530586
Eugeniy Paltsevf091d5a2019-11-08 19:20:22 +0300587config ARC_DBG_JUMP_LABEL
588 bool "Paranoid checks in Static Keys (jump labels) code"
589 depends on JUMP_LABEL
590 default y if STATIC_KEYS_SELFTEST
591 help
592 Enable paranoid checks and self-test of both ARC-specific and generic
593 part of static keys (jump labels) related code.
Vineet Guptaaa6083e2014-11-07 10:45:28 +0530594endif
595
Vineet Gupta999159a2013-01-22 17:00:52 +0530596config ARC_BUILTIN_DTB_NAME
597 string "Built in DTB"
598 help
599 Set the name of the DTB to embed in the vmlinux binary
600 Leaving it blank selects the minimal "skeleton" dtb
601
Vineet Guptacfdbc2e2013-01-18 15:12:20 +0530602endmenu # "ARC Architecture Configuration"
603
Vineet Gupta37eda9d2016-02-10 06:52:07 +0530604config FORCE_MAX_ZONEORDER
605 int "Maximum zone order"
606 default "12" if ARC_HUGEPAGE_16M
607 default "11"
608
Alexey Brodkin996bad62014-10-29 15:26:25 +0300609source "kernel/power/Kconfig"