• Michael Ellerman's avatar
    powerpc/powernv: Fix memtrace build when NUMA=n · 8ccb442d
    Michael Ellerman authored
    Currently memtrace doesn't build if NUMA=n:
    
      In function ‘memtrace_alloc_node’:
      arch/powerpc/platforms/powernv/memtrace.c:134:6:
      error: the address of ‘contig_page_data’ will always evaluate as ‘true’
        if (!NODE_DATA(nid) || !node_spanned_pages(nid))
            ^
    
    This is because for NUMA=n NODE_DATA(nid) points to an always
    allocated structure, contig_page_data.
    
    But even in the NUMA=y case memtrace_alloc_node() is only called for
    online nodes, and we should always have a NODE_DATA() allocated for an
    online node. So remove the (hopefully) overly paranoid check, which
    also means we can build when NUMA=n.
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    8ccb442d
memtrace.c 5.89 KB