1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Author: Huacai Chen <chenhuacai@loongson.cn>
4 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
7 #ifndef _ASM_VDSO_VDSO_H
8 #define _ASM_VDSO_VDSO_H
16 struct vdso_pcpu_data
{
18 } ____cacheline_aligned_in_smp
;
20 struct loongarch_vdso_data
{
21 struct vdso_pcpu_data pdata
[NR_CPUS
];
22 struct vdso_rng_data rng_data
;
29 * +---------------------+--------------------------+
30 * | loongarch vdso data | LOONGARCH_VDSO_DATA_SIZE |
31 * +---------------------+--------------------------+
32 * | time-ns vdso data | PAGE_SIZE |
33 * +---------------------+--------------------------+
34 * | generic vdso data | PAGE_SIZE |
35 * +---------------------+--------------------------+
38 #define LOONGARCH_VDSO_DATA_SIZE PAGE_ALIGN(sizeof(struct loongarch_vdso_data))
39 #define LOONGARCH_VDSO_DATA_PAGES (LOONGARCH_VDSO_DATA_SIZE >> PAGE_SHIFT)
42 VVAR_GENERIC_PAGE_OFFSET
,
43 VVAR_TIMENS_PAGE_OFFSET
,
44 VVAR_LOONGARCH_PAGES_START
,
45 VVAR_LOONGARCH_PAGES_END
= VVAR_LOONGARCH_PAGES_START
+ LOONGARCH_VDSO_DATA_PAGES
- 1,
49 #define VVAR_SIZE (VVAR_NR_PAGES << PAGE_SHIFT)
51 extern struct loongarch_vdso_data _loongarch_data
__attribute__((visibility("hidden")));
53 #endif /* __ASSEMBLY__ */