Skip to content

Commit be3cb68

Browse files
disgoelPraveenPenguin
authored andcommitted
utils/cpu: Add support for Power11 architecture
This commit enhances the CPU utility to support the Power11 architecture by making pattern matching case-insensitive. Signed-off-by: Disha Goel <disgoel@linux.ibm.com> Signed-off-by: Praveen K Pandey <praveen@linux.vnet.ibm.com>
1 parent 698e9d3 commit be3cb68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

avocado/utils/cpu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"ibm": (
3737
rb"POWER\d",
3838
rb"IBM/S390",
39+
rb"Power\d",
3940
),
4041
}
4142

@@ -198,6 +199,7 @@ def get_arch():
198199
cpu_table = [
199200
(b"^cpu.*(RS64|Broadband Engine)", "powerpc"),
200201
(rb"^cpu.*POWER\d+", "powerpc"),
202+
(rb"^cpu.*Power\d+", "powerpc"),
201203
(b"^cpu.*PPC970", "powerpc"),
202204
(
203205
b"(ARM|^CPU implementer|^CPU part|^CPU variant"
@@ -261,7 +263,7 @@ def get_family():
261263
res = []
262264
try:
263265
for line in _get_info():
264-
res = re.findall(rb"cpu\s+:\s+(POWER\d+)", line)
266+
res = re.findall(rb"cpu\s+:\s+(POWER\d+|Power\d+)", line, re.IGNORECASE)
265267
if res:
266268
break
267269
family = res[0].decode("utf-8").lower()

0 commit comments

Comments
 (0)