# SPDX-License-Identifier: GPL-2.0
config LOONGARCH
	bool
	default y
	select ARCH_BINFMT_ELF_STATE
	select ARCH_CLOCKSOURCE_DATA
	select ARCH_DISCARD_MEMBLOCK
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
	select ARCH_SUPPORTS_NUMA_BALANCING
	select ARCH_SUPPORTS_UPROBES
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
	select ARCH_USE_QUEUED_RWLOCKS
	select ARCH_USE_QUEUED_SPINLOCKS
	select ARCH_WANT_IPC_PARSE_VERSION
	select BUILDTIME_EXTABLE_SORT
	select CLONE_BACKWARDS
	select CPU_PM if CPU_IDLE
	select DMA_DIRECT_OPS
	select GENERIC_ATOMIC64 if !64BIT
	select GENERIC_CLOCKEVENTS
	select GENERIC_CMOS_UPDATE
	select GENERIC_CPU_AUTOPROBE
	select GENERIC_IRQ_PROBE
	select GENERIC_IRQ_SHOW
	select GENERIC_LIB_ASHLDI3
	select GENERIC_LIB_ASHRDI3
	select GENERIC_LIB_CMPDI2
	select GENERIC_LIB_LSHRDI3
	select GENERIC_LIB_UCMPDI2
	select GENERIC_PCI_IOMAP
	select GENERIC_SCHED_CLOCK
	select GENERIC_SMP_IDLE_THREAD
	select GENERIC_TIME_VSYSCALL
	select HANDLE_DOMAIN_IRQ
	select HAVE_ARCH_COMPILER_H
	select HAVE_ARCH_JUMP_LABEL
	select HAVE_ARCH_KGDB
	select HAVE_ARCH_MMAP_RND_BITS if MMU
	select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT
	select HAVE_ARCH_SECCOMP_FILTER
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
	select HAVE_CBPF_JIT if !64BIT
	select HAVE_EBPF_JIT if 64BIT
	select HAVE_CONTEXT_TRACKING
	select HAVE_COPY_THREAD_TLS
	select HAVE_C_RECORDMCOUNT
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DEBUG_STACKOVERFLOW
	select HAVE_DMA_CONTIGUOUS
	select HAVE_DYNAMIC_FTRACE
	select HAVE_EXIT_THREAD
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_TRACER
	select HAVE_GENERIC_DMA_COHERENT
	select HAVE_IDE
	select HAVE_IRQ_EXIT_ON_IRQ_STACK
	select HAVE_IRQ_TIME_ACCOUNTING
	select HAVE_KPROBES
	select HAVE_KRETPROBES
	select HAVE_MEMBLOCK
	select HAVE_MEMBLOCK_NODE_MAP
	select HAVE_MOD_ARCH_SPECIFIC
	select HAVE_NMI
	select HAVE_OPROFILE
	select HAVE_PERF_EVENTS
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RSEQ
	select HAVE_STACKPROTECTOR
	select HAVE_SYSCALL_TRACEPOINTS
	select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
	select IRQ_FORCED_THREADING
	select MODULES_USE_ELF_RELA if MODULES && 64BIT
	select MODULES_USE_ELF_REL if MODULES
	select PERF_USE_VMALLOC
	select RTC_LIB if !MACH_LOONGSON64
	select SYSCTL_EXCEPTION_TRACE
	select VIRT_TO_BUS
	select NO_BOOTMEM
	select ARCH_SUPPORTS_ACPI
	select ARCH_HAS_ACPI_TABLE_UPGRADE	if ACPI
	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI

menu "Machine selection"

choice
	prompt "System type"
	default LOONGARCH_GENERIC

config LOONGARCH_GENERIC
	bool "Generic board-agnostic LOONGARCH kernel"
	select BOOT_RAW
	select BUILTIN_DTB
	select CEVT_R4K
	select CLKSRC_LOONGARCH_GIC
	select COMMON_CLK
	select CPU_LOONGARCHR2_IRQ_VI
	select CPU_LOONGARCHR2_IRQ_EI
	select CSRC_R4K
	select HW_HAS_PCI
	select IRQ_LOONGARCH_CPU
	select LIBFDT
	select LOONGARCH_AUTO_PFN_OFFSET
	select LOONGARCH_CPU_SCACHE
	select LOONGARCH_GIC
	select NO_EXCEPT_FILL
	select PCI_DRIVERS_GENERIC
	select PINCTRL
	select SMP_UP if SMP
	select SWAP_IO_SPACE
	select SYS_HAS_CPU_LOONGARCH32_R1
	select SYS_HAS_CPU_LOONGARCH32_R2
	select SYS_HAS_CPU_LOONGARCH64_R1
	select SYS_HAS_CPU_LOONGARCH64_R2
	select SYS_SUPPORTS_32BIT_KERNEL
	select SYS_SUPPORTS_64BIT_KERNEL
	select SYS_SUPPORTS_BIG_ENDIAN
	select SYS_SUPPORTS_HIGHMEM
	select SYS_SUPPORTS_LITTLE_ENDIAN
	select SYS_SUPPORTS_LOONGARCH_CPS
	select SYS_SUPPORTS_LOONGARCH16
	select SYS_SUPPORTS_MULTITHREADING
	select SYS_SUPPORTS_RELOCATABLE
	select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
	select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
	select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
	select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
	select USB_UHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
	select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
	select USE_OF
	help
	  Select this to build a kernel which aims to support multiple boards,
	  generally using a flattened device tree passed from the bootloader
	  using the boot protocol defined in the UHI (Unified Hosting
	  Interface) specification.

config MACH_LOONGSON64
	bool "Loongson-2/3 family of machines"
	select SYS_SUPPORTS_ZBOOT
	help
	  This enables the support of Loongson-2/3 family of machines.

	  Loongson-2 is a family of single-core CPUs and Loongson-3 is a
	  family of multi-core CPUs. They are both 64-bit general-purpose
	  LOONGARCH-compatible CPUs. Loongson-2/3 are developed by the Institute
	  of Computing Technology (ICT), Chinese Academy of Sciences (CAS)
	  in the People's Republic of China. The chief architect is Professor
	  Weiwu Hu.

