Commit a1084542 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull RISC-V updates from Palmer Dabbelt:
 "This contains a handful of patches for this merge window:

   - Support for kasan

   - 32-bit physical addresses on rv32i-based systems

   - Support for CONFIG_DEBUG_VIRTUAL

   - DT entry for the FU540 GPIO controller, which has recently had a
     device driver merged

  These boot a buildroot-based system on QEMU's virt board for me"

* tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: dts: Add DT support for SiFive FU540 GPIO driver
  riscv: mm: add support for CONFIG_DEBUG_VIRTUAL
  riscv: keep 32-bit kernel to 32-bit phys_addr_t
  kasan: Add riscv to KASAN documentation.
  riscv: Add KASAN support
  kasan: No KASAN's memmove check if archs don't have it.
parents b70a2d6b 61ffb9d2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@ global variables yet.

Tag-based KASAN is only supported in Clang and requires version 7.0.0 or later.

Currently generic KASAN is supported for the x86_64, arm64, xtensa and s390
architectures, and tag-based KASAN is supported only for arm64.
Currently generic KASAN is supported for the x86_64, arm64, xtensa, s390 and
riscv architectures, and tag-based KASAN is supported only for arm64.

Usage
-----
+2 −2
Original line number Diff line number Diff line
@@ -12,8 +12,6 @@ config 32BIT

config RISCV
	def_bool y
	# even on 32-bit, physical (and DMA) addresses are > 32-bits
	select PHYS_ADDR_T_64BIT
	select OF
	select OF_EARLY_FLATTREE
	select OF_IRQ
@@ -57,6 +55,7 @@ config RISCV
	select GENERIC_ARCH_TOPOLOGY if SMP
	select ARCH_HAS_PTE_SPECIAL
	select ARCH_HAS_MMIOWB
	select ARCH_HAS_DEBUG_VIRTUAL
	select HAVE_EBPF_JIT if 64BIT
	select EDAC_SUPPORT
	select ARCH_HAS_GIGANTIC_PAGE
@@ -66,6 +65,7 @@ config RISCV
	select HAVE_ARCH_MMAP_RND_BITS if MMU
	select ARCH_HAS_GCOV_PROFILE_ALL
	select HAVE_COPY_THREAD_TLS
	select HAVE_ARCH_KASAN if MMU && 64BIT

config ARCH_MMAP_RND_BITS_MIN
	default 18 if 64BIT
+14 −1
Original line number Diff line number Diff line
@@ -268,6 +268,19 @@
			interrupts = <1 2 3>;
			reg = <0x0 0x2010000 0x0 0x1000>;
		};

		gpio: gpio@10060000 {
			compatible = "sifive,fu540-c000-gpio", "sifive,gpio0";
			interrupt-parent = <&plic0>;
			interrupts = <7>, <8>, <9>, <10>, <11>, <12>, <13>,
				     <14>, <15>, <16>, <17>, <18>, <19>, <20>,
				     <21>, <22>;
			reg = <0x0 0x10060000 0x0 0x1000>;
			gpio-controller;
			#gpio-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <2>;
			clocks = <&prci PRCI_CLK_TLCLK>;
			status = "disabled";
		};
	};
};
+4 −0
Original line number Diff line number Diff line
@@ -94,3 +94,7 @@
&pwm1 {
	status = "okay";
};

&gpio {
	status = "okay";
};
+27 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2019 Andes Technology Corporation */

#ifndef __ASM_KASAN_H
#define __ASM_KASAN_H

#ifndef __ASSEMBLY__

#ifdef CONFIG_KASAN

#include <asm/pgtable.h>

#define KASAN_SHADOW_SCALE_SHIFT	3

#define KASAN_SHADOW_SIZE	(UL(1) << (38 - KASAN_SHADOW_SCALE_SHIFT))
#define KASAN_SHADOW_START	0xffffffc000000000 /* 2^64 - 2^38 */
#define KASAN_SHADOW_END	(KASAN_SHADOW_START + KASAN_SHADOW_SIZE)

#define KASAN_SHADOW_OFFSET	(KASAN_SHADOW_END - (1ULL << \
					(64 - KASAN_SHADOW_SCALE_SHIFT)))

void kasan_init(void);
asmlinkage void kasan_early_init(void);

#endif
#endif
#endif /* __ASM_KASAN_H */
Loading