Skip to content

Commit fea5b15

Browse files
authored
tools/compactsnoop: Add aarch64 support (#5180)
Add aarch64 support. Signed-off-by: Feng Yang <[email protected]>
1 parent 9846a21 commit fea5b15

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tools/compactsnoop.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,12 @@
260260
}
261261
"""
262262

263-
if platform.machine() != 'x86_64' and platform.machine() != 'ppc64le':
263+
if (platform.machine() != 'x86_64' and platform.machine() != 'ppc64le'
264+
and platform.machine() != 'aarch64'):
264265
print("""
265-
Currently only support x86_64 and power servers, if you want
266+
Currently only support x86_64 , aarch64 and power servers, if you want
266267
to use it on other platforms(including power embedded processors),
267-
please refer include/linux/mmzone.h to modify zone_idex_to_str to
268+
please refer include/linux/mmzone.h to modify zone_idx_to_str to
268269
get the right zone type
269270
""")
270271
exit()
@@ -295,7 +296,6 @@
295296

296297
def zone_idx_to_str(idx):
297298
# from include/linux/mmzone.h
298-
# NOTICE: consider only x86_64 servers
299299
zone_type = {
300300
'x86_64':
301301
{
@@ -308,6 +308,14 @@ def zone_idx_to_str(idx):
308308
{
309309
0: "ZONE_NORMAL",
310310
1: "ZONE_MOVABLE"
311+
},
312+
'aarch64':
313+
{
314+
0: "ZONE_DMA",
315+
1: "ZONE_DMA32",
316+
2: "ZONE_NORMAL",
317+
3: "ZONE_MOVABLE",
318+
4: "ZONE_DEVICE"
311319
}
312320
}
313321

0 commit comments

Comments
 (0)