1
0
Fork 0
This commit is contained in:
Mario Limonciello 2026-05-22 12:34:10 +08:00 committed by GitHub
commit 302a3a3be4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -263,7 +263,11 @@ class CPULatencyPlugin(hotplug.Plugin):
# Possible other x86 vendors (from arch/x86/kernel/cpu/*):
# "CentaurHauls", "CyrixInstead", "Geode by NSC", "HygonGenuine", "GenuineTMx86",
# "TransmetaCPU", "UMC UMC UMC"
cpu = procfs.cpuinfo()
try:
cpu = procfs.cpuinfo()
except AttributeError as error:
log.error("Unable to detect CPU: %s" % error)
return
vendor = cpu.tags.get("vendor_id")
if vendor == "GenuineIntel":
self._is_intel = True
@ -316,7 +320,11 @@ class CPULatencyPlugin(hotplug.Plugin):
def _get_cpuinfo_flags(self):
if self._flags is None:
self._flags = procfs.cpuinfo().tags.get("flags", [])
try:
self._flags = procfs.cpuinfo().tags.get("flags", [])
except AttributeError as error:
log.error("failed to read flags: %s" % error)
return []
return self._flags
def _is_cpu_online(self, device):