sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	 Vincenzo Frascino <vincenzo.frascino@arm.com>,
	 Arnd Bergmann <arnd@arndb.de>, Shuah Khan <shuah@kernel.org>,
	 "David S. Miller" <davem@davemloft.net>,
	 Andreas Larsson <andreas@gaisler.com>,
	 Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>,
	 Shannon Nelson <shannon.nelson@amd.com>,
	 Nick Alcock <nick.alcock@oracle.com>,
	John Stultz <jstultz@google.com>,
	 Stephen Boyd <sboyd@kernel.org>,
	 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	sparclinux@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH RFC 02/14] sparc64: time: Remove architecture-specific clocksource data
Date: Thu, 24 Jul 2025 08:26:52 +0200	[thread overview]
Message-ID: <20250724-vdso-sparc64-generic-2-v1-2-e376a3bd24d1@linutronix.de> (raw)
In-Reply-To: <20250724-vdso-sparc64-generic-2-v1-0-e376a3bd24d1@linutronix.de>

There is a dedicated field in 'struct clocksource' for the vDSO clock mode.

Use that field and get rid of 'select ARCH_CLOCKSOURCE_DATA'.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/sparc/Kconfig                   | 1 -
 arch/sparc/include/asm/clocksource.h | 4 ----
 arch/sparc/kernel/time_64.c          | 7 ++++---
 arch/sparc/kernel/vdso.c             | 2 +-
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 0f88123925a4f9f95b1b8336ff80798dacd243f5..742d1ad7fb9483b11d6d5aac607bf24815b7a237 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -102,7 +102,6 @@ config SPARC64
 	select ARCH_USE_QUEUED_RWLOCKS
 	select ARCH_USE_QUEUED_SPINLOCKS
 	select GENERIC_TIME_VSYSCALL
-	select ARCH_CLOCKSOURCE_DATA
 	select ARCH_HAS_PTE_SPECIAL
 	select PCI_DOMAINS if PCI
 	select ARCH_HAS_GIGANTIC_PAGE
diff --git a/arch/sparc/include/asm/clocksource.h b/arch/sparc/include/asm/clocksource.h
index d63ef224befebd68637d0be5d19c5cbf657d590d..81c59fdeb02e814ffac81397611ee63d684d64b1 100644
--- a/arch/sparc/include/asm/clocksource.h
+++ b/arch/sparc/include/asm/clocksource.h
@@ -10,8 +10,4 @@
 #define VCLOCK_TICK   1  /* Use %tick.  */
 #define VCLOCK_STICK  2  /* Use %stick. */
 
-struct arch_clocksource_data {
-	int vclock_mode;
-};
-
 #endif /* _ASM_SPARC_CLOCKSOURCE_H */
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index b32f27f929d1ab49a5aa05cde60d3b88e90928ba..0077286b1f67ffc6b63c78709fbd66aaa3f3bedc 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -48,6 +48,7 @@
 #include <linux/uaccess.h>
 #include <asm/irq_regs.h>
 #include <asm/cacheflush.h>
+#include <asm/clocksource.h>
 
 #include "entry.h"
 #include "kernel.h"
@@ -838,14 +839,14 @@ void __init time_init_early(void)
 	if (tlb_type == spitfire) {
 		if (is_hummingbird()) {
 			init_tick_ops(&hbtick_operations);
-			clocksource_tick.archdata.vclock_mode = VCLOCK_NONE;
+			clocksource_tick.vdso_clock_mode = VCLOCK_NONE;
 		} else {
 			init_tick_ops(&tick_operations);
-			clocksource_tick.archdata.vclock_mode = VCLOCK_TICK;
+			clocksource_tick.vdso_clock_mode = VCLOCK_TICK;
 		}
 	} else {
 		init_tick_ops(&stick_operations);
-		clocksource_tick.archdata.vclock_mode = VCLOCK_STICK;
+		clocksource_tick.vdso_clock_mode = VCLOCK_STICK;
 	}
 }
 
diff --git a/arch/sparc/kernel/vdso.c b/arch/sparc/kernel/vdso.c
index 0e27437eb97bff16aba53b1634c7e9fa7db20b46..a79937998a13b9142cc887dcaf6488571f9557eb 100644
--- a/arch/sparc/kernel/vdso.c
+++ b/arch/sparc/kernel/vdso.c
@@ -29,7 +29,7 @@ void update_vsyscall(struct timekeeper *tk)
 		return;
 
 	vvar_write_begin(vdata);
-	vdata->vclock_mode = tk->tkr_mono.clock->archdata.vclock_mode;
+	vdata->vclock_mode = tk->tkr_mono.clock->vdso_clock_mode;
 	vdata->clock.cycle_last = tk->tkr_mono.cycle_last;
 	vdata->clock.mask = tk->tkr_mono.mask;
 	vdata->clock.mult = tk->tkr_mono.mult;

-- 
2.50.1


  parent reply	other threads:[~2025-07-24  6:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24  6:26 [PATCH RFC 00/14] sparc64: vdso: Switch to generic vDSO library Thomas Weißschuh
2025-07-24  6:26 ` [PATCH RFC 01/14] vdso: add struct __kernel_old_timeval forward declaration to gettime.h Thomas Weißschuh
2025-07-24  6:26 ` Thomas Weißschuh [this message]
2025-07-24  6:26 ` [PATCH RFC 03/14] clocksource: remove ARCH_CLOCKSOURCE_DATA Thomas Weißschuh
2025-07-24  6:26 ` [PATCH RFC 04/14] sparc64: vdso: Link with -z noexecstack Thomas Weißschuh
2025-07-24  6:26 ` [PATCH RFC 05/14] sparc64: vdso: Remove obsolete "fake section table" reservation Thomas Weißschuh
2025-07-24  6:26 ` [PATCH RFC 06/14] sparc64: vdso: Replace code patching with runtime conditional Thomas Weißschuh
2025-07-24  6:26 ` [PATCH RFC 07/14] sparc64: vdso: Move hardware counter read into header Thomas Weißschuh
2025-07-24  6:26 ` [PATCH RFC 08/14] sparc64: vdso: Move syscall fallbacks " Thomas Weißschuh
2025-07-25  9:51   ` Rolf Eike Beer
2025-07-24  6:26 ` [PATCH RFC 09/14] sparc64: vdso: Introduce vdso/processor.h Thomas Weißschuh
2025-07-24  6:27 ` [PATCH RFC 10/14] sparc64: vdso: Switch to the generic vDSO library Thomas Weißschuh
2025-07-24  6:27 ` [PATCH RFC 11/14] sparc64: vdso2c: Drop sym_vvar_start handling Thomas Weißschuh
2025-07-24  6:27 ` [PATCH RFC 12/14] sparc64: vdso2c: Remove symbol handling Thomas Weißschuh
2025-07-24  6:27 ` [PATCH RFC 13/14] sparc64: vdso: Implement clock_gettime64() Thomas Weißschuh
2025-07-24  6:27 ` [PATCH RFC 14/14] sparc64: vdso: Implement clock_getres() 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=20250724-vdso-sparc64-generic-2-v1-2-e376a3bd24d1@linutronix.de \
    --to=thomas.weissschuh@linutronix.de \
    --cc=andreas@gaisler.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=nagarathnam.muthusamy@oracle.com \
    --cc=nick.alcock@oracle.com \
    --cc=sboyd@kernel.org \
    --cc=shannon.nelson@amd.com \
    --cc=shuah@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).