[PATCH v3] Mark xe driver as BROKEN if kernel page size is not 4kB

Simon Richter posted 1 patch 2 months ago
There is a newer version of this series
drivers/gpu/drm/xe/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v3] Mark xe driver as BROKEN if kernel page size is not 4kB
Posted by Simon Richter 2 months ago
This driver, for the time being, assumes that the kernel page size is 4kB,
so it fails on loong64 and aarch64 with 16kB pages, and ppc64el with 64kB
pages.

Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/xe/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index 2bb2bc052120..ea12ff033439 100644
--- a/drivers/gpu/drm/xe/Kconfig
+++ b/drivers/gpu/drm/xe/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_XE
 	tristate "Intel Xe2 Graphics"
-	depends on DRM && PCI
+	depends on DRM && PCI && (PAGE_SIZE_4KB || COMPILE_TEST || BROKEN)
 	depends on KUNIT || !KUNIT
 	depends on INTEL_VSEC || !INTEL_VSEC
 	depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)
-- 
2.47.2
Re: [PATCH v3] Mark xe driver as BROKEN if kernel page size is not 4kB
Posted by Thomas Hellström 2 months ago
On Fri, 2025-08-01 at 19:19 +0900, Simon Richter wrote:
> This driver, for the time being, assumes that the kernel page size is
> 4kB,
> so it fails on loong64 and aarch64 with 16kB pages, and ppc64el with
> 64kB
> pages.
> 
> Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
> Cc: stable@vger.kernel.org

Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
I will add a Fixes: tag and push this.

Thanks,
Thomas


> ---
>  drivers/gpu/drm/xe/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
> index 2bb2bc052120..ea12ff033439 100644
> --- a/drivers/gpu/drm/xe/Kconfig
> +++ b/drivers/gpu/drm/xe/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config DRM_XE
>  	tristate "Intel Xe2 Graphics"
> -	depends on DRM && PCI
> +	depends on DRM && PCI && (PAGE_SIZE_4KB || COMPILE_TEST ||
> BROKEN)
>  	depends on KUNIT || !KUNIT
>  	depends on INTEL_VSEC || !INTEL_VSEC
>  	depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)
Re: [PATCH v3] Mark xe driver as BROKEN if kernel page size is not 4kB
Posted by Thomas Hellström 2 months ago
On Fri, 2025-08-01 at 16:39 +0200, Thomas Hellström wrote:
> On Fri, 2025-08-01 at 19:19 +0900, Simon Richter wrote:
> > This driver, for the time being, assumes that the kernel page size
> > is
> > 4kB,
> > so it fails on loong64 and aarch64 with 16kB pages, and ppc64el
> > with
> > 64kB
> > pages.
> > 
> > Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
> > Cc: stable@vger.kernel.org
> 
> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> I will add a Fixes: tag and push this.
> 
> Thanks,
> Thomas

Actually, I see that the patch in its current form will cause grief
when backporting since that depends line has changed during driver
lifetime. I noticed that when trying to find a good Fixes: tag.

Would you mind if we did the following:

> 
> 
> > ---
> >  drivers/gpu/drm/xe/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/Kconfig
> > b/drivers/gpu/drm/xe/Kconfig
> > index 2bb2bc052120..ea12ff033439 100644
> > --- a/drivers/gpu/drm/xe/Kconfig
> > +++ b/drivers/gpu/drm/xe/Kconfig
> > @@ -1,7 +1,7 @@
> >  # SPDX-License-Identifier: GPL-2.0-only
> >  config DRM_XE
> >  	tristate "Intel Xe2 Graphics"
> > -	depends on DRM && PCI
> > +	depends on DRM && PCI && (PAGE_SIZE_4KB || COMPILE_TEST ||
> > BROKEN)

Scratch this change

> >  	depends on KUNIT || !KUNIT
> >  	depends on INTEL_VSEC || !INTEL_VSEC
> >  	depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)

And instead here add
	depends on PAGE_SIZE_4KB || COMPILE_TEST || BROKEN

Thanks,
Thomas


> 
> 
Re: [PATCH v3] Mark xe driver as BROKEN if kernel page size is not 4kB
Posted by Simon Richter 2 months ago
Hi,

On 8/1/25 23:56, Thomas Hellström wrote:

> Would you mind if we did the following:

[...]

> And instead here add
> 	depends on PAGE_SIZE_4KB || COMPILE_TEST || BROKEN

That is a lot nicer, I like it.

    Simon
[PATCH v4] Mark xe driver as BROKEN if kernel page size is not 4kB
Posted by Simon Richter 2 months ago
This driver, for the time being, assumes that the kernel page size is 4kB,
so it fails on loong64 and aarch64 with 16kB pages, and ppc64el with 64kB
pages.

Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/xe/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index 2bb2bc052120..714d5702dfd7 100644
--- a/drivers/gpu/drm/xe/Kconfig
+++ b/drivers/gpu/drm/xe/Kconfig
@@ -5,6 +5,7 @@ config DRM_XE
 	depends on KUNIT || !KUNIT
 	depends on INTEL_VSEC || !INTEL_VSEC
 	depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)
+	depends on PAGE_SIZE_4KB || COMPILE_TEST || BROKEN
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
 	# the shmem_readpage() which depends upon tmpfs
-- 
2.47.2
Re: [PATCH v4] Mark xe driver as BROKEN if kernel page size is not 4kB
Posted by Thomas Hellström 2 months ago
On Sat, 2025-08-02 at 11:40 +0900, Simon Richter wrote:
> This driver, for the time being, assumes that the kernel page size is
> 4kB,
> so it fails on loong64 and aarch64 with 16kB pages, and ppc64el with
> 64kB
> pages.
> 
> Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/xe/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
> index 2bb2bc052120..714d5702dfd7 100644
> --- a/drivers/gpu/drm/xe/Kconfig
> +++ b/drivers/gpu/drm/xe/Kconfig
> @@ -5,6 +5,7 @@ config DRM_XE
>  	depends on KUNIT || !KUNIT
>  	depends on INTEL_VSEC || !INTEL_VSEC
>  	depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)
> +	depends on PAGE_SIZE_4KB || COMPILE_TEST || BROKEN
>  	select INTERVAL_TREE
>  	# we need shmfs for the swappable backing store, and in
> particular
>  	# the shmem_readpage() which depends upon tmpfs

R-B still stands.

I've pushed this to drm-xe-next with a Fixes: tag which means it will
likely end up in Linus' tree the upcoming weekend.

Thanks,
Thomas