1# SPDX-License-Identifier: GPL-2.0 2config LOONGARCH 3 bool 4 default y 5 select ACPI 6 select ACPI_GENERIC_GSI if ACPI 7 select ACPI_MCFG if ACPI 8 select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU 9 select ACPI_PPTT if ACPI 10 select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI 11 select ARCH_BINFMT_ELF_STATE 12 select ARCH_DISABLE_KASAN_INLINE 13 select ARCH_ENABLE_MEMORY_HOTPLUG 14 select ARCH_ENABLE_MEMORY_HOTREMOVE 15 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE 16 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI 17 select ARCH_HAS_CPU_FINALIZE_INIT 18 select ARCH_HAS_CURRENT_STACK_POINTER 19 select ARCH_HAS_DEBUG_VM_PGTABLE 20 select ARCH_HAS_FAST_MULTIPLIER 21 select ARCH_HAS_FORTIFY_SOURCE 22 select ARCH_HAS_KCOV 23 select ARCH_HAS_KERNEL_FPU_SUPPORT if CPU_HAS_FPU 24 select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 25 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE 26 select ARCH_HAS_PTE_DEVMAP 27 select ARCH_HAS_PTE_SPECIAL 28 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 29 select ARCH_INLINE_READ_LOCK if !PREEMPTION 30 select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION 31 select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION 32 select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION 33 select ARCH_INLINE_READ_UNLOCK if !PREEMPTION 34 select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION 35 select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION 36 select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION 37 select ARCH_INLINE_WRITE_LOCK if !PREEMPTION 38 select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION 39 select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION 40 select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION 41 select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION 42 select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION 43 select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION 44 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION 45 select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION 46 select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION 47 select ARCH_INLINE_SPIN_LOCK if !PREEMPTION 48 select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION 49 select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION 50 select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION 51 select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION 52 select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION 53 select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION 54 select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION 55 select ARCH_KEEP_MEMBLOCK 56 select ARCH_MIGHT_HAVE_PC_PARPORT 57 select ARCH_MIGHT_HAVE_PC_SERIO 58 select ARCH_SPARSEMEM_ENABLE 59 select ARCH_STACKWALK 60 select ARCH_SUPPORTS_ACPI 61 select ARCH_SUPPORTS_ATOMIC_RMW 62 select ARCH_SUPPORTS_HUGETLBFS 63 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 64 select ARCH_SUPPORTS_LTO_CLANG 65 select ARCH_SUPPORTS_LTO_CLANG_THIN 66 select ARCH_SUPPORTS_NUMA_BALANCING 67 select ARCH_USE_BUILTIN_BSWAP 68 select ARCH_USE_CMPXCHG_LOCKREF 69 select ARCH_USE_QUEUED_RWLOCKS 70 select ARCH_USE_QUEUED_SPINLOCKS 71 select ARCH_WANT_DEFAULT_BPF_JIT 72 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 73 select ARCH_WANT_LD_ORPHAN_WARN 74 select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP 75 select ARCH_WANTS_NO_INSTR 76 select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE 77 select BUILDTIME_TABLE_SORT 78 select COMMON_CLK 79 select CPU_PM 80 select EFI 81 select GENERIC_CLOCKEVENTS 82 select GENERIC_CMOS_UPDATE 83 select GENERIC_CPU_AUTOPROBE 84 select GENERIC_CPU_DEVICES 85 select GENERIC_ENTRY 86 select GENERIC_GETTIMEOFDAY 87 select GENERIC_IOREMAP if !ARCH_IOREMAP 88 select GENERIC_IRQ_MATRIX_ALLOCATOR 89 select GENERIC_IRQ_MULTI_HANDLER 90 select GENERIC_IRQ_PROBE 91 select GENERIC_IRQ_SHOW 92 select GENERIC_LIB_ASHLDI3 93 select GENERIC_LIB_ASHRDI3 94 select GENERIC_LIB_CMPDI2 95 select GENERIC_LIB_LSHRDI3 96 select GENERIC_LIB_UCMPDI2 97 select GENERIC_LIB_DEVMEM_IS_ALLOWED 98 select GENERIC_PCI_IOMAP 99 select GENERIC_SCHED_CLOCK 100 select GENERIC_SMP_IDLE_THREAD 101 select GENERIC_TIME_VSYSCALL 102 select GENERIC_VDSO_TIME_NS 103 select GPIOLIB 104 select HAS_IOPORT 105 select HAVE_ARCH_AUDITSYSCALL 106 select HAVE_ARCH_JUMP_LABEL 107 select HAVE_ARCH_JUMP_LABEL_RELATIVE 108 select HAVE_ARCH_KASAN 109 select HAVE_ARCH_KFENCE 110 select HAVE_ARCH_KGDB if PERF_EVENTS 111 select HAVE_ARCH_MMAP_RND_BITS if MMU 112 select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 113 select HAVE_ARCH_SECCOMP 114 select HAVE_ARCH_SECCOMP_FILTER 115 select HAVE_ARCH_TRACEHOOK 116 select HAVE_ARCH_TRANSPARENT_HUGEPAGE 117 select HAVE_ARCH_USERFAULTFD_MINOR if USERFAULTFD 118 select HAVE_ASM_MODVERSIONS 119 select HAVE_CONTEXT_TRACKING_USER 120 select HAVE_C_RECORDMCOUNT 121 select HAVE_DEBUG_KMEMLEAK 122 select HAVE_DEBUG_STACKOVERFLOW 123 select HAVE_DMA_CONTIGUOUS 124 select HAVE_DYNAMIC_FTRACE 125 select HAVE_DYNAMIC_FTRACE_WITH_ARGS 126 select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS 127 select HAVE_DYNAMIC_FTRACE_WITH_REGS 128 select HAVE_EBPF_JIT 129 select HAVE_EFFICIENT_UNALIGNED_ACCESS if !ARCH_STRICT_ALIGN 130 select HAVE_EXIT_THREAD 131 select HAVE_GUP_FAST 132 select HAVE_FTRACE_MCOUNT_RECORD 133 select HAVE_FUNCTION_ARG_ACCESS_API 134 select HAVE_FUNCTION_ERROR_INJECTION 135 select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER 136 select HAVE_FUNCTION_GRAPH_TRACER 137 select HAVE_FUNCTION_TRACER 138 select HAVE_GCC_PLUGINS 139 select HAVE_GENERIC_VDSO 140 select HAVE_HW_BREAKPOINT if PERF_EVENTS 141 select HAVE_IOREMAP_PROT 142 select HAVE_IRQ_EXIT_ON_IRQ_STACK 143 select HAVE_IRQ_TIME_ACCOUNTING 144 select HAVE_KPROBES 145 select HAVE_KPROBES_ON_FTRACE 146 select HAVE_KRETPROBES 147 select HAVE_LIVEPATCH 148 select HAVE_MOD_ARCH_SPECIFIC 149 select HAVE_NMI 150 select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS && AS_HAS_THIN_ADD_SUB 151 select HAVE_PCI 152 select HAVE_PERF_EVENTS 153 select HAVE_PERF_REGS 154 select HAVE_PERF_USER_STACK_DUMP 155 select HAVE_PREEMPT_DYNAMIC_KEY 156 select HAVE_REGS_AND_STACK_ACCESS_API 157 select HAVE_RELIABLE_STACKTRACE if UNWINDER_ORC 158 select HAVE_RETHOOK 159 select HAVE_RSEQ 160 select HAVE_RUST 161 select HAVE_SAMPLE_FTRACE_DIRECT 162 select HAVE_SAMPLE_FTRACE_DIRECT_MULTI 163 select HAVE_SETUP_PER_CPU_AREA if NUMA 164 select HAVE_STACK_VALIDATION if HAVE_OBJTOOL 165 select HAVE_STACKPROTECTOR 166 select HAVE_SYSCALL_TRACEPOINTS 167 select HAVE_TIF_NOHZ 168 select HAVE_VIRT_CPU_ACCOUNTING_GEN if !SMP 169 select IRQ_FORCED_THREADING 170 select IRQ_LOONGARCH_CPU 171 select LOCK_MM_AND_FIND_VMA 172 select MMU_GATHER_MERGE_VMAS if MMU 173 select MODULES_USE_ELF_RELA if MODULES 174 select NEED_PER_CPU_EMBED_FIRST_CHUNK 175 select NEED_PER_CPU_PAGE_FIRST_CHUNK 176 select OF 177 select OF_EARLY_FLATTREE 178 select PCI 179 select PCI_DOMAINS_GENERIC 180 select PCI_ECAM if ACPI 181 select PCI_LOONGSON 182 select PCI_MSI_ARCH_FALLBACKS 183 select PCI_QUIRKS 184 select PERF_USE_VMALLOC 185 select RTC_LIB 186 select SPARSE_IRQ 187 select SYSCTL_ARCH_UNALIGN_ALLOW 188 select SYSCTL_ARCH_UNALIGN_NO_WARN 189 select SYSCTL_EXCEPTION_TRACE 190 select SWIOTLB 191 select TRACE_IRQFLAGS_SUPPORT 192 select USE_PERCPU_NUMA_NODE_ID 193 select USER_STACKTRACE_SUPPORT 194 select ZONE_DMA32 195 196config 32BIT 197 bool 198 199config 64BIT 200 def_bool y 201 202config GENERIC_BUG 203 def_bool y 204 depends on BUG 205 206config GENERIC_BUG_RELATIVE_POINTERS 207 def_bool y 208 depends on GENERIC_BUG 209 210config GENERIC_CALIBRATE_DELAY 211 def_bool y 212 213config GENERIC_CSUM 214 def_bool y 215 216config GENERIC_HWEIGHT 217 def_bool y 218 219config L1_CACHE_SHIFT 220 int 221 default "6" 222 223config LOCKDEP_SUPPORT 224 bool 225 default y 226 227config STACKTRACE_SUPPORT 228 bool 229 default y 230 231# MACH_LOONGSON32 and MACH_LOONGSON64 are deliberately carried over from the 232# MIPS Loongson code, to preserve Loongson-specific code paths in drivers that 233# are shared between architectures, and specifically expecting the symbols. 234config MACH_LOONGSON32 235 def_bool 32BIT 236 237config MACH_LOONGSON64 238 def_bool 64BIT 239 240config FIX_EARLYCON_MEM 241 def_bool y 242 243config PGTABLE_2LEVEL 244 bool 245 246config PGTABLE_3LEVEL 247 bool 248 249config PGTABLE_4LEVEL 250 bool 251 252config PGTABLE_LEVELS 253 int 254 default 2 if PGTABLE_2LEVEL 255 default 3 if PGTABLE_3LEVEL 256 default 4 if PGTABLE_4LEVEL 257 258config SCHED_OMIT_FRAME_POINTER 259 bool 260 default y 261 262config AS_HAS_EXPLICIT_RELOCS 263 def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x)) 264 265config AS_HAS_FCSR_CLASS 266 def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0) 267 268config AS_HAS_THIN_ADD_SUB 269 def_bool $(cc-option,-Wa$(comma)-mthin-add-sub) || AS_IS_LLVM 270 271config AS_HAS_LSX_EXTENSION 272 def_bool $(as-instr,vld \$vr0$(comma)\$a0$(comma)0) 273 274config AS_HAS_LASX_EXTENSION 275 def_bool $(as-instr,xvld \$xr0$(comma)\$a0$(comma)0) 276 277config AS_HAS_LBT_EXTENSION 278 def_bool $(as-instr,movscr2gr \$a0$(comma)\$scr0) 279 280config AS_HAS_LVZ_EXTENSION 281 def_bool $(as-instr,hvcl 0) 282 283menu "Kernel type and options" 284 285source "kernel/Kconfig.hz" 286 287choice 288 prompt "Page Table Layout" 289 default 16KB_2LEVEL if 32BIT 290 default 16KB_3LEVEL if 64BIT 291 help 292 Allows choosing the page table layout, which is a combination 293 of page size and page table levels. The size of virtual memory 294 address space are determined by the page table layout. 295 296config 4KB_3LEVEL 297 bool "4KB with 3 levels" 298 select HAVE_PAGE_SIZE_4KB 299 select PGTABLE_3LEVEL 300 help 301 This option selects 4KB page size with 3 level page tables, which 302 support a maximum of 39 bits of application virtual memory. 303 304config 4KB_4LEVEL 305 bool "4KB with 4 levels" 306 select HAVE_PAGE_SIZE_4KB 307 select PGTABLE_4LEVEL 308 help 309 This option selects 4KB page size with 4 level page tables, which 310 support a maximum of 48 bits of application virtual memory. 311 312config 16KB_2LEVEL 313 bool "16KB with 2 levels" 314 select HAVE_PAGE_SIZE_16KB 315 select PGTABLE_2LEVEL 316 help 317 This option selects 16KB page size with 2 level page tables, which 318 support a maximum of 36 bits of application virtual memory. 319 320config 16KB_3LEVEL 321 bool "16KB with 3 levels" 322 select HAVE_PAGE_SIZE_16KB 323 select PGTABLE_3LEVEL 324 help 325 This option selects 16KB page size with 3 level page tables, which 326 support a maximum of 47 bits of application virtual memory. 327 328config 64KB_2LEVEL 329 bool "64KB with 2 levels" 330 select HAVE_PAGE_SIZE_64KB 331 select PGTABLE_2LEVEL 332 help 333 This option selects 64KB page size with 2 level page tables, which 334 support a maximum of 42 bits of application virtual memory. 335 336config 64KB_3LEVEL 337 bool "64KB with 3 levels" 338 select HAVE_PAGE_SIZE_64KB 339 select PGTABLE_3LEVEL 340 help 341 This option selects 64KB page size with 3 level page tables, which 342 support a maximum of 55 bits of application virtual memory. 343 344endchoice 345 346config CMDLINE 347 string "Built-in kernel command line" 348 help 349 For most platforms, the arguments for the kernel's command line 350 are provided at run-time, during boot. However, there are cases 351 where either no arguments are being provided or the provided 352 arguments are insufficient or even invalid. 353 354 When that occurs, it is possible to define a built-in command 355 line here and choose how the kernel should use it later on. 356 357choice 358 prompt "Kernel command line type" 359 default CMDLINE_BOOTLOADER 360 help 361 Choose how the kernel will handle the provided built-in command 362 line. 363 364config CMDLINE_BOOTLOADER 365 bool "Use bootloader kernel arguments if available" 366 help 367 Prefer the command-line passed by the boot loader if available. 368 Use the built-in command line as fallback in case we get nothing 369 during boot. This is the default behaviour. 370 371config CMDLINE_EXTEND 372 bool "Use built-in to extend bootloader kernel arguments" 373 help 374 The command-line arguments provided during boot will be 375 appended to the built-in command line. This is useful in 376 cases where the provided arguments are insufficient and 377 you don't want to or cannot modify them. 378 379config CMDLINE_FORCE 380 bool "Always use the built-in kernel command string" 381 help 382 Always use the built-in command line, even if we get one during 383 boot. This is useful in case you need to override the provided 384 command line on systems where you don't have or want control 385 over it. 386 387endchoice 388 389config BUILTIN_DTB 390 bool "Enable built-in dtb in kernel" 391 depends on OF 392 help 393 Some existing systems do not provide a canonical device tree to 394 the kernel at boot time. Let's provide a device tree table in the 395 kernel, keyed by the dts filename, containing the relevant DTBs. 396 397 Built-in DTBs are generic enough and can be used as references. 398 399config BUILTIN_DTB_NAME 400 string "Source file for built-in dtb" 401 depends on BUILTIN_DTB 402 help 403 Base name (without suffix, relative to arch/loongarch/boot/dts/) 404 for the DTS file that will be used to produce the DTB linked into 405 the kernel. 406 407config DMI 408 bool "Enable DMI scanning" 409 select DMI_SCAN_MACHINE_NON_EFI_FALLBACK 410 default y 411 help 412 This enables SMBIOS/DMI feature for systems, and scanning of 413 DMI to identify machine quirks. 414 415config EFI 416 bool "EFI runtime service support" 417 select UCS2_STRING 418 select EFI_RUNTIME_WRAPPERS 419 help 420 This enables the kernel to use EFI runtime services that are 421 available (such as the EFI variable services). 422 423config EFI_STUB 424 bool "EFI boot stub support" 425 default y 426 depends on EFI 427 select EFI_GENERIC_STUB 428 help 429 This kernel feature allows the kernel to be loaded directly by 430 EFI firmware without the use of a bootloader. 431 432config SCHED_SMT 433 bool "SMT scheduler support" 434 depends on SMP 435 default y 436 help 437 Improves scheduler's performance when there are multiple 438 threads in one physical core. 439 440config SMP 441 bool "Multi-Processing support" 442 help 443 This enables support for systems with more than one CPU. If you have 444 a system with only one CPU, say N. If you have a system with more 445 than one CPU, say Y. 446 447 If you say N here, the kernel will run on uni- and multiprocessor 448 machines, but will use only one CPU of a multiprocessor machine. If 449 you say Y here, the kernel will run on many, but not all, 450 uniprocessor machines. On a uniprocessor machine, the kernel 451 will run faster if you say N here. 452 453 See also the SMP-HOWTO available at <http://www.tldp.org/docs.html#howto>. 454 455 If you don't know what to do here, say N. 456 457config HOTPLUG_CPU 458 bool "Support for hot-pluggable CPUs" 459 depends on SMP 460 select GENERIC_IRQ_MIGRATION 461 help 462 Say Y here to allow turning CPUs off and on. CPUs can be 463 controlled through /sys/devices/system/cpu. 464 (Note: power management support will enable this option 465 automatically on SMP systems. ) 466 Say N if you want to disable CPU hotplug. 467 468config NR_CPUS 469 int "Maximum number of CPUs (2-256)" 470 range 2 256 471 depends on SMP 472 default "64" 473 help 474 This allows you to specify the maximum number of CPUs which this 475 kernel will support. 476 477config NUMA 478 bool "NUMA Support" 479 select SMP 480 help 481 Say Y to compile the kernel with NUMA (Non-Uniform Memory Access) 482 support. This option improves performance on systems with more 483 than one NUMA node; on single node systems it is generally better 484 to leave it disabled. 485 486config NODES_SHIFT 487 int 488 default "6" 489 depends on NUMA 490 491config ARCH_FORCE_MAX_ORDER 492 int "Maximum zone order" 493 default "13" if PAGE_SIZE_64KB 494 default "11" if PAGE_SIZE_16KB 495 default "10" 496 help 497 The kernel memory allocator divides physically contiguous memory 498 blocks into "zones", where each zone is a power of two number of 499 pages. This option selects the largest power of two that the kernel 500 keeps in the memory allocator. If you need to allocate very large 501 blocks of physically contiguous memory, then you may need to 502 increase this value. 503 504 The page size is not necessarily 4KB. Keep this in mind 505 when choosing a value for this option. 506 507config ARCH_IOREMAP 508 bool "Enable LoongArch DMW-based ioremap()" 509 help 510 We use generic TLB-based ioremap() by default since it has page 511 protection support. However, you can enable LoongArch DMW-based 512 ioremap() for better performance. 513 514config ARCH_WRITECOMBINE 515 bool "Enable WriteCombine (WUC) for ioremap()" 516 help 517 LoongArch maintains cache coherency in hardware, but when paired 518 with LS7A chipsets the WUC attribute (Weak-ordered UnCached, which 519 is similar to WriteCombine) is out of the scope of cache coherency 520 machanism for PCIe devices (this is a PCIe protocol violation, which 521 may be fixed in newer chipsets). 522 523 This means WUC can only used for write-only memory regions now, so 524 this option is disabled by default, making WUC silently fallback to 525 SUC for ioremap(). You can enable this option if the kernel is ensured 526 to run on hardware without this bug. 527 528 You can override this setting via writecombine=on/off boot parameter. 529 530config ARCH_STRICT_ALIGN 531 bool "Enable -mstrict-align to prevent unaligned accesses" if EXPERT 532 default y 533 help 534 Not all LoongArch cores support h/w unaligned access, we can use 535 -mstrict-align build parameter to prevent unaligned accesses. 536 537 CPUs with h/w unaligned access support: 538 Loongson-2K2000/2K3000/3A5000/3C5000/3D5000. 539 540 CPUs without h/w unaligned access support: 541 Loongson-2K500/2K1000. 542 543 This option is enabled by default to make the kernel be able to run 544 on all LoongArch systems. But you can disable it manually if you want 545 to run kernel only on systems with h/w unaligned access support in 546 order to optimise for performance. 547 548config CPU_HAS_FPU 549 bool 550 default y 551 552config CPU_HAS_LSX 553 bool "Support for the Loongson SIMD Extension" 554 depends on AS_HAS_LSX_EXTENSION 555 help 556 Loongson SIMD Extension (LSX) introduces 128 bit wide vector registers 557 and a set of SIMD instructions to operate on them. When this option 558 is enabled the kernel will support allocating & switching LSX 559 vector register contexts. If you know that your kernel will only be 560 running on CPUs which do not support LSX or that your userland will 561 not be making use of it then you may wish to say N here to reduce 562 the size & complexity of your kernel. 563 564 If unsure, say Y. 565 566config CPU_HAS_LASX 567 bool "Support for the Loongson Advanced SIMD Extension" 568 depends on CPU_HAS_LSX 569 depends on AS_HAS_LASX_EXTENSION 570 help 571 Loongson Advanced SIMD Extension (LASX) introduces 256 bit wide vector 572 registers and a set of SIMD instructions to operate on them. When this 573 option is enabled the kernel will support allocating & switching LASX 574 vector register contexts. If you know that your kernel will only be 575 running on CPUs which do not support LASX or that your userland will 576 not be making use of it then you may wish to say N here to reduce 577 the size & complexity of your kernel. 578 579 If unsure, say Y. 580 581config CPU_HAS_LBT 582 bool "Support for the Loongson Binary Translation Extension" 583 depends on AS_HAS_LBT_EXTENSION 584 help 585 Loongson Binary Translation (LBT) introduces 4 scratch registers (SCR0 586 to SCR3), x86/ARM eflags (eflags) and x87 fpu stack pointer (ftop). 587 Enabling this option allows the kernel to allocate and switch registers 588 specific to LBT. 589 590 If you want to use this feature, such as the Loongson Architecture 591 Translator (LAT), say Y. 592 593config CPU_HAS_PREFETCH 594 bool 595 default y 596 597config ARCH_SUPPORTS_KEXEC 598 def_bool y 599 600config ARCH_SUPPORTS_CRASH_DUMP 601 def_bool y 602 603config ARCH_SELECTS_CRASH_DUMP 604 def_bool y 605 depends on CRASH_DUMP 606 select RELOCATABLE 607 608config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION 609 def_bool CRASH_RESERVE 610 611config RELOCATABLE 612 bool "Relocatable kernel" 613 select ARCH_HAS_RELR 614 help 615 This builds the kernel as a Position Independent Executable (PIE), 616 which retains all relocation metadata required, so as to relocate 617 the kernel binary at runtime to a different virtual address from 618 its link address. 619 620config RANDOMIZE_BASE 621 bool "Randomize the address of the kernel (KASLR)" 622 depends on RELOCATABLE 623 help 624 Randomizes the physical and virtual address at which the 625 kernel image is loaded, as a security feature that 626 deters exploit attempts relying on knowledge of the location 627 of kernel internals. 628 629 The kernel will be offset by up to RANDOMIZE_BASE_MAX_OFFSET. 630 631 If unsure, say N. 632 633config RANDOMIZE_BASE_MAX_OFFSET 634 hex "Maximum KASLR offset" if EXPERT 635 depends on RANDOMIZE_BASE 636 range 0x0 0x10000000 637 default "0x01000000" 638 help 639 When KASLR is active, this provides the maximum offset that will 640 be applied to the kernel image. It should be set according to the 641 amount of physical RAM available in the target system. 642 643 This is limited by the size of the lower address memory, 256MB. 644 645source "kernel/livepatch/Kconfig" 646 647config PARAVIRT 648 bool "Enable paravirtualization code" 649 depends on AS_HAS_LVZ_EXTENSION 650 help 651 This changes the kernel so it can modify itself when it is run 652 under a hypervisor, potentially improving performance significantly 653 over full virtualization. However, when run without a hypervisor 654 the kernel is theoretically slower and slightly larger. 655 656config PARAVIRT_TIME_ACCOUNTING 657 bool "Paravirtual steal time accounting" 658 depends on PARAVIRT 659 help 660 Select this option to enable fine granularity task steal time 661 accounting. Time spent executing other tasks in parallel with 662 the current vCPU is discounted from the vCPU power. To account for 663 that, there can be a small performance impact. 664 665 If in doubt, say N here. 666 667endmenu 668 669config ARCH_SELECT_MEMORY_MODEL 670 def_bool y 671 672config ARCH_FLATMEM_ENABLE 673 def_bool y 674 depends on !NUMA 675 676config ARCH_SPARSEMEM_ENABLE 677 def_bool y 678 select SPARSEMEM_VMEMMAP_ENABLE 679 help 680 Say Y to support efficient handling of sparse physical memory, 681 for architectures which are either NUMA (Non-Uniform Memory Access) 682 or have huge holes in the physical address space for other reasons. 683 See <file:Documentation/mm/numa.rst> for more. 684 685config ARCH_MEMORY_PROBE 686 def_bool y 687 depends on MEMORY_HOTPLUG 688 689config MMU 690 bool 691 default y 692 693config ARCH_MMAP_RND_BITS_MIN 694 default 12 695 696config ARCH_MMAP_RND_BITS_MAX 697 default 18 698 699config ARCH_SUPPORTS_UPROBES 700 def_bool y 701 702config KASAN_SHADOW_OFFSET 703 hex 704 default 0x0 705 depends on KASAN 706 707menu "Power management options" 708 709config ARCH_SUSPEND_POSSIBLE 710 def_bool y 711 712config ARCH_HIBERNATION_POSSIBLE 713 def_bool y 714 715source "kernel/power/Kconfig" 716source "drivers/acpi/Kconfig" 717source "drivers/cpufreq/Kconfig" 718 719endmenu 720 721source "arch/loongarch/kvm/Kconfig" 722