Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d8f51d4 authored by Scott Wood's avatar Scott Wood Committed by Will Deacon
Browse files

arm/arm64: arch_timer: Use archdata to indicate vdso suitability



Instead of comparing the name to a magic string, use archdata to
explicitly communicate whether the arch timer is suitable for
direct vdso access.

Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarScott Wood <oss@buserror.net>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent f6dc1576
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
config ARM
	bool
	default y
	select ARCH_CLOCKSOURCE_DATA
	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_ELF_RANDOMIZE
+8 −0
Original line number Diff line number Diff line
#ifndef _ASM_CLOCKSOURCE_H
#define _ASM_CLOCKSOURCE_H

struct arch_clocksource_data {
	bool vdso_direct;	/* Usable for direct VDSO access? */
};

#endif
+1 −1
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ static bool tk_is_cntvct(const struct timekeeper *tk)
	if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
		return false;

	if (strcmp(tk->tkr_mono.clock->name, "arch_sys_counter") != 0)
	if (!tk->tkr_mono.clock->archdata.vdso_direct)
		return false;

	return true;
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ config ARM64
	select ACPI_GENERIC_GSI if ACPI
	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
	select ACPI_MCFG if ACPI
	select ARCH_CLOCKSOURCE_DATA
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
+8 −0
Original line number Diff line number Diff line
#ifndef _ASM_CLOCKSOURCE_H
#define _ASM_CLOCKSOURCE_H

struct arch_clocksource_data {
	bool vdso_direct;	/* Usable for direct VDSO access? */
};

#endif
Loading