[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [PATCH 3/3] Fix compilation issues with CONFIG_DRM_TTM enabled.



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@xxxxxxxxxx>
> > ---
> >  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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.