From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 3/3] Fix compilation issues with CONFIG_DRM_TTM enabled. Date: Thu, 8 Oct 2009 15:00:10 -0400 Message-ID: <20091008190010.GA10022@phenom.dumpdata.com> References: <1255022590-9578-1-git-send-email-konrad.wilk@oracle.com> <1255022590-9578-2-git-send-email-konrad.wilk@oracle.com> <1255022590-9578-3-git-send-email-konrad.wilk@oracle.com> <1255022590-9578-4-git-send-email-konrad.wilk@oracle.com> <4ACE3263.7000609@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <4ACE3263.7000609@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.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. > > =20 >=20 > 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=3D/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=3D/root/xen-unstable.hg/build-linux-2.6-pvops_x86_64/ modul= es 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: /roo= t/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/ttm/Makefile: No such f= ile or directory make[2]: *** No rule to make target `/root/xen-unstable.hg/linux-2.6-pvop= s.git/drivers/gpu/ttm/Makefile'. Stop. make[1]: *** [_module_/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/g= pu/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=3D/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=3D/root/xen-unstable.hg/build-linux-2.6-pvops_x86_64/ m= odules 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/t= tm_agp_backend.o In file included from /root/xen-unstable.hg/linux-2.6-pvops.git/include/l= inux/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/g= pu/drm/ttm/ttm_agp_backend.c:40: /root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h: In= function =E2=80=98dma_sync_single=E2=80=99: /root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:117= : error: implicit declaration of function =E2=80=98dma_sync_single_for_cp= u=E2=80=99 /root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h: In= function =E2=80=98dma_sync_sg=E2=80=99: /root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:124= : error: implicit declaration of function =E2=80=98dma_sync_sg_for_cpu=E2= =80=99 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/g= pu/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 =E2=80=98dma_sync_single_for= _cpu=E2=80=99 /root/xen-unstable.hg/linux-2.6-pvops.git/include/asm-generic/dma-mapping= -common.h:96: error: static declaration of =E2=80=98dma_sync_single_for_c= pu=E2=80=99 follows non-static declaration /root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:117= : note: previous implicit declaration of =E2=80=98dma_sync_single_for_cpu= =E2=80=99 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/g= pu/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 =E2=80=98dma_sync_sg_for_cp= u=E2=80=99 /root/xen-unstable.hg/linux-2.6-pvops.git/include/asm-generic/dma-mapping= -common.h:159: error: static declaration of =E2=80=98dma_sync_sg_for_cpu=E2= =80=99 follows non-static declaration /root/xen-unstable.hg/linux-2.6-pvops.git/include/linux/dma-mapping.h:124= : note: previous implicit declaration of =E2=80=98dma_sync_sg_for_cpu=E2=80= =99 was here make[2]: *** [/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/gpu/drm/t= tm/ttm_agp_backend.o] Error 1 make[1]: *** [_module_/root/xen-unstable.hg/linux-2.6-pvops.git/drivers/g= pu/drm/ttm] Error 2 make: *** [sub-make] Error 2 make: Leaving directory `/root/xen-unstable.hg/linux-2.6-pvops.git' >=20 > > Signed-off-by: Konrad Rzeszutek Wilk > > --- > > 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 @@ > > =20 > > #include > > #include > > -#include > > =20 >=20 > The code below uses dma_alloc/free_coherent, so it needs some header fo= r > the prototypes. Perhaps it should be linux/dma-mapping.h? That was what I thought too, but all of the cases that utilize this heade= r 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.