endchoice

source "arch/loongarch/la64/Kconfig"

endmenu

config RWSEM_GENERIC_SPINLOCK
	bool
	default n

config RWSEM_XCHGADD_ALGORITHM
	bool
	default y

config GENERIC_HWEIGHT
	bool
	default y

config GENERIC_CALIBRATE_DELAY
	bool
	default y

config GENERIC_CSUM
	def_bool y

config SCHED_OMIT_FRAME_POINTER
	bool
	default y

#
# Select some configuration options automatically based on user selections.
#
config FW_ARC
	bool

config ARCH_MAY_HAVE_PC_FDC
	bool

config BOOT_RAW
	bool

config CEVT_R4K
	bool

config CSRC_R4K
	bool


config LOONGARCH_CLOCK_VSYSCALL
	def_bool CSRC_R4K || CLKSRC_LOONGARCH_GIC

config FW_CFE
	bool

config ARCH_SUPPORTS_UPROBES
	bool

config SYS_HAS_EARLY_PRINTK
	bool

config SYS_SUPPORTS_HOTPLUG_CPU
	bool

config SYNC_R4K
	bool

config LOONGARCH_MACHINE
	def_bool n

config NO_IOPORT_MAP
	def_bool n

config GENERIC_CSUM
	bool

config GENERIC_ISA_DMA
	bool
	select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
	select ISA_DMA_API

config GENERIC_ISA_DMA_SUPPORT_BROKEN
	bool
	select GENERIC_ISA_DMA

config ISA_DMA_API
	bool

config HOLES_IN_ZONE
	bool

config SYS_SUPPORTS_RELOCATABLE
	bool
	help
	 Selected if the platform supports relocating the kernel.
	 The platform must provide plat_get_fdt() if it selects CONFIG_USE_OF
	 to allow access to command line and entropy sources.

config LOONGARCH_CBPF_JIT
	def_bool y
	depends on BPF_JIT && HAVE_CBPF_JIT

config LOONGARCH_EBPF_JIT
	def_bool y
	depends on BPF_JIT && HAVE_EBPF_JIT


#
# Endianness selection.  Sufficiently obscure so many users don't know what to
# answer,so we try hard to limit the available choices.  Also the use of a
# choice statement should be more obvious to the user.
#
choice
	prompt "Endianness selection"
	help
	  Some LOONGARCH machines can be configured for either little or big endian
	  byte order. These modes require different kernels and a different
	  Linux distribution.  In general there is one preferred byteorder for a
	  particular system but some systems are just as commonly used in the
	  one or the other endianness.

config CPU_BIG_ENDIAN
	bool "Big endian"
	depends on SYS_SUPPORTS_BIG_ENDIAN

config CPU_LITTLE_ENDIAN
	bool "Little endian"
	depends on SYS_SUPPORTS_LITTLE_ENDIAN

endchoice

config EXPORT_UASM
	bool

config SYS_SUPPORTS_APM_EMULATION
	bool

config SYS_SUPPORTS_BIG_ENDIAN
	bool

config SYS_SUPPORTS_LITTLE_ENDIAN
	bool

config SYS_SUPPORTS_HUGETLBFS
	def_bool y

config NO_EXCEPT_FILL
	bool

config SWAP_IO_SPACE
	bool

config SGI_HAS_INDYDOG
	bool

config SGI_HAS_HAL2
	bool

config SGI_HAS_SEEQ
	bool

config SGI_HAS_WD93
	bool

config SGI_HAS_ZILOG
	bool

config SGI_HAS_I8042
	bool

config DEFAULT_SGI_PARTITION
	bool

config FW_ARC32
	bool

config FW_SNIPROM
	bool

config BOOT_ELF32
	bool

config LOONGARCH_L1_CACHE_SHIFT_6
	bool

config LOONGARCH_L1_CACHE_SHIFT
	int
	default "6"

config HAVE_STD_PC_SERIAL_PORT
	bool

config BOOT_ELF64
	bool

menu "CPU selection"

choice
	prompt "CPU type"
	default CPU_LOONGSON3

config CPU_LOONGSON3
	bool "Loongson 3 CPU"
	depends on SYS_HAS_CPU_LOONGSON3
	select ARCH_HAS_PHYS_TO_DMA
	select CPU_SUPPORTS_64BIT_KERNEL
	select CPU_SUPPORTS_HIGHMEM
	select CPU_SUPPORTS_MSA
	select CPU_SUPPORTS_LASX
	select CPU_SUPPORTS_LAMO_INSTRUCTIONS
	select WEAK_ORDERING
	select WEAK_REORDERING_BEYOND_LLSC
	select LOONGARCH_PGD_C0_CONTEXT
	select LOONGARCH_L1_CACHE_SHIFT_6
	select GPIOLIB
	select SWIOTLB
	select LOONGARCH_ASID_BITS_VARIABLE
	select CPU_LOONGARCHR2_IRQ_VI
	select HAVE_KVM
	select ARCH_SUPPORTS_ATOMIC_RMW
	help
		The Loongson 3 processor implements the LOONGARCH64R2 instruction
		set with many extensions.

config LOONGSON3_CPUAUTOPLUG
	tristate "Loongson 3 CPUAutoplug Driver"
	depends on CPU_LOONGSON3 && HOTPLUG_CPU
	help
	  This option adds a CPUAutoplug driver for Loongson-3 multi-core processors
	  which cpu frequencies of all cores should be configured together.

	  If in doubt, say N.

config LOONGSON3_ENHANCEMENT
	bool "New Loongson 3 CPU Enhancements"
	default n
	select CPU_LOONGARCHR2
	select CPU_HAS_PREFETCH
	depends on CPU_LOONGSON3
	help
	  New Loongson 3 CPU (since Loongson-3A R2, as opposed to Loongson-3A
	  R1, Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as
	  FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPv2 ASE, User
	  Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer),
	  Fast TLB refill support, etc.

	  This option enable those enhancements which are not probed at run
	  time. If you want a generic kernel to run on all Loongson 3 machines,
	  please say 'N' here. If you want a high-performance kernel to run on
	  new Loongson 3 machines only, please say 'Y' here.

