[v0.88][ARM][BUGFIX] Fetch number of cores from /sys/devices/system/cpu/present file, instead of /proc/cpuinfo. Pay attention to cases where frequency and/or MIDR can not be fetched from cpuinfo. This happens when the CPU has offline cores

This commit is contained in:
Dr-Noob
2020-11-22 15:18:15 +01:00
parent fcb2c716db
commit 716706d0a7
4 changed files with 56 additions and 20 deletions

View File

@@ -7,6 +7,7 @@ long get_max_freq_from_file(uint32_t core);
long get_min_freq_from_file(uint32_t core);
#ifdef ARCH_ARM
#define UNKNOWN -1
int get_ncores_from_cpuinfo();
uint32_t get_midr_from_cpuinfo(uint32_t core);
#endif