summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <dev@lankhorst.se>2026-07-24 08:02:14 +0200
committerMaarten Lankhorst <dev@lankhorst.se>2026-07-24 08:02:14 +0200
commit1ff399c4cd132a24c73e5e237a11cb9d6b68dff1 (patch)
tree2ce7d810d19b2292f643b4825f75668911c424f6
parent6273dd3ffb54ec581855b82ae77331b66028249c (diff)
downloadlinux-1ff399c4cd132a24c73e5e237a11cb9d6b68dff1.tar.gz
linux-1ff399c4cd132a24c73e5e237a11cb9d6b68dff1.tar.bz2
linux-1ff399c4cd132a24c73e5e237a11cb9d6b68dff1.zip
Revert "drm/pagemap: Guard HPAGE_PMD_ORDER use with CONFIG_ARCH_ENABLE_THP_MIGRATION"
This reverts commit 04b177544a040cbafab760d6b766381c6b22e0a8. The original author requested it to be reverted, as it conflicts with changes in the -next branch for MM: "I'm not sure who is doing the drm-misc-fixes PR, but if you are can you omit this patch: https://patchwork.freedesktop.org/series/170865/ I guess this conflicts with MM changes in their next tree and it easy enough on our side to do this slightly differently to avoid a conflict so going to post revert + a different change. If this is already sent nbd." Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
-rw-r--r--drivers/gpu/drm/drm_pagemap.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index 4a794544b7dc..892b325fa99b 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -12,12 +12,6 @@
#include <drm/drm_pagemap_util.h>
#include <drm/drm_print.h>
-#if IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION)
-#define DRM_PAGEMAP_PMD_ORDER HPAGE_PMD_ORDER
-#else
-#define DRM_PAGEMAP_PMD_ORDER (-1)
-#endif
-
/**
* DOC: Overview
*
@@ -585,7 +579,7 @@ static int drm_pagemap_cpages(unsigned long *migrate_pfn, unsigned long npages)
order = folio_order(folio);
cpages += NR_PAGES(order);
} else if (migrate_pfn[i] & MIGRATE_PFN_COMPOUND) {
- order = DRM_PAGEMAP_PMD_ORDER;
+ order = HPAGE_PMD_ORDER;
cpages += NR_PAGES(order);
}
@@ -773,11 +767,10 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
if (migrate.src[i] & MIGRATE_PFN_COMPOUND) {
drm_WARN_ONCE(dpagemap->drm, src_page &&
- folio_order(page_folio(src_page)) !=
- DRM_PAGEMAP_PMD_ORDER,
+ folio_order(page_folio(src_page)) != HPAGE_PMD_ORDER,
"Unexpected folio order\n");
- order = DRM_PAGEMAP_PMD_ORDER;
+ order = HPAGE_PMD_ORDER;
migrate.dst[i] |= MIGRATE_PFN_COMPOUND;
for (j = 1; j < NR_PAGES(order) && i + j < npages; j++)