config CPU_LOONGSON3_WORKAROUNDS
	bool "Old Loongson 3 LLSC Workarounds"
	default y if SMP
	depends on CPU_LOONGSON3
	help
	  Loongson 3 processors have the llsc issues which require workarounds.
	  Without workarounds the system may hang unexpectedly.

	  Newer Loongson 3 will fix these issues and no workarounds are needed.
	  The workarounds have no significant side effect on them but may
	  decrease the performance of the system so this option should be
	  disabled unless the kernel is intended to be run on old systems.

	  If unsure, please say Y.

config CPU_LOONGARCH64_R1
	bool "LOONGARCH64 Release 1"
	depends on SYS_HAS_CPU_LOONGARCH64_R1
	select CPU_HAS_PREFETCH
	select CPU_SUPPORTS_32BIT_KERNEL
	select CPU_SUPPORTS_64BIT_KERNEL
	select CPU_SUPPORTS_HIGHMEM
	help
	  Choose this option to build a kernel for release 1 or later of the
	  LOONGARCH64 architecture.  Many modern embedded systems with a 64-bit
	  LOONGARCH processor are based on a LOONGARCH64 processor.  If you know the
	  specific type of processor in your system, choose those that one
	  otherwise CPU_LOONGARCH64_R1 is a safe bet for any LOONGARCH64 system.
	  Release 2 of the LOONGARCH64 architecture is available since several
	  years so chances are you even have a LOONGARCH64 Release 2 processor
	  in which case you should choose CPU_LOONGARCH64_R2 instead for better
	  performance.

config CPU_LOONGARCH64_R2
	bool "LOONGARCH64 Release 2"
	depends on SYS_HAS_CPU_LOONGARCH64_R2
	select CPU_HAS_PREFETCH
	select CPU_SUPPORTS_32BIT_KERNEL
	select CPU_SUPPORTS_64BIT_KERNEL
	select CPU_SUPPORTS_HIGHMEM
	select CPU_SUPPORTS_MSA
	select HAVE_KVM
	select ARCH_SUPPORTS_ATOMIC_RMW
	help
	  Choose this option to build a kernel for release 2 or later of the
	  LOONGARCH64 architecture.  Many modern embedded systems with a 64-bit
	  LOONGARCH processor are based on a LOONGARCH64 processor.  If you know the
	  specific type of processor in your system, choose those that one
	  otherwise CPU_LOONGARCH64_R1 is a safe bet for any LOONGARCH64 system.

endchoice

config SYS_SUPPORTS_ZBOOT
	bool
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_BZIP2
	select HAVE_KERNEL_LZ4
	select HAVE_KERNEL_LZMA
	select HAVE_KERNEL_LZO
	select HAVE_KERNEL_XZ

config SYS_SUPPORTS_ZBOOT_UART16550
	bool
	select SYS_SUPPORTS_ZBOOT

config SYS_SUPPORTS_ZBOOT_UART_PROM
	bool
	select SYS_SUPPORTS_ZBOOT


config SYS_HAS_CPU_LOONGSON3
	bool
	select CPU_SUPPORTS_CPUFREQ
	select CPU_HAS_RIXI

config SYS_HAS_CPU_LOONGARCH64_R1
	bool

config SYS_HAS_CPU_LOONGARCH64_R2
	bool

#
# CPU may reorder R->R, R->W, W->R, W->W
# Reordering beyond LL and SC is handled in WEAK_REORDERING_BEYOND_LLSC
#
config WEAK_ORDERING
	bool

#
# CPU may reorder reads and writes beyond LL/SC
# CPU may reorder R->LL, R->LL, W->LL, W->LL, R->SC, R->SC, W->SC, W->SC
#
config WEAK_REORDERING_BEYOND_LLSC
	bool



config EFI
	bool "EFI runtime service support"
	select UCS2_STRING
	select EFI_RUNTIME_WRAPPERS
	---help---
	  This enables the kernel to use EFI runtime services that are
	  available (such as the EFI variable services).

	  This option is only useful on systems that have EFI firmware.
	  In addition, you should use the latest ELILO loader available
	  at <http://elilo.sourceforge.net> in order to take advantage
	  of EFI runtime services. However, even with this option, the
	  resultant kernel should continue to boot on existing non-EFI
	  platforms.


endmenu

#
# These two indicate any level of the LOONGARCH32 and LOONGARCH64 architecture
#
config CPU_LOONGARCH32
	bool
	default y if CPU_LOONGARCH32_R1 || CPU_LOONGARCH32_R2

config CPU_LOONGARCH64
	bool
	default y if CPU_LOONGARCH64_R1 || CPU_LOONGARCH64_R2

#
# These two indicate the revision of the architecture, either Release 1 or Release 2
#
config CPU_LOONGARCHR1
	bool
	default y if CPU_LOONGARCH32_R1 || CPU_LOONGARCH64_R1

config CPU_LOONGARCHR2
	bool
	default y if CPU_LOONGARCH32_R2 || CPU_LOONGARCH64_R2
	select CPU_HAS_RIXI

config SYS_SUPPORTS_32BIT_KERNEL
	bool
config SYS_SUPPORTS_64BIT_KERNEL
	bool
config CPU_SUPPORTS_32BIT_KERNEL
	bool
config CPU_SUPPORTS_64BIT_KERNEL
	bool
config CPU_SUPPORTS_CPUFREQ
	bool
config CPU_SUPPORTS_ADDRWINCFG
	bool
config CPU_SUPPORTS_UNCACHED_ACCELERATED
	bool
config LOONGARCH_PGD_C0_CONTEXT
	bool
	default y if 64BIT && (CPU_LOONGARCHR2)

#
# Set to y for ptrace access to watch registers.
#
config HARDWARE_WATCHPOINTS
       bool
       default y if CPU_LOONGARCHR1 || CPU_LOONGARCHR2

menu "Kernel type"

