• Kefeng Wang's avatar
    arm64: make ARCH_FORCE_MAX_ORDER selectable · 5a4c2a31
    Kefeng Wang authored
    The other architectures with ARCH_FORCE_MAX_ORDER are selectable,
    but not for ARM64, this is to make it selectable on ARM64, which
    is useful for user that need to allocate more than 4MB of physically
    contiguous memory with 4K pagesize, also bigger on 16K pagesize too, the
    max value of MAX_ORDER is calculated bellow,
    
    see include/linux/mmzone.h,
    
      MAX_ORDER - 1 + PAGE_SHIFT <= SECTION_SIZE_BITS
    
      so max value of MAX_ORDER = SECTION_SIZE_BITS + 1 - PAGE_SHIFT
    
        | SECTION_SIZE_BITS |  PAGE_SHIFT  |  max MAX_ORDER  |  default MAX_ORDER |
    ----+-------------------+--------------+-----------------+--------------------+
    4K  |       27          |      12      |     16          |      11            |
    16K |       27          |      14      |     14          |      12            |
    64K |       29          |      16      |     14          |      14            |
    ----+-------------------+--------------+-----------------+--------------------+
    Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
    Link: https://lore.kernel.org/r/20230104130000.69806-1-wangkefeng.wang@huawei.com
    [catalin.marinas@arm.com: add the calculations as comment to arch/arm64/Kconfig]
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    5a4c2a31
Kconfig 78.1 KB