Description of problem: When the RTC divider is changed from reset to an operating time base, the first update cycle should be 500ms later. But on some Zhaoxin SOCs, this first update cycle is one second later. So set RTC time on these Zhaoxin SOCs will causing 500ms delay. Skip setup RTC divider on these SOCs in mc146818_set_time to fix it. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 测试时尽量不要联网或用ntp同步时间。这是因为系统时间同步ntp时间是一个渐进过程,容易导致测试时现象不明显 方法1 1、 hwclock –s 将RTC同步到系统时间 2、 hwclock –w 将系统时间写RTC里 3、 adjtimex –c 比较系统时间 方法2: 1、 启动时在BIOS setup时间,尽量使其北京时间相同 2、 hwclock –s 将RTC时间同步到系统中 3、 hwclock –w,将系统时间写到RTC里 4、 多执行几次2、3两步, 5、 hwclock –r读RTC时间,用其与北京时间比较,是否慢于北京时间 Actual results: Expected results: 用方法1验证时,在执行adjtimex -c结果中system-cmos列其平均值不应超过0.5,一般会小于0.01 用方法2验证时,对比RTC时间和北京时间的差值,差值不大于1秒 Additional info:
merged: https://gitee.com/anolis/cloud-kernel/pulls/834