choice
	prompt "Kernel code model"
	help
	  You should only select this option if you have a workload that
	  actually benefits from 64-bit processing or if your machine has
	  large memory.  You will only be presented a single option in this
	  menu if your system does not support both 32-bit and 64-bit kernels.

config 32BIT
	bool "32-bit kernel"
	depends on CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL
	select TRAD_SIGNALS
	help
	  Select this option if you want to build a 32-bit kernel.

config 64BIT
	bool "64-bit kernel"
	depends on CPU_SUPPORTS_64BIT_KERNEL && SYS_SUPPORTS_64BIT_KERNEL
	help
	  Select this option if you want to build a 64-bit kernel.

endchoice

config KVM_GUEST
	bool "KVM Guest Kernel"
	depends on BROKEN_ON_SMP
	help
	  Select this option if building a guest kernel for KVM (Trap & Emulate)
	  mode.

config KVM_GUEST_TIMER_FREQ
	int "Count/Compare Timer Frequency (MHz)"
	depends on KVM_GUEST
	default 100
	help
	  Set this to non-zero if building a guest kernel for KVM to skip RTC
	  emulation when determining guest CPU Frequency. Instead, the guest's
	  timer frequency is specified directly.

config LOONGARCH_VA_BITS_48
	bool "48 bits virtual memory"
	depends on 64BIT
	help
	  Support a maximum at least 48 bits of application virtual
	  memory.  Default is 40 bits or less, depending on the CPU.
	  For page sizes 16k and above, this option results in a small
	  memory overhead for page tables.  For 4k page size, a fourth
	  level of page tables is added which imposes both a memory
	  overhead as well as slower TLB fault handling.

	  If unsure, say N.

config CPU_SUPPORTS_LAMO_INSTRUCTIONS
	bool "Loongson support lamo instructions"
	default n
	depends on CPU_LOONGSON3
	help
	  This option enable new atomic instructions which is supported in Loongson3A4000 and later.
	  You need a special compiler that support these instructions to compile.

choice
	prompt "Kernel page size"
	default PAGE_SIZE_4KB

config PAGE_SIZE_4KB
	bool "4kB"
	depends on !CPU_LOONGSON2 && !CPU_LOONGSON3
	help
	 This option select the standard 4kB Linux page size.  On some
	 R3000-family processors this is the only available page size.  Using
	 4kB page size will minimize memory consumption and is therefore
	 recommended for low memory systems.

config PAGE_SIZE_8KB
	bool "8kB"
	depends on !LOONGARCH_VA_BITS_48
	help
	  Using 8kB page size will result in higher performance kernel at
	  the price of higher memory consumption.  This option is available
	  only on R8000 and cnLOONGARCH processors.  Note that you will need a
	  suitable Linux distribution to support this.

config PAGE_SIZE_16KB
	bool "16kB"
	help
	  Using 16kB page size will result in higher performance kernel at
	  the price of higher memory consumption.  This option is available on
	  all non-R3000 family processors.  Note that you will need a suitable
	  Linux distribution to support this.

config PAGE_SIZE_32KB
	bool "32kB"
	depends on !LOONGARCH_VA_BITS_48
	help
	  Using 32kB page size will result in higher performance kernel at
	  the price of higher memory consumption.  This option is available
	  only on cnLOONGARCH cores.  Note that you will need a suitable Linux
	  distribution to support this.

config PAGE_SIZE_64KB
	bool "64kB"
	help
	  Using 64kB page size will result in higher performance kernel at
	  the price of higher memory consumption.  This option is available on
	  all non-R3000 family processor.  Not that at the time of this
	  writing this option is still high experimental.

endchoice

config FORCE_MAX_ZONEORDER
	int "Maximum zone order"
	range 14 64 if PAGE_SIZE_64KB
	default "14" if PAGE_SIZE_64KB
	range 13 64 if PAGE_SIZE_32KB
	default "13" if PAGE_SIZE_32KB
	range 12 64 if PAGE_SIZE_16KB
	default "12" if PAGE_SIZE_16KB
	range 11 64
	default "11"
	help
	  The kernel memory allocator divides physically contiguous memory
	  blocks into "zones", where each zone is a power of two number of
	  pages.  This option selects the largest power of two that the kernel
	  keeps in the memory allocator.  If you need to allocate very large
	  blocks of physically contiguous memory, then you may need to
	  increase this value.

	  This config option is actually maximum order plus one. For example,
	  a value of 11 means that the largest free memory block is 2^10 pages.

	  The page size is not necessarily 4KB.  Keep this in mind
	  when choosing a value for this option.

config BOARD_SCACHE
	bool

config IP22_CPU_SCACHE
	bool
	select BOARD_SCACHE

#
# Support for a LOONGARCH32 / LOONGARCH64 style S-caches
#
config LOONGARCH_CPU_SCACHE
	bool
	select BOARD_SCACHE

config R5000_CPU_SCACHE
	bool
	select BOARD_SCACHE

config RM7000_CPU_SCACHE
	bool
	select BOARD_SCACHE

config SIBYTE_DMA_PAGEOPS
	bool "Use DMA to clear/copy pages"
	depends on CPU_SB1
	help
	  Instead of using the CPU to zero and copy pages, use a Data Mover
	  channel.  These DMA channels are otherwise unused by the standard
	  SiByte Linux port.  Seems to give a small performance benefit.

config CPU_HAS_PREFETCH
	bool

config CPU_GENERIC_DUMP_TLB
	bool
	default y

config CPU_HAS_FPU
	bool
	default y

config CPU_HAS_LSX
	bool "Support for the LOONGARCH SIMD Architecture"
	depends on CPU_SUPPORTS_MSA
	depends on 64BIT || LOONGARCH_O32_FP64_SUPPORT
	help
	  LOONGARCH SIMD Architecture (MSA) introduces 128 bit wide vector registers
	  and a set of SIMD instructions to operate on them. When this option
	  is enabled the kernel will support allocating & switching MSA
	  vector register contexts. If you know that your kernel will only be
	  running on CPUs which do not support MSA or that your userland will
	  not be making use of it then you may wish to say N here to reduce
	  the size & complexity of your kernel.

	  If unsure, say Y.

