Skip to content
  • Robin Murphy's avatar
    iommu/io-pgtable-arm: Make allocations NUMA-aware · 4b123757
    Robin Murphy authored
    
    
    We would generally expect pagetables to be read by the IOMMU more than
    written by the CPU, so in NUMA systems it makes sense to locate them
    close to the former and avoid cross-node pagetable walks if at all
    possible. As it turns out, we already have a handle on the IOMMU device
    for the sake of coherency management, so it's trivial to grab the
    appropriate NUMA node when allocating new pagetable pages.
    
    Note that we drop the semantics of alloc_pages_exact(), but that's fine
    since they have never been necessary: the only time we're allocating
    more than one page is for stage 2 top-level concatenation, but since
    that is based on the number of IPA bits, the size is always some exact
    power of two anyway.
    
    Acked-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    4b123757