Page MenuHomeFreeBSD

powerpc/mpc85xx: Synchronize timebase the platform correct way
ClosedPublic

Authored by jhibbits on Feb 16 2019, 4:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 11:11 AM
Unknown Object (File)
Nov 15 2024, 5:54 PM
Unknown Object (File)
Nov 7 2024, 9:33 AM
Unknown Object (File)
Oct 27 2024, 12:58 PM
Unknown Object (File)
Oct 27 2024, 12:57 PM
Unknown Object (File)
Oct 27 2024, 12:57 PM
Unknown Object (File)
Oct 27 2024, 12:57 PM
Unknown Object (File)
Oct 27 2024, 12:32 PM
Subscribers

Details

Summary

To safely synchronize timebase we need to disable the timebase on all
cores, set timebase, and resynchronize. This adds two new devices, mutually
exclusive, which attach on the SoC simplebus, to freeze and unfreeze the
timebase. The devices are singletons, and platform-specific, so I saw no reason
to make them optional and in separate files.

This was found to be necessary for top(1) to work correctly on an AmigaOne
X5000 (P5020 SoC).

Test Plan

Regression test on various Book-E hardware.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Should we panic if freeze_timebase somehow doesn't get set? Or, alternately, fall back on the old lame thing?

I have two alternative paths to go: if (freeze... != NULL), or have a default empty freeze function. Doesn't matter to me which way we go with, but, yes, we need a fallback to do it the lame way.

Add a dummy freezer, to keep the code path easier to follow.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 27 2019, 3:31 AM
This revision was automatically updated to reflect the committed changes.