config CPU_HAS_LASX
    bool "Support for the Loongson Advanced SIMD Extension (EXPERIMENTAL)"
    depends on CPU_SUPPORTS_LASX
    depends on 64BIT && CPU_HAS_LSX
    help
      Loongson Advanced SIMD Extension is 256bit wide SIMD extension first
      introduced in Loongson 3A4000

	  If unsure, say Y.

config CPU_HAS_LBT
	bool
	default y

config CPU_HAS_WB
	bool

config XKS01
	bool

config CPU_HAS_RIXI
	bool

#
# Vectored interrupt mode is an R2 feature
#
config CPU_LOONGARCHR2_IRQ_VI
	bool

#
# Extended interrupt mode is an R2 feature
#
config CPU_LOONGARCHR2_IRQ_EI
	bool

config CPU_HAS_SYNC
	bool
	default y

#
# CPU non-features
#
config LOONGARCH_ASID_SHIFT
	int
	default 0

config LOONGARCH_ASID_BITS
	int
	default 0 if LOONGARCH_ASID_BITS_VARIABLE
	default 8

config LOONGARCH_ASID_BITS_VARIABLE
	bool

config LOONGARCH_CRC_SUPPORT
	bool

#
# - Highmem only makes sense for the 32-bit kernel.
# - The current highmem code will only work properly on physically indexed
#   caches such as R3000, SB1, R7000 or those that look like they're virtually
#   indexed such as R4000/R4400 SC and MC versions or R10000.  So for the
#   moment we protect the user and offer the highmem option only on machines
#   where it's known to be safe.  This will not offer highmem on a few systems
#   such as LOONGARCH32 and LOONGARCH64 CPUs which may have virtual and physically
#   indexed CPUs but we're playing safe.
# - We use SYS_SUPPORTS_HIGHMEM to offer highmem only for systems where we
#   know they might have memory configurations that could make use of highmem
#   support.
#
config HIGHMEM
	bool "High Memory Support"
	depends on 32BIT && CPU_SUPPORTS_HIGHMEM && SYS_SUPPORTS_HIGHMEM && !CPU_LOONGARCH32_3_5_EVA

config CPU_SUPPORTS_HIGHMEM
	bool

config SYS_SUPPORTS_HIGHMEM
	bool

config CPU_SUPPORTS_MSA
	bool

config CPU_SUPPORTS_LASX
	bool

config ARCH_FLATMEM_ENABLE
	def_bool y
	depends on !NUMA && !CPU_LOONGSON2

config ARCH_DISCONTIGMEM_ENABLE
	bool
	default y if SGI_IP27
	help
	  Say Y to support efficient handling of discontiguous physical memory,
	  for architectures which are either NUMA (Non-Uniform Memory Access)
	  or have huge holes in the physical address space for other reasons.
	  See <file:Documentation/vm/numa.rst> for more.

config ARCH_SPARSEMEM_ENABLE
	bool
	select SPARSEMEM_STATIC

config NUMA
	bool "NUMA Support"
	depends on SYS_SUPPORTS_NUMA
	select ACPI_NUMA if ACPI
	help
	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
	  Access).  This option improves performance on systems with more
	  than two nodes; on two node systems it is generally better to
	  leave it disabled; on single node systems disable this option
	  disabled.

config SYS_SUPPORTS_NUMA
	bool

config RELOCATABLE
	bool "Relocatable kernel"
	depends on SYS_SUPPORTS_RELOCATABLE && (CPU_LOONGARCH32_R2 || CPU_LOONGARCH64_R2)
	help
	  This builds a kernel image that retains relocation information
	  so it can be loaded someplace besides the default 1MB.
	  The relocations make the kernel binary about 15% larger,
	  but are discarded at runtime

config RELOCATION_TABLE_SIZE
	hex "Relocation table size"
	depends on RELOCATABLE
	range 0x0 0x01000000
	default "0x00100000"
	---help---
	  A table of relocation data will be appended to the kernel binary
	  and parsed at boot to fix up the relocated kernel.

	  This option allows the amount of space reserved for the table to be
	  adjusted, although the default of 1Mb should be ok in most cases.

	  The build will fail and a valid size suggested if this is too small.

	  If unsure, leave at the default value.

config RANDOMIZE_BASE
	bool "Randomize the address of the kernel image"
	depends on RELOCATABLE
	---help---
	   Randomizes the physical and virtual address at which the
	   kernel image is loaded, as a security feature that
	   deters exploit attempts relying on knowledge of the location
	   of kernel internals.

	   Entropy is generated using any coprocessor 0 registers available.

	   The kernel will be offset by up to RANDOMIZE_BASE_MAX_OFFSET.

	   If unsure, say N.

config RANDOMIZE_BASE_MAX_OFFSET
	hex "Maximum kASLR offset" if EXPERT
	depends on RANDOMIZE_BASE
	range 0x0 0x40000000 if 64BIT
	range 0x0 0x08000000
	default "0x01000000"
	---help---
	  When kASLR is active, this provides the maximum offset that will
	  be applied to the kernel image. It should be set according to the
	  amount of physical RAM available in the target system minus
	  PHYSICAL_START and must be a power of 2.

	  This is limited by the size of KSEG0, 256Mb on 32-bit or 1Gb with
	  64-bit. The default is 16Mb.

config NODES_SHIFT
	int
	default "6"
	depends on NEED_MULTIPLE_NODES

config HW_PERF_EVENTS
	bool "Enable hardware performance counter support for perf events"
	depends on PERF_EVENTS && !OPROFILE && (CPU_LOONGARCH32 || CPU_LOONGARCH64 || CPU_LOONGSON3)
	default y
	help
	  Enable hardware performance counter support for perf events. If
	  disabled, perf events will use software events only.
config DMI
	default y
	select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
	bool "Enable DMI scanning" if EXPERT
	---help---
	Enabled scanning of DMI to identify machine quirks. Say Y
	here unless you have verified that your setup is not
	affected by entries in the DMI blacklist. Required by PNP
	BIOS code.



