From: Jonathan Austin <jonathan.austin@arm.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Vinod Koul <vinod.koul@intel.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Steve Capper <Steve.Capper@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linus.walleij@linaro.org, Al Viro <viro@zeniv.linux.org.uk>
Subject: amba-pl08x and 'get_signal' namespace collision/build error
Date: Tue, 25 Jun 2013 12:30:08 +0100 [thread overview]
Message-ID: <51C97F40.5030101@arm.com> (raw)
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 <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/mm_types.h>
+
+#include <asm/barrier.h>
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 <linux/init.h>
+#include <linux/sched.h>
#include <asm/idmap.h>
#include <asm/pgalloc.h>
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 <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
+#include <linux/sched.h>
#include <asm/cputype.h>
#include <asm/idmap.h>
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 <linux/list.h>
#include <linux/vmalloc.h>
+#include <linux/sched.h>
/* the upper-most page table pointer */
extern pmd_t *top_pmd;
next reply other threads:[~2013-06-25 11:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 11:30 Jonathan Austin [this message]
2013-06-25 13:49 ` amba-pl08x and 'get_signal' namespace collision/build error Linus Walleij
2013-06-25 18:45 ` Russell King - ARM Linux
2013-06-26 4:48 ` Vinod Koul
2013-06-26 8:19 ` Russell King - ARM Linux
2013-06-26 10:39 ` Vinod Koul
2013-06-26 12:00 ` Mark Brown
2013-06-27 9:46 ` Russell King - ARM Linux
2013-07-03 18:27 ` Olof Johansson
2013-07-05 6:18 ` Vinod Koul
2013-07-07 12:32 ` Russell King - ARM Linux
2013-07-07 13:34 ` Vinod Koul
2013-07-08 2:04 ` Vinod Koul
2013-06-26 8:40 ` Steve Capper
2013-06-26 9:13 ` Steve Capper
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=51C97F40.5030101@arm.com \
--to=jonathan.austin@arm.com \
--cc=Steve.Capper@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox