Skip to content

Commit

Permalink
Merge tag 'riscv-for-linus-5.15-mw1' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/riscv/linux

Pull more RISC-V updates from Palmer Dabbelt:

 - A pair of defconfig additions, for NVMe and the EFI filesystem
   localization options.

 - A larger address space for stack randomization.

 - A cleanup to our install rules.

 - A DTS update for the Microchip Icicle board, to fix the serial
   console.

 - Support for build-time table sorting, which allows us to have
   __ex_table read-only.

* tag 'riscv-for-linus-5.15-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: Move EXCEPTION_TABLE to RO_DATA segment
  riscv: Enable BUILDTIME_TABLE_SORT
  riscv: dts: microchip: mpfs-icicle: Fix serial console
  riscv: move the (z)install rules to arch/riscv/Makefile
  riscv: Improve stack randomisation on RV64
  riscv: defconfig: enable NLS_CODEPAGE_437, NLS_ISO8859_1
  riscv: defconfig: enable BLK_DEV_NVME
  • Loading branch information
torvalds committed Sep 11, 2021
2 parents 4e1c754 + 6f55ab3 commit b79bd0d
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Documentation/features/vm/ELF-ASLR/arch-support.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
| openrisc: | TODO |
| parisc: | ok |
| powerpc: | ok |
| riscv: | TODO |
| riscv: | ok |
| s390: | ok |
| sh: | TODO |
| sparc: | TODO |
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ config RISCV
select ARCH_WANT_FRAME_POINTERS
select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
select BUILDTIME_TABLE_SORT if MMU
select CLONE_BACKWARDS
select CLINT_TIMER if !MMU
select COMMON_CLK
Expand Down
7 changes: 5 additions & 2 deletions arch/riscv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ $(BOOT_TARGETS): vmlinux
Image.%: Image
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

zinstall install:
$(Q)$(MAKE) $(build)=$(boot) $@
install: install-image = Image
zinstall: install-image = Image.gz
install zinstall:
$(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \
$(boot)/$(install-image) System.map "$(INSTALL_PATH)"

archclean:
$(Q)$(MAKE) $(clean)=$(boot)
8 changes: 0 additions & 8 deletions arch/riscv/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,3 @@ $(obj)/Image.lzo: $(obj)/Image FORCE

$(obj)/loader.bin: $(obj)/loader FORCE
$(call if_changed,objcopy)

install:
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(obj)/Image System.map "$(INSTALL_PATH)"

zinstall:
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(obj)/Image.gz System.map "$(INSTALL_PATH)"
6 changes: 5 additions & 1 deletion arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@

aliases {
ethernet0 = &emac1;
serial0 = &serial0;
serial1 = &serial1;
serial2 = &serial2;
serial3 = &serial3;
};

chosen {
stdout-path = &serial0;
stdout-path = "serial0:115200n8";
};

cpus {
Expand Down
4 changes: 4 additions & 0 deletions arch/riscv/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCIE_XILINX=y
CONFIG_PCIE_FU740=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_VIRTIO_BLK=y
CONFIG_BLK_DEV_NVME=m
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
CONFIG_SCSI_VIRTIO=y
Expand Down Expand Up @@ -108,6 +110,8 @@ CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_ROOT_NFS=y
CONFIG_9P_FS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=m
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_DEV_VIRTIO=y
CONFIG_PRINTK_TIME=y
Expand Down
3 changes: 3 additions & 0 deletions arch/riscv/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
*/
#define ELF_ET_DYN_BASE ((TASK_SIZE / 3) * 2)

#ifdef CONFIG_64BIT
#define STACK_RND_MASK (0x3ffff >> (PAGE_SHIFT - 12))
#endif
/*
* This yields a mask that user programs can use to figure out what
* instruction set this CPU supports. This could be done in user space,
Expand Down
1 change: 0 additions & 1 deletion arch/riscv/kernel/vmlinux-xip.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ SECTIONS
}

BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
EXCEPTION_TABLE(0x10)

.rel.dyn : AT(ADDR(.rel.dyn) - LOAD_OFFSET) {
*(.rel.dyn*)
Expand Down
4 changes: 2 additions & 2 deletions arch/riscv/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright (C) 2017 SiFive
*/

#define RO_EXCEPTION_TABLE_ALIGN 16

#ifdef CONFIG_XIP_KERNEL
#include "vmlinux-xip.lds.S"
#else
Expand Down Expand Up @@ -112,8 +114,6 @@ SECTIONS
*(.srodata*)
}

EXCEPTION_TABLE(0x10)

. = ALIGN(SECTION_ALIGN);
_data = .;

Expand Down
1 change: 1 addition & 0 deletions scripts/sorttable.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ static int do_file(char const *const fname, void *addr)
case EM_ARM:
case EM_MICROBLAZE:
case EM_MIPS:
case EM_RISCV:
case EM_XTENSA:
break;
default:
Expand Down

0 comments on commit b79bd0d

Please sign in to comment.