config DMI
	default y
	select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
	bool "Enable DMI scanning" if EXPERT
	help
	  Enabled scanning of DMI to identify machine quirks. Say Y
	  here unless you have verified that your setup is not
	  affected by entries in the DMI blacklist. Required by PNP
	  BIOS code.

config SMP
	bool "Multi-Processing support"
	depends on SYS_SUPPORTS_SMP
	help
	  This enables support for systems with more than one CPU. If you have
	  a system with only one CPU, say N. If you have a system with more
	  than one CPU, say Y.

	  If you say N here, the kernel will run on uni- and multiprocessor
	  machines, but will use only one CPU of a multiprocessor machine. If
	  you say Y here, the kernel will run on many, but not all,
	  uniprocessor machines. On a uniprocessor machine, the kernel
	  will run faster if you say N here.

	  People using multiprocessor machines who say Y here should also say
	  Y to "Enhanced Real Time Clock Support", below.

	  See also the SMP-HOWTO available at
	  <http://www.tldp.org/docs.html#howto>.

	  If you don't know what to do here, say N.

config HOTPLUG_CPU
	bool "Support for hot-pluggable CPUs"
	depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU
	help
	  Say Y here to allow turning CPUs off and on. CPUs can be
	  controlled through /sys/devices/system/cpu.
	  (Note: power management support will enable this option
	    automatically on SMP systems. )
	  Say N if you want to disable CPU hotplug.

config SMP_UP
	bool

config SYS_SUPPORTS_LOONGARCH_CMP
	bool

config SYS_SUPPORTS_LOONGARCH_CPS
	bool

config SYS_SUPPORTS_SMP
	bool

config NR_CPUS_DEFAULT_4
	bool

config NR_CPUS_DEFAULT_8
	bool

config NR_CPUS_DEFAULT_16
	bool

config NR_CPUS_DEFAULT_32
	bool

config NR_CPUS_DEFAULT_64
	bool

config NR_CPUS
	int "Maximum number of CPUs (2-256)"
	range 2 256
	depends on SMP
	default "4" if NR_CPUS_DEFAULT_4
	default "8" if NR_CPUS_DEFAULT_8
	default "16" if NR_CPUS_DEFAULT_16
	default "32" if NR_CPUS_DEFAULT_32
	default "64" if NR_CPUS_DEFAULT_64
	help
	  This allows you to specify the maximum number of CPUs which this
	  kernel will support.  The maximum supported value is 32 for 32-bit
	  kernel and 64 for 64-bit kernels; the minimum value which makes
	  sense is 1 for Qemu (useful only for kernel debugging purposes)
	  and 2 for all others.

	  This is purely to save memory - each supported CPU adds
	  approximately eight kilobytes to the kernel image.  For best
	  performance should round up your number of processors to the next
	  power of two.

config LOONGARCH_PERF_SHARED_TC_COUNTERS
	bool

config LOONGARCH_NR_CPU_NR_MAP_1024
	bool

config LOONGARCH_NR_CPU_NR_MAP
	int
	depends on SMP
	default 1024 if LOONGARCH_NR_CPU_NR_MAP_1024
	default NR_CPUS if !LOONGARCH_NR_CPU_NR_MAP_1024

#
# Timer Interrupt Frequency Configuration
#

choice
	prompt "Timer frequency"
	default HZ_250
	help
	 Allows the configuration of the timer frequency.

	config HZ_24
		bool "24 HZ" if SYS_SUPPORTS_24HZ || SYS_SUPPORTS_ARBIT_HZ

	config HZ_48
		bool "48 HZ" if SYS_SUPPORTS_48HZ || SYS_SUPPORTS_ARBIT_HZ

	config HZ_100
		bool "100 HZ" if SYS_SUPPORTS_100HZ || SYS_SUPPORTS_ARBIT_HZ

	config HZ_128
		bool "128 HZ" if SYS_SUPPORTS_128HZ || SYS_SUPPORTS_ARBIT_HZ

	config HZ_250
		bool "250 HZ" if SYS_SUPPORTS_250HZ || SYS_SUPPORTS_ARBIT_HZ

	config HZ_256
		bool "256 HZ" if SYS_SUPPORTS_256HZ || SYS_SUPPORTS_ARBIT_HZ

	config HZ_1000
		bool "1000 HZ" if SYS_SUPPORTS_1000HZ || SYS_SUPPORTS_ARBIT_HZ

	config HZ_1024
		bool "1024 HZ" if SYS_SUPPORTS_1024HZ || SYS_SUPPORTS_ARBIT_HZ

endchoice

config SYS_SUPPORTS_24HZ
	bool

config SYS_SUPPORTS_48HZ
	bool

config SYS_SUPPORTS_100HZ
	bool

config SYS_SUPPORTS_128HZ
	bool

config SYS_SUPPORTS_250HZ
	bool

config SYS_SUPPORTS_256HZ
	bool

config SYS_SUPPORTS_1000HZ
	bool

config SYS_SUPPORTS_1024HZ
	bool

config SYS_SUPPORTS_ARBIT_HZ
	bool
	default y if !SYS_SUPPORTS_24HZ && \
		     !SYS_SUPPORTS_48HZ && \
		     !SYS_SUPPORTS_100HZ && \
		     !SYS_SUPPORTS_128HZ && \
		     !SYS_SUPPORTS_250HZ && \
		     !SYS_SUPPORTS_256HZ && \
		     !SYS_SUPPORTS_1000HZ && \
		     !SYS_SUPPORTS_1024HZ

config HZ
	int
	default 24 if HZ_24
	default 48 if HZ_48
	default 100 if HZ_100
	default 128 if HZ_128
	default 250 if HZ_250
	default 256 if HZ_256
	default 1000 if HZ_1000
	default 1024 if HZ_1024

config SCHED_HRTICK
	def_bool HIGH_RES_TIMERS

config KEXEC
	bool "Kexec system call"
	select KEXEC_CORE
	help
	  kexec is a system call that implements the ability to shutdown your
	  current kernel, and to start another kernel.  It is like a reboot
	  but it is independent of the system firmware.   And like a reboot
	  you can start any kernel with it, not just Linux.

	  The name comes from the similarity to the exec system call.

	  It is an ongoing process to be certain the hardware in a machine
	  is properly shutdown, so do not be surprised if this code does not
	  initially work for you.  As of this writing the exact hardware
	  interface is strongly in flux, so no good recommendation can be
	  made.

