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

(cherry picked from commit 762dcf10641251c55dda2e6950fef8bb698027ad)

Details

Provenance
jrtc27Authored on Aug 14 2022, 6:50 PM
Parents
rG2b7b51c479c4: libcrypto: Work around strict aliasing violations in bn_nist.c
Branches
Unknown
Tags
Unknown