Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'riscv/for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:
"Three fixes for RISC-V:

- Don't free and reuse memory containing the code that CPUs parked at
boot reside in.

- Fix rv64 build problems for ubsan and some modules by adding
logical and arithmetic shift helpers for 128-bit values. These are
from libgcc and are similar to what's present for ARM64.

- Fix vDSO builds to clean up their own temporary files"

* tag 'riscv/for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
riscv: Less inefficient gcc tishift helpers (and export their symbols)
riscv: delete temporary files
riscv: make sure the cores stay looping in .Lsecondary_park

+73 -25
+4
arch/riscv/include/asm/asm-prototypes.h
··· 5 5 #include <linux/ftrace.h> 6 6 #include <asm-generic/asm-prototypes.h> 7 7 8 + long long __lshrti3(long long a, int b); 9 + long long __ashrti3(long long a, int b); 10 + long long __ashlti3(long long a, int b); 11 + 8 12 #endif /* _ASM_RISCV_PROTOTYPES_H */
+10 -6
arch/riscv/kernel/head.S
··· 80 80 81 81 #ifdef CONFIG_SMP 82 82 li t0, CONFIG_NR_CPUS 83 - bgeu a0, t0, .Lsecondary_park 83 + blt a0, t0, .Lgood_cores 84 + tail .Lsecondary_park 85 + .Lgood_cores: 84 86 #endif 85 87 86 88 /* Pick one hart to run the main boot sequence */ ··· 211 209 tail smp_callin 212 210 #endif 213 211 214 - .align 2 215 - .Lsecondary_park: 216 - /* We lack SMP support or have too many harts, so park this hart */ 217 - wfi 218 - j .Lsecondary_park 219 212 END(_start) 220 213 221 214 #ifdef CONFIG_RISCV_M_MODE ··· 291 294 ret 292 295 END(reset_regs) 293 296 #endif /* CONFIG_RISCV_M_MODE */ 297 + 298 + .section ".text", "ax",@progbits 299 + .align 2 300 + .Lsecondary_park: 301 + /* We lack SMP support or have too many harts, so park this hart */ 302 + wfi 303 + j .Lsecondary_park 294 304 295 305 __PAGE_ALIGNED_BSS 296 306 /* Empty zero page */
+2 -1
arch/riscv/kernel/vdso/Makefile
··· 58 58 cmd_vdsold = $(CC) $(KBUILD_CFLAGS) $(call cc-option, -no-pie) -nostdlib -nostartfiles $(SYSCFLAGS_$(@F)) \ 59 59 -Wl,-T,$(filter-out FORCE,$^) -o $@.tmp && \ 60 60 $(CROSS_COMPILE)objcopy \ 61 - $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ 61 + $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \ 62 + rm $@.tmp 62 63 63 64 # install commands for the unstripped file 64 65 quiet_cmd_vdso_install = INSTALL $@
+57 -18
arch/riscv/lib/tishift.S
··· 4 4 */ 5 5 6 6 #include <linux/linkage.h> 7 + #include <asm-generic/export.h> 7 8 8 - ENTRY(__lshrti3) 9 + SYM_FUNC_START(__lshrti3) 9 10 beqz a2, .L1 10 11 li a5,64 11 12 sub a5,a5,a2 12 - addi sp,sp,-16 13 13 sext.w a4,a5 14 14 blez a5, .L2 15 15 sext.w a2,a2 16 - sll a4,a1,a4 17 16 srl a0,a0,a2 18 - srl a1,a1,a2 17 + sll a4,a1,a4 18 + srl a2,a1,a2 19 19 or a0,a0,a4 20 - sd a1,8(sp) 21 - sd a0,0(sp) 22 - ld a0,0(sp) 23 - ld a1,8(sp) 24 - addi sp,sp,16 25 - ret 20 + mv a1,a2 26 21 .L1: 27 22 ret 28 23 .L2: 29 - negw a4,a4 30 - srl a1,a1,a4 31 - sd a1,0(sp) 32 - sd zero,8(sp) 33 - ld a0,0(sp) 34 - ld a1,8(sp) 35 - addi sp,sp,16 24 + negw a0,a4 25 + li a2,0 26 + srl a0,a1,a0 27 + mv a1,a2 36 28 ret 37 - ENDPROC(__lshrti3) 29 + SYM_FUNC_END(__lshrti3) 30 + EXPORT_SYMBOL(__lshrti3) 31 + 32 + SYM_FUNC_START(__ashrti3) 33 + beqz a2, .L3 34 + li a5,64 35 + sub a5,a5,a2 36 + sext.w a4,a5 37 + blez a5, .L4 38 + sext.w a2,a2 39 + srl a0,a0,a2 40 + sll a4,a1,a4 41 + sra a2,a1,a2 42 + or a0,a0,a4 43 + mv a1,a2 44 + .L3: 45 + ret 46 + .L4: 47 + negw a0,a4 48 + srai a2,a1,0x3f 49 + sra a0,a1,a0 50 + mv a1,a2 51 + ret 52 + SYM_FUNC_END(__ashrti3) 53 + EXPORT_SYMBOL(__ashrti3) 54 + 55 + SYM_FUNC_START(__ashlti3) 56 + beqz a2, .L5 57 + li a5,64 58 + sub a5,a5,a2 59 + sext.w a4,a5 60 + blez a5, .L6 61 + sext.w a2,a2 62 + sll a1,a1,a2 63 + srl a4,a0,a4 64 + sll a2,a0,a2 65 + or a1,a1,a4 66 + mv a0,a2 67 + .L5: 68 + ret 69 + .L6: 70 + negw a1,a4 71 + li a2,0 72 + sll a1,a0,a1 73 + mv a0,a2 74 + ret 75 + SYM_FUNC_END(__ashlti3) 76 + EXPORT_SYMBOL(__ashlti3)