config CRASH_DUMP
	bool "Kernel crash dumps"
	help
	  Generate crash dump after being started by kexec.
	  This should be normally only set in special crash dump kernels
	  which are loaded in the main kernel with kexec-tools into
	  a specially reserved region and then later executed after
	  a crash by kdump/kexec. The crash dump kernel must be compiled
	  to a memory address not used by the main kernel or firmware using
	  PHYSICAL_START.

config PHYSICAL_START
	hex "Physical address where the kernel is loaded"
	default "0xffffffff84000000"
	depends on CRASH_DUMP
	help
	  This gives the CKSEG0 or KSEG0 address where the kernel is loaded.
	  If you plan to use kernel for capturing the crash dump change
	  this value to start of the reserved region (the "X" value as
	  specified in the "crashkernel=YM@XM" command line boot parameter
	  passed to the panic-ed kernel).

config SECCOMP
	bool "Enable seccomp to safely compute untrusted bytecode"
	depends on PROC_FS
	default y
	help
	  This kernel feature is useful for number crunching applications
	  that may need to compute untrusted bytecode during their
	  execution. By using pipes or other transports made available to
	  the process as file descriptors supporting the read/write
	  syscalls, it's possible to isolate those applications in
	  their own address space using seccomp. Once seccomp is
	  enabled via /proc/<pid>/seccomp, it cannot be disabled
	  and the task is only allowed to execute a few safe syscalls
	  defined by each seccomp mode.

	  If unsure, say Y. Only embedded should say N here.

config LOONGARCH_O32_FP64_SUPPORT
	bool "Support for O32 binaries using 64-bit FP"
	depends on 32BIT || LOONGARCH32_O32
	help
	  When this is enabled, the kernel will support use of 64-bit floating
	  point registers with binaries using the O32 ABI along with the
	  EF_LOONGARCH_FP64 ELF header flag (typically built with -mfp64). On
	  32-bit LOONGARCH systems this support is at the cost of increasing the
	  size and complexity of the compiled FPU emulator. Thus if you are
	  running a LOONGARCH32 system and know that none of your userland binaries
	  will require 64-bit floating point, you may wish to reduce the size
	  of your kernel & potentially improve FP emulation performance by
	  saying N here.

	  Although binutils currently supports use of this flag the details
	  concerning its effect upon the O32 ABI in userland are still being
	  worked on. In order to avoid userland becoming dependant upon current
	  behaviour before the details have been finalised, this option should
	  be considered experimental and only enabled by those working upon
	  said details.

	  If unsure, say N.

config USE_OF
	bool
	select OF
	select OF_EARLY_FLATTREE
	select IRQ_DOMAIN

config BUILTIN_DTB
	bool

choice
	prompt "Kernel appended dtb support" if USE_OF
	default LOONGARCH_NO_APPENDED_DTB

	config LOONGARCH_NO_APPENDED_DTB
		bool "None"
		help
		  Do not enable appended dtb support.

	config LOONGARCH_ELF_APPENDED_DTB
		bool "vmlinux"
		help
		  With this option, the boot code will look for a device tree binary
		  DTB) included in the vmlinux ELF section .appended_dtb. By default
		  it is empty and the DTB can be appended using binutils command
		  objcopy:

		    objcopy --update-section .appended_dtb=<filename>.dtb vmlinux

		  This is meant as a backward compatiblity convenience for those
		  systems with a bootloader that can't be upgraded to accommodate
		  the documented boot protocol using a device tree.

	config LOONGARCH_RAW_APPENDED_DTB
		bool "vmlinux.bin or vmlinuz.bin"
		help
		  With this option, the boot code will look for a device tree binary
		  DTB) appended to raw vmlinux.bin or vmlinuz.bin.
		  (e.g. cat vmlinux.bin <filename>.dtb > vmlinux_w_dtb).

		  This is meant as a backward compatibility convenience for those
		  systems with a bootloader that can't be upgraded to accommodate
		  the documented boot protocol using a device tree.

		  Beware that there is very little in terms of protection against
		  this option being confused by leftover garbage in memory that might
		  look like a DTB header after a reboot if no actual DTB is appended
		  to vmlinux.bin.  Do not leave this option active in a production kernel
		  if you don't intend to always append a DTB.
endchoice

choice
	prompt "Kernel command line type" if !CMDLINE_OVERRIDE
	default LOONGARCH_CMDLINE_FROM_DTB if USE_OF &&  \
					 !MACH_LOONGSON64
	default LOONGARCH_CMDLINE_FROM_BOOTLOADER

	config LOONGARCH_CMDLINE_FROM_DTB
		depends on USE_OF
		bool "Dtb kernel arguments if available"

	config LOONGARCH_CMDLINE_DTB_EXTEND
		depends on USE_OF
		bool "Extend dtb kernel arguments with bootloader arguments"

	config LOONGARCH_CMDLINE_FROM_BOOTLOADER
		bool "Bootloader kernel arguments if available"

	config LOONGARCH_CMDLINE_BUILTIN_EXTEND
		depends on CMDLINE_BOOL
		bool "Extend builtin kernel arguments with bootloader arguments"
endchoice

endmenu

config ARCH_ENABLE_MEMORY_HOTPLUG
	def_bool y
	depends on LOONGARCH

config ARCH_ENABLE_MEMORY_HOTREMOVE
	def_bool y
	depends on MEMORY_HOTPLUG

config ARCH_MEMORY_PROBE
	def_bool y
	depends on MEMORY_HOTPLUG

config HAVE_ARCH_NODEDATA_EXTENSION
	def_bool y
	depends on NUMA && ARCH_ENABLE_MEMORY_HOTPLUG

config LOCKDEP_SUPPORT
	bool
	default y

config STACKTRACE_SUPPORT
	bool
	default y

config HAVE_LATENCYTOP_SUPPORT
	bool
	default y

