x86/time: minor adjustments to init_pit()
authorJan Beulich <jbeulich@suse.com>
Mon, 24 Jan 2022 07:40:59 +0000 (08:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 24 Jan 2022 07:40:59 +0000 (08:40 +0100)
commit5e73b2594c540400d8d8510a7e38ab52cc69b243
tree71a35329716a7d402acc9c3374c34d381b5cc406
parent8593782ace71149339adace3201d3467ae7bf502
x86/time: minor adjustments to init_pit()

For one, "using_pit" shouldn't be set ahead of the function's last
(for now: only) error path. Otherwise "clocksource=pit" on the command
line can lead to misbehavior when actually taking that error path.

And then make an implicit assumption explicit: CALIBRATE_FRAC cannot,
for example, simply be changed to 10. The way init_pit() works, the
upper bound on the calibration period is about 54ms.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/time.c