1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2c32e64e8SGuo Renconfig CSKY 3c32e64e8SGuo Ren def_bool y 4942fa985SYury Norov select ARCH_32BIT_OFF_T 513bf5cedSChristoph Hellwig select ARCH_HAS_DMA_PREP_COHERENT 6de863678SMa Jun select ARCH_HAS_GCOV_PROFILE_ALL 7c32e64e8SGuo Ren select ARCH_HAS_SYNC_DMA_FOR_CPU 8c32e64e8SGuo Ren select ARCH_HAS_SYNC_DMA_FOR_DEVICE 9c32e64e8SGuo Ren select ARCH_USE_BUILTIN_BSWAP 10c32e64e8SGuo Ren select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2 1118c07d23SGuo Ren select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 12c32e64e8SGuo Ren select COMMON_CLK 13c32e64e8SGuo Ren select CLKSRC_MMIO 141994cc49SGuo Ren select CSKY_MPINTC if CPU_CK860 151994cc49SGuo Ren select CSKY_MP_TIMER if CPU_CK860 161994cc49SGuo Ren select CSKY_APB_INTC 17f04b951fSChristoph Hellwig select DMA_DIRECT_REMAP 18c32e64e8SGuo Ren select IRQ_DOMAIN 19c32e64e8SGuo Ren select HANDLE_DOMAIN_IRQ 20c32e64e8SGuo Ren select DW_APB_TIMER_OF 210055f67bSChristoph Hellwig select GENERIC_IOREMAP 22c32e64e8SGuo Ren select GENERIC_LIB_ASHLDI3 23c32e64e8SGuo Ren select GENERIC_LIB_ASHRDI3 24c32e64e8SGuo Ren select GENERIC_LIB_LSHRDI3 25c32e64e8SGuo Ren select GENERIC_LIB_MULDI3 26c32e64e8SGuo Ren select GENERIC_LIB_CMPDI2 27c32e64e8SGuo Ren select GENERIC_LIB_UCMPDI2 28c32e64e8SGuo Ren select GENERIC_ALLOCATOR 29c32e64e8SGuo Ren select GENERIC_ATOMIC64 30c32e64e8SGuo Ren select GENERIC_CLOCKEVENTS 31c32e64e8SGuo Ren select GENERIC_CPU_DEVICES 32c32e64e8SGuo Ren select GENERIC_IRQ_CHIP 33c32e64e8SGuo Ren select GENERIC_IRQ_PROBE 34c32e64e8SGuo Ren select GENERIC_IRQ_SHOW 35c32e64e8SGuo Ren select GENERIC_IRQ_MULTI_HANDLER 36c32e64e8SGuo Ren select GENERIC_SCHED_CLOCK 37c32e64e8SGuo Ren select GENERIC_SMP_IDLE_THREAD 381994cc49SGuo Ren select GX6605S_TIMER if CPU_CK610 39c32e64e8SGuo Ren select HAVE_ARCH_TRACEHOOK 402f7932b0SGuo Ren select HAVE_ARCH_AUDITSYSCALL 41*e95a4f8cSGuo Ren select HAVE_ARCH_SECCOMP_FILTER 420b9f386cSGuo Ren select HAVE_COPY_THREAD_TLS 4318c07d23SGuo Ren select HAVE_DEBUG_BUGVERBOSE 4428bb030fSGuo Ren select HAVE_DYNAMIC_FTRACE 4589a3927aSGuo Ren select HAVE_DYNAMIC_FTRACE_WITH_REGS 46230c77a5SGuo Ren select HAVE_FUNCTION_TRACER 47d7950be1SGuo Ren select HAVE_FUNCTION_GRAPH_TRACER 4828bb030fSGuo Ren select HAVE_FTRACE_MCOUNT_RECORD 49c32e64e8SGuo Ren select HAVE_KERNEL_GZIP 50c32e64e8SGuo Ren select HAVE_KERNEL_LZO 51c32e64e8SGuo Ren select HAVE_KERNEL_LZMA 5233e53ae1SGuo Ren select HAVE_KPROBES if !CPU_CK610 5333e53ae1SGuo Ren select HAVE_KPROBES_ON_FTRACE if !CPU_CK610 5433e53ae1SGuo Ren select HAVE_KRETPROBES if !CPU_CK610 55f50fd2d8SGuo Ren select HAVE_PERF_EVENTS 56daac95e7SMao Han select HAVE_PERF_REGS 57daac95e7SMao Han select HAVE_PERF_USER_STACK_DUMP 58c32e64e8SGuo Ren select HAVE_DMA_CONTIGUOUS 59bfe47f35SGuo Ren select HAVE_REGS_AND_STACK_ACCESS_API 609866d141SGuo Ren select HAVE_RSEQ 612f78c73fSMao Han select HAVE_STACKPROTECTOR 622f7932b0SGuo Ren select HAVE_SYSCALL_TRACEPOINTS 63c32e64e8SGuo Ren select MAY_HAVE_SPARSE_IRQ 64c32e64e8SGuo Ren select MODULES_USE_ELF_RELA if MODULES 65c32e64e8SGuo Ren select OF 66c32e64e8SGuo Ren select OF_EARLY_FLATTREE 67f50fd2d8SGuo Ren select PERF_USE_VMALLOC if CPU_CK610 68c32e64e8SGuo Ren select RTC_LIB 69c32e64e8SGuo Ren select TIMER_OF 70c32e64e8SGuo Ren select USB_ARCH_HAS_EHCI 71c32e64e8SGuo Ren select USB_ARCH_HAS_OHCI 725b49c82dSMaJun select GENERIC_PCI_IOMAP 735b49c82dSMaJun select HAVE_PCI 745b49c82dSMaJun select PCI_DOMAINS_GENERIC if PCI 755b49c82dSMaJun select PCI_SYSCALL if PCI 765b49c82dSMaJun select PCI_MSI if PCI 77c32e64e8SGuo Ren 78000591f1SGuo Renconfig LOCKDEP_SUPPORT 79000591f1SGuo Ren def_bool y 80000591f1SGuo Ren 818f6bb793SGuo Renconfig ARCH_SUPPORTS_UPROBES 828f6bb793SGuo Ren def_bool y if !CPU_CK610 838f6bb793SGuo Ren 84c32e64e8SGuo Renconfig CPU_HAS_CACHEV2 85c32e64e8SGuo Ren bool 86c32e64e8SGuo Ren 87c32e64e8SGuo Renconfig CPU_HAS_FPUV2 88c32e64e8SGuo Ren bool 89c32e64e8SGuo Ren 90c32e64e8SGuo Renconfig CPU_HAS_HILO 91c32e64e8SGuo Ren bool 92c32e64e8SGuo Ren 93c32e64e8SGuo Renconfig CPU_HAS_TLBI 94c32e64e8SGuo Ren bool 95c32e64e8SGuo Ren 96c32e64e8SGuo Renconfig CPU_HAS_LDSTEX 97c32e64e8SGuo Ren bool 98c32e64e8SGuo Ren help 99bebd26abSRandy Dunlap For SMP, CPU needs "ldex&stex" instructions for atomic operations. 100c32e64e8SGuo Ren 101c32e64e8SGuo Renconfig CPU_NEED_TLBSYNC 102c32e64e8SGuo Ren bool 103c32e64e8SGuo Ren 104c32e64e8SGuo Renconfig CPU_NEED_SOFTALIGN 105c32e64e8SGuo Ren bool 106c32e64e8SGuo Ren 107c32e64e8SGuo Renconfig CPU_NO_USER_BKPT 108c32e64e8SGuo Ren bool 109c32e64e8SGuo Ren help 110c32e64e8SGuo Ren For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because 111c32e64e8SGuo Ren abiv2 is 16/32bit instruction set and "trap 1" is 32bit. 112c32e64e8SGuo Ren So we need a 16bit instruction as user space bkpt, and it will cause an illegal 113c32e64e8SGuo Ren instruction exception. 114c32e64e8SGuo Ren In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not. 115c32e64e8SGuo Ren 116c32e64e8SGuo Renconfig GENERIC_CALIBRATE_DELAY 117c32e64e8SGuo Ren def_bool y 118c32e64e8SGuo Ren 119c32e64e8SGuo Renconfig GENERIC_CSUM 120c32e64e8SGuo Ren def_bool y 121c32e64e8SGuo Ren 122c32e64e8SGuo Renconfig GENERIC_HWEIGHT 123c32e64e8SGuo Ren def_bool y 124c32e64e8SGuo Ren 125c32e64e8SGuo Renconfig MMU 126c32e64e8SGuo Ren def_bool y 127c32e64e8SGuo Ren 1280ea2dc7cSGuo Renconfig STACKTRACE_SUPPORT 1290ea2dc7cSGuo Ren def_bool y 1300ea2dc7cSGuo Ren 131c32e64e8SGuo Renconfig TIME_LOW_RES 132c32e64e8SGuo Ren def_bool y 133c32e64e8SGuo Ren 134c32e64e8SGuo Renconfig TRACE_IRQFLAGS_SUPPORT 135c32e64e8SGuo Ren def_bool y 136c32e64e8SGuo Ren 137c32e64e8SGuo Renconfig CPU_TLB_SIZE 138c32e64e8SGuo Ren int 139c32e64e8SGuo Ren default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810) 140c32e64e8SGuo Ren default "1024" if (CPU_CK860) 141c32e64e8SGuo Ren 142c32e64e8SGuo Renconfig CPU_ASID_BITS 143c32e64e8SGuo Ren int 144c32e64e8SGuo Ren default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810) 145c32e64e8SGuo Ren default "12" if (CPU_CK860) 146c32e64e8SGuo Ren 147c32e64e8SGuo Renconfig L1_CACHE_SHIFT 148c32e64e8SGuo Ren int 149c32e64e8SGuo Ren default "4" if (CPU_CK610) 150c32e64e8SGuo Ren default "5" if (CPU_CK807 || CPU_CK810) 151c32e64e8SGuo Ren default "6" if (CPU_CK860) 152c32e64e8SGuo Ren 153c32e64e8SGuo Renmenu "Processor type and features" 154c32e64e8SGuo Ren 155c32e64e8SGuo Renchoice 156c32e64e8SGuo Ren prompt "CPU MODEL" 157c32e64e8SGuo Ren default CPU_CK807 158c32e64e8SGuo Ren 159c32e64e8SGuo Renconfig CPU_CK610 160c32e64e8SGuo Ren bool "CSKY CPU ck610" 161c32e64e8SGuo Ren select CPU_NEED_TLBSYNC 162c32e64e8SGuo Ren select CPU_NEED_SOFTALIGN 163c32e64e8SGuo Ren select CPU_NO_USER_BKPT 164c32e64e8SGuo Ren 165c32e64e8SGuo Renconfig CPU_CK810 166c32e64e8SGuo Ren bool "CSKY CPU ck810" 167c32e64e8SGuo Ren select CPU_HAS_HILO 168c32e64e8SGuo Ren select CPU_NEED_TLBSYNC 169c32e64e8SGuo Ren 170c32e64e8SGuo Renconfig CPU_CK807 171c32e64e8SGuo Ren bool "CSKY CPU ck807" 172c32e64e8SGuo Ren select CPU_HAS_HILO 173c32e64e8SGuo Ren 174c32e64e8SGuo Renconfig CPU_CK860 175c32e64e8SGuo Ren bool "CSKY CPU ck860" 176c32e64e8SGuo Ren select CPU_HAS_TLBI 177c32e64e8SGuo Ren select CPU_HAS_CACHEV2 178c32e64e8SGuo Ren select CPU_HAS_LDSTEX 179c32e64e8SGuo Ren select CPU_HAS_FPUV2 180c32e64e8SGuo Renendchoice 181c32e64e8SGuo Ren 182c32e64e8SGuo Renchoice 183f50fd2d8SGuo Ren prompt "C-SKY PMU type" 184f50fd2d8SGuo Ren depends on PERF_EVENTS 185f50fd2d8SGuo Ren depends on CPU_CK807 || CPU_CK810 || CPU_CK860 186f50fd2d8SGuo Ren 187f50fd2d8SGuo Renconfig CPU_PMU_NONE 188f50fd2d8SGuo Ren bool "None" 189f50fd2d8SGuo Ren 190f50fd2d8SGuo Renconfig CSKY_PMU_V1 191f50fd2d8SGuo Ren bool "Performance Monitoring Unit Ver.1" 192f50fd2d8SGuo Ren 193f50fd2d8SGuo Renendchoice 194f50fd2d8SGuo Ren 195f50fd2d8SGuo Renchoice 196c32e64e8SGuo Ren prompt "Power Manager Instruction (wait/doze/stop)" 197c32e64e8SGuo Ren default CPU_PM_NONE 198c32e64e8SGuo Ren 199c32e64e8SGuo Renconfig CPU_PM_NONE 200c32e64e8SGuo Ren bool "None" 201c32e64e8SGuo Ren 202c32e64e8SGuo Renconfig CPU_PM_WAIT 203c32e64e8SGuo Ren bool "wait" 204c32e64e8SGuo Ren 205c32e64e8SGuo Renconfig CPU_PM_DOZE 206c32e64e8SGuo Ren bool "doze" 207c32e64e8SGuo Ren 208c32e64e8SGuo Renconfig CPU_PM_STOP 209c32e64e8SGuo Ren bool "stop" 210c32e64e8SGuo Renendchoice 211c32e64e8SGuo Ren 212f525bb2cSGuo Renmenuconfig HAVE_TCM 213f525bb2cSGuo Ren bool "Tightly-Coupled/Sram Memory" 214f525bb2cSGuo Ren select GENERIC_ALLOCATOR 215f525bb2cSGuo Ren help 216f525bb2cSGuo Ren The implementation are not only used by TCM (Tightly-Coupled Meory) 217f525bb2cSGuo Ren but also used by sram on SOC bus. It follow existed linux tcm 218f525bb2cSGuo Ren software interface, so that old tcm application codes could be 219f525bb2cSGuo Ren re-used directly. 220f525bb2cSGuo Ren 221f525bb2cSGuo Renif HAVE_TCM 222f525bb2cSGuo Renconfig ITCM_RAM_BASE 223f525bb2cSGuo Ren hex "ITCM ram base" 224f525bb2cSGuo Ren default 0xffffffff 225f525bb2cSGuo Ren 226f525bb2cSGuo Renconfig ITCM_NR_PAGES 227f525bb2cSGuo Ren int "Page count of ITCM size: NR*4KB" 228f525bb2cSGuo Ren range 1 256 229f525bb2cSGuo Ren default 32 230f525bb2cSGuo Ren 231f525bb2cSGuo Renconfig HAVE_DTCM 232f525bb2cSGuo Ren bool "DTCM Support" 233f525bb2cSGuo Ren 234f525bb2cSGuo Renconfig DTCM_RAM_BASE 235f525bb2cSGuo Ren hex "DTCM ram base" 236f525bb2cSGuo Ren depends on HAVE_DTCM 237f525bb2cSGuo Ren default 0xffffffff 238f525bb2cSGuo Ren 239f525bb2cSGuo Renconfig DTCM_NR_PAGES 240f525bb2cSGuo Ren int "Page count of DTCM size: NR*4KB" 241f525bb2cSGuo Ren depends on HAVE_DTCM 242f525bb2cSGuo Ren range 1 256 243f525bb2cSGuo Ren default 32 244f525bb2cSGuo Renendif 245f525bb2cSGuo Ren 246c32e64e8SGuo Renconfig CPU_HAS_VDSP 247c32e64e8SGuo Ren bool "CPU has VDSP coprocessor" 248c32e64e8SGuo Ren depends on CPU_HAS_FPU && CPU_HAS_FPUV2 249c32e64e8SGuo Ren 250c32e64e8SGuo Renconfig CPU_HAS_FPU 251c32e64e8SGuo Ren bool "CPU has FPU coprocessor" 252c32e64e8SGuo Ren depends on CPU_CK807 || CPU_CK810 || CPU_CK860 253c32e64e8SGuo Ren 254761b4f69SGuo Renconfig CPU_HAS_ICACHE_INS 255761b4f69SGuo Ren bool "CPU has Icache invalidate instructions" 256761b4f69SGuo Ren depends on CPU_HAS_CACHEV2 257761b4f69SGuo Ren 258c32e64e8SGuo Renconfig CPU_HAS_TEE 259c32e64e8SGuo Ren bool "CPU has Trusted Execution Environment" 260c32e64e8SGuo Ren depends on CPU_CK810 261c32e64e8SGuo Ren 262c32e64e8SGuo Renconfig SMP 263c32e64e8SGuo Ren bool "Symmetric Multi-Processing (SMP) support for C-SKY" 264c32e64e8SGuo Ren depends on CPU_CK860 265c32e64e8SGuo Ren default n 266c32e64e8SGuo Ren 267c32e64e8SGuo Renconfig NR_CPUS 268c32e64e8SGuo Ren int "Maximum number of CPUs (2-32)" 269c32e64e8SGuo Ren range 2 32 270c32e64e8SGuo Ren depends on SMP 271c32e64e8SGuo Ren default "2" 272c32e64e8SGuo Ren 273c32e64e8SGuo Renconfig HIGHMEM 274c32e64e8SGuo Ren bool "High Memory Support" 275c32e64e8SGuo Ren depends on !CPU_CK610 276c32e64e8SGuo Ren default y 277c32e64e8SGuo Ren 278c32e64e8SGuo Renconfig FORCE_MAX_ZONEORDER 279c32e64e8SGuo Ren int "Maximum zone order" 280c32e64e8SGuo Ren default "11" 281c32e64e8SGuo Ren 282c32e64e8SGuo Renconfig RAM_BASE 283c32e64e8SGuo Ren hex "DRAM start addr (the same with memory-section in dts)" 284c32e64e8SGuo Ren default 0x0 285c32e64e8SGuo Ren 286859e5f45SGuo Renconfig HOTPLUG_CPU 287859e5f45SGuo Ren bool "Support for hot-pluggable CPUs" 288859e5f45SGuo Ren select GENERIC_IRQ_MIGRATION 289859e5f45SGuo Ren depends on SMP 290859e5f45SGuo Ren help 291859e5f45SGuo Ren Say Y here to allow turning CPUs off and on. CPUs can be 292859e5f45SGuo Ren controlled through /sys/devices/system/cpu/cpu1/hotplug/target. 293859e5f45SGuo Ren 294859e5f45SGuo Ren Say N if you want to disable CPU hotplug. 295c32e64e8SGuo Renendmenu 296c32e64e8SGuo Ren 297a736fa1eSGuo Rensource "arch/csky/Kconfig.platforms" 298a736fa1eSGuo Ren 299c32e64e8SGuo Rensource "kernel/Kconfig.hz" 300*e95a4f8cSGuo Ren 301*e95a4f8cSGuo Renconfig SECCOMP 302*e95a4f8cSGuo Ren bool "Enable seccomp to safely compute untrusted bytecode" 303*e95a4f8cSGuo Ren help 304*e95a4f8cSGuo Ren This kernel feature is useful for number crunching applications 305*e95a4f8cSGuo Ren that may need to compute untrusted bytecode during their 306*e95a4f8cSGuo Ren execution. By using pipes or other transports made available to 307*e95a4f8cSGuo Ren the process as file descriptors supporting the read/write 308*e95a4f8cSGuo Ren syscalls, it's possible to isolate those applications in 309*e95a4f8cSGuo Ren their own address space using seccomp. Once seccomp is 310*e95a4f8cSGuo Ren enabled via prctl(PR_SET_SECCOMP), it cannot be disabled 311*e95a4f8cSGuo Ren and the task is only allowed to execute a few safe syscalls 312*e95a4f8cSGuo Ren defined by each seccomp mode. 313