diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-06-26 16:45:49 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-06-26 16:45:49 +0200 |
commit | a57e8e1982cc0e4631772c52218548432974de58 (patch) | |
tree | 12c71ffb948ece626ad072e84a3c82b1f36cbaf8 /arch | |
parent | d48e0cd8fcaf314175a15d3076d7a1e71bd4e628 (diff) | |
parent | a2e1bb44a35d84bc760a0553fb1e36fecc25a623 (diff) |
Merge tag 'timers-v5.4' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull clocksource/events updates from Daniel Lezcano:
- Rewrite of the davinci timer resulting to an immutable branch to be
shared with davinci platform specific tree (Bartosz Golaszewski)
- Cleanup and improvements of the tegra timer (Dmitry Osipenko)
- Add new nxp system counter timer (Bai Ping)
- Increase priority for exynos_mct to take over the initialization
of the IP the arch ARM timer depends on (Marek Szyprowski)
- Change macro use _BITUL() by BIT() on arc timer (Masahiro Yamada)
- Implement the delay timer on ixp4xx (Linus Walleij)
- Add the SPDX license identifier on the meson timer (Neil Armstrong)
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/arch_timer.h | 10 | ||||
-rw-r--r-- | arch/arm64/include/asm/arch_timer.h | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 4b66ecd6be99..99175812d903 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h @@ -4,6 +4,7 @@ #include <asm/barrier.h> #include <asm/errno.h> +#include <asm/hwcap.h> #include <linux/clocksource.h> #include <linux/init.h> #include <linux/types.h> @@ -124,6 +125,15 @@ static inline void arch_timer_set_cntkctl(u32 cntkctl) isb(); } +static inline void arch_timer_set_evtstrm_feature(void) +{ + elf_hwcap |= HWCAP_EVTSTRM; +} + +static inline bool arch_timer_have_evtstrm_feature(void) +{ + return elf_hwcap & HWCAP_EVTSTRM; +} #endif #endif diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h index 50b3ab7ded4f..a847a3ee6cab 100644 --- a/arch/arm64/include/asm/arch_timer.h +++ b/arch/arm64/include/asm/arch_timer.h @@ -20,6 +20,7 @@ #define __ASM_ARCH_TIMER_H #include <asm/barrier.h> +#include <asm/hwcap.h> #include <asm/sysreg.h> #include <linux/bug.h> @@ -240,4 +241,16 @@ static inline int arch_timer_arch_init(void) return 0; } +static inline void arch_timer_set_evtstrm_feature(void) +{ + cpu_set_named_feature(EVTSTRM); +#ifdef CONFIG_COMPAT + compat_elf_hwcap |= COMPAT_HWCAP_EVTSTRM; +#endif +} + +static inline bool arch_timer_have_evtstrm_feature(void) +{ + return cpu_have_named_feature(EVTSTRM); +} #endif |