• Anshuman Khandual's avatar
    arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs · abb7962a
    Anshuman Khandual authored
    Currently 'hugetlb_cma=' command line argument does not create CMA area on
    ARM64_16K_PAGES and ARM64_64K_PAGES based platforms. Instead, it just ends
    up with the following warning message. Reason being, hugetlb_cma_reserve()
    never gets called for these huge page sizes.
    
    [   64.255669] hugetlb_cma: the option isn't supported by current arch
    
    This enables CMA areas reservation on ARM64_16K_PAGES and ARM64_64K_PAGES
    configs by defining an unified arm64_hugetlb_cma_reseve() that is wrapped
    in CONFIG_CMA. Call site for arm64_hugetlb_cma_reserve() is also protected
    as <asm/hugetlb.h> is conditionally included and hence cannot contain stub
    for the inverse config i.e !(CONFIG_HUGETLB_PAGE && CONFIG_CMA).
    Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Barry Song <song.bao.hua@hisilicon.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Link: https://lore.kernel.org/r/1593578521-24672-1-git-send-email-anshuman.khandual@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    abb7962a
hugetlbpage.c 11.9 KB