Re: [RESEND RFC PATCH v3] rtc: Fix the AltCentury value on AMD/Hygon platform

2019-10-20 Thread Jinke Fan
On 2019/10/20 6:04, Alexandre Belloni wrote: > On 15/10/2019 16:08:27+0800, Jinke Fan wrote: >> save_freq_select = CMOS_READ(RTC_FREQ_SELECT); >> -CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); >> + >> +#ifdef CONFIG_X86 >> +if (boot_cpu_data.x86_vendor == X86_VENDOR_A

Re: [RESEND RFC PATCH v3] rtc: Fix the AltCentury value on AMD/Hygon platform

2019-10-19 Thread Alexandre Belloni
On 15/10/2019 16:08:27+0800, Jinke Fan wrote: > When using following operations: > date -s "21190910 19:20:00" > hwclock -w > to change date from 2019 to 2119 for test, it will fail on Hygon > Dhyana and AMD Zen CPUs, while the same operations run ok on Intel i7 > platform. > > MC146818 driver use

Re: [RESEND RFC PATCH v3] rtc: Fix the AltCentury value on AMD/Hygon platform

2019-10-15 Thread Jinke Fan
On 2019/10/15 16:27, Alexandre Belloni wrote: > Oh come on, you sent that patch only a week ago and v2 had a so obvious > mistake that my trust in your code quality is now very low. Hi Alexandre, The patch v3 has been compiled for sparc64 and alpha architectures with: - GCC_VERSION=7.4.0 make.cr

Re: [RESEND RFC PATCH v3] rtc: Fix the AltCentury value on AMD/Hygon platform

2019-10-15 Thread Alexandre Belloni
Oh come on, you sent that patch only a week ago and v2 had a so obvious mistake that my trust in your code quality is now very low. On 15/10/2019 16:08:27+0800, Jinke Fan wrote: > When using following operations: > date -s "21190910 19:20:00" > hwclock -w > to change date from 2019 to 2119 for tes

[RESEND RFC PATCH v3] rtc: Fix the AltCentury value on AMD/Hygon platform

2019-10-15 Thread Jinke Fan
When using following operations: date -s "21190910 19:20:00" hwclock -w to change date from 2019 to 2119 for test, it will fail on Hygon Dhyana and AMD Zen CPUs, while the same operations run ok on Intel i7 platform. MC146818 driver use function mc146818_set_time() to set register RTC_FREQ_SELECT(