Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Mark Brown <broonie@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Matthew Brost <matthew.brost@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Usama Arif <usama.arif@linux.dev>
Cc: linux-mm@kvack.org, dri-devel@lists.freedesktop.org,
	linux-next@vger.kernel.org
Subject: Semantic conflict between 04b177544a04 in drm-misc-fixes and 0b6b1bb28482 in -mm
Date: Wed, 22 Jul 2026 15:56:05 -0700	[thread overview]
Message-ID: <20260722225605.GA1910198@ax162> (raw)

Hi Mark and drm and mm folks,

There is a semantic conflict between commit 04b177544a04 ("drm/pagemap:
Guard HPAGE_PMD_ORDER use with CONFIG_ARCH_ENABLE_THP_MIGRATION") in the
drm-misc-fixes tree and commit 0b6b1bb28482 ("mm: rename
ARCH_ENABLE_THP_MIGRATION to ARCH_HAS_PMD_SOFTLEAVES"), resulting in a
lone instance of CONFIG_ARCH_ENABLE_THP_MIGRATION with no way to define
it.

  $ git grep ARCH_ENABLE_THP_MIGRATION
  Next/merge.log:Merging drm-misc-fixes/for-linux-next-fixes (04b177544a040 drm/pagemap: Guard HPAGE_PMD_ORDER use with CONFIG_ARCH_ENABLE_THP_MIGRATION)
  drivers/gpu/drm/drm_pagemap.c:#if IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION)

This results in an objtool warning (or error with CONFIG_OBJTOOL_WERROR)
when building with clang because NR_PAGES(order) results in 1U << -1,
which causes clang to stop generating code for
drm_pagemap_migrate_to_devmem() when encountering unconditional
undefined behavior.

  drivers/gpu/drm/drm_gpusvm_helper.o: error: objtool: drm_pagemap_migrate_to_devmem() falls through to next function drm_pagemap_zdd_alloc()

Mark, could please apply the following diff to the -mm merge to avoid
this? Obviously, there will need to be further coordination for
resolving this upstream when the time comes but it is only an issue in
-next currently.

diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index 4a794544b7dc..f00c27edbfb9 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -12,7 +12,7 @@
 #include <drm/drm_pagemap_util.h>
 #include <drm/drm_print.h>
 
-#if IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION)
+#if IS_ENABLED(CONFIG_ARCH_HAS_PMD_SOFTLEAVES)
 #define DRM_PAGEMAP_PMD_ORDER	HPAGE_PMD_ORDER
 #else
 #define DRM_PAGEMAP_PMD_ORDER	(-1)
-- 
Cheers,
Nathan


             reply	other threads:[~2026-07-22 22:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 22:56 Nathan Chancellor [this message]
2026-07-22 23:15 ` Semantic conflict between 04b177544a04 in drm-misc-fixes and 0b6b1bb28482 in -mm Matthew Brost
2026-07-23 21:27   ` Nathan Chancellor
2026-07-23 23:09     ` Andrew Morton
2026-07-23 23:11       ` Matthew Brost
2026-07-24  0:13         ` Mark Brown
2026-07-24 19:48           ` Nathan Chancellor
2026-07-24 19:50             ` Matthew Brost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260722225605.GA1910198@ax162 \
    --to=nathan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=usama.arif@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox