From: Marc Zyngier <marc.zyngier@arm.com>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
Russell King <linux@arm.linux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Will Deacon <will.deacon@arm.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Valentin Schneider <valentin.schneider@arm.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 3/7] arm64: Use arch_timer_read_counter instead of arch_counter_get_cntvct
Date: Mon, 8 Apr 2019 16:49:03 +0100 [thread overview]
Message-ID: <20190408154907.223536-4-marc.zyngier@arm.com> (raw)
In-Reply-To: <20190408154907.223536-1-marc.zyngier@arm.com>
Only arch_timer_read_counter will guarantee that workarounds are
applied. So let's use this one instead of arch_counter_get_cntvct.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/kernel/traps.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 8ad119c3f665..6190a60388cf 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -493,7 +493,7 @@ static void cntvct_read_handler(unsigned int esr, struct pt_regs *regs)
{
int rt = ESR_ELx_SYS64_ISS_RT(esr);
- pt_regs_write_reg(regs, rt, arch_counter_get_cntvct());
+ pt_regs_write_reg(regs, rt, arch_timer_read_counter());
arm64_skip_faulting_instruction(regs, AARCH64_INSN_SIZE);
}
@@ -665,7 +665,7 @@ static void compat_cntvct_read_handler(unsigned int esr, struct pt_regs *regs)
{
int rt = (esr & ESR_ELx_CP15_64_ISS_RT_MASK) >> ESR_ELx_CP15_64_ISS_RT_SHIFT;
int rt2 = (esr & ESR_ELx_CP15_64_ISS_RT2_MASK) >> ESR_ELx_CP15_64_ISS_RT2_SHIFT;
- u64 val = arch_counter_get_cntvct();
+ u64 val = arch_timer_read_counter();
pt_regs_write_reg(regs, rt, lower_32_bits(val));
pt_regs_write_reg(regs, rt2, upper_32_bits(val));
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-08 15:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 15:49 [PATCH 0/7] clocksource/arm_arch_timer: Removing the static branch on errata handling Marc Zyngier
2019-04-08 15:49 ` [PATCH 1/7] ARM: vdso: Remove dependency with the arch_timer driver internals Marc Zyngier
2019-04-08 15:58 ` Mark Rutland
2019-04-15 10:46 ` Marc Zyngier
2019-04-30 14:23 ` Will Deacon
2019-04-08 15:49 ` [PATCH 2/7] watchdog/sbsa: Use arch_timer_read_counter instead of arch_counter_get_cntvct Marc Zyngier
2019-04-08 15:59 ` Mark Rutland
2019-04-08 18:07 ` Guenter Roeck
2019-04-09 7:43 ` Marc Zyngier
2019-04-08 15:49 ` Marc Zyngier [this message]
2019-04-08 15:59 ` [PATCH 3/7] arm64: " Mark Rutland
2019-04-08 15:49 ` [PATCH 4/7] clocksource/arm_arch_timer: Direcly assign set_next_event workaround Marc Zyngier
2019-04-08 16:02 ` Mark Rutland
2019-04-11 17:17 ` Daniel Lezcano
2019-04-15 10:18 ` Marc Zyngier
2019-04-08 15:49 ` [PATCH 5/7] clocksource/arm_arch_timer: Drop use of static key in arch_timer_reg_read_stable Marc Zyngier
2019-04-08 16:04 ` Mark Rutland
2019-04-15 11:04 ` Daniel Lezcano
2019-04-08 15:49 ` [PATCH 6/7] clocksource/arm_arch_timer: Remove use of workaround static key Marc Zyngier
2019-04-08 16:05 ` Mark Rutland
2019-04-15 11:07 ` Daniel Lezcano
2019-04-08 15:49 ` [PATCH 7/7] clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters Marc Zyngier
2019-04-08 16:08 ` Mark Rutland
2019-04-15 12:16 ` Daniel Lezcano
2019-04-30 15:27 ` Marc Zyngier
2019-04-30 15:39 ` Valentin Schneider
2019-05-03 20:32 ` Daniel Lezcano
2019-05-03 20:31 ` Daniel Lezcano
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=20190408154907.223536-4-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=catalin.marinas@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
--cc=valentin.schneider@arm.com \
--cc=will.deacon@arm.com \
--cc=wim@linux-watchdog.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;
as well as URLs for NNTP newsgroup(s).