Skip to content
  • Tejun Heo's avatar
    memblock: Reimplement __memblock_remove() using memblock_isolate_range() · 71936180
    Tejun Heo authored
    
    
    __memblock_remove()'s open coded region manipulation can be trivially
    replaced with memblock_islate_range().  This increases code sharing
    and eases improving region tracking.
    
    This pulls memblock_isolate_range() out of HAVE_MEMBLOCK_NODE_MAP.
    Make it use memblock_get_region_node() instead of assuming rgn->nid is
    available.
    
    -v2: Fixed build failure on !HAVE_MEMBLOCK_NODE_MAP caused by direct
         rgn->nid access.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Yinghai Lu <yinghai@kernel.org>
    71936180