Commit 112e7e21 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'loongarch-6.5' of...

Merge tag 'loongarch-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch updates from Huacai Chen:

 - preliminary ClangBuiltLinux enablement

 - add support to clone a time namespace

 - add vector extensions support

 - add SMT (Simultaneous Multi-Threading) support

 - support dbar with different hints

 - introduce hardware page table walker

 - add jump-label implementation

 - add rethook and uprobes support

 - some bug fixes and other small changes

* tag 'loongarch-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (28 commits)
  LoongArch: Remove five DIE_* definitions in kdebug.h
  LoongArch: Add uprobes support
  LoongArch: Use larch_insn_gen_break() for kprobes
  LoongArch: Add larch_insn_gen_break() to generate break insns
  LoongArch: Check for AMO instructions in insns_not_supported()
  LoongArch: Move three functions from kprobes.c to inst.c
  LoongArch: Replace kretprobe with rethook
  LoongArch: Add jump-label implementation
  LoongArch: Select HAVE_DEBUG_KMEMLEAK to support kmemleak
  LoongArch: Export some arch-specific pm interfaces
  LoongArch: Introduce hardware page table walker
  LoongArch: Support dbar with different hints
  LoongArch: Add SMT (Simultaneous Multi-Threading) support
  LoongArch: Add vector extensions support
  LoongArch: Add support to clone a time namespace
  Makefile: Add loongarch target flag for Clang compilation
  LoongArch: Mark Clang LTO as working
  LoongArch: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation
  LoongArch: vDSO: Use CLANG_FLAGS instead of filtering out '--target='
  LoongArch: Tweak CFLAGS for Clang compatibility
  ...
parents e55e5df1 5ee35c76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
    |        csky: |  ok  |
    |     hexagon: | TODO |
    |        ia64: | TODO |
    |   loongarch: | TODO |
    |   loongarch: |  ok  |
    |        m68k: | TODO |
    |  microblaze: | TODO |
    |        mips: |  ok  |
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
    |        csky: |  ok  |
    |     hexagon: | TODO |
    |        ia64: | TODO |
    |   loongarch: | TODO |
    |   loongarch: |  ok  |
    |        m68k: | TODO |
    |  microblaze: |  ok  |
    |        mips: |  ok  |
+64 −8
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ config LOONGARCH
	select ACPI
	select ACPI_GENERIC_GSI if ACPI
	select ACPI_MCFG if ACPI
	select ACPI_PPTT if ACPI
	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
	select ARCH_BINFMT_ELF_STATE
	select ARCH_ENABLE_MEMORY_HOTPLUG
@@ -49,6 +50,8 @@ config LOONGARCH
	select ARCH_SUPPORTS_ACPI
	select ARCH_SUPPORTS_ATOMIC_RMW
	select ARCH_SUPPORTS_HUGETLBFS
	select ARCH_SUPPORTS_LTO_CLANG
	select ARCH_SUPPORTS_LTO_CLANG_THIN
	select ARCH_SUPPORTS_NUMA_BALANCING
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_CMPXCHG_LOCKREF
@@ -81,9 +84,12 @@ config LOONGARCH
	select GENERIC_SCHED_CLOCK
	select GENERIC_SMP_IDLE_THREAD
	select GENERIC_TIME_VSYSCALL
	select GENERIC_VDSO_TIME_NS
	select GPIOLIB
	select HAS_IOPORT
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_JUMP_LABEL
	select HAVE_ARCH_JUMP_LABEL_RELATIVE
	select HAVE_ARCH_MMAP_RND_BITS if MMU
	select HAVE_ARCH_SECCOMP_FILTER
	select HAVE_ARCH_TRACEHOOK
@@ -91,6 +97,7 @@ config LOONGARCH
	select HAVE_ASM_MODVERSIONS
	select HAVE_CONTEXT_TRACKING_USER
	select HAVE_C_RECORDMCOUNT
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DEBUG_STACKOVERFLOW
	select HAVE_DMA_CONTIGUOUS
	select HAVE_DYNAMIC_FTRACE
@@ -121,6 +128,7 @@ config LOONGARCH
	select HAVE_PERF_REGS
	select HAVE_PERF_USER_STACK_DUMP
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RETHOOK
	select HAVE_RSEQ
	select HAVE_SAMPLE_FTRACE_DIRECT
	select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
@@ -163,14 +171,6 @@ config 32BIT
config 64BIT
	def_bool y

config CPU_HAS_FPU
	bool
	default y

config CPU_HAS_PREFETCH
	bool
	default y

config GENERIC_BUG
	def_bool y
	depends on BUG