config PGTABLE_LEVELS
	int
	default 4 if PAGE_SIZE_4KB && LOONGARCH_VA_BITS_48
	default 3 if 64BIT && !PAGE_SIZE_64KB
	default 2

config LOONGARCH_AUTO_PFN_OFFSET
	bool

menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"

config HW_HAS_EISA
	bool
config HW_HAS_PCI
	bool

config PCI
	bool "Support for PCI controller"
	depends on HW_HAS_PCI
	select PCI_DOMAINS
	help
	  Find out whether you have a PCI motherboard. PCI is the name of a
	  bus system, i.e. the way the CPU talks to the other stuff inside
	  your box. Other bus systems are ISA, EISA, or VESA. If you have PCI,
	  say Y, otherwise N.

config HT_PCI
	bool "Support for HT-linked PCI"
	default y
	depends on CPU_LOONGSON3
	select PCI
	select PCI_DOMAINS
	help
	  Loongson family machines use Hyper-Transport bus for inter-core
	  connection and device connection. The PCI bus is a subordinate
	  linked at HT. Choose Y for Loongson-3 based machines.

config PCI_DOMAINS
	bool

config PCI_DOMAINS_GENERIC
	bool

config PCI_DRIVERS_GENERIC
	select PCI_DOMAINS_GENERIC if PCI_DOMAINS
	bool

config PCI_DRIVERS_LEGACY
	def_bool !PCI_DRIVERS_GENERIC
	select NO_GENERIC_PCI_IOPORT_MAP

source "drivers/pci/Kconfig"

#
# ISA support is now enabled via select.  Too many systems still have the one
# or other ISA chip on the board that users don't know about so don't expect
# users to choose the right thing ...
#
config ISA
	bool

config EISA
	bool "EISA support"
	depends on HW_HAS_EISA
	select ISA
	select GENERIC_ISA_DMA
	---help---
	  The Extended Industry Standard Architecture (EISA) bus was
	  developed as an open alternative to the IBM MicroChannel bus.

	  The EISA bus provided some of the features of the IBM MicroChannel
	  bus while maintaining backward compatibility with cards made for
	  the older ISA bus.  The EISA bus saw limited use between 1988 and
	  1995 when it was made obsolete by the PCI bus.

	  Say Y here if you are building a kernel for an EISA-based machine.

	  Otherwise, say N.

source "drivers/eisa/Kconfig"

config TC
	bool "TURBOchannel support"
	depends on MACH_DECSTATION
	help
	  TURBOchannel is a DEC (now Compaq (now HP)) bus for Alpha and LOONGARCH
	  processors.  TURBOchannel programming specifications are available
	  at:
	  <ftp://ftp.hp.com/pub/alphaserver/archive/triadd/>
	  and:
	  <http://www.computer-refuge.org/classiccmp/ftp.digital.com/pub/DEC/TriAdd/>
	  Linux driver support status is documented at:
	  <http://www.linux-mips.org/wiki/DECstation>

config MMU
	bool
	default y

config ARCH_MMAP_RND_BITS_MIN
	default 12 if 64BIT
	default 8

config ARCH_MMAP_RND_BITS_MAX
	default 18 if 64BIT
	default 15

config ARCH_MMAP_RND_COMPAT_BITS_MIN
       default 8

config ARCH_MMAP_RND_COMPAT_BITS_MAX
       default 15

config I8253
	bool
	select CLKSRC_I8253
	select CLKEVT_I8253
	select LOONGARCH_EXTERNAL_TIMER

config ZONE_DMA
	bool

config ZONE_DMA32
	bool

source "drivers/pcmcia/Kconfig"

config HAS_RAPIDIO
	bool
	default n

config RAPIDIO
	tristate "RapidIO support"
	depends on HAS_RAPIDIO || PCI
	help
	  If you say Y here, the kernel will include drivers and
	  infrastructure code to support RapidIO interconnect devices.

source "drivers/rapidio/Kconfig"

endmenu

config TRAD_SIGNALS
	bool

config LOONGARCH32_COMPAT
	bool

config COMPAT
	bool

config SYSVIPC_COMPAT
	bool

config LOONGARCH32_O32
	bool "Kernel support for o32 binaries"
	depends on 64BIT
	select ARCH_WANT_OLD_COMPAT_IPC
	select COMPAT
	select LOONGARCH32_COMPAT
	select SYSVIPC_COMPAT if SYSVIPC
	select AUDITSYSCALL_O32 if AUDITSYSCALL
	help
	  Select this option if you want to run o32 binaries.  These are pure
	  32-bit binaries as used by the 32-bit Linux/LOONGARCH port.  Most of
	  existing binaries are in this format.

	  If unsure, say Y.

config LOONGARCH32_N32
	bool "Kernel support for n32 binaries"
	depends on 64BIT
	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
	select COMPAT
	select LOONGARCH32_COMPAT
	select SYSVIPC_COMPAT if SYSVIPC
	select AUDITSYSCALL_N32 if AUDITSYSCALL
	help
	  Select this option if you want to run n32 binaries.  These are
	  64-bit binaries using 32-bit quantities for addressing and certain
	  data that would normally be 64-bit.  They are used in special
	  cases.

	  If unsure, say N.

config BINFMT_ELF32
	bool
	default y if LOONGARCH32_O32 || LOONGARCH32_N32
	select ELFCORE

menu "Power management options"

config ARCH_HIBERNATION_POSSIBLE
	def_bool y
	depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP

config ARCH_SUSPEND_POSSIBLE
	def_bool y
	depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP

source "kernel/power/Kconfig"

if CPU_LOONGSON3
source "drivers/acpi/Kconfig"
endif

endmenu

config LOONGARCH_EXTERNAL_TIMER
	bool

menu "CPU Power Management"

if CPU_SUPPORTS_CPUFREQ && LOONGARCH_EXTERNAL_TIMER
source "drivers/cpufreq/Kconfig"
endif

source "drivers/cpuidle/Kconfig"

endmenu

source "drivers/firmware/Kconfig"
source "arch/loongarch/kvm/Kconfig"
