diff options
Diffstat (limited to 'arch/loongarch/include/asm/vdso/vdso.h')
| -rw-r--r-- | arch/loongarch/include/asm/vdso/vdso.h | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/arch/loongarch/include/asm/vdso/vdso.h b/arch/loongarch/include/asm/vdso/vdso.h index 3b55d32a0619..04bd2d452876 100644 --- a/arch/loongarch/include/asm/vdso/vdso.h +++ b/arch/loongarch/include/asm/vdso/vdso.h @@ -4,40 +4,18 @@ * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ -#ifndef __ASSEMBLY__ +#ifndef _ASM_VDSO_VDSO_H +#define _ASM_VDSO_VDSO_H + +#ifndef __ASSEMBLER__ #include <asm/asm.h> #include <asm/page.h> #include <asm/vdso.h> +#include <vdso/datapage.h> -struct vdso_pcpu_data { - u32 node; -} ____cacheline_aligned_in_smp; - -struct loongarch_vdso_data { - struct vdso_pcpu_data pdata[NR_CPUS]; - struct vdso_data data[CS_BASES]; /* Arch-independent data */ -}; - -#define VDSO_DATA_SIZE PAGE_ALIGN(sizeof(struct loongarch_vdso_data)) - -static inline unsigned long get_vdso_base(void) -{ - unsigned long addr; - - __asm__( - " la.pcrel %0, _start\n" - : "=r" (addr) - : - :); - - return addr; -} +#define VVAR_SIZE (VDSO_NR_PAGES << PAGE_SHIFT) -static inline const struct vdso_data *get_vdso_data(void) -{ - return (const struct vdso_data *)(get_vdso_base() - - VDSO_DATA_SIZE + SMP_CACHE_BYTES * NR_CPUS); -} +#endif /* __ASSEMBLER__ */ -#endif /* __ASSEMBLY__ */ +#endif |
