Arnd Bergmann
2020-May-08 14:40 UTC
[Nouveau] [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
CONFIG_DEVICE_PRIVATE cannot be selected in configurations without ZONE_DEVICE: WARNING: unmet direct dependencies detected for DEVICE_PRIVATE Depends on [n]: ZONE_DEVICE [=n] Selected by [y]: - DRM_NOUVEAU_SVM [=y] && HAS_IOMEM [=y] && DRM_NOUVEAU [=y] && MMU [=y] && STAGING [=y] kernel/resource.c:1653:28: error: use of undeclared identifier 'PA_SECTION_SHIFT' size = ALIGN(size, 1UL << PA_SECTION_SHIFT); ^ kernel/resource.c:1654:48: error: use of undeclared identifier 'MAX_PHYSMEM_BITS' Add a dependency for Nouveau to avoid broken randconfig builds. Fixes: d2c63df2242e ("mm/hmm: make CONFIG_DEVICE_PRIVATE into a select") Signed-off-by: Arnd Bergmann <arnd at arndb.de> --- drivers/gpu/drm/nouveau/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index af5793f3e7c2..996ec5475908 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -87,6 +87,7 @@ config DRM_NOUVEAU_BACKLIGHT config DRM_NOUVEAU_SVM bool "(EXPERIMENTAL) Enable SVM (Shared Virtual Memory) support" depends on DRM_NOUVEAU + depends on ZONE_DEVICE depends on MMU depends on STAGING select DEVICE_PRIVATE -- 2.26.0
Jason Gunthorpe
2020-May-08 15:00 UTC
[Nouveau] [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
On Fri, May 08, 2020 at 04:40:09PM +0200, Arnd Bergmann wrote:> CONFIG_DEVICE_PRIVATE cannot be selected in configurations > without ZONE_DEVICE:It is kind of unfortunate to lift dependencies from DEVICE_PRIVATE into the users, is this really how kconfig is supposed to work or is something else wrong here? Jason
Arnd Bergmann
2020-May-08 15:05 UTC
[Nouveau] [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
On Fri, May 8, 2020 at 5:00 PM Jason Gunthorpe <jgg at mellanox.com> wrote:> > On Fri, May 08, 2020 at 04:40:09PM +0200, Arnd Bergmann wrote: > > CONFIG_DEVICE_PRIVATE cannot be selected in configurations > > without ZONE_DEVICE: > > It is kind of unfortunate to lift dependencies from DEVICE_PRIVATE > into the users, is this really how kconfig is supposed to work or is > something else wrong here?Usually the problem is trying to use 'select' for something that can be done with 'depends on'. I have actually no idea what CONFIG_DEVICE_PRIVATE does, as it lacks a help text and is a rather generic term. Would it be possible to decouple DEVICE_PRIVATE from ZONE_DEVICE? It sounds like the first is related to the device model, while the second is for memory management, so maybe the dependency is not necessary. Arnd
Randy Dunlap
2020-May-08 18:05 UTC
[Nouveau] [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
On 5/8/20 7:40 AM, Arnd Bergmann wrote:> CONFIG_DEVICE_PRIVATE cannot be selected in configurations > without ZONE_DEVICE: > > WARNING: unmet direct dependencies detected for DEVICE_PRIVATE > Depends on [n]: ZONE_DEVICE [=n] > Selected by [y]: > - DRM_NOUVEAU_SVM [=y] && HAS_IOMEM [=y] && DRM_NOUVEAU [=y] && MMU [=y] && STAGING [=y] > kernel/resource.c:1653:28: error: use of undeclared identifier 'PA_SECTION_SHIFT' > size = ALIGN(size, 1UL << PA_SECTION_SHIFT); > ^ > kernel/resource.c:1654:48: error: use of undeclared identifier 'MAX_PHYSMEM_BITS' > > Add a dependency for Nouveau to avoid broken randconfig builds. > > Fixes: d2c63df2242e ("mm/hmm: make CONFIG_DEVICE_PRIVATE into a select") > Signed-off-by: Arnd Bergmann <arnd at arndb.de>Acked-by: Randy Dunlap <rdunlap at infradead.org> # build-tested Thanks.> --- > drivers/gpu/drm/nouveau/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig > index af5793f3e7c2..996ec5475908 100644 > --- a/drivers/gpu/drm/nouveau/Kconfig > +++ b/drivers/gpu/drm/nouveau/Kconfig > @@ -87,6 +87,7 @@ config DRM_NOUVEAU_BACKLIGHT > config DRM_NOUVEAU_SVM > bool "(EXPERIMENTAL) Enable SVM (Shared Virtual Memory) support" > depends on DRM_NOUVEAU > + depends on ZONE_DEVICE > depends on MMU > depends on STAGING > select DEVICE_PRIVATE >-- ~Randy
Jason Gunthorpe
2020-May-11 13:52 UTC
[Nouveau] [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
On Fri, May 08, 2020 at 04:40:09PM +0200, Arnd Bergmann wrote:> CONFIG_DEVICE_PRIVATE cannot be selected in configurations > without ZONE_DEVICE: > > WARNING: unmet direct dependencies detected for DEVICE_PRIVATE > Depends on [n]: ZONE_DEVICE [=n] > Selected by [y]: > - DRM_NOUVEAU_SVM [=y] && HAS_IOMEM [=y] && DRM_NOUVEAU [=y] && MMU [=y] && STAGING [=y] > kernel/resource.c:1653:28: error: use of undeclared identifier 'PA_SECTION_SHIFT' > size = ALIGN(size, 1UL << PA_SECTION_SHIFT); > ^ > kernel/resource.c:1654:48: error: use of undeclared identifier 'MAX_PHYSMEM_BITS' > > Add a dependency for Nouveau to avoid broken randconfig builds. > > Fixes: d2c63df2242e ("mm/hmm: make CONFIG_DEVICE_PRIVATE into a > select")I've reverted the patch this fixes, it seems more trouble than it is worth. Thanks, Jason
Maybe Matching Threads
- [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
- [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
- [PATCH 2/2] nouveau: fix dependencies for DEVICE_PRIVATE
- [PATCH hmm v2 1/5] mm/hmm: make CONFIG_DEVICE_PRIVATE into a select
- [PATCH] drm/nouveau: Fix DEVICE_PRIVATE dependencies