Use delta value based on its speed for faster probing. Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx> --- diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index ae2984f..46a896f 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c @@ -179,7 +179,7 @@ static int c0_compare_int_pending(void) static int c0_compare_int_usable(void) { - const unsigned int delta = 0x300000; + unsigned int delta; unsigned int cnt; /* @@ -192,6 +192,8 @@ static int c0_compare_int_usable(void) return 0; } + delta = read_c0_count(); + delta = ((read_c0_count() - delta) ?: 1) << 8; cnt = read_c0_count(); cnt += delta; write_c0_compare(cnt);