clocksource/drivers/imx-tpm: exclude sched clock for ARM64
Subsystems (2)
PATCH 1/1 clocksource/drivers/imx-tpm: exclude sched clock for ARM64
From: Peng Fan <[email protected]>
For ARM64 platform such as i.MX8ULP which has ARMv8 generic timer as sched clock, which is much faster compared with tpm sched clock. Reading the tpm count register in i.MX8ULP requires about 290ns, this is slow and introduce scheduler latency. So exclude tpm sched clock for ARM64 platform.
--- drivers/clocksource/timer-imx-tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-imx-tpm.c +1 -1
@@ -150,10 +150,10 @@ static int __init tpm_clocksource_init(void) tpm_delay_timer.read_current_timer = &tpm_read_current_timer; tpm_delay_timer.freq =timer_of_rate (&to_tpm) >>3 ;register_current_timer_delay (&tpm_delay_timer); -#endif sched_clock_register (tpm_read_sched_clock, counter_width,timer_of_rate (&to_tpm) >>3 ); +#endif return clocksource_mmio_init(timer_base + TPM_CNT, "imx-tpm",
Signature · 1 line
2.25.1
Quoted 2 lines
Subject: [PATCH] clocksource/drivers/imx-tpm: exclude sched clock for ARM64
Gentle ping..
Thanks,
Peng.
Quoted 32 lines
From: Peng Fan <[email protected]>
For ARM64 platform such as i.MX8ULP which has ARMv8 generic timer as sched clock, which is much faster compared with tpm sched clock. Reading the tpm count register in i.MX8ULP requires about 290ns, this is slow and introduce scheduler latency. So exclude tpm sched clock for ARM64 platform.
Signed-off-by Peng Fan <[email protected]>--- drivers/clocksource/timer-imx-tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clocksource/timer-imx-tpm.c +1
-2@@ -150,10 +150,10 @@ static int __init tpm_clocksource_init(void) tpm_delay_timer.read_current_timer = &tpm_read_current_timer; tpm_delay_timer.freq =timer_of_rate (&to_tpm) >>3 ;register_current_timer_delay (&tpm_delay_timer); -#endif sched_clock_register (tpm_read_sched_clock, counter_width,timer_of_rate (&to_tpm) >>3 ); +#endif return clocksource_mmio_init(timer_base + TPM_CNT, "imx-tpm", --2.25.1
[tip: timers/core] clocksource/drivers/imx-tpm: Exclude sched clock for ARM64
In reply to Peng Fan (OSS)The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 10720e120e2b1d66172dccb06eb4f346a665cca6 Gitweb: https://git.kernel.org/tip/10720e120e2b1d66172dccb06eb4f346a665cca6 Author: Peng Fan <[email protected]> AuthorDate: Wed, 05 Jan 2022 20:43:04 +08:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Wed, 16 Feb 2022 14:43:30 +01:00
clocksource/drivers/imx-tpm: Exclude sched clock for ARM64
For ARM64 platform such as i.MX8ULP which has ARMv8 generic timer as sched clock, which is much faster compared with tpm sched clock. Reading the tpm count register in i.MX8ULP requires about 290ns, this is slow and introduce scheduler latency. So exclude tpm sched clock for ARM64 platform.
--- drivers/clocksource/timer-imx-tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-imx-tpm.c +1 -1
@@ -150,10 +150,10 @@ static int __init tpm_clocksource_init(void) tpm_delay_timer.read_current_timer = &tpm_read_current_timer; tpm_delay_timer.freq =timer_of_rate (&to_tpm) >>3 ;register_current_timer_delay (&tpm_delay_timer); -#endif sched_clock_register (tpm_read_sched_clock, counter_width,timer_of_rate (&to_tpm) >>3 ); +#endif return clocksource_mmio_init(timer_base + TPM_CNT, "imx-tpm",