File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 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 ()
295296
296297def 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
You can’t perform that action at this time.
0 commit comments