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)
Dec 20 2023, 1:43 AM
Unknown Object (File)
Nov 29 2023, 7:35 PM
Unknown Object (File)
Nov 10 2023, 3:43 PM
Unknown Object (File)
Nov 8 2023, 3:51 PM
Unknown Object (File)
Nov 4 2023, 10:09 PM
Unknown Object (File)
Nov 3 2023, 3:25 AM
Unknown Object (File)
Oct 3 2023, 10:08 PM
Unknown Object (File)
Oct 1 2023, 3:24 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 22751
Build 21843: arc lint + arc unit

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.