From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
To: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tzimmermann@suse.de" <tzimmermann@suse.de>
Cc: "sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"airlied@linux.ie" <airlied@linux.ie>,
"andreyknvl@gmail.com" <andreyknvl@gmail.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"lkft@linaro.org" <lkft@linaro.org>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
"mripard@kernel.org" <mripard@kernel.org>,
"daniel@ffwll.ch" <daniel@ffwll.ch>
Subject: Re: [PATCH v1] drm: import DMA_BUF module namespace
Date: Wed, 27 Oct 2021 20:54:23 +0000 [thread overview]
Message-ID: <0f90b5da6139316429363fc14f76e96366f4a4b5.camel@toradex.com> (raw)
In-Reply-To: <77d1966e-3081-10d3-d7a8-c159b62004aa@suse.de>
Sali Thomas
On Wed, 2021-10-27 at 20:30 +0200, Thomas Zimmermann wrote:
> Hi,
>
> thanks for the patch.
You are very welcome.
> Am 27.10.21 um 17:25 schrieb Marcel Ziswiler:
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> >
> > Today's -next fails building arm64 defconfig as follows:
> >
> > ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vunmap from
> > namespace DMA_BUF, but does not import it.
> > ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vmap from
> > namespace DMA_BUF, but does not import it.
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > Fixes: commit 4b2b5e142ff4 ("drm: Move GEM memory managers into modules")
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> >
> > ---
> >
> > drivers/gpu/drm/drm_gem_cma_helper.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
> > index 6f7b3f8ec04d3..69f8564ad11cd 100644
> > --- a/drivers/gpu/drm/drm_gem_cma_helper.c
> > +++ b/drivers/gpu/drm/drm_gem_cma_helper.c
> > @@ -23,6 +23,8 @@
> > #include <drm/drm_gem_cma_helper.h>
> > #include <drm/drm_vma_manager.h>
> >
> > +MODULE_IMPORT_NS(DMA_BUF);
>
> Could this line be moved to the bottom of the file, where the other
> MODULE statements are?
Hehe, good question. I was actually asking myself the same but quickly looking at a few files and they all had
it after their includes towards the top. Turns out that was rather short sighted...
Let me look more closely. Current -next has exactly 200 files with a MODULE_IMPORT_NS statement. Okay, some of
which are documentation. Anyway, 132 of which do have it with their other MODULE macros towards the end as you
suggest. 20 of which and mainly DRM stuff has it towards the top after them includes. Funny.
What does the documentation suggest?
Documentation/core-api/symbol-namespaces.rst
"It is advisable to add the MODULE_IMPORT_NS() statement close to other module
metadata definitions like MODULE_AUTHOR() or MODULE_LICENSE(). Refer to section
5. for a way to create missing import statements automatically."
There you go. Plus there is even some fancy automation (;-p).
So let me move it down there then.
> In the fixed commit 4b2b5e142ff4, there's a similar change for
> drm_gem_shmem_helper.c. It uses dma-buf_vmap as well. Does that module
> require the same fix?
Likely. Let me just run ze automation and see what we get...
> Do you have any idea why I don't see these errors in my builds?
Well, I guess, there are various KCONFIG symbols influencing that whole story. How about e.g.
init/Kconfig:config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
> Best regards
> Thomas
Cheers
Marcel
> > +
> > /**
> > * DOC: cma helpers
> > *
> >
>
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
--
Best regards - Mit freundlichen Grüssen - Meilleures salutations
Marcel Ziswiler
Software Team Lead - Embedded Linux BSP
Toradex AG
Ebenaustrasse 10 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 4800
next prev parent reply other threads:[~2021-10-27 20:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 15:25 [PATCH v1] drm: import DMA_BUF module namespace Marcel Ziswiler
2021-10-27 18:30 ` Thomas Zimmermann
2021-10-27 20:54 ` Marcel Ziswiler [this message]
2021-10-28 18:45 ` Thomas Zimmermann
2021-10-29 7:19 ` Marcel Ziswiler
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=0f90b5da6139316429363fc14f76e96366f4a4b5.camel@toradex.com \
--to=marcel.ziswiler@toradex.com \
--cc=airlied@linux.ie \
--cc=alexandre.belloni@bootlin.com \
--cc=andreyknvl@gmail.com \
--cc=arnd@arndb.de \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=lkft@linaro.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tzimmermann@suse.de \
/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