HomeFreeBSD

goldfish_rtc: Fix handling a local time RTC

Description

goldfish_rtc: Fix handling a local time RTC

The default QEMU config is to have the RTC in UTC. However, if run with
-rtc base=localtime (and wall_cmos_clock is set to match), the driver
fails to account for adjkerntz due to the use of CLOCKF_SETTIME_NO_ADJ.
Copy the same code used by other CLOCKF_SETTIME_NO_ADJ-using drivers
to fix this, namely manually subtracting utc_offset().

Fixes: d63a631e7244 ("Add Goldfish RTC device driver for RISC-V")
MFC after: 1 week

Details

Provenance
jrtc27Authored on Aug 14 2022, 6:50 PM
Parents
rG9f678cfcb42d: bhyve nvme: Fix firmware read only initialization
Branches
Unknown
Tags
Unknown