18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci#
38c2ecf20Sopenharmony_ci# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
48c2ecf20Sopenharmony_ci#
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciconfig ARC
78c2ecf20Sopenharmony_ci	def_bool y
88c2ecf20Sopenharmony_ci	select ARC_TIMERS
98c2ecf20Sopenharmony_ci	select ARCH_HAS_DEBUG_VM_PGTABLE
108c2ecf20Sopenharmony_ci	select ARCH_HAS_DMA_PREP_COHERENT
118c2ecf20Sopenharmony_ci	select ARCH_HAS_PTE_SPECIAL
128c2ecf20Sopenharmony_ci	select ARCH_HAS_SETUP_DMA_OPS
138c2ecf20Sopenharmony_ci	select ARCH_HAS_SYNC_DMA_FOR_CPU
148c2ecf20Sopenharmony_ci	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
158c2ecf20Sopenharmony_ci	select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
168c2ecf20Sopenharmony_ci	select ARCH_32BIT_OFF_T
178c2ecf20Sopenharmony_ci	select BUILDTIME_TABLE_SORT
188c2ecf20Sopenharmony_ci	select CLONE_BACKWARDS
198c2ecf20Sopenharmony_ci	select COMMON_CLK
208c2ecf20Sopenharmony_ci	select DMA_DIRECT_REMAP
218c2ecf20Sopenharmony_ci	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
228c2ecf20Sopenharmony_ci	select GENERIC_CLOCKEVENTS
238c2ecf20Sopenharmony_ci	select GENERIC_FIND_FIRST_BIT
248c2ecf20Sopenharmony_ci	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
258c2ecf20Sopenharmony_ci	select GENERIC_IRQ_SHOW
268c2ecf20Sopenharmony_ci	select GENERIC_PCI_IOMAP
278c2ecf20Sopenharmony_ci	select GENERIC_PENDING_IRQ if SMP
288c2ecf20Sopenharmony_ci	select GENERIC_SCHED_CLOCK
298c2ecf20Sopenharmony_ci	select GENERIC_SMP_IDLE_THREAD
308c2ecf20Sopenharmony_ci	select HAVE_ARCH_KGDB
318c2ecf20Sopenharmony_ci	select HAVE_ARCH_TRACEHOOK
328c2ecf20Sopenharmony_ci	select HAVE_DEBUG_STACKOVERFLOW
338c2ecf20Sopenharmony_ci	select HAVE_DEBUG_KMEMLEAK
348c2ecf20Sopenharmony_ci	select HAVE_FUTEX_CMPXCHG if FUTEX
358c2ecf20Sopenharmony_ci	select HAVE_IOREMAP_PROT
368c2ecf20Sopenharmony_ci	select HAVE_KERNEL_GZIP
378c2ecf20Sopenharmony_ci	select HAVE_KERNEL_LZMA
388c2ecf20Sopenharmony_ci	select HAVE_KPROBES
398c2ecf20Sopenharmony_ci	select HAVE_KRETPROBES
408c2ecf20Sopenharmony_ci	select HAVE_MOD_ARCH_SPECIFIC
418c2ecf20Sopenharmony_ci	select HAVE_OPROFILE
428c2ecf20Sopenharmony_ci	select HAVE_PERF_EVENTS
438c2ecf20Sopenharmony_ci	select HANDLE_DOMAIN_IRQ
448c2ecf20Sopenharmony_ci	select IRQ_DOMAIN
458c2ecf20Sopenharmony_ci	select MODULES_USE_ELF_RELA
468c2ecf20Sopenharmony_ci	select OF
478c2ecf20Sopenharmony_ci	select OF_EARLY_FLATTREE
488c2ecf20Sopenharmony_ci	select PCI_SYSCALL if PCI
498c2ecf20Sopenharmony_ci	select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
508c2ecf20Sopenharmony_ci	select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
518c2ecf20Sopenharmony_ci	select SET_FS
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciconfig ARCH_HAS_CACHE_LINE_SIZE
548c2ecf20Sopenharmony_ci	def_bool y
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciconfig TRACE_IRQFLAGS_SUPPORT
578c2ecf20Sopenharmony_ci	def_bool y
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ciconfig LOCKDEP_SUPPORT
608c2ecf20Sopenharmony_ci	def_bool y
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ciconfig SCHED_OMIT_FRAME_POINTER
638c2ecf20Sopenharmony_ci	def_bool y
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciconfig GENERIC_CSUM
668c2ecf20Sopenharmony_ci	def_bool y
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ciconfig ARCH_DISCONTIGMEM_ENABLE
698c2ecf20Sopenharmony_ci	def_bool n
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ciconfig ARCH_FLATMEM_ENABLE
728c2ecf20Sopenharmony_ci	def_bool y
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciconfig MMU
758c2ecf20Sopenharmony_ci	def_bool y
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ciconfig NO_IOPORT_MAP
788c2ecf20Sopenharmony_ci	def_bool y
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ciconfig GENERIC_CALIBRATE_DELAY
818c2ecf20Sopenharmony_ci	def_bool y
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ciconfig GENERIC_HWEIGHT
848c2ecf20Sopenharmony_ci	def_bool y
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ciconfig STACKTRACE_SUPPORT
878c2ecf20Sopenharmony_ci	def_bool y
888c2ecf20Sopenharmony_ci	select STACKTRACE
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ciconfig HAVE_ARCH_TRANSPARENT_HUGEPAGE
918c2ecf20Sopenharmony_ci	def_bool y
928c2ecf20Sopenharmony_ci	depends on ARC_MMU_V4
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_cimenu "ARC Architecture Configuration"
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_cimenu "ARC Platform/SoC/Board"
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_cisource "arch/arc/plat-tb10x/Kconfig"
998c2ecf20Sopenharmony_cisource "arch/arc/plat-axs10x/Kconfig"
1008c2ecf20Sopenharmony_cisource "arch/arc/plat-hsdk/Kconfig"
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ciendmenu
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_cichoice
1058c2ecf20Sopenharmony_ci	prompt "ARC Instruction Set"
1068c2ecf20Sopenharmony_ci	default ISA_ARCV2
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ciconfig ISA_ARCOMPACT
1098c2ecf20Sopenharmony_ci	bool "ARCompact ISA"
1108c2ecf20Sopenharmony_ci	select CPU_NO_EFFICIENT_FFS
1118c2ecf20Sopenharmony_ci	help
1128c2ecf20Sopenharmony_ci	  The original ARC ISA of ARC600/700 cores
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ciconfig ISA_ARCV2
1158c2ecf20Sopenharmony_ci	bool "ARC ISA v2"
1168c2ecf20Sopenharmony_ci	select ARC_TIMERS_64BIT
1178c2ecf20Sopenharmony_ci	help
1188c2ecf20Sopenharmony_ci	  ISA for the Next Generation ARC-HS cores
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ciendchoice
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_cimenu "ARC CPU Configuration"
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_cichoice
1258c2ecf20Sopenharmony_ci	prompt "ARC Core"
1268c2ecf20Sopenharmony_ci	default ARC_CPU_770 if ISA_ARCOMPACT
1278c2ecf20Sopenharmony_ci	default ARC_CPU_HS if ISA_ARCV2
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ciif ISA_ARCOMPACT
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ciconfig ARC_CPU_750D
1328c2ecf20Sopenharmony_ci	bool "ARC750D"
1338c2ecf20Sopenharmony_ci	select ARC_CANT_LLSC
1348c2ecf20Sopenharmony_ci	help
1358c2ecf20Sopenharmony_ci	  Support for ARC750 core
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ciconfig ARC_CPU_770
1388c2ecf20Sopenharmony_ci	bool "ARC770"
1398c2ecf20Sopenharmony_ci	select ARC_HAS_SWAPE
1408c2ecf20Sopenharmony_ci	help
1418c2ecf20Sopenharmony_ci	  Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
1428c2ecf20Sopenharmony_ci	  This core has a bunch of cool new features:
1438c2ecf20Sopenharmony_ci	  -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
1448c2ecf20Sopenharmony_ci	           Shared Address Spaces (for sharing TLB entries in MMU)
1458c2ecf20Sopenharmony_ci	  -Caches: New Prog Model, Region Flush
1468c2ecf20Sopenharmony_ci	  -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ciendif #ISA_ARCOMPACT
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ciconfig ARC_CPU_HS
1518c2ecf20Sopenharmony_ci	bool "ARC-HS"
1528c2ecf20Sopenharmony_ci	depends on ISA_ARCV2
1538c2ecf20Sopenharmony_ci	help
1548c2ecf20Sopenharmony_ci	  Support for ARC HS38x Cores based on ARCv2 ISA
1558c2ecf20Sopenharmony_ci	  The notable features are:
1568c2ecf20Sopenharmony_ci	    - SMP configurations of up to 4 cores with coherency
1578c2ecf20Sopenharmony_ci	    - Optional L2 Cache and IO-Coherency
1588c2ecf20Sopenharmony_ci	    - Revised Interrupt Architecture (multiple priorites, reg banks,
1598c2ecf20Sopenharmony_ci	        auto stack switch, auto regfile save/restore)
1608c2ecf20Sopenharmony_ci	    - MMUv4 (PIPT dcache, Huge Pages)
1618c2ecf20Sopenharmony_ci	    - Instructions for
1628c2ecf20Sopenharmony_ci		* 64bit load/store: LDD, STD
1638c2ecf20Sopenharmony_ci		* Hardware assisted divide/remainder: DIV, REM
1648c2ecf20Sopenharmony_ci		* Function prologue/epilogue: ENTER_S, LEAVE_S
1658c2ecf20Sopenharmony_ci		* IRQ enable/disable: CLRI, SETI
1668c2ecf20Sopenharmony_ci		* pop count: FFS, FLS
1678c2ecf20Sopenharmony_ci		* SETcc, BMSKN, XBFU...
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ciendchoice
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ciconfig ARC_TUNE_MCPU
1728c2ecf20Sopenharmony_ci	string "Override default -mcpu compiler flag"
1738c2ecf20Sopenharmony_ci	default ""
1748c2ecf20Sopenharmony_ci	help
1758c2ecf20Sopenharmony_ci	  Override default -mcpu=xxx compiler flag (which is set depending on
1768c2ecf20Sopenharmony_ci	  the ISA version) with the specified value.
1778c2ecf20Sopenharmony_ci	  NOTE: If specified flag isn't supported by current compiler the
1788c2ecf20Sopenharmony_ci	  ISA default value will be used as a fallback.
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_ciconfig CPU_BIG_ENDIAN
1818c2ecf20Sopenharmony_ci	bool "Enable Big Endian Mode"
1828c2ecf20Sopenharmony_ci	help
1838c2ecf20Sopenharmony_ci	  Build kernel for Big Endian Mode of ARC CPU
1848c2ecf20Sopenharmony_ci
1858c2ecf20Sopenharmony_ciconfig SMP
1868c2ecf20Sopenharmony_ci	bool "Symmetric Multi-Processing"
1878c2ecf20Sopenharmony_ci	select ARC_MCIP if ISA_ARCV2
1888c2ecf20Sopenharmony_ci	help
1898c2ecf20Sopenharmony_ci	  This enables support for systems with more than one CPU.
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ciif SMP
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ciconfig NR_CPUS
1948c2ecf20Sopenharmony_ci	int "Maximum number of CPUs (2-4096)"
1958c2ecf20Sopenharmony_ci	range 2 4096
1968c2ecf20Sopenharmony_ci	default "4"
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ciconfig ARC_SMP_HALT_ON_RESET
1998c2ecf20Sopenharmony_ci	bool "Enable Halt-on-reset boot mode"
2008c2ecf20Sopenharmony_ci	help
2018c2ecf20Sopenharmony_ci	  In SMP configuration cores can be configured as Halt-on-reset
2028c2ecf20Sopenharmony_ci	  or they could all start at same time. For Halt-on-reset, non
2038c2ecf20Sopenharmony_ci	  masters are parked until Master kicks them so they can start off
2048c2ecf20Sopenharmony_ci	  at designated entry point. For other case, all jump to common
2058c2ecf20Sopenharmony_ci	  entry point and spin wait for Master's signal.
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_ciendif #SMP
2088c2ecf20Sopenharmony_ci
2098c2ecf20Sopenharmony_ciconfig ARC_MCIP
2108c2ecf20Sopenharmony_ci	bool "ARConnect Multicore IP (MCIP) Support "
2118c2ecf20Sopenharmony_ci	depends on ISA_ARCV2
2128c2ecf20Sopenharmony_ci	default y if SMP
2138c2ecf20Sopenharmony_ci	help
2148c2ecf20Sopenharmony_ci	  This IP block enables SMP in ARC-HS38 cores.
2158c2ecf20Sopenharmony_ci	  It provides for cross-core interrupts, multi-core debug
2168c2ecf20Sopenharmony_ci	  hardware semaphores, shared memory,....
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_cimenuconfig ARC_CACHE
2198c2ecf20Sopenharmony_ci	bool "Enable Cache Support"
2208c2ecf20Sopenharmony_ci	default y
2218c2ecf20Sopenharmony_ci
2228c2ecf20Sopenharmony_ciif ARC_CACHE
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ciconfig ARC_CACHE_LINE_SHIFT
2258c2ecf20Sopenharmony_ci	int "Cache Line Length (as power of 2)"
2268c2ecf20Sopenharmony_ci	range 5 7
2278c2ecf20Sopenharmony_ci	default "6"
2288c2ecf20Sopenharmony_ci	help
2298c2ecf20Sopenharmony_ci	  Starting with ARC700 4.9, Cache line length is configurable,
2308c2ecf20Sopenharmony_ci	  This option specifies "N", with Line-len = 2 power N
2318c2ecf20Sopenharmony_ci	  So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
2328c2ecf20Sopenharmony_ci	  Linux only supports same line lengths for I and D caches.
2338c2ecf20Sopenharmony_ci
2348c2ecf20Sopenharmony_ciconfig ARC_HAS_ICACHE
2358c2ecf20Sopenharmony_ci	bool "Use Instruction Cache"
2368c2ecf20Sopenharmony_ci	default y
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ciconfig ARC_HAS_DCACHE
2398c2ecf20Sopenharmony_ci	bool "Use Data Cache"
2408c2ecf20Sopenharmony_ci	default y
2418c2ecf20Sopenharmony_ci
2428c2ecf20Sopenharmony_ciconfig ARC_CACHE_PAGES
2438c2ecf20Sopenharmony_ci	bool "Per Page Cache Control"
2448c2ecf20Sopenharmony_ci	default y
2458c2ecf20Sopenharmony_ci	depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
2468c2ecf20Sopenharmony_ci	help
2478c2ecf20Sopenharmony_ci	  This can be used to over-ride the global I/D Cache Enable on a
2488c2ecf20Sopenharmony_ci	  per-page basis (but only for pages accessed via MMU such as
2498c2ecf20Sopenharmony_ci	  Kernel Virtual address or User Virtual Address)
2508c2ecf20Sopenharmony_ci	  TLB entries have a per-page Cache Enable Bit.
2518c2ecf20Sopenharmony_ci	  Note that Global I/D ENABLE + Per Page DISABLE works but corollary
2528c2ecf20Sopenharmony_ci	  Global DISABLE + Per Page ENABLE won't work
2538c2ecf20Sopenharmony_ci
2548c2ecf20Sopenharmony_ciconfig ARC_CACHE_VIPT_ALIASING
2558c2ecf20Sopenharmony_ci	bool "Support VIPT Aliasing D$"
2568c2ecf20Sopenharmony_ci	depends on ARC_HAS_DCACHE && ISA_ARCOMPACT
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_ciendif #ARC_CACHE
2598c2ecf20Sopenharmony_ci
2608c2ecf20Sopenharmony_ciconfig ARC_HAS_ICCM
2618c2ecf20Sopenharmony_ci	bool "Use ICCM"
2628c2ecf20Sopenharmony_ci	help
2638c2ecf20Sopenharmony_ci	  Single Cycle RAMS to store Fast Path Code
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ciconfig ARC_ICCM_SZ
2668c2ecf20Sopenharmony_ci	int "ICCM Size in KB"
2678c2ecf20Sopenharmony_ci	default "64"
2688c2ecf20Sopenharmony_ci	depends on ARC_HAS_ICCM
2698c2ecf20Sopenharmony_ci
2708c2ecf20Sopenharmony_ciconfig ARC_HAS_DCCM
2718c2ecf20Sopenharmony_ci	bool "Use DCCM"
2728c2ecf20Sopenharmony_ci	help
2738c2ecf20Sopenharmony_ci	  Single Cycle RAMS to store Fast Path Data
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_ciconfig ARC_DCCM_SZ
2768c2ecf20Sopenharmony_ci	int "DCCM Size in KB"
2778c2ecf20Sopenharmony_ci	default "64"
2788c2ecf20Sopenharmony_ci	depends on ARC_HAS_DCCM
2798c2ecf20Sopenharmony_ci
2808c2ecf20Sopenharmony_ciconfig ARC_DCCM_BASE
2818c2ecf20Sopenharmony_ci	hex "DCCM map address"
2828c2ecf20Sopenharmony_ci	default "0xA0000000"
2838c2ecf20Sopenharmony_ci	depends on ARC_HAS_DCCM
2848c2ecf20Sopenharmony_ci
2858c2ecf20Sopenharmony_cichoice
2868c2ecf20Sopenharmony_ci	prompt "MMU Version"
2878c2ecf20Sopenharmony_ci	default ARC_MMU_V3 if ARC_CPU_770
2888c2ecf20Sopenharmony_ci	default ARC_MMU_V2 if ARC_CPU_750D
2898c2ecf20Sopenharmony_ci	default ARC_MMU_V4 if ARC_CPU_HS
2908c2ecf20Sopenharmony_ci
2918c2ecf20Sopenharmony_ciif ISA_ARCOMPACT
2928c2ecf20Sopenharmony_ci
2938c2ecf20Sopenharmony_ciconfig ARC_MMU_V1
2948c2ecf20Sopenharmony_ci	bool "MMU v1"
2958c2ecf20Sopenharmony_ci	help
2968c2ecf20Sopenharmony_ci	  Orig ARC700 MMU
2978c2ecf20Sopenharmony_ci
2988c2ecf20Sopenharmony_ciconfig ARC_MMU_V2
2998c2ecf20Sopenharmony_ci	bool "MMU v2"
3008c2ecf20Sopenharmony_ci	help
3018c2ecf20Sopenharmony_ci	  Fixed the deficiency of v1 - possible thrashing in memcpy scenario
3028c2ecf20Sopenharmony_ci	  when 2 D-TLB and 1 I-TLB entries index into same 2way set.
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_ciconfig ARC_MMU_V3
3058c2ecf20Sopenharmony_ci	bool "MMU v3"
3068c2ecf20Sopenharmony_ci	depends on ARC_CPU_770
3078c2ecf20Sopenharmony_ci	help
3088c2ecf20Sopenharmony_ci	  Introduced with ARC700 4.10: New Features
3098c2ecf20Sopenharmony_ci	  Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
3108c2ecf20Sopenharmony_ci	  Shared Address Spaces (SASID)
3118c2ecf20Sopenharmony_ci
3128c2ecf20Sopenharmony_ciendif
3138c2ecf20Sopenharmony_ci
3148c2ecf20Sopenharmony_ciconfig ARC_MMU_V4
3158c2ecf20Sopenharmony_ci	bool "MMU v4"
3168c2ecf20Sopenharmony_ci	depends on ISA_ARCV2
3178c2ecf20Sopenharmony_ci
3188c2ecf20Sopenharmony_ciendchoice
3198c2ecf20Sopenharmony_ci
3208c2ecf20Sopenharmony_ci
3218c2ecf20Sopenharmony_cichoice
3228c2ecf20Sopenharmony_ci	prompt "MMU Page Size"
3238c2ecf20Sopenharmony_ci	default ARC_PAGE_SIZE_8K
3248c2ecf20Sopenharmony_ci
3258c2ecf20Sopenharmony_ciconfig ARC_PAGE_SIZE_8K
3268c2ecf20Sopenharmony_ci	bool "8KB"
3278c2ecf20Sopenharmony_ci	help
3288c2ecf20Sopenharmony_ci	  Choose between 8k vs 16k
3298c2ecf20Sopenharmony_ci
3308c2ecf20Sopenharmony_ciconfig ARC_PAGE_SIZE_16K
3318c2ecf20Sopenharmony_ci	bool "16KB"
3328c2ecf20Sopenharmony_ci	depends on ARC_MMU_V3 || ARC_MMU_V4
3338c2ecf20Sopenharmony_ci
3348c2ecf20Sopenharmony_ciconfig ARC_PAGE_SIZE_4K
3358c2ecf20Sopenharmony_ci	bool "4KB"
3368c2ecf20Sopenharmony_ci	depends on ARC_MMU_V3 || ARC_MMU_V4
3378c2ecf20Sopenharmony_ci
3388c2ecf20Sopenharmony_ciendchoice
3398c2ecf20Sopenharmony_ci
3408c2ecf20Sopenharmony_cichoice
3418c2ecf20Sopenharmony_ci	prompt "MMU Super Page Size"
3428c2ecf20Sopenharmony_ci	depends on ISA_ARCV2 && TRANSPARENT_HUGEPAGE
3438c2ecf20Sopenharmony_ci	default ARC_HUGEPAGE_2M
3448c2ecf20Sopenharmony_ci
3458c2ecf20Sopenharmony_ciconfig ARC_HUGEPAGE_2M
3468c2ecf20Sopenharmony_ci	bool "2MB"
3478c2ecf20Sopenharmony_ci
3488c2ecf20Sopenharmony_ciconfig ARC_HUGEPAGE_16M
3498c2ecf20Sopenharmony_ci	bool "16MB"
3508c2ecf20Sopenharmony_ci
3518c2ecf20Sopenharmony_ciendchoice
3528c2ecf20Sopenharmony_ci
3538c2ecf20Sopenharmony_ciconfig NODES_SHIFT
3548c2ecf20Sopenharmony_ci	int "Maximum NUMA Nodes (as a power of 2)"
3558c2ecf20Sopenharmony_ci	default "0" if !DISCONTIGMEM
3568c2ecf20Sopenharmony_ci	default "1" if DISCONTIGMEM
3578c2ecf20Sopenharmony_ci	depends on NEED_MULTIPLE_NODES
3588c2ecf20Sopenharmony_ci	help
3598c2ecf20Sopenharmony_ci	  Accessing memory beyond 1GB (with or w/o PAE) requires 2 memory
3608c2ecf20Sopenharmony_ci	  zones.
3618c2ecf20Sopenharmony_ci
3628c2ecf20Sopenharmony_ciconfig ARC_COMPACT_IRQ_LEVELS
3638c2ecf20Sopenharmony_ci	depends on ISA_ARCOMPACT
3648c2ecf20Sopenharmony_ci	bool "Setup Timer IRQ as high Priority"
3658c2ecf20Sopenharmony_ci	# if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
3668c2ecf20Sopenharmony_ci	depends on !SMP
3678c2ecf20Sopenharmony_ci
3688c2ecf20Sopenharmony_ciconfig ARC_FPU_SAVE_RESTORE
3698c2ecf20Sopenharmony_ci	bool "Enable FPU state persistence across context switch"
3708c2ecf20Sopenharmony_ci	help
3718c2ecf20Sopenharmony_ci	  ARCompact FPU has internal registers to assist with Double precision
3728c2ecf20Sopenharmony_ci	  Floating Point operations. There are control and stauts registers
3738c2ecf20Sopenharmony_ci	  for floating point exceptions and rounding modes. These are
3748c2ecf20Sopenharmony_ci	  preserved across task context switch when enabled.
3758c2ecf20Sopenharmony_ci
3768c2ecf20Sopenharmony_ciconfig ARC_CANT_LLSC
3778c2ecf20Sopenharmony_ci	def_bool n
3788c2ecf20Sopenharmony_ci
3798c2ecf20Sopenharmony_ciconfig ARC_HAS_LLSC
3808c2ecf20Sopenharmony_ci	bool "Insn: LLOCK/SCOND (efficient atomic ops)"
3818c2ecf20Sopenharmony_ci	default y
3828c2ecf20Sopenharmony_ci	depends on !ARC_CANT_LLSC
3838c2ecf20Sopenharmony_ci
3848c2ecf20Sopenharmony_ciconfig ARC_HAS_SWAPE
3858c2ecf20Sopenharmony_ci	bool "Insn: SWAPE (endian-swap)"
3868c2ecf20Sopenharmony_ci	default y
3878c2ecf20Sopenharmony_ci
3888c2ecf20Sopenharmony_ciif ISA_ARCV2
3898c2ecf20Sopenharmony_ci
3908c2ecf20Sopenharmony_ciconfig ARC_USE_UNALIGNED_MEM_ACCESS
3918c2ecf20Sopenharmony_ci	bool "Enable unaligned access in HW"
3928c2ecf20Sopenharmony_ci	default y
3938c2ecf20Sopenharmony_ci	select HAVE_EFFICIENT_UNALIGNED_ACCESS
3948c2ecf20Sopenharmony_ci	help
3958c2ecf20Sopenharmony_ci	  The ARC HS architecture supports unaligned memory access
3968c2ecf20Sopenharmony_ci	  which is disabled by default. Enable unaligned access in
3978c2ecf20Sopenharmony_ci	  hardware and use software to use it
3988c2ecf20Sopenharmony_ci
3998c2ecf20Sopenharmony_ciconfig ARC_HAS_LL64
4008c2ecf20Sopenharmony_ci	bool "Insn: 64bit LDD/STD"
4018c2ecf20Sopenharmony_ci	help
4028c2ecf20Sopenharmony_ci	  Enable gcc to generate 64-bit load/store instructions
4038c2ecf20Sopenharmony_ci	  ISA mandates even/odd registers to allow encoding of two
4048c2ecf20Sopenharmony_ci	  dest operands with 2 possible source operands.
4058c2ecf20Sopenharmony_ci	default y
4068c2ecf20Sopenharmony_ci
4078c2ecf20Sopenharmony_ciconfig ARC_HAS_DIV_REM
4088c2ecf20Sopenharmony_ci	bool "Insn: div, divu, rem, remu"
4098c2ecf20Sopenharmony_ci	default y
4108c2ecf20Sopenharmony_ci
4118c2ecf20Sopenharmony_ciconfig ARC_HAS_ACCL_REGS
4128c2ecf20Sopenharmony_ci	bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6 and/or DSP)"
4138c2ecf20Sopenharmony_ci	default y
4148c2ecf20Sopenharmony_ci	help
4158c2ecf20Sopenharmony_ci	  Depending on the configuration, CPU can contain accumulator reg-pair
4168c2ecf20Sopenharmony_ci	  (also referred to as r58:r59). These can also be used by gcc as GPR so
4178c2ecf20Sopenharmony_ci	  kernel needs to save/restore per process
4188c2ecf20Sopenharmony_ci
4198c2ecf20Sopenharmony_ciconfig ARC_DSP_HANDLED
4208c2ecf20Sopenharmony_ci	def_bool n
4218c2ecf20Sopenharmony_ci
4228c2ecf20Sopenharmony_ciconfig ARC_DSP_SAVE_RESTORE_REGS
4238c2ecf20Sopenharmony_ci	def_bool n
4248c2ecf20Sopenharmony_ci
4258c2ecf20Sopenharmony_cichoice
4268c2ecf20Sopenharmony_ci	prompt "DSP support"
4278c2ecf20Sopenharmony_ci	default ARC_DSP_NONE
4288c2ecf20Sopenharmony_ci	help
4298c2ecf20Sopenharmony_ci	  Depending on the configuration, CPU can contain DSP registers
4308c2ecf20Sopenharmony_ci	  (ACC0_GLO, ACC0_GHI, DSP_BFLY0, DSP_CTRL, DSP_FFT_CTRL).
4318c2ecf20Sopenharmony_ci	  Bellow is options describing how to handle these registers in
4328c2ecf20Sopenharmony_ci	  interrupt entry / exit and in context switch.
4338c2ecf20Sopenharmony_ci
4348c2ecf20Sopenharmony_ciconfig ARC_DSP_NONE
4358c2ecf20Sopenharmony_ci	bool "No DSP extension presence in HW"
4368c2ecf20Sopenharmony_ci	help
4378c2ecf20Sopenharmony_ci	  No DSP extension presence in HW
4388c2ecf20Sopenharmony_ci
4398c2ecf20Sopenharmony_ciconfig ARC_DSP_KERNEL
4408c2ecf20Sopenharmony_ci	bool "DSP extension in HW, no support for userspace"
4418c2ecf20Sopenharmony_ci	select ARC_HAS_ACCL_REGS
4428c2ecf20Sopenharmony_ci	select ARC_DSP_HANDLED
4438c2ecf20Sopenharmony_ci	help
4448c2ecf20Sopenharmony_ci	  DSP extension presence in HW, no support for DSP-enabled userspace
4458c2ecf20Sopenharmony_ci	  applications. We don't save / restore DSP registers and only do
4468c2ecf20Sopenharmony_ci	  some minimal preparations so userspace won't be able to break kernel
4478c2ecf20Sopenharmony_ci
4488c2ecf20Sopenharmony_ciconfig ARC_DSP_USERSPACE
4498c2ecf20Sopenharmony_ci	bool "Support DSP for userspace apps"
4508c2ecf20Sopenharmony_ci	select ARC_HAS_ACCL_REGS
4518c2ecf20Sopenharmony_ci	select ARC_DSP_HANDLED
4528c2ecf20Sopenharmony_ci	select ARC_DSP_SAVE_RESTORE_REGS
4538c2ecf20Sopenharmony_ci	help
4548c2ecf20Sopenharmony_ci	  DSP extension presence in HW, support save / restore DSP registers to
4558c2ecf20Sopenharmony_ci	  run DSP-enabled userspace applications
4568c2ecf20Sopenharmony_ci
4578c2ecf20Sopenharmony_ciconfig ARC_DSP_AGU_USERSPACE
4588c2ecf20Sopenharmony_ci	bool "Support DSP with AGU for userspace apps"
4598c2ecf20Sopenharmony_ci	select ARC_HAS_ACCL_REGS
4608c2ecf20Sopenharmony_ci	select ARC_DSP_HANDLED
4618c2ecf20Sopenharmony_ci	select ARC_DSP_SAVE_RESTORE_REGS
4628c2ecf20Sopenharmony_ci	help
4638c2ecf20Sopenharmony_ci	  DSP and AGU extensions presence in HW, support save / restore DSP
4648c2ecf20Sopenharmony_ci	  and AGU registers to run DSP-enabled userspace applications
4658c2ecf20Sopenharmony_ciendchoice
4668c2ecf20Sopenharmony_ci
4678c2ecf20Sopenharmony_ciconfig ARC_IRQ_NO_AUTOSAVE
4688c2ecf20Sopenharmony_ci	bool "Disable hardware autosave regfile on interrupts"
4698c2ecf20Sopenharmony_ci	default n
4708c2ecf20Sopenharmony_ci	help
4718c2ecf20Sopenharmony_ci	  On HS cores, taken interrupt auto saves the regfile on stack.
4728c2ecf20Sopenharmony_ci	  This is programmable and can be optionally disabled in which case
4738c2ecf20Sopenharmony_ci	  software INTERRUPT_PROLOGUE/EPILGUE do the needed work
4748c2ecf20Sopenharmony_ci
4758c2ecf20Sopenharmony_ciconfig ARC_LPB_DISABLE
4768c2ecf20Sopenharmony_ci	bool "Disable loop buffer (LPB)"
4778c2ecf20Sopenharmony_ci	help
4788c2ecf20Sopenharmony_ci	  On HS cores, loop buffer (LPB) is programmable in runtime and can
4798c2ecf20Sopenharmony_ci	  be optionally disabled.
4808c2ecf20Sopenharmony_ci
4818c2ecf20Sopenharmony_ciendif # ISA_ARCV2
4828c2ecf20Sopenharmony_ci
4838c2ecf20Sopenharmony_ciendmenu   # "ARC CPU Configuration"
4848c2ecf20Sopenharmony_ci
4858c2ecf20Sopenharmony_ciconfig LINUX_LINK_BASE
4868c2ecf20Sopenharmony_ci	hex "Kernel link address"
4878c2ecf20Sopenharmony_ci	default "0x80000000"
4888c2ecf20Sopenharmony_ci	help
4898c2ecf20Sopenharmony_ci	  ARC700 divides the 32 bit phy address space into two equal halves
4908c2ecf20Sopenharmony_ci	  -Lower 2G (0 - 0x7FFF_FFFF ) is user virtual, translated by MMU
4918c2ecf20Sopenharmony_ci	  -Upper 2G (0x8000_0000 onwards) is untranslated, for kernel
4928c2ecf20Sopenharmony_ci	  Typically Linux kernel is linked at the start of untransalted addr,
4938c2ecf20Sopenharmony_ci	  hence the default value of 0x8zs.
4948c2ecf20Sopenharmony_ci	  However some customers have peripherals mapped at this addr, so
4958c2ecf20Sopenharmony_ci	  Linux needs to be scooted a bit.
4968c2ecf20Sopenharmony_ci	  If you don't know what the above means, leave this setting alone.
4978c2ecf20Sopenharmony_ci	  This needs to match memory start address specified in Device Tree
4988c2ecf20Sopenharmony_ci
4998c2ecf20Sopenharmony_ciconfig LINUX_RAM_BASE
5008c2ecf20Sopenharmony_ci	hex "RAM base address"
5018c2ecf20Sopenharmony_ci	default LINUX_LINK_BASE
5028c2ecf20Sopenharmony_ci	help
5038c2ecf20Sopenharmony_ci	  By default Linux is linked at base of RAM. However in some special
5048c2ecf20Sopenharmony_ci	  cases (such as HSDK), Linux can't be linked at start of DDR, hence
5058c2ecf20Sopenharmony_ci	  this option.
5068c2ecf20Sopenharmony_ci
5078c2ecf20Sopenharmony_ciconfig HIGHMEM
5088c2ecf20Sopenharmony_ci	bool "High Memory Support"
5098c2ecf20Sopenharmony_ci	select ARCH_DISCONTIGMEM_ENABLE
5108c2ecf20Sopenharmony_ci	help
5118c2ecf20Sopenharmony_ci	  With ARC 2G:2G address split, only upper 2G is directly addressable by
5128c2ecf20Sopenharmony_ci	  kernel. Enable this to potentially allow access to rest of 2G and PAE
5138c2ecf20Sopenharmony_ci	  in future
5148c2ecf20Sopenharmony_ci
5158c2ecf20Sopenharmony_ciconfig ARC_HAS_PAE40
5168c2ecf20Sopenharmony_ci	bool "Support for the 40-bit Physical Address Extension"
5178c2ecf20Sopenharmony_ci	depends on ISA_ARCV2
5188c2ecf20Sopenharmony_ci	select HIGHMEM
5198c2ecf20Sopenharmony_ci	select PHYS_ADDR_T_64BIT
5208c2ecf20Sopenharmony_ci	help
5218c2ecf20Sopenharmony_ci	  Enable access to physical memory beyond 4G, only supported on
5228c2ecf20Sopenharmony_ci	  ARC cores with 40 bit Physical Addressing support
5238c2ecf20Sopenharmony_ci
5248c2ecf20Sopenharmony_ciconfig ARC_KVADDR_SIZE
5258c2ecf20Sopenharmony_ci	int "Kernel Virtual Address Space size (MB)"
5268c2ecf20Sopenharmony_ci	range 0 512
5278c2ecf20Sopenharmony_ci	default "256"
5288c2ecf20Sopenharmony_ci	help
5298c2ecf20Sopenharmony_ci	  The kernel address space is carved out of 256MB of translated address
5308c2ecf20Sopenharmony_ci	  space for catering to vmalloc, modules, pkmap, fixmap. This however may
5318c2ecf20Sopenharmony_ci	  not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
5328c2ecf20Sopenharmony_ci	  this to be stretched to 512 MB (by extending into the reserved
5338c2ecf20Sopenharmony_ci	  kernel-user gutter)
5348c2ecf20Sopenharmony_ci
5358c2ecf20Sopenharmony_ciconfig ARC_CURR_IN_REG
5368c2ecf20Sopenharmony_ci	bool "Dedicate Register r25 for current_task pointer"
5378c2ecf20Sopenharmony_ci	default y
5388c2ecf20Sopenharmony_ci	help
5398c2ecf20Sopenharmony_ci	  This reserved Register R25 to point to Current Task in
5408c2ecf20Sopenharmony_ci	  kernel mode. This saves memory access for each such access
5418c2ecf20Sopenharmony_ci
5428c2ecf20Sopenharmony_ci
5438c2ecf20Sopenharmony_ciconfig ARC_EMUL_UNALIGNED
5448c2ecf20Sopenharmony_ci	bool "Emulate unaligned memory access (userspace only)"
5458c2ecf20Sopenharmony_ci	select SYSCTL_ARCH_UNALIGN_NO_WARN
5468c2ecf20Sopenharmony_ci	select SYSCTL_ARCH_UNALIGN_ALLOW
5478c2ecf20Sopenharmony_ci	depends on ISA_ARCOMPACT
5488c2ecf20Sopenharmony_ci	help
5498c2ecf20Sopenharmony_ci	  This enables misaligned 16 & 32 bit memory access from user space.
5508c2ecf20Sopenharmony_ci	  Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
5518c2ecf20Sopenharmony_ci	  potential bugs in code
5528c2ecf20Sopenharmony_ci
5538c2ecf20Sopenharmony_ciconfig HZ
5548c2ecf20Sopenharmony_ci	int "Timer Frequency"
5558c2ecf20Sopenharmony_ci	default 100
5568c2ecf20Sopenharmony_ci
5578c2ecf20Sopenharmony_ciconfig ARC_METAWARE_HLINK
5588c2ecf20Sopenharmony_ci	bool "Support for Metaware debugger assisted Host access"
5598c2ecf20Sopenharmony_ci	help
5608c2ecf20Sopenharmony_ci	  This options allows a Linux userland apps to directly access
5618c2ecf20Sopenharmony_ci	  host file system (open/creat/read/write etc) with help from
5628c2ecf20Sopenharmony_ci	  Metaware Debugger. This can come in handy for Linux-host communication
5638c2ecf20Sopenharmony_ci	  when there is no real usable peripheral such as EMAC.
5648c2ecf20Sopenharmony_ci
5658c2ecf20Sopenharmony_cimenuconfig ARC_DBG
5668c2ecf20Sopenharmony_ci	bool "ARC debugging"
5678c2ecf20Sopenharmony_ci	default y
5688c2ecf20Sopenharmony_ci
5698c2ecf20Sopenharmony_ciif ARC_DBG
5708c2ecf20Sopenharmony_ci
5718c2ecf20Sopenharmony_ciconfig ARC_DW2_UNWIND
5728c2ecf20Sopenharmony_ci	bool "Enable DWARF specific kernel stack unwind"
5738c2ecf20Sopenharmony_ci	default y
5748c2ecf20Sopenharmony_ci	select KALLSYMS
5758c2ecf20Sopenharmony_ci	help
5768c2ecf20Sopenharmony_ci	  Compiles the kernel with DWARF unwind information and can be used
5778c2ecf20Sopenharmony_ci	  to get stack backtraces.
5788c2ecf20Sopenharmony_ci
5798c2ecf20Sopenharmony_ci	  If you say Y here the resulting kernel image will be slightly larger
5808c2ecf20Sopenharmony_ci	  but not slower, and it will give very useful debugging information.
5818c2ecf20Sopenharmony_ci	  If you don't debug the kernel, you can say N, but we may not be able
5828c2ecf20Sopenharmony_ci	  to solve problems without frame unwind information
5838c2ecf20Sopenharmony_ci
5848c2ecf20Sopenharmony_ciconfig ARC_DBG_TLB_PARANOIA
5858c2ecf20Sopenharmony_ci	bool "Paranoia Checks in Low Level TLB Handlers"
5868c2ecf20Sopenharmony_ci
5878c2ecf20Sopenharmony_ciconfig ARC_DBG_JUMP_LABEL
5888c2ecf20Sopenharmony_ci	bool "Paranoid checks in Static Keys (jump labels) code"
5898c2ecf20Sopenharmony_ci	depends on JUMP_LABEL
5908c2ecf20Sopenharmony_ci	default y if STATIC_KEYS_SELFTEST
5918c2ecf20Sopenharmony_ci	help
5928c2ecf20Sopenharmony_ci	  Enable paranoid checks and self-test of both ARC-specific and generic
5938c2ecf20Sopenharmony_ci	  part of static keys (jump labels) related code.
5948c2ecf20Sopenharmony_ciendif
5958c2ecf20Sopenharmony_ci
5968c2ecf20Sopenharmony_ciconfig ARC_BUILTIN_DTB_NAME
5978c2ecf20Sopenharmony_ci	string "Built in DTB"
5988c2ecf20Sopenharmony_ci	help
5998c2ecf20Sopenharmony_ci	  Set the name of the DTB to embed in the vmlinux binary
6008c2ecf20Sopenharmony_ci	  Leaving it blank selects the minimal "skeleton" dtb
6018c2ecf20Sopenharmony_ci
6028c2ecf20Sopenharmony_ciendmenu	 # "ARC Architecture Configuration"
6038c2ecf20Sopenharmony_ci
6048c2ecf20Sopenharmony_ciconfig FORCE_MAX_ZONEORDER
6058c2ecf20Sopenharmony_ci	int "Maximum zone order"
6068c2ecf20Sopenharmony_ci	default "12" if ARC_HUGEPAGE_16M
6078c2ecf20Sopenharmony_ci	default "11"
6088c2ecf20Sopenharmony_ci
6098c2ecf20Sopenharmony_cisource "kernel/power/Kconfig"
610