summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/vdso/vdso.h
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-09-01 14:13:11 +0800
committerJason A. Donenfeld <Jason@zx2c4.com>2024-09-13 17:28:35 +0200
commit18efd0b10e0fd77fe649a375f9f17a387b5d1609 (patch)
tree66cb8366065d0f5866f08e4cade3e2ccd968eb99 /arch/loongarch/include/asm/vdso/vdso.h
parent4d456f0c87c95efb6197a30cd76b5b6ee5fb012e (diff)
LoongArch: vDSO: Wire up getrandom() vDSO implementation
Hook up the generic vDSO implementation to the LoongArch vDSO data page by providing the required __arch_chacha20_blocks_nostack, __arch_get_k_vdso_rng_data, and getrandom_syscall implementations. Also wire up the selftests. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Acked-by: Huacai Chen <chenhuacai@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'arch/loongarch/include/asm/vdso/vdso.h')
-rw-r--r--arch/loongarch/include/asm/vdso/vdso.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/vdso/vdso.h b/arch/loongarch/include/asm/vdso/vdso.h
index 5a12309d9fb5..e31ac7474513 100644
--- a/arch/loongarch/include/asm/vdso/vdso.h
+++ b/arch/loongarch/include/asm/vdso/vdso.h
@@ -4,6 +4,9 @@
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
*/
+#ifndef _ASM_VDSO_VDSO_H
+#define _ASM_VDSO_VDSO_H
+
#ifndef __ASSEMBLY__
#include <asm/asm.h>
@@ -16,6 +19,7 @@ struct vdso_pcpu_data {
struct loongarch_vdso_data {
struct vdso_pcpu_data pdata[NR_CPUS];
+ struct vdso_rng_data rng_data;
};
/*
@@ -63,3 +67,5 @@ static inline unsigned long get_vdso_data(void)
}
#endif /* __ASSEMBLY__ */
+
+#endif