Fix caveat in new implementation of linprocfs_docpuinfo():
Prevent kernel panic in case that extended-cpuid isn't supported by CPU Reviewed by: kib, ngie, trasz Approved by: trasz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11294
This commit is contained in:
parent
d44b45df2c
commit
4b36080668
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320265
@ -245,7 +245,10 @@ linprocfs_docpuinfo(PFS_FILL_ARGS)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
do_cpuid(0x80000006, cache_size);
|
||||
if (cpu_exthigh >= 0x80000006)
|
||||
do_cpuid(0x80000006, cache_size);
|
||||
else
|
||||
memset(cache_size, 0, sizeof(cache_size));
|
||||
for (i = 0; i < mp_ncpus; ++i) {
|
||||
fqmhz = 0;
|
||||
fqkhz = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user