Skip to content

Commit af4b67d

Browse files
committed
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 <[email protected]>
1 parent 73c359d commit af4b67d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/loongarch/kernel/time.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ void sync_counter(void)
127127
int constant_clockevent_init(void)
128128
{
129129
unsigned int cpu = smp_processor_id();
130-
unsigned long min_delta = 0x600;
130+
#ifdef CONFIG_PREEMPT_RT
131+
unsigned long min_delta = 100;
132+
#else
133+
unsigned long min_delta = 1000;
134+
#endif
131135
unsigned long max_delta = (1UL << 48) - 1;
132136
struct clock_event_device *cd;
133137
static int irq = 0, timer_irq_installed = 0;

0 commit comments

Comments
 (0)