aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-10-31 19:20:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-31 19:20:28 -0400
commit3dca04d694f16cc74dc87de9a13547e2ffec81d7 (patch)
tree7853d982b1c726fdfd6434dfccbb1ff158b8411c /arch
parent9bb9d4fdce9e6b351b7b905f150745a0fccccc06 (diff)
parentef70696a63c773280ef46f5764a6cda39ef2f383 (diff)
Merge tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux
Pull more RISC-V updates from Palmer Dabbelt: "This contains the follow-on patches I'd like to target for the 4.20 merge window. I'm being somewhat conservative here, as while there are a few patches on the mailing list that were posted early in the merge window I'd like to let those bake for another round -- this was a fairly big release as far as RISC-V is concerened, and we need to walk before we can run. As far as the patches that made it go: - A patch to ignore offline CPUs when calculating AT_HWCAP. This should fix GDB on the HiFive unleashed, which has an embedded core for hart 0 which is exposed to Linux as an offline CPU. - A move of EM_RISCV to elf-em.h, which is where it should have been to begin with. - I've also removed the 64-bit divide routines. I know I'm not really playing by my own rules here because I posted the patches this morning, but since they shouldn't be in the kernel I think it's better to err on the side of going too fast here. I don't anticipate any more patch sets for the merge window" * tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: Move EM_RISCV into elf-em.h RISC-V: properly determine hardware caps Revert "lib: Add umoddi3 and udivmoddi4 of GCC library routines" Revert "RISC-V: Select GENERIC_LIB_UMODDI3 on RV32"
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/Kconfig1
-rw-r--r--arch/riscv/include/asm/elf.h3
-rw-r--r--arch/riscv/kernel/cpufeature.c8
3 files changed, 5 insertions, 7 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d86842c21710..55da93f4e818 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -107,7 +107,6 @@ config ARCH_RV32I
107 select GENERIC_LIB_ASHRDI3 107 select GENERIC_LIB_ASHRDI3
108 select GENERIC_LIB_LSHRDI3 108 select GENERIC_LIB_LSHRDI3
109 select GENERIC_LIB_UCMPDI2 109 select GENERIC_LIB_UCMPDI2
110 select GENERIC_LIB_UMODDI3
111 110
112config ARCH_RV64I 111config ARCH_RV64I
113 bool "RV64I" 112 bool "RV64I"
diff --git a/arch/riscv/include/asm/elf.h b/arch/riscv/include/asm/elf.h
index a1ef503d616e..697fc23b0d5a 100644
--- a/arch/riscv/include/asm/elf.h
+++ b/arch/riscv/include/asm/elf.h
@@ -16,9 +16,6 @@
16#include <asm/auxvec.h> 16#include <asm/auxvec.h>
17#include <asm/byteorder.h> 17#include <asm/byteorder.h>
18 18
19/* TODO: Move definition into include/uapi/linux/elf-em.h */
20#define EM_RISCV 0xF3
21
22/* 19/*
23 * These are used to set parameters in the core dumps. 20 * These are used to set parameters in the core dumps.
24 */ 21 */
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 5493f3228704..0339087aa652 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -28,7 +28,7 @@ bool has_fpu __read_mostly;
28 28
29void riscv_fill_hwcap(void) 29void riscv_fill_hwcap(void)
30{ 30{
31 struct device_node *node; 31 struct device_node *node = NULL;
32 const char *isa; 32 const char *isa;
33 size_t i; 33 size_t i;
34 static unsigned long isa2hwcap[256] = {0}; 34 static unsigned long isa2hwcap[256] = {0};
@@ -44,9 +44,11 @@ void riscv_fill_hwcap(void)
44 44
45 /* 45 /*
46 * We don't support running Linux on hertergenous ISA systems. For 46 * We don't support running Linux on hertergenous ISA systems. For
47 * now, we just check the ISA of the first processor. 47 * now, we just check the ISA of the first "okay" processor.
48 */ 48 */
49 node = of_find_node_by_type(NULL, "cpu"); 49 while ((node = of_find_node_by_type(node, "cpu")))
50 if (riscv_of_processor_hartid(node) >= 0)
51 break;
50 if (!node) { 52 if (!node) {
51 pr_warning("Unable to find \"cpu\" devicetree entry"); 53 pr_warning("Unable to find \"cpu\" devicetree entry");
52 return; 54 return;