[PATCH v2 3/4] clocksource/drivers/arm_arch_timer_mmio: Switch over to standalone driver
Lorenzo Pieralisi
lpieralisi at kernel.org
Thu Oct 30 09:35:11 PDT 2025
On Thu, Aug 14, 2025 at 04:46:21PM +0100, Marc Zyngier wrote:
[...]
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
[...]
> #ifdef CONFIG_ACPI_GTDT
> -static int __init
> -arch_timer_mem_verify_cntfrq(struct arch_timer_mem *timer_mem)
> -{
> - struct arch_timer_mem_frame *frame;
> - u32 rate;
> - int i;
> -
> - for (i = 0; i < ARCH_TIMER_MEM_MAX_FRAMES; i++) {
> - frame = &timer_mem->frame[i];
> -
> - if (!frame->valid)
> - continue;
> -
> - rate = arch_timer_mem_frame_get_cntfrq(frame);
> - if (rate == arch_timer_rate)
> - continue;
> -
> - pr_err(FW_BUG "CNTFRQ mismatch: frame @ %pa: (0x%08lx), CPU: (0x%08lx)\n",
> - &frame->cntbase,
> - (unsigned long)rate, (unsigned long)arch_timer_rate);
> -
> - return -EINVAL;
> - }
> -
> - return 0;
> -}
> -
> -static int __init arch_timer_mem_acpi_init(int platform_timer_count)
> -{
> - struct arch_timer_mem *timers, *timer;
> - struct arch_timer_mem_frame *frame, *best_frame = NULL;
> - int timer_count, i, ret = 0;
> -
> - timers = kcalloc(platform_timer_count, sizeof(*timers),
> - GFP_KERNEL);
> - if (!timers)
> - return -ENOMEM;
> -
> - ret = acpi_arch_timer_mem_init(timers, &timer_count);
You probably already noticed (I was checking the initcall level in
drivers/acpi/arm64/gtdt.c to start sorting out GICv5 IWB dependencies),
AFAICS acpi_arch_timer_mem_init() is now unused so it can be removed.
Thanks,
Lorenzo
More information about the linux-arm-kernel
mailing list