From patchwork Thu Aug 8 19:21:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 2841355 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 80DAEBF546 for ; Thu, 8 Aug 2013 19:36:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AC8A2035C for ; Thu, 8 Aug 2013 19:36:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D280F20328 for ; Thu, 8 Aug 2013 19:36:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD24AE68F4 for ; Thu, 8 Aug 2013 12:36:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D6BAE679F for ; Thu, 8 Aug 2013 12:30:15 -0700 (PDT) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 882B8630E; Thu, 8 Aug 2013 13:30:14 -0600 (MDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id A892DE461B; Thu, 8 Aug 2013 13:21:01 -0600 (MDT) Message-ID: <5203EF9C.8080000@wwwdotorg.org> Date: Thu, 08 Aug 2013 13:21:00 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: David Herrmann Subject: Re: Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c" References: <5203DCB0.9060409@wwwdotorg.org> In-Reply-To: X-Enigmail-Version: 1.4.6 X-Virus-Scanned: clamav-milter 0.97.8 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: Dave Airlie , "linux-next@vger.kernel.org" , "dri-devel@lists.freedesktop.org" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 08/08/2013 12:13 PM, David Herrmann wrote: > Hi > > On Thu, Aug 8, 2013 at 8:00 PM, Stephen Warren wrote: >> In next-20130808, building tegra_defconfig for ARM yields: >> >>> drivers/built-in.o: In function `drm_lastclose': >>> /home/swarren/shared/git_wa/kernel/kernel.git/drivers/gpu/drm/drm_drv.c:198: undefined reference to `drm_agp_clear' >> >> That's because drm_agp_clear() is called unconditionally, yet is only >> conditionally built into drm_agpsupport.c (#if __OS_HAS_AGP). >> >> Should the call from drm_drv.c be conditional, or should there be a >> dummy static inline replacement in include/drm/drmP.h for when AGP >> support isn't available? > > Sorry, I missed testing with AGP=n and the code I fixed depended on > dead-code-elimination to link correctly. I overlooked that. There is a > patch pending on dri-devel: > http://lists.freedesktop.org/archives/dri-devel/2013-August/043077.html That makes it worse! To solve it, you need: diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index f926542..a184eee 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h @@ -8,7 +8,7 @@ #include #include -#ifdef __OS_HAS_AGP +#if __OS_HAS_AGP void drm_free_agp(DRM_AGP_MEM * handle, int pages); int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);