On Wed, Jul 22, 2026 at 12:32 AM Matthew Brost <[email protected]> wrote: > > HPAGE_PMD_SHIFT expands to BUILD_BUG() when CONFIG_PGTABLE_HAS_HUGE_LEAVES > is not set, causing a compile error when both CONFIG_TRANSPARENT_HUGEPAGE > and CONFIG_HUGETLB_PAGE are disabled: > > drivers/gpu/drm/drm_pagemap.c:480:12: error: call to > '__compiletime_assert_458' > declared with 'error' attribute: BUILD_BUG failed > 480 | order = HPAGE_PMD_ORDER; > | ^ > include/linux/huge_mm.h:117:26: note: expanded from macro 'HPAGE_PMD_ORDER' > 117 | #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT) > | ^ > include/linux/huge_mm.h:113:28: note: expanded from macro 'HPAGE_PMD_SHIFT' > 113 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) > > Define DRM_PAGEMAP_PMD_ORDER, which maps to HPAGE_PMD_ORDER when > CONFIG_ARCH_ENABLE_THP_MIGRATION is enabled and to -1 otherwise. > > This is safe because all code paths that use DRM_PAGEMAP_PMD_ORDER are > reachable only when CONFIG_ARCH_ENABLE_THP_MIGRATION is enabled. > > Fixes: 139ab31aea8a ("drm/pagemap: Correct cpages calculation for > migrate_vma_setup") > Reported-by: kernel test robot <[email protected]> > Closes: https://lore.kernel.org/r/[email protected]/ > Cc: Jan Stancek <[email protected]> > Signed-off-by: Matthew Brost <[email protected]>
Thanks for fix, this resolves (same) build failure I was seeing as well. Tested-by: Jan Stancek <[email protected]>
