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-linus-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:
"A handful of fixes.

Specifically:

- fix linker argument to allow linking with lld

- build fix for configurations without a frame pointer

- a handful of build fixes related the SBI 0.1 vs 0.2 split

- remove STRICT_KERNEL_RWX for !MMU, which isn't useful"

* tag 'riscv-for-linus-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU
riscv: sbi: Fix undefined reference to sbi_shutdown
tty: riscv: Using RISCV_SBI_V01 instead of RISCV_SBI
riscv: sbi: Correct sbi_shutdown() and sbi_clear_ipi() export
riscv: fix vdso build with lld
RISC-V: stacktrace: Declare sp_in_global outside ifdef

+18 -15
+1 -1
arch/riscv/Kconfig
··· 60 60 select ARCH_HAS_GIGANTIC_PAGE 61 61 select ARCH_HAS_SET_DIRECT_MAP 62 62 select ARCH_HAS_SET_MEMORY 63 - select ARCH_HAS_STRICT_KERNEL_RWX 63 + select ARCH_HAS_STRICT_KERNEL_RWX if MMU 64 64 select ARCH_WANT_HUGE_PMD_SHARE if 64BIT 65 65 select SPARSEMEM_STATIC if 32BIT 66 66 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
+10 -7
arch/riscv/kernel/sbi.c
··· 102 102 { 103 103 sbi_ecall(SBI_EXT_0_1_SHUTDOWN, 0, 0, 0, 0, 0, 0, 0); 104 104 } 105 - EXPORT_SYMBOL(sbi_set_timer); 105 + EXPORT_SYMBOL(sbi_shutdown); 106 106 107 107 /** 108 108 * sbi_clear_ipi() - Clear any pending IPIs for the calling hart. ··· 113 113 { 114 114 sbi_ecall(SBI_EXT_0_1_CLEAR_IPI, 0, 0, 0, 0, 0, 0, 0); 115 115 } 116 - EXPORT_SYMBOL(sbi_shutdown); 116 + EXPORT_SYMBOL(sbi_clear_ipi); 117 117 118 118 /** 119 119 * sbi_set_timer_v01() - Program the timer for next timer event. ··· 167 167 168 168 return result; 169 169 } 170 + 171 + static void sbi_set_power_off(void) 172 + { 173 + pm_power_off = sbi_shutdown; 174 + } 170 175 #else 171 176 static void __sbi_set_timer_v01(uint64_t stime_value) 172 177 { ··· 196 191 197 192 return 0; 198 193 } 194 + 195 + static void sbi_set_power_off(void) {} 199 196 #endif /* CONFIG_RISCV_SBI_V01 */ 200 197 201 198 static void __sbi_set_timer_v02(uint64_t stime_value) ··· 547 540 return __sbi_base_ecall(SBI_EXT_BASE_GET_IMP_VERSION); 548 541 } 549 542 550 - static void sbi_power_off(void) 551 - { 552 - sbi_shutdown(); 553 - } 554 543 555 544 int __init sbi_init(void) 556 545 { 557 546 int ret; 558 547 559 - pm_power_off = sbi_power_off; 548 + sbi_set_power_off(); 560 549 ret = sbi_get_spec_version(); 561 550 if (ret > 0) 562 551 sbi_spec_version = ret;
+2 -2
arch/riscv/kernel/stacktrace.c
··· 12 12 #include <linux/stacktrace.h> 13 13 #include <linux/ftrace.h> 14 14 15 + register unsigned long sp_in_global __asm__("sp"); 16 + 15 17 #ifdef CONFIG_FRAME_POINTER 16 18 17 19 struct stackframe { 18 20 unsigned long fp; 19 21 unsigned long ra; 20 22 }; 21 - 22 - register unsigned long sp_in_global __asm__("sp"); 23 23 24 24 void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, 25 25 bool (*fn)(unsigned long, void *), void *arg)
+3 -3
arch/riscv/kernel/vdso/Makefile
··· 33 33 $(call if_changed,vdsold) 34 34 35 35 # We also create a special relocatable object that should mirror the symbol 36 - # table and layout of the linked DSO. With ld -R we can then refer to 37 - # these symbols in the kernel code rather than hand-coded addresses. 36 + # table and layout of the linked DSO. With ld --just-symbols we can then 37 + # refer to these symbols in the kernel code rather than hand-coded addresses. 38 38 39 39 SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \ 40 40 -Wl,--build-id -Wl,--hash-style=both 41 41 $(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE 42 42 $(call if_changed,vdsold) 43 43 44 - LDFLAGS_vdso-syms.o := -r -R 44 + LDFLAGS_vdso-syms.o := -r --just-symbols 45 45 $(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE 46 46 $(call if_changed,ld) 47 47
+1 -1
drivers/tty/hvc/Kconfig
··· 88 88 89 89 config HVC_RISCV_SBI 90 90 bool "RISC-V SBI console support" 91 - depends on RISCV_SBI 91 + depends on RISCV_SBI_V01 92 92 select HVC_DRIVER 93 93 help 94 94 This enables support for console output via RISC-V SBI calls, which
+1 -1
drivers/tty/serial/Kconfig
··· 86 86 87 87 config SERIAL_EARLYCON_RISCV_SBI 88 88 bool "Early console using RISC-V SBI" 89 - depends on RISCV_SBI 89 + depends on RISCV_SBI_V01 90 90 select SERIAL_CORE 91 91 select SERIAL_CORE_CONSOLE 92 92 select SERIAL_EARLYCON