Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit a6de21ba authored by Palmer Dabbelt's avatar Palmer Dabbelt
Browse files

RISC-V: Fix some RV32 bugs and build failures



This patch set fixes up various failures in the RV32I port.  The fixes
are all nominally independent, but are really only testable together
because the RV32I port fails to build without all of them.  The patch
set includes:

* The removal of tishift on RV32I targets, as 128-bit integers are not
  supported by the toolchain.
* The removal of swiotlb from RV32I targets, since all physical
  addresses can be mapped by all hardware on all existing RV32I targets.
* The addition of ummodi3 and udivmoddi4 from an old version of GCC that
  was licensed under GPLv2 as generic code, along with their use on
  RV32I targets.
* A fix to our page alignment logic within ioremap for RV32I targets.

Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parents 4e4101cf 827a4381
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ config ARCH_RV32I
	select GENERIC_LIB_ASHRDI3
	select GENERIC_LIB_LSHRDI3
	select GENERIC_LIB_UCMPDI2
	select GENERIC_LIB_UMODDI3

config ARCH_RV64I
	bool "RV64I"
+3 −0
Original line number Diff line number Diff line
@@ -227,7 +227,10 @@ void __init setup_arch(char **cmdline_p)
	setup_bootmem();
	paging_init();
	unflatten_device_tree();

#ifdef CONFIG_SWIOTLB
	swiotlb_init(1);
#endif

#ifdef CONFIG_SMP
	setup_smp();
+2 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ lib-y += delay.o
lib-y	+= memcpy.o
lib-y	+= memset.o
lib-y	+= uaccess.o
lib-y	+= tishift.o

lib-(CONFIG_64BIT) += tishift.o

lib-$(CONFIG_32BIT) += udivdi3.o
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ static void __iomem *__ioremap_caller(phys_addr_t addr, size_t size,

	/* Page-align mappings */
	offset = addr & (~PAGE_MASK);
	addr &= PAGE_MASK;
	addr -= offset;
	size = PAGE_ALIGN(size + offset);

	area = get_vm_area_caller(size, VM_IOREMAP, caller);
+3 −0
Original line number Diff line number Diff line
@@ -621,3 +621,6 @@ config GENERIC_LIB_CMPDI2

config GENERIC_LIB_UCMPDI2
	bool

config GENERIC_LIB_UMODDI3
	bool
Loading