diff options
author | Paul Burton <[email protected]> | 2020-05-21 23:48:16 +0300 |
---|---|---|
committer | Daniel Lezcano <[email protected]> | 2020-05-23 00:03:08 +0200 |
commit | 48016e78d328998b1f00bcfb639adeabca51abe5 (patch) | |
tree | a572cf743868f8e827f696800f01c13258c46010 /lib/mpi/mpi-sub-ui.c | |
parent | 6d2e16a3181bafb77b535095c39ad1c8b9558c8c (diff) |
clocksource: mips-gic-timer: Register as sched_clock
The MIPS GIC timer is well suited for use as sched_clock, so register it
as such.
Whilst the existing gic_read_count() function matches the prototype
needed by sched_clock_register() already, we split it into 2 functions
in order to remove the need to evaluate the mips_cm_is64 condition
within each call since sched_clock should be as fast as possible.
Note the sched clock framework needs the clock source being stable in
order to rely on it. So we register the MIPS GIC timer as schedule clocks
only if it's, if either the system doesn't have CPU-frequency enabled or
the CPU frequency is changed by means of the CPC core clock divider
available on the platforms with CM3 or newer.
Signed-off-by: Paul Burton <[email protected]>
Co-developed-by: Serge Semin <[email protected]>
[[email protected]: Register sched-clock if CM3 or !CPU-freq]
Signed-off-by: Serge Semin <[email protected]>
Cc: Alexey Malahov <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions