mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
Revert "drm/pagemap: Guard HPAGE_PMD_ORDER use with CONFIG_ARCH_ENABLE_THP_MIGRATION"
This reverts commit 04b177544a.
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>
This commit is contained in:
parent
6273dd3ffb
commit
1ff399c4cd
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user