iommu/io-pgtable-arm-v7s: About pagetable 33bit PA
yong.wu at mediatek.com
Thu Nov 8 07:31:32 UTC 2018
After the commit ad67f5a6545f ("arm64: replace ZONE_DMA with
ZONE_DMA32"), we don't have ZONE_DMA in aarch64, but
__arm_v7s_alloc_table use the GFP_DMA to expect the physical address
of pagetable should be 32bit.
Right now we meet a issue that the lvl1 pagetable PA is 0x1_3ab6_0000 in
the 4GB broad. then the IOMMU initialize failed.(This issue can be fixed
if we revert ad67f5a6545f.)
I planed to add GFP_DMA32 for pagetable allocation. the level1 was
ok but level2 was failed. It looks that slab don't like GFP_DMA32.
this is the warning log:
Unexpected gfp: 0x4 (GFP_DMA32). Fixing up to gfp: 0x488020 (GFP_ATOMIC|
__GFP_ZERO). Fix your code!
I don't know why slab don't allow GFP_DMA32, the gfp flags seems only
be bypassed to alloc_page. Is it possible that let slab allow GFP_DMA32
We notice that this has been discussed. but if we use alloc_page for
the level2 pagetable, It may waste lots of memory.
Any suggestion is appreciated.
Reported-by: Nicolas Boichat <drinkcat at chromium.org>
More information about the iommu