From patchwork Tue Jun 25 11:30:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Austin X-Patchwork-Id: 254120 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 791672C0209 for ; Tue, 25 Jun 2013 21:30:58 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrRSQ-0003pi-De; Tue, 25 Jun 2013 11:30:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrRSN-0004Md-Q8; Tue, 25 Jun 2013 11:30:43 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrRSL-0004LJ-73 for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2013 11:30:42 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 25 Jun 2013 12:30:18 +0100 Received: from [10.1.199.71] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 25 Jun 2013 12:30:15 +0100 Message-ID: <51C97F40.5030101@arm.com> Date: Tue, 25 Jun 2013 12:30:08 +0100 From: Jonathan Austin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: "linux-kernel@vger.kernel.org" Subject: amba-pl08x and 'get_signal' namespace collision/build error X-OriginalArrivalTime: 25 Jun 2013 11:30:15.0754 (UTC) FILETIME=[5D2CCAA0:01CE7197] X-MC-Unique: 113062512301800201 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130625_073041_431378_881E59EE X-CRM114-Status: GOOD ( 13.52 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [91.220.42.44 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Steve Capper , Vinod Koul , Catalin Marinas , linus.walleij@linaro.org, Will Deacon , Al Viro , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hi all, There's a patch making its way to mainline via Russell's tree (8d96250700: ARM: mm: Transparent huge page support for LPAE systems) that breaks the build of the amba-pl08x driver (drivers/dma/amba-pl08x.c) because the 'get_signal' macro from include/linux/signal.h is now in the driver's scope and it clobbers a (previously) valid function call. The error: drivers/dma/amba-pl08x.c: In function ‘pl08x_request_mux’: drivers/dma/amba-pl08x.c:303:13: error: expected identifier before ‘(’ token Here's the problematic include: In file included from include/linux/sched.h:32:0, --new include--> from /data/build/a32/linux/arch/arm/include/asm/tlbflush.h:204, from /data/build/a32/linux/arch/arm/include/asm/pgtable.h:28, from include/linux/mm.h:44, from include/linux/scatterlist.h:6, from include/linux/dmaengine.h:27, from include/linux/amba/pl08x.h:21, from drivers/dma/amba-pl08x.c:74: include/linux/signal.h:298:2: error: #error get_signal defined here Below is a 'fix' that *doesn't* require any renaming of either the get_signal function or macro, but there's nothing to say that driver shouldn't be able to use the pl08x_platform_data struct *and* do scheduling so this doesn't seem like the best fix really. So can we do something better? Al: the commit where you add the get_signal() helper suggests you want to make it a function not a macro in the future - what needs to be done before that can happen? I think that would be the best/easiest fix. Jonny ----------8<----------- diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index c78efbc..ce1185c 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h @@ -201,7 +201,10 @@ #ifndef __ASSEMBLY__ -#include +#include +#include + +#include struct cpu_tlb_fns { void (*flush_user_range)(unsigned long, unsigned long, struct vm_area_struct *); diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c index 38a5067..3100983 100644 --- a/arch/arm/kernel/suspend.c +++ b/arch/arm/kernel/suspend.c @@ -1,4 +1,5 @@ #include +#include #include #include diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index 83cb3ac..304e8ce 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index d5a4e9a..6eeaf3d 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h @@ -1,6 +1,7 @@ #ifdef CONFIG_MMU #include #include +#include /* the upper-most page table pointer */ extern pmd_t *top_pmd;