File tree Expand file tree Collapse file tree
src/internal/updateplatform Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,12 +29,13 @@ import (
2929)
3030
3131const (
32- cpuInfoFilePath = "/proc/cpuinfo"
33- cpuKeyDelim = ":"
34- cpuKeyName = "model name"
35- cpuKeySWCPU = "cpu"
36- cpuKeyARMProcessor = "Processor"
37- cpuKeyHWHardware = "Hardware"
32+ cpuInfoFilePath = "/proc/cpuinfo"
33+ cpuKeyDelim = ":"
34+ cpuKeyLoongArchCPUModel = "Model Name"
35+ cpuKeyName = "model name"
36+ cpuKeySWCPU = "cpu"
37+ cpuKeyARMProcessor = "Processor"
38+ cpuKeyHWHardware = "Hardware"
3839
3940 lscpuKeyModelName = "Model name"
4041 lscpuKeyDelim = ":"
@@ -278,7 +279,13 @@ func getProcessorInfo(file string) (string, error) {
278279 return "" , err
279280 }
280281
281- cpu , _ := getCPUInfoFromMap (cpuKeySWCPU , data )
282+ // loongarch
283+ cpu , _ := getCPUInfoFromMap (cpuKeyLoongArchCPUModel , data )
284+ if len (cpu ) != 0 {
285+ return cpu , nil
286+ }
287+
288+ cpu , _ = getCPUInfoFromMap (cpuKeySWCPU , data )
282289 if len (cpu ) != 0 {
283290 return cpu , nil
284291 }
You can’t perform that action at this time.
0 commit comments