diff --git a/arch/riscv/include/asm/mmu.h b/arch/riscv/include/asm/mmu.h
index cedcf8ea3c76..0099dc116168 100644
--- a/arch/riscv/include/asm/mmu.h
+++ b/arch/riscv/include/asm/mmu.h
@@ -16,7 +16,6 @@ typedef struct {
 	atomic_long_t id;
 #endif
 	void *vdso;
-	void *vdso_info;
 #ifdef CONFIG_SMP
 	/* A local icache flush is needed before user execution can resume. */
 	cpumask_t icache_stale_mask;
diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c
index 69b05b6c181b..0cac2b9fa908 100644
--- a/arch/riscv/kernel/vdso.c
+++ b/arch/riscv/kernel/vdso.c
@@ -27,6 +27,11 @@ extern char vdso_start[], vdso_end[];
 extern char compat_vdso_start[], compat_vdso_end[];
 #endif
 
+enum vdso_abi {
+	VDSO_ABI_RV64,
+	VDSO_ABI_RV32,
+};
+
 enum vvar_pages {
 	VVAR_DATA_PAGE_OFFSET,
 	VVAR_TIMENS_PAGE_OFFSET,
@@ -68,67 +73,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
 	return 0;
 }
 
-static void __init __vdso_init(struct __vdso_info *vdso_info)
-{
-	unsigned int i;
-	struct page **vdso_pagelist;
-	unsigned long pfn;
-
-	if (memcmp(vdso_info->vdso_code_start, "\177ELF", 4))
-		panic("vDSO is not a valid ELF object!\n");
-
-	vdso_info->vdso_pages = (
-		vdso_info->vdso_code_end -
-		vdso_info->vdso_code_start) >>
-		PAGE_SHIFT;
-
-	vdso_pagelist = kcalloc(vdso_info->vdso_pages,
-				sizeof(struct page *),
-				GFP_KERNEL);
-	if (vdso_pagelist == NULL)
-		panic("vDSO kcalloc failed!\n");
-
-	/* Grab the vDSO code pages. */
-	pfn = sym_to_pfn(vdso_info->vdso_code_start);
-
-	for (i = 0; i < vdso_info->vdso_pages; i++)
-		vdso_pagelist[i] = pfn_to_page(pfn + i);
-
-	vdso_info->cm->pages = vdso_pagelist;
-}
-
 #ifdef CONFIG_TIME_NS
-struct vdso_data *arch_get_vdso_data(void *vvar_page)
-{
-	return (struct vdso_data *)(vvar_page);
-}
-
-/*
- * The vvar mapping contains data for a specific time namespace, so when a task
- * changes namespace we must unmap its vvar data for the old namespace.
- * Subsequent faults will map in data for the new namespace.
- *
- * For more details see timens_setup_vdso_data().
- */
-int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
-{
-	struct mm_struct *mm = task->mm;
-	struct vm_area_struct *vma;
-	struct __vdso_info *vdso_info = mm->context.vdso_info;
-
-	mmap_read_lock(mm);
-
-	for (vma = mm->mmap; vma; vma = vma->vm_next) {
-		unsigned long size = vma->vm_end - vma->vm_start;
-
-		if (vma_is_special_mapping(vma, vdso_info->dm))
-			zap_page_range(vma, vma->vm_start, size);
-	}
-
-	mmap_read_unlock(mm);
-	return 0;
-}
-
 static struct page *find_timens_vvar_page(struct vm_area_struct *vma)
 {
 	if (likely(vma->vm_mm == current->mm))
@@ -197,12 +142,23 @@ static struct vm_special_mapping rv_vdso_maps[] __ro_after_init = {
 	},
 };
 
-static struct __vdso_info vdso_info __ro_after_init = {
-	.name = "vdso",
-	.vdso_code_start = vdso_start,
-	.vdso_code_end = vdso_end,
-	.dm = &rv_vdso_maps[RV_VDSO_MAP_VVAR],
-	.cm = &rv_vdso_maps[RV_VDSO_MAP_VDSO],
+static struct __vdso_info vdso_info[] __ro_after_init = {
+	[VDSO_ABI_RV64] = {
+		.name = "vdso",
+		.vdso_code_start = vdso_start,
+		.vdso_code_end = vdso_end,
+		.dm = &rv_vdso_maps[RV_VDSO_MAP_VVAR],
+		.cm = &rv_vdso_maps[RV_VDSO_MAP_VDSO],
+	},
+#ifdef CONFIG_COMPAT
+	[VDSO_ABI_RV32] = {
+		.name = "compat_vdso",
+		.vdso_code_start = compat_vdso_start,
+		.vdso_code_end = compat_vdso_end,
+		.dm = &rv_compat_vdso_maps[RV_VDSO_MAP_VVAR],
+		.cm = &rv_compat_vdso_maps[RV_VDSO_MAP_VDSO],
+	},
+#endif
 };
 
 #ifdef CONFIG_COMPAT
@@ -216,21 +172,78 @@ static struct vm_special_mapping rv_compat_vdso_maps[] __ro_after_init = {
 		.mremap = vdso_mremap,
 	},
 };
+#endif
 
-static struct __vdso_info compat_vdso_info __ro_after_init = {
-	.name = "compat_vdso",
-	.vdso_code_start = compat_vdso_start,
-	.vdso_code_end = compat_vdso_end,
-	.dm = &rv_compat_vdso_maps[RV_VDSO_MAP_VVAR],
-	.cm = &rv_compat_vdso_maps[RV_VDSO_MAP_VDSO],
-};
+static void __init __vdso_init(enum vdso_abi abi)
+{
+	unsigned int i;
+	struct page **vdso_pagelist;
+	unsigned long pfn;
+
+	if (memcmp(vdso_info[abi].vdso_code_start, "\177ELF", 4))
+		panic("vDSO is not a valid ELF object!\n");
+
+	vdso_info[abi].vdso_pages = (
+		vdso_info[abi].vdso_code_end -
+		vdso_info[abi].vdso_code_start) >>
+		PAGE_SHIFT;
+
+	vdso_pagelist = kcalloc(vdso_info[abi].vdso_pages,
+				sizeof(struct page *),
+				GFP_KERNEL);
+	if (vdso_pagelist == NULL)
+		panic("vDSO kcalloc failed!\n");
+
+	/* Grab the vDSO code pages. */
+	pfn = sym_to_pfn(vdso_info[abi].vdso_code_start);
+
+	for (i = 0; i < vdso_info[abi].vdso_pages; i++)
+		vdso_pagelist[i] = pfn_to_page(pfn + i);
+
+	vdso_info[abi].cm->pages = vdso_pagelist;
+}
+
+#ifdef CONFIG_TIME_NS
+struct vdso_data *arch_get_vdso_data(void *vvar_page)
+{
+	return (struct vdso_data *)(vvar_page);
+}
+
+/*
+ * The vvar mapping contains data for a specific time namespace, so when a task
+ * changes namespace we must unmap its vvar data for the old namespace.
+ * Subsequent faults will map in data for the new namespace.
+ *
+ * For more details see timens_setup_vdso_data().
+ */
+int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
+{
+	struct mm_struct *mm = task->mm;
+	struct vm_area_struct *vma;
+
+	mmap_read_lock(mm);
+
+	for (vma = mm->mmap; vma; vma = vma->vm_next) {
+		unsigned long size = vma->vm_end - vma->vm_start;
+
+		if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_RV64].dm))
+			zap_page_range(vma, vma->vm_start, size);
+#ifdef CONFIG_COMPAT
+		if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_RV32].dm))
+			zap_page_range(vma, vma->vm_start, size);
+#endif
+	}
+
+	mmap_read_unlock(mm);
+	return 0;
+}
 #endif
 
 static int __init vdso_init(void)
 {
-	__vdso_init(&vdso_info);
+	__vdso_init(VDSO_ABI_RV64);
 #ifdef CONFIG_COMPAT
-	__vdso_init(&compat_vdso_info);
+	__vdso_init(VDSO_ABI_RV32);
 #endif
 
 	return 0;
@@ -240,14 +253,14 @@ arch_initcall(vdso_init);
 static int __setup_additional_pages(struct mm_struct *mm,
 				    struct linux_binprm *bprm,
 				    int uses_interp,
-				    struct __vdso_info *vdso_info)
+				    enum vdso_abi abi)
 {
 	unsigned long vdso_base, vdso_text_len, vdso_mapping_len;
 	void *ret;
 
 	BUILD_BUG_ON(VVAR_NR_PAGES != __VVAR_PAGES);
 
-	vdso_text_len = vdso_info->vdso_pages << PAGE_SHIFT;
+	vdso_text_len = vdso_info[abi].vdso_pages << PAGE_SHIFT;
 	/* Be sure to map the data page */
 	vdso_mapping_len = vdso_text_len + VVAR_SIZE;
 
@@ -258,18 +271,17 @@ static int __setup_additional_pages(struct mm_struct *mm,
 	}
 
 	ret = _install_special_mapping(mm, vdso_base, VVAR_SIZE,
-		(VM_READ | VM_MAYREAD | VM_PFNMAP), vdso_info->dm);
+		(VM_READ | VM_MAYREAD | VM_PFNMAP), vdso_info[abi].dm);
 	if (IS_ERR(ret))
 		goto up_fail;
 
 	vdso_base += VVAR_SIZE;
 	mm->context.vdso = (void *)vdso_base;
-	mm->context.vdso_info = (void *)vdso_info;
 
 	ret =
 	   _install_special_mapping(mm, vdso_base, vdso_text_len,
 		(VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC),
-		vdso_info->cm);
+		vdso_info[abi].cm);
 
 	if (IS_ERR(ret))
 		goto up_fail;
@@ -291,8 +303,7 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
 	if (mmap_write_lock_killable(mm))
 		return -EINTR;
 
-	ret = __setup_additional_pages(mm, bprm, uses_interp,
-							&compat_vdso_info);
+	ret = __setup_additional_pages(mm, bprm, uses_interp, VDSO_ABI_RV32);
 	mmap_write_unlock(mm);
 
 	return ret;
@@ -307,7 +318,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
 	if (mmap_write_lock_killable(mm))
 		return -EINTR;
 
-	ret = __setup_additional_pages(mm, bprm, uses_interp, &vdso_info);
+	ret = __setup_additional_pages(mm, bprm, uses_interp, VDSO_ABI_RV64);
 	mmap_write_unlock(mm);
 
 	return ret;
