1fa96b57cSHuacai Chen# SPDX-License-Identifier: GPL-2.0 2fa96b57cSHuacai Chenconfig LOONGARCH 3fa96b57cSHuacai Chen bool 4fa96b57cSHuacai Chen default y 5f30d1f49SHuacai Chen select ACPI 6cd057667SJianmin Lv select ACPI_GENERIC_GSI if ACPI 757fc7323SHuacai Chen select ACPI_MCFG if ACPI 8a02f66bbSJames Morse select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU 9f6f0c9a7SHuacai Chen select ACPI_PPTT if ACPI 10fa96b57cSHuacai Chen select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI 11fa96b57cSHuacai Chen select ARCH_BINFMT_ELF_STATE 121e338f4dSSabyrzhan Tasbolatov select ARCH_NEEDS_DEFER_KASAN 135aa4ac64SQing Zhang select ARCH_DISABLE_KASAN_INLINE 14fa96b57cSHuacai Chen select ARCH_ENABLE_MEMORY_HOTPLUG 15b3ff2d9cSMasahiro Yamada select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE 16fa96b57cSHuacai Chen select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI 179841c423SThomas Gleixner select ARCH_HAS_CPU_FINALIZE_INIT 188b5db5e5SHuacai Chen select ARCH_HAS_CURRENT_STACK_POINTER 19614d7e99SHuacai Chen select ARCH_HAS_DEBUG_VM_PGTABLE 202cce9059SXi Ruoyao select ARCH_HAS_FAST_MULTIPLIER 21d4c937c2SQing Zhang select ARCH_HAS_FORTIFY_SOURCE 222363088eSFeiyang Chen select ARCH_HAS_KCOV 233d9aba66SHuacai Chen select ARCH_HAS_KERNEL_FPU_SUPPORT if 64BIT && CPU_HAS_FPU 243f48f3d9SPaul E. McKenney select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 25de0e30beSChenguang Zhao select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE 26704f06eeSHuacai Chen select ARCH_HAS_PREEMPT_LAZY 273d9aba66SHuacai Chen select ARCH_HAS_PTE_SPECIAL if 64BIT 28e86935f7SHuacai Chen select ARCH_HAS_SET_MEMORY 29f04de6d8SHuacai Chen select ARCH_HAS_SET_DIRECT_MAP 30fa96b57cSHuacai Chen select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 31892a7963SYuli Wang select ARCH_HAS_UBSAN 32d2862bb9SThomas Weißschuh select ARCH_HAS_VDSO_ARCH_DATA 33fa96b57cSHuacai Chen select ARCH_INLINE_READ_LOCK if !PREEMPTION 34fa96b57cSHuacai Chen select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION 35fa96b57cSHuacai Chen select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION 36fa96b57cSHuacai Chen select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION 37fa96b57cSHuacai Chen select ARCH_INLINE_READ_UNLOCK if !PREEMPTION 38fa96b57cSHuacai Chen select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION 39fa96b57cSHuacai Chen select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION 40fa96b57cSHuacai Chen select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION 41fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_LOCK if !PREEMPTION 42fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION 43fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION 44fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION 45fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION 46fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION 47fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION 48fa96b57cSHuacai Chen select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION 49fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION 50fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION 51fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_LOCK if !PREEMPTION 52fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION 53fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION 54fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION 55fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION 56fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION 57fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION 58fa96b57cSHuacai Chen select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION 59e0fba87cSHuacai Chen select ARCH_KEEP_MEMBLOCK 60fa96b57cSHuacai Chen select ARCH_MIGHT_HAVE_PC_PARPORT 61fa96b57cSHuacai Chen select ARCH_MIGHT_HAVE_PC_SERIO 6293a4fa62SQing Zhang select ARCH_STACKWALK 63fa96b57cSHuacai Chen select ARCH_SUPPORTS_ACPI 64fa96b57cSHuacai Chen select ARCH_SUPPORTS_ATOMIC_RMW 653d9aba66SHuacai Chen select ARCH_SUPPORTS_HUGETLBFS if 64BIT 665125d033SXi Ruoyao select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 675a31ed46SWANG Xuerui select ARCH_SUPPORTS_LTO_CLANG 685a31ed46SWANG Xuerui select ARCH_SUPPORTS_LTO_CLANG_THIN 69b37981ceSYuli Wang select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS 703d9aba66SHuacai Chen select ARCH_SUPPORTS_NUMA_BALANCING if NUMA 71892979b0SWentao Guan select ARCH_SUPPORTS_PER_VMA_LOCK 72be2ea982SHuacai Chen select ARCH_SUPPORTS_RT 737bd291abSPeter Zijlstra select ARCH_SUPPORTS_SCHED_SMT if SMP 747bd291abSPeter Zijlstra select ARCH_SUPPORTS_SCHED_MC if SMP 75fa96b57cSHuacai Chen select ARCH_USE_BUILTIN_BSWAP 76fa96b57cSHuacai Chen select ARCH_USE_CMPXCHG_LOCKREF 77fb8e9f59SYuli Wang select ARCH_USE_MEMTEST 78fa96b57cSHuacai Chen select ARCH_USE_QUEUED_RWLOCKS 795f1e001bSHuacai Chen select ARCH_USE_QUEUED_SPINLOCKS 803d9aba66SHuacai Chen select ARCH_WANT_DEFAULT_BPF_JIT if HAVE_EBPF_JIT 81fa96b57cSHuacai Chen select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 821429cfdeSArd Biesheuvel select ARCH_WANT_LD_ORPHAN_WARN 833d9aba66SHuacai Chen select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP if 64BIT 84fa96b57cSHuacai Chen select ARCH_WANTS_NO_INSTR 85ff4a2443SHuacai Chen select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE 86fa96b57cSHuacai Chen select BUILDTIME_TABLE_SORT 87fa96b57cSHuacai Chen select COMMON_CLK 88366bb35aSHuacai Chen select CPU_PM 89558aff7aSZhao Qunqin select EDAC_SUPPORT 90f30d1f49SHuacai Chen select EFI 913d9aba66SHuacai Chen select GENERIC_ATOMIC64 if 32BIT 92fa96b57cSHuacai Chen select GENERIC_CLOCKEVENTS 93fa96b57cSHuacai Chen select GENERIC_CMOS_UPDATE 94fa96b57cSHuacai Chen select GENERIC_CPU_AUTOPROBE 95db3ba29aSJames Morse select GENERIC_CPU_DEVICES 96e8dd556cSTiezhu Yang select GENERIC_CPU_VULNERABILITIES 97fa96b57cSHuacai Chen select GENERIC_ENTRY 983d9aba66SHuacai Chen select GENERIC_GETTIMEOFDAY if 64BIT 99d2791341SHuacai Chen select GENERIC_IOREMAP if !ARCH_IOREMAP 100ae16f05cSTianyang Zhang select GENERIC_IRQ_MATRIX_ALLOCATOR 101fa96b57cSHuacai Chen select GENERIC_IRQ_MULTI_HANDLER 102fa96b57cSHuacai Chen select GENERIC_IRQ_PROBE 103fa96b57cSHuacai Chen select GENERIC_IRQ_SHOW 104fa96b57cSHuacai Chen select GENERIC_LIB_ASHLDI3 105fa96b57cSHuacai Chen select GENERIC_LIB_ASHRDI3 106fa96b57cSHuacai Chen select GENERIC_LIB_CMPDI2 107fa96b57cSHuacai Chen select GENERIC_LIB_LSHRDI3 108fa96b57cSHuacai Chen select GENERIC_LIB_UCMPDI2 109235d074fSHuacai Chen select GENERIC_LIB_DEVMEM_IS_ALLOWED 110fa96b57cSHuacai Chen select GENERIC_PCI_IOMAP 111fa96b57cSHuacai Chen select GENERIC_SCHED_CLOCK 11246859ac8SHuacai Chen select GENERIC_SMP_IDLE_THREAD 1133d9aba66SHuacai Chen select GENERIC_TIME_VSYSCALL if GENERIC_GETTIMEOFDAY 114fa96b57cSHuacai Chen select GPIOLIB 115fcbfe812SNiklas Schnelle select HAS_IOPORT 1163d9aba66SHuacai Chen select HAVE_ALIGNED_STRUCT_PAGE if 64BIT 117fa96b57cSHuacai Chen select HAVE_ARCH_AUDITSYSCALL 1183d9aba66SHuacai Chen select HAVE_ARCH_BITREVERSE if 64BIT 119f02644e3SYouling Tang select HAVE_ARCH_JUMP_LABEL 120f02644e3SYouling Tang select HAVE_ARCH_JUMP_LABEL_RELATIVE 1213d9aba66SHuacai Chen select HAVE_ARCH_KASAN if 64BIT 1223d9aba66SHuacai Chen select HAVE_ARCH_KFENCE if 64BIT 123e14dd076SQing Zhang select HAVE_ARCH_KGDB if PERF_EVENTS 12457fbad15SKees Cook select HAVE_ARCH_KSTACK_ERASE 125fa96b57cSHuacai Chen select HAVE_ARCH_MMAP_RND_BITS if MMU 126a0f7085fSJinjie Ruan select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 1276b79ecd0SMasahiro Yamada select HAVE_ARCH_SECCOMP 128fa96b57cSHuacai Chen select HAVE_ARCH_SECCOMP_FILTER 129fa96b57cSHuacai Chen select HAVE_ARCH_TRACEHOOK 1303d9aba66SHuacai Chen select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT 1313d9aba66SHuacai Chen select HAVE_ARCH_USERFAULTFD_MINOR if 64BIT && USERFAULTFD 132fa96b57cSHuacai Chen select HAVE_ASM_MODVERSIONS 133f0e4b1b6SGeorge Guo select HAVE_CMPXCHG_DOUBLE 13407d5798aSHuacai Chen select HAVE_CMPXCHG_LOCAL 13524a9c541SFrederic Weisbecker select HAVE_CONTEXT_TRACKING_USER 136a0a458fbSQing Zhang select HAVE_C_RECORDMCOUNT 1375d553770STiezhu Yang select HAVE_DEBUG_KMEMLEAK 138fa96b57cSHuacai Chen select HAVE_DEBUG_STACKOVERFLOW 139fa96b57cSHuacai Chen select HAVE_DMA_CONTIGUOUS 1404733f09dSQing Zhang select HAVE_DYNAMIC_FTRACE 141ac7127e1SQing Zhang select HAVE_DYNAMIC_FTRACE_WITH_ARGS 142762abbc0SMasami Hiramatsu (Google) select HAVE_FTRACE_REGS_HAVING_PT_REGS 1439cdc3b6aSYouling Tang select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS 1448778ba2cSQing Zhang select HAVE_DYNAMIC_FTRACE_WITH_REGS 1453d9aba66SHuacai Chen select HAVE_EBPF_JIT if 64BIT 14641596803SHuacai Chen select HAVE_EFFICIENT_UNALIGNED_ACCESS if !ARCH_STRICT_ALIGN 147fa96b57cSHuacai Chen select HAVE_EXIT_THREAD 148f9629891SThomas Gleixner select HAVE_GENERIC_TIF_BITS 14925176ad0SDavid Hildenbrand select HAVE_GUP_FAST 150a762e926SMasami Hiramatsu (Google) select HAVE_FTRACE_GRAPH_FUNC 151356bd6f2SQing Zhang select HAVE_FUNCTION_ARG_ACCESS_API 1528b5ee2c6STiezhu Yang select HAVE_FUNCTION_ERROR_INJECTION 153a3ed4157SMasami Hiramatsu (Google) select HAVE_FUNCTION_GRAPH_FREGS 154dbe3ba30SQing Zhang select HAVE_FUNCTION_GRAPH_TRACER 155dbe3ba30SQing Zhang select HAVE_FUNCTION_TRACER 1562363088eSFeiyang Chen select HAVE_GCC_PLUGINS 157fa96b57cSHuacai Chen select HAVE_GENERIC_VDSO 158edffa33cSQing Zhang select HAVE_HW_BREAKPOINT if PERF_EVENTS 159fa96b57cSHuacai Chen select HAVE_IOREMAP_PROT 160fa96b57cSHuacai Chen select HAVE_IRQ_EXIT_ON_IRQ_STACK 161fa96b57cSHuacai Chen select HAVE_IRQ_TIME_ACCOUNTING 1626d4cc40fSTiezhu Yang select HAVE_KPROBES 16309e679c2STiezhu Yang select HAVE_KPROBES_ON_FTRACE 1643f553686STiezhu Yang select HAVE_KRETPROBES 165199cc14cSJinyang He select HAVE_LIVEPATCH 166fa96b57cSHuacai Chen select HAVE_MOD_ARCH_SPECIFIC 167fa96b57cSHuacai Chen select HAVE_NMI 1683d9aba66SHuacai Chen select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS && AS_HAS_THIN_ADD_SUB && 64BIT 16957fc7323SHuacai Chen select HAVE_PCI 1703d9aba66SHuacai Chen select HAVE_PERF_EVENTS if 64BIT 171b37042b2SHuacai Chen select HAVE_PERF_REGS 172b37042b2SHuacai Chen select HAVE_PERF_USER_STACK_DUMP 173826d2af6SHuacai Chen select HAVE_POSIX_CPU_TIMERS_TASK_WORK 17480c7889dSHuacai Chen select HAVE_PREEMPT_DYNAMIC_KEY 175fa96b57cSHuacai Chen select HAVE_REGS_AND_STACK_ACCESS_API 176199cc14cSJinyang He select HAVE_RELIABLE_STACKTRACE if UNWINDER_ORC 1777b0a0964SHaoran Jiang select HAVE_RETHOOK 178fa96b57cSHuacai Chen select HAVE_RSEQ 17990868ff9SWANG Rui select HAVE_RUST 18022f367a6SYouling Tang select HAVE_SAMPLE_FTRACE_DIRECT 18122f367a6SYouling Tang select HAVE_SAMPLE_FTRACE_DIRECT_MULTI 182d4b6f156SHuacai Chen select HAVE_SETUP_PER_CPU_AREA if NUMA 183cb8a2ef0STiezhu Yang select HAVE_STACK_VALIDATION if HAVE_OBJTOOL 18409f33601SHuacai Chen select HAVE_STACKPROTECTOR 185fa96b57cSHuacai Chen select HAVE_SYSCALL_TRACEPOINTS 186fa96b57cSHuacai Chen select HAVE_TIF_NOHZ 18708dac3b8SBibo Mao select HAVE_VIRT_CPU_ACCOUNTING_GEN 188009ee0c9SHuacai Chen select HOTPLUG_SMT if HOTPLUG_CPU 189fa96b57cSHuacai Chen select IRQ_FORCED_THREADING 190fa96b57cSHuacai Chen select IRQ_LOONGARCH_CPU 191a050ba1eSLinus Torvalds select LOCK_MM_AND_FIND_VMA 192f30d1f49SHuacai Chen select MMU_GATHER_MERGE_VMAS if MMU 193a5b981e6SQi Zheng select MMU_GATHER_RCU_TABLE_FREE 194fa96b57cSHuacai Chen select MODULES_USE_ELF_RELA if MODULES 195d4b6f156SHuacai Chen select NEED_PER_CPU_EMBED_FIRST_CHUNK 196d4b6f156SHuacai Chen select NEED_PER_CPU_PAGE_FIRST_CHUNK 197a24f2fb7SHuacai Chen select NUMA_MEMBLKS if NUMA 19888d4d957SBinbin Zhou select OF 19988d4d957SBinbin Zhou select OF_EARLY_FLATTREE 20057fc7323SHuacai Chen select PCI 20157fc7323SHuacai Chen select PCI_DOMAINS_GENERIC 20257fc7323SHuacai Chen select PCI_ECAM if ACPI 20357fc7323SHuacai Chen select PCI_LOONGSON 20457fc7323SHuacai Chen select PCI_MSI_ARCH_FALLBACKS 2057c12bb8fSHuacai Chen select PCI_QUIRKS 206fa96b57cSHuacai Chen select PERF_USE_VMALLOC 207fa96b57cSHuacai Chen select RTC_LIB 208fa96b57cSHuacai Chen select SPARSE_IRQ 20961a6fcccSHuacai Chen select SYSCTL_ARCH_UNALIGN_ALLOW 21061a6fcccSHuacai Chen select SYSCTL_ARCH_UNALIGN_NO_WARN 211fa96b57cSHuacai Chen select SYSCTL_EXCEPTION_TRACE 2123d9aba66SHuacai Chen select SWIOTLB if 64BIT 213fa96b57cSHuacai Chen select TRACE_IRQFLAGS_SUPPORT 214d4b6f156SHuacai Chen select USE_PERCPU_NUMA_NODE_ID 2154d7bf939SQing Zhang select USER_STACKTRACE_SUPPORT 21618efd0b1SXi Ruoyao select VDSO_GETRANDOM 2173d9aba66SHuacai Chen select ZONE_DMA32 if 64BIT 2183d9aba66SHuacai Chen 2193d9aba66SHuacai Chenmenu "Kernel type and options" 2203d9aba66SHuacai Chen 2213d9aba66SHuacai Chenchoice 2223d9aba66SHuacai Chen prompt "Kernel type" 223*4808e5ccSHuacai Chen default 64BIT # Keep existing behavior 224fa96b57cSHuacai Chen 225fa96b57cSHuacai Chenconfig 32BIT 2263d9aba66SHuacai Chen bool "32-bit kernel" 2273d9aba66SHuacai Chen help 2283d9aba66SHuacai Chen Select this option if you want to build a 32-bit kernel. 229fa96b57cSHuacai Chen 230fa96b57cSHuacai Chenconfig 64BIT 2313d9aba66SHuacai Chen bool "64-bit kernel" 2323d9aba66SHuacai Chen help 2333d9aba66SHuacai Chen Select this option if you want to build a 64-bit kernel. 2343d9aba66SHuacai Chen 2353d9aba66SHuacai Chenendchoice 2363d9aba66SHuacai Chen 2373d9aba66SHuacai Chenif 32BIT 2383d9aba66SHuacai Chen 2393d9aba66SHuacai Chenchoice 2403d9aba66SHuacai Chen prompt "32-bit kernel sub-type" 2413d9aba66SHuacai Chen 2423d9aba66SHuacai Chenconfig 32BIT_REDUCED 2433d9aba66SHuacai Chen bool "32-bit kernel for LA32R" 2443d9aba66SHuacai Chen help 2453d9aba66SHuacai Chen Select this option if you want to build a 32-bit kernel for 2463d9aba66SHuacai Chen LoongArch32 Reduced (LA32R). 2473d9aba66SHuacai Chen 2483d9aba66SHuacai Chenconfig 32BIT_STANDARD 2493d9aba66SHuacai Chen bool "32-bit kernel for LA32S" 2503d9aba66SHuacai Chen help 2513d9aba66SHuacai Chen Select this option if you want to build a 32-bit kernel for 2523d9aba66SHuacai Chen LoongArch32 Standard (LA32S). 2533d9aba66SHuacai Chen 2543d9aba66SHuacai Chenendchoice 2553d9aba66SHuacai Chen 2563d9aba66SHuacai Chenendif 257fa96b57cSHuacai Chen 2582d2c3952SYouling Tangconfig GENERIC_BUG 2592d2c3952SYouling Tang def_bool y 2602d2c3952SYouling Tang depends on BUG 2612d2c3952SYouling Tang 2622d2c3952SYouling Tangconfig GENERIC_BUG_RELATIVE_POINTERS 2632d2c3952SYouling Tang def_bool y 2642d2c3952SYouling Tang depends on GENERIC_BUG 2652d2c3952SYouling Tang 266fa96b57cSHuacai Chenconfig GENERIC_CALIBRATE_DELAY 267fa96b57cSHuacai Chen def_bool y 268fa96b57cSHuacai Chen 269fa96b57cSHuacai Chenconfig GENERIC_CSUM 270fa96b57cSHuacai Chen def_bool y 271fa96b57cSHuacai Chen 272fa96b57cSHuacai Chenconfig GENERIC_HWEIGHT 273fa96b57cSHuacai Chen def_bool y 274fa96b57cSHuacai Chen 275fa96b57cSHuacai Chenconfig L1_CACHE_SHIFT 276fa96b57cSHuacai Chen int 277fa96b57cSHuacai Chen default "6" 278fa96b57cSHuacai Chen 279fa96b57cSHuacai Chenconfig LOCKDEP_SUPPORT 280fa96b57cSHuacai Chen bool 281fa96b57cSHuacai Chen default y 282fa96b57cSHuacai Chen 28393a4fa62SQing Zhangconfig STACKTRACE_SUPPORT 28493a4fa62SQing Zhang bool 28593a4fa62SQing Zhang default y 28693a4fa62SQing Zhang 2879550dfdeSColin Ian King# MACH_LOONGSON32 and MACH_LOONGSON64 are deliberately carried over from the 288fa96b57cSHuacai Chen# MIPS Loongson code, to preserve Loongson-specific code paths in drivers that 289fa96b57cSHuacai Chen# are shared between architectures, and specifically expecting the symbols. 290fa96b57cSHuacai Chenconfig MACH_LOONGSON32 291fa96b57cSHuacai Chen def_bool 32BIT 292fa96b57cSHuacai Chen 293fa96b57cSHuacai Chenconfig MACH_LOONGSON64 294fa96b57cSHuacai Chen def_bool 64BIT 295fa96b57cSHuacai Chen 296d2791341SHuacai Chenconfig FIX_EARLYCON_MEM 297341cf992SJiaxun Yang def_bool !ARCH_IOREMAP 298d2791341SHuacai Chen 299fa96b57cSHuacai Chenconfig PGTABLE_2LEVEL 300fa96b57cSHuacai Chen bool 301fa96b57cSHuacai Chen 302fa96b57cSHuacai Chenconfig PGTABLE_3LEVEL 303fa96b57cSHuacai Chen bool 304fa96b57cSHuacai Chen 305fa96b57cSHuacai Chenconfig PGTABLE_4LEVEL 306fa96b57cSHuacai Chen bool 307fa96b57cSHuacai Chen 308fa96b57cSHuacai Chenconfig PGTABLE_LEVELS 309fa96b57cSHuacai Chen int 310fa96b57cSHuacai Chen default 2 if PGTABLE_2LEVEL 311fa96b57cSHuacai Chen default 3 if PGTABLE_3LEVEL 312fa96b57cSHuacai Chen default 4 if PGTABLE_4LEVEL 313fa96b57cSHuacai Chen 314fa96b57cSHuacai Chenconfig SCHED_OMIT_FRAME_POINTER 315fa96b57cSHuacai Chen bool 316fa96b57cSHuacai Chen default y 317fa96b57cSHuacai Chen 3180d8dad70SXi Ruoyaoconfig AS_HAS_EXPLICIT_RELOCS 3190d8dad70SXi Ruoyao def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x)) 3200d8dad70SXi Ruoyao 32138bb46f9SWANG Xueruiconfig AS_HAS_FCSR_CLASS 32238bb46f9SWANG Xuerui def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0) 32338bb46f9SWANG Xuerui 324120dd411SXi Ruoyaoconfig AS_HAS_THIN_ADD_SUB 325a7e08377STiezhu Yang def_bool $(cc-option,-Wa$(comma)-mthin-add-sub) || AS_IS_LLVM 326120dd411SXi Ruoyao 32761650023SHuacai Chenconfig AS_HAS_LSX_EXTENSION 32861650023SHuacai Chen def_bool $(as-instr,vld \$vr0$(comma)\$a0$(comma)0) 32961650023SHuacai Chen 33061650023SHuacai Chenconfig AS_HAS_LASX_EXTENSION 33161650023SHuacai Chen def_bool $(as-instr,xvld \$xr0$(comma)\$a0$(comma)0) 33261650023SHuacai Chen 333bd3c5798SQi Huconfig AS_HAS_LBT_EXTENSION 334bd3c5798SQi Hu def_bool $(as-instr,movscr2gr \$a0$(comma)\$scr0) 335bd3c5798SQi Hu 336c1fc48aaSTianrui Zhaoconfig AS_HAS_LVZ_EXTENSION 337c1fc48aaSTianrui Zhao def_bool $(as-instr,hvcl 0) 338c1fc48aaSTianrui Zhao 339c8b8f3c5SThomas Weißschuhconfig AS_HAS_SCQ_EXTENSION 340c8b8f3c5SThomas Weißschuh def_bool $(as-instr,sc.q \$t0$(comma)\$t1$(comma)\$t2) 341c8b8f3c5SThomas Weißschuh 342e20ab7d4STiezhu Yangconfig CC_HAS_ANNOTATE_TABLEJUMP 343e20ab7d4STiezhu Yang def_bool $(cc-option,-mannotate-tablejump) 344e20ab7d4STiezhu Yang 34574f8295cSTiezhu Yangconfig RUSTC_HAS_ANNOTATE_TABLEJUMP 34674f8295cSTiezhu Yang depends on RUST 34774f8295cSTiezhu Yang def_bool $(rustc-option,-Cllvm-args=--loongarch-annotate-tablejump) 34874f8295cSTiezhu Yang 349fa96b57cSHuacai Chensource "kernel/Kconfig.hz" 350fa96b57cSHuacai Chen 3518b81576cSHuacai Chenconfig HIGHMEM 3528b81576cSHuacai Chen bool "High Memory Support" 3538b81576cSHuacai Chen depends on 32BIT 3548b81576cSHuacai Chen select KMAP_LOCAL 3558b81576cSHuacai Chen 356fa96b57cSHuacai Chenchoice 357fa96b57cSHuacai Chen prompt "Page Table Layout" 358fa96b57cSHuacai Chen default 16KB_2LEVEL if 32BIT 359fa96b57cSHuacai Chen default 16KB_3LEVEL if 64BIT 360fa96b57cSHuacai Chen help 361fa96b57cSHuacai Chen Allows choosing the page table layout, which is a combination 362fa96b57cSHuacai Chen of page size and page table levels. The size of virtual memory 363fa96b57cSHuacai Chen address space are determined by the page table layout. 364fa96b57cSHuacai Chen 3653d9aba66SHuacai Chenconfig 4KB_2LEVEL 3663d9aba66SHuacai Chen bool "4KB with 2 levels" 3673d9aba66SHuacai Chen select HAVE_PAGE_SIZE_4KB 3683d9aba66SHuacai Chen select PGTABLE_2LEVEL 3693d9aba66SHuacai Chen help 3703d9aba66SHuacai Chen This option selects 4KB page size with 2 level page tables, which 3713d9aba66SHuacai Chen support a maximum of 32 bits of application virtual memory. 3723d9aba66SHuacai Chen 373fa96b57cSHuacai Chenconfig 4KB_3LEVEL 374fa96b57cSHuacai Chen bool "4KB with 3 levels" 3753d9aba66SHuacai Chen depends on 64BIT 376ba89f9c8SArnd Bergmann select HAVE_PAGE_SIZE_4KB 377fa96b57cSHuacai Chen select PGTABLE_3LEVEL 378fa96b57cSHuacai Chen help 379fa96b57cSHuacai Chen This option selects 4KB page size with 3 level page tables, which 380fa96b57cSHuacai Chen support a maximum of 39 bits of application virtual memory. 381fa96b57cSHuacai Chen 382fa96b57cSHuacai Chenconfig 4KB_4LEVEL 383fa96b57cSHuacai Chen bool "4KB with 4 levels" 3843d9aba66SHuacai Chen depends on 64BIT 385ba89f9c8SArnd Bergmann select HAVE_PAGE_SIZE_4KB 386fa96b57cSHuacai Chen select PGTABLE_4LEVEL 387fa96b57cSHuacai Chen help 388fa96b57cSHuacai Chen This option selects 4KB page size with 4 level page tables, which 389fa96b57cSHuacai Chen support a maximum of 48 bits of application virtual memory. 390fa96b57cSHuacai Chen 391fa96b57cSHuacai Chenconfig 16KB_2LEVEL 392fa96b57cSHuacai Chen bool "16KB with 2 levels" 393ba89f9c8SArnd Bergmann select HAVE_PAGE_SIZE_16KB 394fa96b57cSHuacai Chen select PGTABLE_2LEVEL 395fa96b57cSHuacai Chen help 396fa96b57cSHuacai Chen This option selects 16KB page size with 2 level page tables, which 397fa96b57cSHuacai Chen support a maximum of 36 bits of application virtual memory. 398fa96b57cSHuacai Chen 399fa96b57cSHuacai Chenconfig 16KB_3LEVEL 400fa96b57cSHuacai Chen bool "16KB with 3 levels" 4013d9aba66SHuacai Chen depends on 64BIT 402ba89f9c8SArnd Bergmann select HAVE_PAGE_SIZE_16KB 403fa96b57cSHuacai Chen select PGTABLE_3LEVEL 404fa96b57cSHuacai Chen help 405fa96b57cSHuacai Chen This option selects 16KB page size with 3 level page tables, which 406fa96b57cSHuacai Chen support a maximum of 47 bits of application virtual memory. 407fa96b57cSHuacai Chen 408fa96b57cSHuacai Chenconfig 64KB_2LEVEL 409fa96b57cSHuacai Chen bool "64KB with 2 levels" 410ba89f9c8SArnd Bergmann select HAVE_PAGE_SIZE_64KB 411fa96b57cSHuacai Chen select PGTABLE_2LEVEL 412fa96b57cSHuacai Chen help 413fa96b57cSHuacai Chen This option selects 64KB page size with 2 level page tables, which 414fa96b57cSHuacai Chen support a maximum of 42 bits of application virtual memory. 415fa96b57cSHuacai Chen 416fa96b57cSHuacai Chenconfig 64KB_3LEVEL 417fa96b57cSHuacai Chen bool "64KB with 3 levels" 4183d9aba66SHuacai Chen depends on 64BIT 419ba89f9c8SArnd Bergmann select HAVE_PAGE_SIZE_64KB 420fa96b57cSHuacai Chen select PGTABLE_3LEVEL 421fa96b57cSHuacai Chen help 422fa96b57cSHuacai Chen This option selects 64KB page size with 3 level page tables, which 423fa96b57cSHuacai Chen support a maximum of 55 bits of application virtual memory. 424fa96b57cSHuacai Chen 425fa96b57cSHuacai Chenendchoice 426fa96b57cSHuacai Chen 427fa96b57cSHuacai Chenconfig CMDLINE 428fa96b57cSHuacai Chen string "Built-in kernel command line" 429fa96b57cSHuacai Chen help 430fa96b57cSHuacai Chen For most platforms, the arguments for the kernel's command line 431fa96b57cSHuacai Chen are provided at run-time, during boot. However, there are cases 432fa96b57cSHuacai Chen where either no arguments are being provided or the provided 433fa96b57cSHuacai Chen arguments are insufficient or even invalid. 434fa96b57cSHuacai Chen 435fa96b57cSHuacai Chen When that occurs, it is possible to define a built-in command 436fa96b57cSHuacai Chen line here and choose how the kernel should use it later on. 437fa96b57cSHuacai Chen 438fa96b57cSHuacai Chenchoice 439fa96b57cSHuacai Chen prompt "Kernel command line type" 440fa96b57cSHuacai Chen default CMDLINE_BOOTLOADER 441fa96b57cSHuacai Chen help 442fa96b57cSHuacai Chen Choose how the kernel will handle the provided built-in command 443fa96b57cSHuacai Chen line. 444fa96b57cSHuacai Chen 445fa96b57cSHuacai Chenconfig CMDLINE_BOOTLOADER 446fa96b57cSHuacai Chen bool "Use bootloader kernel arguments if available" 447fa96b57cSHuacai Chen help 448fa96b57cSHuacai Chen Prefer the command-line passed by the boot loader if available. 449fa96b57cSHuacai Chen Use the built-in command line as fallback in case we get nothing 450fa96b57cSHuacai Chen during boot. This is the default behaviour. 451fa96b57cSHuacai Chen 452fa96b57cSHuacai Chenconfig CMDLINE_EXTEND 453fa96b57cSHuacai Chen bool "Use built-in to extend bootloader kernel arguments" 454fa96b57cSHuacai Chen help 455be216cbcS谢致邦 (XIE Zhibang) The built-in command line will be appended to the command- 456be216cbcS谢致邦 (XIE Zhibang) line arguments provided during boot. This is useful in 457fa96b57cSHuacai Chen cases where the provided arguments are insufficient and 458fa96b57cSHuacai Chen you don't want to or cannot modify them. 459fa96b57cSHuacai Chen 460fa96b57cSHuacai Chenconfig CMDLINE_FORCE 461fa96b57cSHuacai Chen bool "Always use the built-in kernel command string" 462fa96b57cSHuacai Chen help 463fa96b57cSHuacai Chen Always use the built-in command line, even if we get one during 464fa96b57cSHuacai Chen boot. This is useful in case you need to override the provided 465fa96b57cSHuacai Chen command line on systems where you don't have or want control 466fa96b57cSHuacai Chen over it. 467fa96b57cSHuacai Chen 468fa96b57cSHuacai Chenendchoice 469fa96b57cSHuacai Chen 4705f346a6eSBinbin Zhouconfig BUILTIN_DTB 4715f346a6eSBinbin Zhou bool "Enable built-in dtb in kernel" 4725f346a6eSBinbin Zhou depends on OF 473c91ddab5SMasahiro Yamada select GENERIC_BUILTIN_DTB 4745f346a6eSBinbin Zhou help 4755f346a6eSBinbin Zhou Some existing systems do not provide a canonical device tree to 4765f346a6eSBinbin Zhou the kernel at boot time. Let's provide a device tree table in the 4775f346a6eSBinbin Zhou kernel, keyed by the dts filename, containing the relevant DTBs. 4785f346a6eSBinbin Zhou 4795f346a6eSBinbin Zhou Built-in DTBs are generic enough and can be used as references. 4805f346a6eSBinbin Zhou 4815f346a6eSBinbin Zhouconfig BUILTIN_DTB_NAME 4825f346a6eSBinbin Zhou string "Source file for built-in dtb" 4835f346a6eSBinbin Zhou depends on BUILTIN_DTB 4845f346a6eSBinbin Zhou help 4855f346a6eSBinbin Zhou Base name (without suffix, relative to arch/loongarch/boot/dts/) 4865f346a6eSBinbin Zhou for the DTS file that will be used to produce the DTB linked into 4875f346a6eSBinbin Zhou the kernel. 4885f346a6eSBinbin Zhou 489fa96b57cSHuacai Chenconfig DMI 490fa96b57cSHuacai Chen bool "Enable DMI scanning" 491fa96b57cSHuacai Chen select DMI_SCAN_MACHINE_NON_EFI_FALLBACK 492fa96b57cSHuacai Chen default y 493fa96b57cSHuacai Chen help 494fa96b57cSHuacai Chen This enables SMBIOS/DMI feature for systems, and scanning of 495fa96b57cSHuacai Chen DMI to identify machine quirks. 496fa96b57cSHuacai Chen 497fa96b57cSHuacai Chenconfig EFI 498fa96b57cSHuacai Chen bool "EFI runtime service support" 499fa96b57cSHuacai Chen select UCS2_STRING 500fa96b57cSHuacai Chen select EFI_RUNTIME_WRAPPERS 501fa96b57cSHuacai Chen help 502fa96b57cSHuacai Chen This enables the kernel to use EFI runtime services that are 503fa96b57cSHuacai Chen available (such as the EFI variable services). 504fa96b57cSHuacai Chen 505ead384d9SHuacai Chenconfig EFI_STUB 506ead384d9SHuacai Chen bool "EFI boot stub support" 507ead384d9SHuacai Chen default y 508ead384d9SHuacai Chen depends on EFI 509ead384d9SHuacai Chen select EFI_GENERIC_STUB 510ead384d9SHuacai Chen help 511ead384d9SHuacai Chen This kernel feature allows the kernel to be loaded directly by 512ead384d9SHuacai Chen EFI firmware without the use of a bootloader. 513ead384d9SHuacai Chen 51446859ac8SHuacai Chenconfig SMP 51546859ac8SHuacai Chen bool "Multi-Processing support" 5163d9aba66SHuacai Chen depends on 64BIT 51746859ac8SHuacai Chen help 51846859ac8SHuacai Chen This enables support for systems with more than one CPU. If you have 51946859ac8SHuacai Chen a system with only one CPU, say N. If you have a system with more 52046859ac8SHuacai Chen than one CPU, say Y. 52146859ac8SHuacai Chen 52246859ac8SHuacai Chen If you say N here, the kernel will run on uni- and multiprocessor 52346859ac8SHuacai Chen machines, but will use only one CPU of a multiprocessor machine. If 52446859ac8SHuacai Chen you say Y here, the kernel will run on many, but not all, 52546859ac8SHuacai Chen uniprocessor machines. On a uniprocessor machine, the kernel 52646859ac8SHuacai Chen will run faster if you say N here. 52746859ac8SHuacai Chen 52846859ac8SHuacai Chen See also the SMP-HOWTO available at <http://www.tldp.org/docs.html#howto>. 52946859ac8SHuacai Chen 53046859ac8SHuacai Chen If you don't know what to do here, say N. 53146859ac8SHuacai Chen 53246859ac8SHuacai Chenconfig HOTPLUG_CPU 53346859ac8SHuacai Chen bool "Support for hot-pluggable CPUs" 53446859ac8SHuacai Chen depends on SMP 53546859ac8SHuacai Chen select GENERIC_IRQ_MIGRATION 53646859ac8SHuacai Chen help 53746859ac8SHuacai Chen Say Y here to allow turning CPUs off and on. CPUs can be 53846859ac8SHuacai Chen controlled through /sys/devices/system/cpu. 53946859ac8SHuacai Chen (Note: power management support will enable this option 54046859ac8SHuacai Chen automatically on SMP systems. ) 54146859ac8SHuacai Chen Say N if you want to disable CPU hotplug. 54246859ac8SHuacai Chen 54346859ac8SHuacai Chenconfig NR_CPUS 5449559d580SHuacai Chen int "Maximum number of CPUs (2-2048)" 5459559d580SHuacai Chen range 2 2048 5469559d580SHuacai Chen default "2048" 54746859ac8SHuacai Chen depends on SMP 54846859ac8SHuacai Chen help 54946859ac8SHuacai Chen This allows you to specify the maximum number of CPUs which this 55046859ac8SHuacai Chen kernel will support. 55146859ac8SHuacai Chen 552d4b6f156SHuacai Chenconfig NUMA 553d4b6f156SHuacai Chen bool "NUMA Support" 554255b4658SHuacai Chen select SMP 5553d9aba66SHuacai Chen depends on 64BIT 556d4b6f156SHuacai Chen help 557d4b6f156SHuacai Chen Say Y to compile the kernel with NUMA (Non-Uniform Memory Access) 558d4b6f156SHuacai Chen support. This option improves performance on systems with more 559d4b6f156SHuacai Chen than one NUMA node; on single node systems it is generally better 560d4b6f156SHuacai Chen to leave it disabled. 561d4b6f156SHuacai Chen 562d4b6f156SHuacai Chenconfig NODES_SHIFT 563d4b6f156SHuacai Chen int 564d4b6f156SHuacai Chen default "6" 565d4b6f156SHuacai Chen depends on NUMA 566d4b6f156SHuacai Chen 5670192445cSZi Yanconfig ARCH_FORCE_MAX_ORDER 568fa96b57cSHuacai Chen int "Maximum zone order" 56923baf831SKirill A. Shutemov default "13" if PAGE_SIZE_64KB 57023baf831SKirill A. Shutemov default "11" if PAGE_SIZE_16KB 57123baf831SKirill A. Shutemov default "10" 572fa96b57cSHuacai Chen help 573fa96b57cSHuacai Chen The kernel memory allocator divides physically contiguous memory 574fa96b57cSHuacai Chen blocks into "zones", where each zone is a power of two number of 575fa96b57cSHuacai Chen pages. This option selects the largest power of two that the kernel 576fa96b57cSHuacai Chen keeps in the memory allocator. If you need to allocate very large 577fa96b57cSHuacai Chen blocks of physically contiguous memory, then you may need to 578fa96b57cSHuacai Chen increase this value. 579fa96b57cSHuacai Chen 580fa96b57cSHuacai Chen The page size is not necessarily 4KB. Keep this in mind 581fa96b57cSHuacai Chen when choosing a value for this option. 582fa96b57cSHuacai Chen 583d2791341SHuacai Chenconfig ARCH_IOREMAP 584d2791341SHuacai Chen bool "Enable LoongArch DMW-based ioremap()" 585d2791341SHuacai Chen help 586d2791341SHuacai Chen We use generic TLB-based ioremap() by default since it has page 587d2791341SHuacai Chen protection support. However, you can enable LoongArch DMW-based 588d2791341SHuacai Chen ioremap() for better performance. 589d2791341SHuacai Chen 59016c52e50SHuacai Chenconfig ARCH_WRITECOMBINE 59116c52e50SHuacai Chen bool "Enable WriteCombine (WUC) for ioremap()" 59216c52e50SHuacai Chen help 59316c52e50SHuacai Chen LoongArch maintains cache coherency in hardware, but when paired 59416c52e50SHuacai Chen with LS7A chipsets the WUC attribute (Weak-ordered UnCached, which 59516c52e50SHuacai Chen is similar to WriteCombine) is out of the scope of cache coherency 59616c52e50SHuacai Chen machanism for PCIe devices (this is a PCIe protocol violation, which 59716c52e50SHuacai Chen may be fixed in newer chipsets). 59816c52e50SHuacai Chen 59916c52e50SHuacai Chen This means WUC can only used for write-only memory regions now, so 60016c52e50SHuacai Chen this option is disabled by default, making WUC silently fallback to 60116c52e50SHuacai Chen SUC for ioremap(). You can enable this option if the kernel is ensured 60216c52e50SHuacai Chen to run on hardware without this bug. 60316c52e50SHuacai Chen 60416c52e50SHuacai Chen You can override this setting via writecombine=on/off boot parameter. 60516c52e50SHuacai Chen 60641596803SHuacai Chenconfig ARCH_STRICT_ALIGN 60741596803SHuacai Chen bool "Enable -mstrict-align to prevent unaligned accesses" if EXPERT 60841596803SHuacai Chen default y 60941596803SHuacai Chen help 61041596803SHuacai Chen Not all LoongArch cores support h/w unaligned access, we can use 61141596803SHuacai Chen -mstrict-align build parameter to prevent unaligned accesses. 61241596803SHuacai Chen 61341596803SHuacai Chen CPUs with h/w unaligned access support: 614f5003098STiezhu Yang Loongson-2K2000/2K3000 and all of Loongson-3 series processors 615f5003098STiezhu Yang based on LoongArch. 61641596803SHuacai Chen 61741596803SHuacai Chen CPUs without h/w unaligned access support: 618f5003098STiezhu Yang Loongson-2K0300/2K0500/2K1000. 619f5003098STiezhu Yang 620f5003098STiezhu Yang If you want to make sure whether to support unaligned memory access 621f5003098STiezhu Yang on your hardware, please read the bit 20 (UAL) of CPUCFG1 register. 62241596803SHuacai Chen 62341596803SHuacai Chen This option is enabled by default to make the kernel be able to run 62441596803SHuacai Chen on all LoongArch systems. But you can disable it manually if you want 62541596803SHuacai Chen to run kernel only on systems with h/w unaligned access support in 62641596803SHuacai Chen order to optimise for performance. 62741596803SHuacai Chen 62879974cc3SHuacai Chenconfig CPU_HAS_AMO 62979974cc3SHuacai Chen bool 63079974cc3SHuacai Chen default 64BIT 63179974cc3SHuacai Chen 63261650023SHuacai Chenconfig CPU_HAS_FPU 63361650023SHuacai Chen bool 63461650023SHuacai Chen default y 63561650023SHuacai Chen 63661650023SHuacai Chenconfig CPU_HAS_LSX 63761650023SHuacai Chen bool "Support for the Loongson SIMD Extension" 6383d9aba66SHuacai Chen depends on AS_HAS_LSX_EXTENSION && 64BIT 63961650023SHuacai Chen help 64061650023SHuacai Chen Loongson SIMD Extension (LSX) introduces 128 bit wide vector registers 64161650023SHuacai Chen and a set of SIMD instructions to operate on them. When this option 64261650023SHuacai Chen is enabled the kernel will support allocating & switching LSX 64361650023SHuacai Chen vector register contexts. If you know that your kernel will only be 64461650023SHuacai Chen running on CPUs which do not support LSX or that your userland will 64561650023SHuacai Chen not be making use of it then you may wish to say N here to reduce 64661650023SHuacai Chen the size & complexity of your kernel. 64761650023SHuacai Chen 64861650023SHuacai Chen If unsure, say Y. 64961650023SHuacai Chen 65061650023SHuacai Chenconfig CPU_HAS_LASX 65161650023SHuacai Chen bool "Support for the Loongson Advanced SIMD Extension" 65261650023SHuacai Chen depends on CPU_HAS_LSX 6533d9aba66SHuacai Chen depends on AS_HAS_LASX_EXTENSION && 64BIT 65461650023SHuacai Chen help 65561650023SHuacai Chen Loongson Advanced SIMD Extension (LASX) introduces 256 bit wide vector 65661650023SHuacai Chen registers and a set of SIMD instructions to operate on them. When this 65761650023SHuacai Chen option is enabled the kernel will support allocating & switching LASX 65861650023SHuacai Chen vector register contexts. If you know that your kernel will only be 65961650023SHuacai Chen running on CPUs which do not support LASX or that your userland will 66061650023SHuacai Chen not be making use of it then you may wish to say N here to reduce 66161650023SHuacai Chen the size & complexity of your kernel. 66261650023SHuacai Chen 66361650023SHuacai Chen If unsure, say Y. 66461650023SHuacai Chen 665bd3c5798SQi Huconfig CPU_HAS_LBT 666bd3c5798SQi Hu bool "Support for the Loongson Binary Translation Extension" 6673d9aba66SHuacai Chen depends on AS_HAS_LBT_EXTENSION && 64BIT 668bd3c5798SQi Hu help 669bd3c5798SQi Hu Loongson Binary Translation (LBT) introduces 4 scratch registers (SCR0 670bd3c5798SQi Hu to SCR3), x86/ARM eflags (eflags) and x87 fpu stack pointer (ftop). 671bd3c5798SQi Hu Enabling this option allows the kernel to allocate and switch registers 672bd3c5798SQi Hu specific to LBT. 673bd3c5798SQi Hu 674bd3c5798SQi Hu If you want to use this feature, such as the Loongson Architecture 675bd3c5798SQi Hu Translator (LAT), say Y. 676bd3c5798SQi Hu 67761650023SHuacai Chenconfig CPU_HAS_PREFETCH 67861650023SHuacai Chen bool 67961650023SHuacai Chen default y 68061650023SHuacai Chen 68119e6dd0bSEric DeVolderconfig ARCH_SUPPORTS_KEXEC 68219e6dd0bSEric DeVolder def_bool y 6834a03b2acSYouling Tang 684d162feecSYouling Tangconfig ARCH_SUPPORTS_KEXEC_FILE 685d162feecSYouling Tang def_bool 64BIT 686d162feecSYouling Tang 687d162feecSYouling Tangconfig ARCH_SELECTS_KEXEC_FILE 688d162feecSYouling Tang def_bool 64BIT 689d162feecSYouling Tang depends on KEXEC_FILE 690fc9c112fSYouling Tang select KEXEC_ELF 691d162feecSYouling Tang select RELOCATABLE 692d162feecSYouling Tang select HAVE_IMA_KEXEC if IMA 693d162feecSYouling Tang 69419e6dd0bSEric DeVolderconfig ARCH_SUPPORTS_CRASH_DUMP 6953d9aba66SHuacai Chen def_bool 64BIT 6964a03b2acSYouling Tang 69731daa343SDave Vasilevskyconfig ARCH_DEFAULT_CRASH_DUMP 6983d9aba66SHuacai Chen def_bool 64BIT 69931daa343SDave Vasilevsky 70019e6dd0bSEric DeVolderconfig ARCH_SELECTS_CRASH_DUMP 7013d9aba66SHuacai Chen def_bool 64BIT 70219e6dd0bSEric DeVolder depends on CRASH_DUMP 7033f89765dSYouling Tang select RELOCATABLE 7044e62d1d8SYouling Tang 70578de91b4SYouling Tangconfig ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION 706697f3342SBaoquan He def_bool CRASH_RESERVE 70778de91b4SYouling Tang 708d8da19fbSYouling Tangconfig RELOCATABLE 709d8da19fbSYouling Tang bool "Relocatable kernel" 7103d9aba66SHuacai Chen depends on 64BIT 711e05d4cd9SXi Ruoyao select ARCH_HAS_RELR 712d8da19fbSYouling Tang help 713d8da19fbSYouling Tang This builds the kernel as a Position Independent Executable (PIE), 714d8da19fbSYouling Tang which retains all relocation metadata required, so as to relocate 715d8da19fbSYouling Tang the kernel binary at runtime to a different virtual address from 716d8da19fbSYouling Tang its link address. 717d8da19fbSYouling Tang 718e5f02b51SYouling Tangconfig RANDOMIZE_BASE 719e5f02b51SYouling Tang bool "Randomize the address of the kernel (KASLR)" 720e5f02b51SYouling Tang depends on RELOCATABLE 721e5f02b51SYouling Tang help 722e5f02b51SYouling Tang Randomizes the physical and virtual address at which the 723e5f02b51SYouling Tang kernel image is loaded, as a security feature that 724e5f02b51SYouling Tang deters exploit attempts relying on knowledge of the location 725e5f02b51SYouling Tang of kernel internals. 726e5f02b51SYouling Tang 727e5f02b51SYouling Tang The kernel will be offset by up to RANDOMIZE_BASE_MAX_OFFSET. 728e5f02b51SYouling Tang 729e5f02b51SYouling Tang If unsure, say N. 730e5f02b51SYouling Tang 731e5f02b51SYouling Tangconfig RANDOMIZE_BASE_MAX_OFFSET 732e5f02b51SYouling Tang hex "Maximum KASLR offset" if EXPERT 733e5f02b51SYouling Tang depends on RANDOMIZE_BASE 734e5f02b51SYouling Tang range 0x0 0x10000000 735e5f02b51SYouling Tang default "0x01000000" 736e5f02b51SYouling Tang help 737e5f02b51SYouling Tang When KASLR is active, this provides the maximum offset that will 738e5f02b51SYouling Tang be applied to the kernel image. It should be set according to the 739e5f02b51SYouling Tang amount of physical RAM available in the target system. 740e5f02b51SYouling Tang 741e5f02b51SYouling Tang This is limited by the size of the lower address memory, 256MB. 742e5f02b51SYouling Tang 743199cc14cSJinyang Hesource "kernel/livepatch/Kconfig" 744199cc14cSJinyang He 74574c16b2eSBibo Maoconfig PARAVIRT 74674c16b2eSBibo Mao bool "Enable paravirtualization code" 7473d9aba66SHuacai Chen depends on AS_HAS_LVZ_EXTENSION && 64BIT 748b8431b90SJuergen Gross select HAVE_PV_STEAL_CLOCK_GEN 74974c16b2eSBibo Mao help 75074c16b2eSBibo Mao This changes the kernel so it can modify itself when it is run 75174c16b2eSBibo Mao under a hypervisor, potentially improving performance significantly 75274c16b2eSBibo Mao over full virtualization. However, when run without a hypervisor 75374c16b2eSBibo Mao the kernel is theoretically slower and slightly larger. 75474c16b2eSBibo Mao 75503779999SBibo Maoconfig PARAVIRT_TIME_ACCOUNTING 75603779999SBibo Mao bool "Paravirtual steal time accounting" 75703779999SBibo Mao depends on PARAVIRT 75803779999SBibo Mao help 75903779999SBibo Mao Select this option to enable fine granularity task steal time 76003779999SBibo Mao accounting. Time spent executing other tasks in parallel with 76103779999SBibo Mao the current vCPU is discounted from the vCPU power. To account for 76203779999SBibo Mao that, there can be a small performance impact. 76303779999SBibo Mao 76403779999SBibo Mao If in doubt, say N here. 76503779999SBibo Mao 766fa96b57cSHuacai Chenendmenu 767fa96b57cSHuacai Chen 768fa96b57cSHuacai Chenconfig ARCH_SELECT_MEMORY_MODEL 769fa96b57cSHuacai Chen def_bool y 770fa96b57cSHuacai Chen 771fa96b57cSHuacai Chenconfig ARCH_FLATMEM_ENABLE 772fa96b57cSHuacai Chen def_bool y 773d4b6f156SHuacai Chen depends on !NUMA 774fa96b57cSHuacai Chen 775fa96b57cSHuacai Chenconfig ARCH_SPARSEMEM_ENABLE 7763d9aba66SHuacai Chen def_bool 64BIT 7777b09f5afSFeiyang Chen select SPARSEMEM_VMEMMAP_ENABLE 778fa96b57cSHuacai Chen help 779fa96b57cSHuacai Chen Say Y to support efficient handling of sparse physical memory, 780fa96b57cSHuacai Chen for architectures which are either NUMA (Non-Uniform Memory Access) 781fa96b57cSHuacai Chen or have huge holes in the physical address space for other reasons. 782ee65728eSMike Rapoport See <file:Documentation/mm/numa.rst> for more. 783fa96b57cSHuacai Chen 784fa96b57cSHuacai Chenconfig ARCH_MEMORY_PROBE 785fa96b57cSHuacai Chen def_bool y 786fa96b57cSHuacai Chen depends on MEMORY_HOTPLUG 787fa96b57cSHuacai Chen 788fa96b57cSHuacai Chenconfig MMU 789fa96b57cSHuacai Chen bool 790fa96b57cSHuacai Chen default y 791fa96b57cSHuacai Chen 792fa96b57cSHuacai Chenconfig ARCH_MMAP_RND_BITS_MIN 7933d9aba66SHuacai Chen default 10 if 32BIT 7943d9aba66SHuacai Chen default 12 if 64BIT 795fa96b57cSHuacai Chen 796fa96b57cSHuacai Chenconfig ARCH_MMAP_RND_BITS_MAX 7973d9aba66SHuacai Chen default 15 if 32BIT 7983d9aba66SHuacai Chen default 20 if 64BIT 799fa96b57cSHuacai Chen 80019bc6cb6STiezhu Yangconfig ARCH_SUPPORTS_UPROBES 80119bc6cb6STiezhu Yang def_bool y 80219bc6cb6STiezhu Yang 8035aa4ac64SQing Zhangconfig KASAN_SHADOW_OFFSET 8045aa4ac64SQing Zhang hex 8055aa4ac64SQing Zhang default 0x0 8065aa4ac64SQing Zhang depends on KASAN 8075aa4ac64SQing Zhang 808fa96b57cSHuacai Chenmenu "Power management options" 809fa96b57cSHuacai Chen 810366bb35aSHuacai Chenconfig ARCH_SUSPEND_POSSIBLE 811366bb35aSHuacai Chen def_bool y 812366bb35aSHuacai Chen 8137db54bfeSHuacai Chenconfig ARCH_HIBERNATION_POSSIBLE 8147db54bfeSHuacai Chen def_bool y 8157db54bfeSHuacai Chen 816366bb35aSHuacai Chensource "kernel/power/Kconfig" 817fa96b57cSHuacai Chensource "drivers/acpi/Kconfig" 818f60d251bSHuacai Chensource "drivers/cpufreq/Kconfig" 819fa96b57cSHuacai Chen 820fa96b57cSHuacai Chenendmenu 821c1fc48aaSTianrui Zhao 822c1fc48aaSTianrui Zhaosource "arch/loongarch/kvm/Kconfig" 823