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) {
590
590
if (fgets (buffer , PROC_LINE_LENGTH , file ) == NULL )
591
591
break ;
592
592
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
+ ) {
594
597
continue ;
595
598
} else if (
596
599
(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
597
602
(sscanf (buffer , "clock : %lfMHz" , & frequency ) == 1 )
598
603
) {
599
604
if (cpuid < 0 || (unsigned int )cpuid > (super -> existingCPUs - 1 )) {
You can’t perform that action at this time.
0 commit comments