All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 3/3] Fix compilation issues with CONFIG_DRM_TTM enabled.
Date: Thu, 8 Oct 2009 15:00:10 -0400	[thread overview]
Message-ID: <20091008190010.GA10022@phenom.dumpdata.com> (raw)
In-Reply-To: <4ACE3263.7000609@goop.org>

On Thu, Oct 08, 2009 at 11:41:39AM -0700, Jeremy Fitzhardinge wrote:
> On 10/08/09 10:23, Konrad Rzeszutek Wilk wrote:
> > The recent fix for GART on Xen included an extra include which
> > caused the build to choke when building the ttm drivers.
> >   
> 
> How does the compile fail?  (Generally its best to include the
> compilation error messages when submitting a compile-fix patch.)

[root@tst001 linux-2.6-pvops.git]# SUBDIRS=/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/ttm make -j4 -C /root/xen-unstable.hg/linux-2.6-pvops.git O=/root/xen-unstable.hg/build-linux-2.6-pvops_x86_64/  modules
make: Entering directory `/root/xen-unstable.hg/linux-2.6-pvops.git'
/root/xen-unstable.hg/linux-2.6-pvops.git/scripts/Makefile.build:44: /root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/ttm/Makefile: No such file or directory
make[2]: *** No rule to make target `/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/ttm/Makefile'.  Stop.
make[1]: *** [_module_/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/ttm] Error 2
make: *** [sub-make] Error 2
make: Leaving directory `/root/xen-unstable.hg/linux-2.6-pvops.git'
[root@tst001 linux-2.6-pvops.git]# SUBDIRS=/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/ttm make -j4 -C /root/xen-unstable.hg/linux-2.6-pvops.git O=/root/xen-unstable.hg/build-linux-2.6-pvops_x86_64/  modules
make: Entering directory `/root/xen-unstable.hg/linux-2.6-pvops.git'
  CC [M]  /root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/ttm/ttm_agp_backend.o
In file included from /root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/swiotlb.h:6,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/arch/x86/include/asm/swiotlb.h:5,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/arch/x86/include/asm/dma-mapping.h:15,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/arch/x86/include/asm/agp.h:7,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/ttm/ttm_agp_backend.c:40:
/root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h: In function ‘dma_sync_single’:
/root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:117: error: implicit declaration of function ‘dma_sync_single_for_cpu’
/root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h: In function ‘dma_sync_sg’:
/root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:124: error: implicit declaration of function ‘dma_sync_sg_for_cpu’
In file included from /root/xen-unstable.hg/linux-2.6-pvops.git/arch/x86/include/asm/dma-mapping.h:37,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/arch/x86/include/asm/agp.h:7,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/ttm/ttm_agp_backend.c:40:
/root/xen-unstable.hg/linux-2.6-pvops.git/include/asm-generic/dma-mapping-common.h: At top level:
/root/xen-unstable.hg/linux-2.6-pvops.git/include/asm-generic/dma-mapping-common.h:96: warning: conflicting types for ‘dma_sync_single_for_cpu’
/root/xen-unstable.hg/linux-2.6-pvops.git/include/asm-generic/dma-mapping-common.h:96: error: static declaration of ‘dma_sync_single_for_cpu’ follows non-static declaration
/root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:117: note: previous implicit declaration of ‘dma_sync_single_for_cpu’ was here
In file included from /root/xen-unstable.hg/linux-2.6-pvops.git/arch/x86/include/asm/dma-mapping.h:37,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/arch/x86/include/asm/agp.h:7,
                 from /root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/ttm/ttm_agp_backend.c:40:
/root/xen-unstable.hg/linux-2.6-pvops.git/include/asm-generic/dma-mapping-common.h:159: warning: conflicting types for ‘dma_sync_sg_for_cpu’
/root/xen-unstable.hg/linux-2.6-pvops.git/include/asm-generic/dma-mapping-common.h:159: error: static declaration of ‘dma_sync_sg_for_cpu’ follows non-static declaration
/root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:124: note: previous implicit declaration of ‘dma_sync_sg_for_cpu’ was here
make[2]: *** [/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/ttm/ttm_agp_backend.o] Error 1
make[1]: *** [_module_/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/ttm] Error 2
make: *** [sub-make] Error 2
make: Leaving directory `/root/xen-unstable.hg/linux-2.6-pvops.git'


> 
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > ---
> >  arch/x86/include/asm/agp.h |    1 -
> >  1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/agp.h b/arch/x86/include/asm/agp.h
> > index 8107b71..3282ea6 100644
> > --- a/arch/x86/include/asm/agp.h
> > +++ b/arch/x86/include/asm/agp.h
> > @@ -3,7 +3,6 @@
> >  
> >  #include <asm/pgtable.h>
> >  #include <asm/cacheflush.h>
> > -#include <asm/dma-mapping.h>
> >   
> 
> The code below uses dma_alloc/free_coherent, so it needs some header for
> the prototypes.  Perhaps it should be linux/dma-mapping.h?

That was what I thought too, but all of the cases that utilize this header
had beforehand included the header for the dma_alloc/free_coherent.

Your idea of using linux/dma-mapping.h fixes the issue as well, and it
is much clearer.

      reply	other threads:[~2009-10-08 19:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08 17:23 [PATCH PV_OPS] Misc fixes Konrad Rzeszutek Wilk
2009-10-08 17:23 ` [PATCH 1/3] Fix toogle whether xenbus driver should be built as module or part of kernel Konrad Rzeszutek Wilk
2009-10-08 17:23   ` [PATCH 2/3] Fix compile warnings: ignoring return value of 'xenbus_register_backend' Konrad Rzeszutek Wilk
2009-10-08 17:23     ` [PATCH 3/3] Fix compilation issues with CONFIG_DRM_TTM enabled Konrad Rzeszutek Wilk
2009-10-08 18:41       ` Jeremy Fitzhardinge
2009-10-08 19:00         ` Konrad Rzeszutek Wilk [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=20091008190010.GA10022@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.