Skip to content

Commit 3dca04d

Browse files
committed
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"
2 parents 9bb9d4f + ef70696 commit 3dca04d

File tree

8 files changed

+6
-353
lines changed

8 files changed

+6
-353
lines changed

arch/riscv/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ config ARCH_RV32I
107107
select GENERIC_LIB_ASHRDI3
108108
select GENERIC_LIB_LSHRDI3
109109
select GENERIC_LIB_UCMPDI2
110-
select GENERIC_LIB_UMODDI3
111110

112111
config ARCH_RV64I
113112
bool "RV64I"

arch/riscv/include/asm/elf.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
#include <asm/auxvec.h>
1717
#include <asm/byteorder.h>
1818

19-
/* TODO: Move definition into include/uapi/linux/elf-em.h */
20-
#define EM_RISCV 0xF3
21-
2219
/*
2320
* These are used to set parameters in the core dumps.
2421
*/

arch/riscv/kernel/cpufeature.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bool has_fpu __read_mostly;
2828

2929
void riscv_fill_hwcap(void)
3030
{
31-
struct device_node *node;
31+
struct device_node *node = NULL;
3232
const char *isa;
3333
size_t i;
3434
static unsigned long isa2hwcap[256] = {0};
@@ -44,9 +44,11 @@ void riscv_fill_hwcap(void)
4444

4545
/*
4646
* 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.
4848
*/
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;
5052
if (!node) {
5153
pr_warning("Unable to find \"cpu\" devicetree entry");
5254
return;

include/uapi/linux/elf-em.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define EM_TILEPRO 188 /* Tilera TILEPro */
4242
#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
4343
#define EM_TILEGX 191 /* Tilera TILE-Gx */
44+
#define EM_RISCV 243 /* RISC-V */
4445
#define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */
4546
#define EM_FRV 0x5441 /* Fujitsu FR-V */
4647

lib/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,3 @@ config GENERIC_LIB_CMPDI2
624624

625625
config GENERIC_LIB_UCMPDI2
626626
bool
627-
628-
config GENERIC_LIB_UMODDI3
629-
bool

lib/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,4 +274,3 @@ obj-$(CONFIG_GENERIC_LIB_LSHRDI3) += lshrdi3.o
274274
obj-$(CONFIG_GENERIC_LIB_MULDI3) += muldi3.o
275275
obj-$(CONFIG_GENERIC_LIB_CMPDI2) += cmpdi2.o
276276
obj-$(CONFIG_GENERIC_LIB_UCMPDI2) += ucmpdi2.o
277-
obj-$(CONFIG_GENERIC_LIB_UMODDI3) += umoddi3.o udivmoddi4.o

lib/udivmoddi4.c

Lines changed: 0 additions & 310 deletions
This file was deleted.

0 commit comments

Comments
 (0)