• David Rientjes's avatar
    x86, paravirt: fix build error when thp is disabled · c36e0501
    David Rientjes authored
    With CONFIG_PARAVIRT=y and CONFIG_TRANSPARENT_HUGEPAGE=n, the build breaks
    because set_pmd_at() is undeclared:
    
      mm/memory.c: In function 'do_pmd_numa_page':
      mm/memory.c:3520: error: implicit declaration of function 'set_pmd_at'
      mm/mprotect.c: In function 'change_pmd_protnuma':
      mm/mprotect.c:120: error: implicit declaration of function 'set_pmd_at'
    
    This is because paravirt defines set_pmd_at() only when
    CONFIG_TRANSPARENT_HUGEPAGE=y and such a restriction is unneeded.  The
    fix is to define it for all CONFIG_PARAVIRT configurations.
    Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c36e0501
paravirt.h 24.6 KB