Commit 999324f5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'loongarch-5.20' of...

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

Pull LoongArch updates from Huacai Chen:

 - Optimise getcpu() with vDSO

 - PCI enablement on top of pci & irqchip changes

 - Stack unwinder and stack trace support

 - Some bug fixes and build error fixes

 - Update the default config file

* tag 'loongarch-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  docs/zh_CN/LoongArch: Add I14 description
  docs/LoongArch: Add I14 description
  LoongArch: Update Loongson-3 default config file
  LoongArch: Add USER_STACKTRACE support
  LoongArch: Add STACKTRACE support
  LoongArch: Add prologue unwinder support
  LoongArch: Add guess unwinder support
  LoongArch: Add vDSO syscall __vdso_getcpu()
  LoongArch: Add PCI controller support
  LoongArch: Parse MADT to get multi-processor information
  LoongArch: Jump to the link address before enable PG
  LoongArch: Requires __force attributes for any casts
  LoongArch: Fix unsigned comparison with less than zero
  LoongArch: Adjust arch/loongarch/Kconfig
  LoongArch: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
parents f7cdaeea 71535592
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ I26 Opcode + I26L + I26H
=========== ==========================

Rd is the destination register operand, while Rj, Rk and Ra ("a" stands for
"additional") are the source register operands. I8/I12/I16/I21/I26 are
"additional") are the source register operands. I8/I12/I14/I16/I21/I26 are
immediate operands of respective width. The longer I21 and I26 are stored
in separate higher and lower parts in the instruction word, denoted by the "L"
and "H" suffixes.
+2 −2
Original line number Diff line number Diff line
@@ -190,8 +190,8 @@ I26 Opcode + I26L + I26H
=========== ==========================

Opcode是指令操作码,Rj和Rk是源操作数(寄存器),Rd是目标操作数(寄存器),Ra是
4R-type格式特有的附加操作数(寄存器)。I8/I12/I16/I21/I26分别是8位/12位/16位/
21位/26位的立即数。其中较长的21位和26位立即数在指令字中被分割为高位部分与低位
4R-type格式特有的附加操作数(寄存器)。I8/I12/I14/I16/I21/I26分别是8位/12位/14位/
16位/21位/26位的立即数。其中较长的21位和26位立即数在指令字中被分割为高位部分与低位
部分,所以你们在这里的格式描述中能够看到I21L/I21H和I26L/I26H这样带后缀的表述。

指令列表
+17 −1
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@
config LOONGARCH
	bool
	default y
	select ACPI
	select ACPI_GENERIC_GSI if ACPI
	select ACPI_MCFG if ACPI
	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
	select ARCH_BINFMT_ELF_STATE
	select ARCH_ENABLE_MEMORY_HOTPLUG
@@ -40,6 +42,7 @@ config LOONGARCH
	select ARCH_MIGHT_HAVE_PC_PARPORT
	select ARCH_MIGHT_HAVE_PC_SERIO
	select ARCH_SPARSEMEM_ENABLE
	select ARCH_STACKWALK
	select ARCH_SUPPORTS_ACPI
	select ARCH_SUPPORTS_ATOMIC_RMW
	select ARCH_SUPPORTS_HUGETLBFS
@@ -51,6 +54,7 @@ config LOONGARCH
	select ARCH_WANTS_NO_INSTR
	select BUILDTIME_TABLE_SORT
	select COMMON_CLK
	select EFI
	select GENERIC_CLOCKEVENTS
	select GENERIC_CMOS_UPDATE
	select GENERIC_CPU_AUTOPROBE
@@ -86,6 +90,7 @@ config LOONGARCH
	select HAVE_IRQ_TIME_ACCOUNTING
	select HAVE_MOD_ARCH_SPECIFIC
	select HAVE_NMI
	select HAVE_PCI
	select HAVE_PERF_EVENTS
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RSEQ
@@ -95,20 +100,27 @@ config LOONGARCH
	select HAVE_VIRT_CPU_ACCOUNTING_GEN if !SMP
	select IRQ_FORCED_THREADING
	select IRQ_LOONGARCH_CPU
	select MMU_GATHER_MERGE_VMAS if MMU
	select MODULES_USE_ELF_RELA if MODULES
	select NEED_PER_CPU_EMBED_FIRST_CHUNK
	select NEED_PER_CPU_PAGE_FIRST_CHUNK
	select OF
	select OF_EARLY_FLATTREE
	select PCI
	select PCI_DOMAINS_GENERIC
	select PCI_ECAM if ACPI
	select PCI_LOONGSON
	select PCI_MSI_ARCH_FALLBACKS
	select PERF_USE_VMALLOC
	select RTC_LIB
	select SMP
	select SPARSE_IRQ
	select SYSCTL_EXCEPTION_TRACE
	select SWIOTLB
	select TRACE_IRQFLAGS_SUPPORT
	select USE_PERCPU_NUMA_NODE_ID
	select USER_STACKTRACE_SUPPORT
	select ZONE_DMA32
	select MMU_GATHER_MERGE_VMAS if MMU

config 32BIT
	bool
@@ -141,6 +153,10 @@ config LOCKDEP_SUPPORT
	bool
	default y

config STACKTRACE_SUPPORT
	bool
	default y

# MACH_LOONGSON32 and MACH_LOONGSON64 are delibrately carried over from the
# MIPS Loongson code, to preserve Loongson-specific code paths in drivers that
# are shared between architectures, and specifically expecting the symbols.
+29 −0
Original line number Diff line number Diff line
choice
	prompt "Choose kernel unwinder"
	default UNWINDER_PROLOGUE if KALLSYMS
	help
	  This determines which method will be used for unwinding kernel stack
	  traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
	  lockdep, and more.

config UNWINDER_GUESS
	bool "Guess unwinder"
	help
	  This option enables the "guess" unwinder for unwinding kernel stack
	  traces.  It scans the stack and reports every kernel text address it
	  finds.  Some of the addresses it reports may be incorrect.

	  While this option often produces false positives, it can still be
	  useful in many cases.

config UNWINDER_PROLOGUE
	bool "Prologue unwinder"
	depends on KALLSYMS
	help
	  This option enables the "prologue" unwinder for unwinding kernel stack
	  traces.  It unwind the stack frame based on prologue code analyze.  Symbol
	  information is needed, at least the address and length of each function.
	  Some of the addresses it reports may be incorrect (but better than the
	  Guess unwinder).

endchoice
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ cflags-y += $(call cc-option, -mno-check-zero-division)
load-y		= 0x9000000000200000
bootvars-y	= VMLINUX_LOAD_ADDRESS=$(load-y)

drivers-$(CONFIG_PCI)		+= arch/loongarch/pci/

KBUILD_AFLAGS	+= $(cflags-y)
KBUILD_CFLAGS	+= $(cflags-y)
KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y)
Loading