File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -590,10 +590,15 @@ static void scanCPUFrequencyFromCPUinfo(LinuxMachine* this) {
590590 if (fgets (buffer , PROC_LINE_LENGTH , file ) == NULL )
591591 break ;
592592
593- if (sscanf (buffer , "processor : %d" , & cpuid ) == 1 ) {
593+ if (
594+ (sscanf (buffer , "processor : %d" , & cpuid ) == 1 ) ||
595+ (sscanf (buffer , "cpu number : %d" , & cpuid ) == 1 ) // s390: https://github.com/torvalds/linux/blob/v6.15/arch/s390/kernel/processor.c#L349
596+ ) {
594597 continue ;
595598 } else if (
596599 (sscanf (buffer , "cpu MHz : %lf" , & frequency ) == 1 ) ||
600+ (sscanf (buffer , "CPU MHz : %lf" , & frequency ) == 1 ) || // LooooongArch: https://github.com/torvalds/linux/blob/v6.15/arch/loongarch/kernel/proc.c#L42
601+ (sscanf (buffer , "cpu MHz dynamic : %lf" , & frequency ) == 1 ) || // s390: https://github.com/torvalds/linux/blob/v6.15/arch/s390/kernel/processor.c#L335
597602 (sscanf (buffer , "clock : %lfMHz" , & frequency ) == 1 )
598603 ) {
599604 if (cpuid < 0 || (unsigned int )cpuid > (super -> existingCPUs - 1 )) {
You can’t perform that action at this time.
0 commit comments