2015-11-04 09:22:33

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the drm tree

Hi Dave,

After merging the drm tree, today's linux-next build (s390 allmodconfig)
failed like this:

drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:143:2: error: implicit declaration of function 'dma_to_phys' [-Werror=implicit-function-declaration]

Caused by commit

69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")

Discovered after the release.

--
Cheers,
Stephen Rothwell [email protected]


2015-11-09 16:45:15

by Guenter Roeck

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the drm tree

On Wed, Nov 04, 2015 at 08:22:26PM +1100, Stephen Rothwell wrote:
> Hi Dave,
>
> After merging the drm tree, today's linux-next build (s390 allmodconfig)
> failed like this:
>
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:143:2: error: implicit declaration of function 'dma_to_phys' [-Werror=implicit-function-declaration]
>
> Caused by commit
>
> 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
>
> Discovered after the release.
>
Still seen in next-20151109, affecting at least alpha, i386, parisc, s390,
and xtensa, but probably other architectures as well.

dma_to_phys() was until now not used from driver code, and is only declared
for an architecture if it is used/needed there.

Also:

ERROR: "drm_gem_cma_create" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_mmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_get_sg_table" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_vm_ops" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_mmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_vunmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_import_sg_table" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_free_object" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_prime_vmap" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_dumb_map_offset" [drivers/gpu/drm/vc4/vc4.ko] undefined!
ERROR: "drm_gem_cma_create" [drivers/gpu/drm/drm_kms_helper.ko] undefined!
ERROR: "drm_gem_cma_describe" [drivers/gpu/drm/drm_kms_helper.ko] undefined!
ERROR: "drm_gem_cma_free_object" [drivers/gpu/drm/drm_kms_helper.ko] undefined!

seen with m68k:allmodconfig.

Guenter

2015-11-10 04:55:59

by Alexandre Courbot

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the drm tree

On Tue, Nov 10, 2015 at 1:45 AM, Guenter Roeck <[email protected]> wrote:
> On Wed, Nov 04, 2015 at 08:22:26PM +1100, Stephen Rothwell wrote:
>> Hi Dave,
>>
>> After merging the drm tree, today's linux-next build (s390 allmodconfig)
>> failed like this:
>>
>> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:143:2: error: implicit declaration of function 'dma_to_phys' [-Werror=implicit-function-declaration]
>>
>> Caused by commit
>>
>> 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
>>
>> Discovered after the release.
>>
> Still seen in next-20151109, affecting at least alpha, i386, parisc, s390,
> and xtensa, but probably other architectures as well.
>
> dma_to_phys() was until now not used from driver code, and is only declared
> for an architecture if it is used/needed there.

Mmm there doesn't seem to be a portable way of getting a physical
address from a DMA handle, which is what we are trying to do in this
code.

In that particular case a cast is enough though, so we should probably
just do that. I will send a patch for Ben/David to include in order to
fix this issue at least.