Commit 283f13d4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'riscv-for-linus-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - A fix for a build warning in the jump_label code

 - One of the git://github -> https://github cleanups, for the SiFive
   drivers

 - A fix for the kasan initialization code, this still likely warrants
   some cleanups but that's a bigger problem and at least this fixes the
   crashes in the short term

 - A pair of fixes for extension support detection on mixed LLVM/GNU
   toolchains

 - A fix for a runtime warning in the /proc/cpuinfo code

* tag 'riscv-for-linus-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  RISC-V: Fix /proc/cpuinfo cpumask warning
  riscv: fix detection of toolchain Zihintpause support
  riscv: fix detection of toolchain Zicbom support
  riscv: mm: add missing memcpy in kasan_init
  MAINTAINERS: git://github.com -> https://github.com for sifive
  riscv: jump_label: mark arguments as const to satisfy asm constraints
parents 13f05fb2 d14e99bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18787,7 +18787,7 @@ M: Palmer Dabbelt <palmer@dabbelt.com>
M:	Paul Walmsley <paul.walmsley@sifive.com>
L:	linux-riscv@lists.infradead.org
S:	Supported
T:	git git://github.com/sifive/riscv-linux.git
T:	git https://github.com/sifive/riscv-linux.git
N:	sifive
K:	[^@]sifive
+13 −4
Original line number Diff line number Diff line
@@ -411,14 +411,16 @@ config RISCV_ISA_SVPBMT

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

config CC_HAS_ZICBOM
config TOOLCHAIN_HAS_ZICBOM
	bool
	default y if 64BIT && $(cc-option,-mabi=lp64 -march=rv64ima_zicbom)
	default y if 32BIT && $(cc-option,-mabi=ilp32 -march=rv32ima_zicbom)
	default y
	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zicbom)
	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zicbom)
	depends on LLD_VERSION >= 150000 || LD_VERSION >= 23800

config RISCV_ISA_ZICBOM
	bool "Zicbom extension support for non-coherent DMA operation"
	depends on CC_HAS_ZICBOM
	depends on TOOLCHAIN_HAS_ZICBOM
	depends on !XIP_KERNEL && MMU
	select RISCV_DMA_NONCOHERENT
	select RISCV_ALTERNATIVE
@@ -433,6 +435,13 @@ config RISCV_ISA_ZICBOM

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

config TOOLCHAIN_HAS_ZIHINTPAUSE
	bool
	default y
	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zihintpause)
	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zihintpause)
	depends on LLD_VERSION >= 150000 || LD_VERSION >= 23600

config FPU
	bool "FPU support"
	default y
+2 −4
Original line number Diff line number Diff line
@@ -59,12 +59,10 @@ toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zi
riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei

# Check if the toolchain supports Zicbom extension
toolchain-supports-zicbom := $(call cc-option-yn, -march=$(riscv-march-y)_zicbom)
riscv-march-$(toolchain-supports-zicbom) := $(riscv-march-y)_zicbom
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZICBOM) := $(riscv-march-y)_zicbom

# Check if the toolchain supports Zihintpause extension
toolchain-supports-zihintpause := $(call cc-option-yn, -march=$(riscv-march-y)_zihintpause)
riscv-march-$(toolchain-supports-zihintpause) := $(riscv-march-y)_zihintpause
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE) := $(riscv-march-y)_zihintpause

KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y))
KBUILD_AFLAGS += -march=$(riscv-march-y)
+4 −4
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@

#define JUMP_LABEL_NOP_SIZE 4

static __always_inline bool arch_static_branch(struct static_key *key,
					       bool branch)
static __always_inline bool arch_static_branch(struct static_key * const key,
					       const bool branch)
{
	asm_volatile_goto(
		"	.option push				\n\t"
@@ -35,8 +35,8 @@ static __always_inline bool arch_static_branch(struct static_key *key,
	return true;
}

static __always_inline bool arch_static_branch_jump(struct static_key *key,
						    bool branch)
static __always_inline bool arch_static_branch_jump(struct static_key * const key,
						    const bool branch)
{
	asm_volatile_goto(
		"	.option push				\n\t"
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ static inline void cpu_relax(void)
		 * Reduce instruction retirement.
		 * This assumes the PC changes.
		 */
#ifdef __riscv_zihintpause
#ifdef CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE
		__asm__ __volatile__ ("pause");
#else
		/* Encoding of the pause instruction */
Loading