Skip to content

Commit

Permalink
tools/compactsnoop: Add aarch64 support
Browse files Browse the repository at this point in the history
Signed-off-by: Feng Yang <[email protected]>
  • Loading branch information
kknjh committed Jan 1, 2025
1 parent 3845f7f commit 298434d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tools/compactsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,12 @@
}
"""

if platform.machine() != 'x86_64' and platform.machine() != 'ppc64le':
if (platform.machine() != 'x86_64' and platform.machine() != 'ppc64le'
and platform.machine() != 'aarch64'):
print("""
Currently only support x86_64 and power servers, if you want
Currently only support x86_64 , aarch64 and power servers, if you want
to use it on other platforms(including power embedded processors),
please refer include/linux/mmzone.h to modify zone_idex_to_str to
please refer include/linux/mmzone.h to modify zone_idx_to_str to
get the right zone type
""")
exit()
Expand Down Expand Up @@ -308,6 +309,14 @@ def zone_idx_to_str(idx):
{
0: "ZONE_NORMAL",
1: "ZONE_MOVABLE"
},
'aarch64':
{
0: "ZONE_DMA",
1: "ZONE_DMA32",
2: "ZONE_NORMAL",
3: "ZONE_MOVABLE",
4: "ZONE_DEVICE"
}
}

Expand Down

0 comments on commit 298434d

Please sign in to comment.