@@ -243,6 +243,15 @@ config SCHED_OMIT_FRAME_POINTER
config AS_HAS_EXPLICIT_RELOCS
	def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x))

config AS_HAS_FCSR_CLASS
	def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0)

config AS_HAS_LSX_EXTENSION
	def_bool $(as-instr,vld \$vr0$(comma)\$a0$(comma)0)

config AS_HAS_LASX_EXTENSION
	def_bool $(as-instr,xvld \$xr0$(comma)\$a0$(comma)0)

menu "Kernel type and options"

source "kernel/Kconfig.hz"
@@ -374,6 +383,13 @@ config EFI_STUB
	  This kernel feature allows the kernel to be loaded directly by
	  EFI firmware without the use of a bootloader.

config SCHED_SMT
	bool "SMT scheduler support"
	default y
	help
	  Improves scheduler's performance when there are multiple
	  threads in one physical core.

config SMP
	bool "Multi-Processing support"
	help
@@ -483,6 +499,43 @@ config ARCH_STRICT_ALIGN
	  to run kernel only on systems with h/w unaligned access support in
	  order to optimise for performance.

config CPU_HAS_FPU
	bool
	default y

config CPU_HAS_LSX
	bool "Support for the Loongson SIMD Extension"
	depends on AS_HAS_LSX_EXTENSION
	help
	  Loongson SIMD Extension (LSX) 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 LSX
	  vector register contexts. If you know that your kernel will only be
	  running on CPUs which do not support LSX 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"
	depends on CPU_HAS_LSX
	depends on AS_HAS_LASX_EXTENSION
	help
	  Loongson Advanced SIMD Extension (LASX) introduces 256 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 LASX
	  vector register contexts. If you know that your kernel will only be
	  running on CPUs which do not support LASX 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_PREFETCH
	bool
	default y

config KEXEC
	bool "Kexec system call"
	select KEXEC_CORE
@@ -592,6 +645,9 @@ config ARCH_MMAP_RND_BITS_MIN
config ARCH_MMAP_RND_BITS_MAX
	default 18

config ARCH_SUPPORTS_UPROBES
	def_bool y

menu "Power management options"

config ARCH_SUSPEND_POSSIBLE
+14 −9
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ ld-emul = $(64bit-emul)
cflags-y		+= -mabi=lp64s
endif

cflags-y			+= -G0 -pipe -msoft-float
LDFLAGS_vmlinux			+= -G0 -static -n -nostdlib
cflags-y			+= -pipe -msoft-float
LDFLAGS_vmlinux			+= -static -n -nostdlib

# When the assembler supports explicit relocation hint, we must use it.
# GCC may have -mexplicit-relocs off by default if it was built with an old
@@ -56,13 +56,18 @@ LDFLAGS_vmlinux += -G0 -static -n -nostdlib
# When the assembler does not supports explicit relocation hint, we can't use
# it.  Disable it if the compiler supports it.
#
# If you've seen "unknown reloc hint" message building the kernel and you are
# now wondering why "-mexplicit-relocs" is not wrapped with cc-option: the
# combination of a "new" assembler and "old" compiler is not supported.  Either
# upgrade the compiler or downgrade the assembler.
# The combination of a "new" assembler and "old" GCC is not supported, given
# the rarity of this combo and the extra complexity needed to make it work.
# Either upgrade the compiler or downgrade the assembler; the build will error
# out if it is the case (by probing for the model attribute; all supported
# compilers in this case would have support).
#
# Also, -mdirect-extern-access is useful in case of building with explicit
# relocs, for avoiding unnecessary GOT accesses. It is harmless to not have
# support though.
ifdef CONFIG_AS_HAS_EXPLICIT_RELOCS
cflags-y			+= -mexplicit-relocs
KBUILD_CFLAGS_KERNEL		+= -mdirect-extern-access
cflags-y			+= $(call cc-option,-mexplicit-relocs)
KBUILD_CFLAGS_KERNEL		+= $(call cc-option,-mdirect-extern-access)
else
cflags-y			+= $(call cc-option,-mno-explicit-relocs)
KBUILD_AFLAGS_KERNEL		+= -Wa,-mla-global-with-pcrel
@@ -107,7 +112,7 @@ KBUILD_CFLAGS += -isystem $(shell $(CC) -print-file-name=include)
KBUILD_LDFLAGS	+= -m $(ld-emul)

ifdef CONFIG_LOONGARCH
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
CHECKFLAGS += $(shell $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
	grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
	sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
endif
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ generic-y += mcs_spinlock.h
generic-y += parport.h
generic-y += early_ioremap.h
generic-y += qrwlock.h
generic-y += qspinlock.h
generic-y += rwsem.h
generic-y += segment.h
generic-y += user.h
Loading