summaryrefslogtreecommitdiff
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>2026-05-21 08:53:18 +0200
committerThomas Gleixner <tglx@kernel.org>2026-06-04 18:22:45 +0200
commit8ea920c48d82a0ef031bedfb649d4d8c77ef3d1c (patch)
treecb7d395540251aaa7da16b2a0fca694770083c6f /arch/mips/kernel
parent60ad2f1158577b4923987f0a410456cfccd0fd23 (diff)
downloadlinux-8ea920c48d82a0ef031bedfb649d4d8c77ef3d1c.tar.gz
linux-8ea920c48d82a0ef031bedfb649d4d8c77ef3d1c.zip
MIPS: VDSO: Only map the data pages when the vDSO is used
A future change will make it possible to disable the time-related vDSO. In that case there is no point in calling into the datastore. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Link: https://patch.msgid.link/20260521-vdso-mips-kconfig-v1-4-2f79dcd6c78f@linutronix.de
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/vdso.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c
index 2fa4df3e46e4..bd1fc17d3975 100644
--- a/arch/mips/kernel/vdso.c
+++ b/arch/mips/kernel/vdso.c
@@ -129,7 +129,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
* This ensures that when the kernel updates the VDSO data userland
* will observe it without requiring cache invalidations.
*/
- if (cpu_has_dc_aliases) {
+ if (cpu_has_dc_aliases && IS_ENABLED(CONFIG_HAVE_GENERIC_VDSO)) {
base = __ALIGN_MASK(base, shm_align_mask);
base += ((unsigned long)vdso_k_time_data - gic_size) & shm_align_mask;
}
@@ -137,10 +137,12 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
data_addr = base + gic_size;
vdso_addr = data_addr + VDSO_NR_PAGES * PAGE_SIZE;
- vma = vdso_install_vvar_mapping(mm, data_addr);
- if (IS_ERR(vma)) {
- ret = PTR_ERR(vma);
- goto out;
+ if (IS_ENABLED(CONFIG_HAVE_GENERIC_VDSO)) {
+ vma = vdso_install_vvar_mapping(mm, data_addr);
+ if (IS_ERR(vma)) {
+ ret = PTR_ERR(vma);
+ goto out;
+ }
}
/* Map GIC user page. */