Skip to content

Commit 36a5ff7

Browse files
committed
Don't require CPU topology
Some older ASIC won't have it. Just show a warning if that's the case. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
1 parent 65a2dcd commit 36a5ff7

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

src/amd_debug/failures.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -576,15 +576,6 @@ def __init__(self, actual_cores, max_cores):
576576
)
577577

578578

579-
class CpuTopologyUnknown(S0i3Failure):
580-
"""CPU topology unknown"""
581-
582-
def __init__(self):
583-
super().__init__()
584-
self.description = "CPU topology unknown"
585-
self.explanation = "The CPU topology could not be determined. This may prevent the system from entering hardware sleep states correctly."
586-
587-
588579
class RogAllyOldMcu(S0i3Failure):
589580
"""MCU firwmare is too old"""
590581

src/amd_debug/prerequisites.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
AmdHsmpBug,
4545
AmdgpuPpFeatureMask,
4646
ASpmWrong,
47-
CpuTopologyUnknown,
4847
DeepSleep,
4948
DevSlpDiskIssue,
5049
DevSlpHostIssue,
@@ -1124,10 +1123,9 @@ def read_cpuid(cpu, leaf, subleaf):
11241123
if level_type == 0:
11251124
self.db.record_prereq(
11261125
"Unable to discover CPU topology, didn't find socket level",
1127-
"",
1126+
"🚦",
11281127
)
1129-
self.failures += [CpuTopologyUnknown()]
1130-
return False
1128+
return True
11311129
if level_type == 4:
11321130
break
11331131
_, cpu_count, _, _ = read_cpuid(0, 0x80000026, level)

src/test_prerequisites.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,9 @@ def test_check_cpu_socket_level_at_boundary(
548548
struct.pack("4I", 0, 16, 0, 0), # subleaf 4: cpu_count = 16
549549
]
550550
result = self.validator.check_cpu()
551-
self.assertFalse(result)
551+
self.assertTrue(result)
552552
self.mock_db.record_prereq.assert_called_with(
553-
"Unable to discover CPU topology, didn't find socket level", ""
553+
"Unable to discover CPU topology, didn't find socket level", "🚦"
554554
)
555555

556556
@patch("builtins.open", new_callable=mock_open)

0 commit comments

Comments
 (0)