From: Huacai Chen Date: Fri, 22 Nov 2024 07:47:48 +0000 (+0800) Subject: LoongArch: Reduce min_delta for the arch clockevent device X-Git-Tag: microblaze-v6.16~521^2~7 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=af4b67da652214f06fde48cca7bb438fa829741f;p=linux-2.6-microblaze.git LoongArch: Reduce min_delta for the arch clockevent device Now the min_delta is 0x600 (1536) for LoongArch's constant clockevent device. For a 100MHz hardware timer this means ~15us. This is a little big, especially for PREEMPT_RT enabled kernels. So reduce it to 100 for PREEMPT_RT kernel, and 1000 for others (we don't want too small values to affect performance). Signed-off-by: Huacai Chen --- diff --git a/arch/loongarch/kernel/time.c b/arch/loongarch/kernel/time.c index 46d7d40c87e3..a07d7eff4dc5 100644 --- a/arch/loongarch/kernel/time.c +++ b/arch/loongarch/kernel/time.c @@ -127,7 +127,11 @@ void sync_counter(void) int constant_clockevent_init(void) { unsigned int cpu = smp_processor_id(); - unsigned long min_delta = 0x600; +#ifdef CONFIG_PREEMPT_RT + unsigned long min_delta = 100; +#else + unsigned long min_delta = 1000; +#endif unsigned long max_delta = (1UL << 48) - 1; struct clock_event_device *cd; static int irq = 0, timer_irq_installed = 0;