Hi Andy and Hucan, On 10/18/19 4:15 AM, Andy Lutomirski wrote: > On Thu, Oct 17, 2019 at 7:57 PM Huacai Chen <chenhc@xxxxxxxxxx> wrote: >> >> In do_hres(), we currently use whether the return value of __arch_get_ >> hw_counter() is negtive to indicate fallback, but this is not a good >> idea. Because: >> >> 1, ARM64 returns ULL_MAX but MIPS returns 0 when clock_mode is invalid; >> 2, For a 64bit counter, a "negtive" value of counter is actually valid. > > s/negtive/negative > > What's the actual bug? Is it that MIPS is returning 0 but the check > is < 0? Sounds like MIPS should get fixed. > I submitted a patch for this yesterday to the MIPS maintainers [1]. The MIPS32 r1 implementation had a bug when VDSO_CLOCK_NONE was set. The issue has been reported by Maxime Bizon who tested the fix as well. [1] https://patchwork.kernel.org/patch/11193391/ -- Regards, Vincenzo