mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Weißschuh" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: thomas.weissschuh@linutronix.de,
	Thomas Gleixner <tglx@kernel.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/vdso] MIPS: VDSO: Only map the data pages when the vDSO is used
Date: Thu, 04 Jun 2026 16:24:54 -0000	[thread overview]
Message-ID: <178059029438.710.11119859555214795870.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260521-vdso-mips-kconfig-v1-4-2f79dcd6c78f@linutronix.de>

The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     8ea920c48d82a0ef031bedfb649d4d8c77ef3d1c
Gitweb:        https://git.kernel.org/tip/8ea920c48d82a0ef031bedfb649d4d8c77ef3d1c
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Thu, 21 May 2026 08:53:18 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Thu, 04 Jun 2026 18:22:45 +02:00

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
---
 arch/mips/Kconfig       |  2 +-
 arch/mips/kernel/vdso.c | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b041d3d..f56e1a5 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -74,7 +74,6 @@ config MIPS
 	select HAVE_FUNCTION_GRAPH_TRACER
 	select HAVE_FUNCTION_TRACER
 	select HAVE_GCC_PLUGINS
-	select HAVE_GENERIC_VDSO
 	select HAVE_IOREMAP_PROT
 	select HAVE_IRQ_EXIT_ON_IRQ_STACK
 	select HAVE_IRQ_TIME_ACCOUNTING
@@ -3171,6 +3170,7 @@ config MIPS_EXTERNAL_TIMER
 config MIPS_GENERIC_GETTIMEOFDAY
 	def_bool y
 	select GENERIC_GETTIMEOFDAY
+	select HAVE_GENERIC_VDSO
 
 menu "CPU Power Management"
 
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c
index 2fa4df3..bd1fc17 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. */

  reply	other threads:[~2026-06-04 16:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21  6:53 [PATCH 0/9] MIPS: VDSO: Clean up vDSO Kconfig Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 1/9] MAINTAINERS: Add include/linux/vdso_datastore.h to vDSO block Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 2/9] vdso/datastore: Always provide symbol declarations Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 3/9] MIPS: Introduce Kconfig MIPS_GENERIC_GETTIMEOFDAY Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 4/9] MIPS: VDSO: Only map the data pages when the vDSO is used Thomas Weißschuh
2026-06-04 16:24   ` tip-bot2 for Thomas Weißschuh [this message]
2026-05-21  6:53 ` [PATCH 5/9] MIPS: csrc-r4k: Only use VDSO_CLOCKMODE_R4K when it is a available Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-05  7:59     ` Thomas Weißschuh
2026-06-09 15:04   ` tip-bot2 for Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 6/9] clocksource/drivers/mips-gic-timer: Only use VDSO_CLOCKMODE_GIC " Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-09 15:04   ` tip-bot2 for Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 7/9] MIPS: VDSO: Fold MIPS_DISABLE_VDSO into MIPS_GENERIC_GETTIMEOFDAY Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-09 15:04   ` tip-bot2 for Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 8/9] MIPS: VDSO: Gate microMIPS restriction on GCC version Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-09 15:04   ` tip-bot2 for Thomas Weißschuh
2026-05-21  6:53 ` [PATCH 9/9] MIPS: VDSO: Fold MIPS_CLOCK_VSYSCALL into MIPS_GENERIC_GETTIMEOFDAY Thomas Weißschuh
2026-06-04 16:24   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-09 15:03   ` tip-bot2 for Thomas Weißschuh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178059029438.710.11119859555214795870.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®