Skip to content

Commit 5c5ecd1

Browse files
Merge tag 'riscv-fixes-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into fixes
riscv fixes for 6.16-rc1 - A fix for the newly introduced getrandom vdso where clang optimizes away a register variable which is both an input and an output parameter - A fix for theadvector where we did not save all the vector registers, only a few of them * tag 'riscv-fixes-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux: RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper riscv: vector: Fix context save/restore with xtheadvector
2 parents 8d90d98 + 2b95186 commit 5c5ecd1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

arch/riscv/include/asm/vdso/getrandom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static __always_inline ssize_t getrandom_syscall(void *_buffer, size_t _len, uns
1818
register unsigned int flags asm("a2") = _flags;
1919

2020
asm volatile ("ecall\n"
21-
: "+r" (ret)
21+
: "=r" (ret)
2222
: "r" (nr), "r" (buffer), "r" (len), "r" (flags)
2323
: "memory");
2424

arch/riscv/include/asm/vector.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ static inline void __riscv_v_vstate_save(struct __riscv_v_ext_state *save_to,
205205
THEAD_VSETVLI_T4X0E8M8D1
206206
THEAD_VSB_V_V0T0
207207
"add t0, t0, t4\n\t"
208-
THEAD_VSB_V_V0T0
208+
THEAD_VSB_V_V8T0
209209
"add t0, t0, t4\n\t"
210-
THEAD_VSB_V_V0T0
210+
THEAD_VSB_V_V16T0
211211
"add t0, t0, t4\n\t"
212-
THEAD_VSB_V_V0T0
212+
THEAD_VSB_V_V24T0
213213
: : "r" (datap) : "memory", "t0", "t4");
214214
} else {
215215
asm volatile (
@@ -241,11 +241,11 @@ static inline void __riscv_v_vstate_restore(struct __riscv_v_ext_state *restore_
241241
THEAD_VSETVLI_T4X0E8M8D1
242242
THEAD_VLB_V_V0T0
243243
"add t0, t0, t4\n\t"
244-
THEAD_VLB_V_V0T0
244+
THEAD_VLB_V_V8T0
245245
"add t0, t0, t4\n\t"
246-
THEAD_VLB_V_V0T0
246+
THEAD_VLB_V_V16T0
247247
"add t0, t0, t4\n\t"
248-
THEAD_VLB_V_V0T0
248+
THEAD_VLB_V_V24T0
249249
: : "r" (datap) : "memory", "t0", "t4");
250250
} else {
251251
asm volatile (

0 commit comments

Comments
 (0)