Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Dave Airlie <airlied@gmail.com>
Cc: "Randy Dunlap" <rdunlap@infradead.org>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Simona Vetter" <simona@ffwll.ch>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	linux-next <linux-next@vger.kernel.org>
Subject: Re: does DRM_GPUSVM require hugepages?
Date: Tue, 5 May 2026 19:39:25 -0700	[thread overview]
Message-ID: <afqp3eF6hvVtL2xq@gsse-cloud1.jf.intel.com> (raw)
In-Reply-To: <CAPM=9txXGY7Pv7ge-x3roA422c=Ycefc7Ens20dEiHuKrKR=3g@mail.gmail.com>

On Wed, May 06, 2026 at 11:42:13AM +1000, Dave Airlie wrote:
> On Sun, 3 May 2026 at 10:03, Randy Dunlap <rdunlap@infradead.org> wrote:
> >
> > Hi,
> >
> > In linux-next-20260430, I'm seeing build errors on some ARCHes when
> > DRM_XE=m (probably just "is set") but HAVE_ARCH_TRANSPARENT_HUGEPAGE
> > is not set (not selected) by the ARCH.
> 
> I'm seeing this locally on my arm32 builds, Matthew, Thomas?
> 

Thanks. Yes, this looks like an issue we fix in this cycle.

Matt

> Dave.
> 
> >
> > Does drm_gpusvm.c require hugepages?
> > Or possibly DRM_XE needs some kind of restriction?
> >
> > I see build failures on ARCH=alpha, ARCH=openrisc, ARCH=mips (32-bit
> > or 64-bit), and ARCH=arm (without ARM_LPAE set).
> >
> > Example:
> > ../drivers/gpu/drm/drm_gpusvm.c: In function 'drm_gpusvm_get_pages':
> > ./../include/linux/compiler_types.h:699:45: error: call to '__compiletime_assert_361' declared with attribute error: BUILD_BUG failed
> >   699 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >       |                                             ^
> > ./../include/linux/compiler_types.h:680:25: note: in definition of macro '__compiletime_assert'
> >   680 |                         prefix ## suffix();                             \
> >       |                         ^~~~~~
> > ./../include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
> >   699 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >       |         ^~~~~~~~~~~~~~~~~~~
> > ../include/linux/build_bug.h:40:37: note: in expansion of macro 'compiletime_assert'
> >    40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> >       |                                     ^~~~~~~~~~~~~~~~~~
> > ../include/linux/build_bug.h:60:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> >    60 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
> >       |                     ^~~~~~~~~~~~~~~~
> > ../include/linux/huge_mm.h:113:28: note: in expansion of macro 'BUILD_BUG'
> >   113 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
> >       |                            ^~~~~~~~~
> > ../include/linux/huge_mm.h:120:35: note: in expansion of macro 'HPAGE_PMD_SHIFT'
> >   120 | #define HPAGE_PMD_SIZE  ((1UL) << HPAGE_PMD_SHIFT)
> >       |                                   ^~~~~~~~~~~~~~~
> > ../drivers/gpu/drm/drm_gpusvm.c:1560:52: note: in expansion of macro 'HPAGE_PMD_SIZE'
> >  1560 |                                                    HPAGE_PMD_SIZE ?
> >       |                                                    ^~~~~~~~~~~~~~
> > make[6]: *** [../scripts/Makefile.build:289: drivers/gpu/drm/drm_gpusvm.o] Error 1
> >
> > where include/linux/huge_mm.h:113: says:
> >
> > #ifdef CONFIG_PGTABLE_HAS_HUGE_LEAVES
> > #define HPAGE_PMD_SHIFT PMD_SHIFT
> > #define HPAGE_PUD_SHIFT PUD_SHIFT
> > #else
> > #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) <<<<<<<<<<<<<<<<<< line 113
> > #define HPAGE_PUD_SHIFT ({ BUILD_BUG(); 0; })
> > #endif
> >
> > --
> > ~Randy
> >

      reply	other threads:[~2026-05-06  2:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-03  0:03 does DRM_GPUSVM require hugepages? Randy Dunlap
2026-05-06  1:42 ` Dave Airlie
2026-05-06  2:39   ` Matthew Brost [this message]

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=afqp3eF6hvVtL2xq@gsse-cloud1.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    /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