arm64: Add CNTFRQ_EL0 handler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
dann frazier | ||
Zesty |
Fix Released
|
High
|
dann frazier |
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.
I have regression tested this, using the above test case, on the HP m400, the QDT Centriq 2400, and a Cavium ThunderX CRB.
Changed in linux (Ubuntu): | |
assignee: | nobody → dann frazier (dannf) |
Changed in linux (Ubuntu Zesty): | |
assignee: | nobody → 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 |
description: | updated |
Changed in linux (Ubuntu Zesty): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Zesty): | |
status: | Fix Committed → Fix Released |
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification- needed- zesty' to 'verification- done-zesty' . If the problem still exists, change the tag 'verification- needed- zesty' to 'verification- failed- zesty'.
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Thank you!