mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
MIPS: csrc-r4k: Refine rating computation
Increase frequency addend dividend to 10000000 (10MHz) to reasonably accommodate multi GHz level mips_hpt_frequency. Cap rating of csrc-r4k into 299 to ensure it doesn't go into "Desired" range, given all the drama we have with CP0 count registers (SMP sync, behaviour on wait etc). Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
04f38d1a4d
commit
c171186c17
@ -111,7 +111,8 @@ int __init init_r4k_clocksource(void)
|
||||
return -ENXIO;
|
||||
|
||||
/* Calculate a somewhat reasonable rating value */
|
||||
clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
|
||||
clocksource_mips.rating = 200;
|
||||
clocksource_mips.rating += clamp(mips_hpt_frequency / 10000000, 0, 99);
|
||||
|
||||
/*
|
||||
* R2 onwards makes the count accessible to user mode so it can be used
|
||||
|
Loading…
Reference in New Issue
Block a user