Public bug reported: [Impact] Userspace reads of CNTVCT_EL0 are broken on HiSilicon D05 systems, which breaks some applications such as OpenMPI.
[Test Case] #include <sys/times.h> #include <stdio.h> int main(int argc, char *argv[]) { unsigned int freq; __asm__ __volatile__ ("mrs %0, CNTFRQ_EL0" : "=r" (freq)); printf("freq %d\n",freq); return (int)freq; } ================================== gcc test.c test ./test This will report an illegal instruction, but should print a frequency value. [Regression Risk] The best way we can minimize risk is to verify on both a system that has an errata handler for the timer (D05) and a system that doesn't. We should then be exercising both code paths. ** Affects: linux (Ubuntu) Importance: High Assignee: dann frazier (dannf) Status: In Progress ** Affects: linux (Ubuntu Zesty) Importance: High Assignee: dann frazier (dannf) Status: In Progress ** Also affects: linux (Ubuntu Zesty) Importance: Undecided Status: New ** Changed in: linux (Ubuntu) Assignee: (unassigned) => dann frazier (dannf) ** Changed in: linux (Ubuntu Zesty) Assignee: (unassigned) => dann frazier (dannf) ** Changed in: linux (Ubuntu) Importance: Undecided => High ** Changed in: linux (Ubuntu Zesty) Importance: Undecided => High ** Changed in: linux (Ubuntu) Status: New => In Progress ** Changed in: linux (Ubuntu Zesty) Status: New => In Progress -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1688164 Title: arm64: Add CNTFRQ_EL0 handler Status in linux package in Ubuntu: In Progress Status in linux source package in Zesty: In Progress Bug description: [Impact] Userspace reads of CNTVCT_EL0 are broken on HiSilicon D05 systems, which breaks some applications such as OpenMPI. [Test Case] #include <sys/times.h> #include <stdio.h> int main(int argc, char *argv[]) { unsigned int freq; __asm__ __volatile__ ("mrs %0, CNTFRQ_EL0" : "=r" (freq)); printf("freq %d\n",freq); return (int)freq; } ================================== gcc test.c test ./test This will report an illegal instruction, but should print a frequency value. [Regression Risk] The best way we can minimize risk is to verify on both a system that has an errata handler for the timer (D05) and a system that doesn't. We should then be exercising both code paths. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1688164/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp