* [PATCH] Add missing include of linux/ftrace.h
@ 2011-09-29 15:13 Jamie Iles
2011-10-01 16:35 ` Russell King - ARM Linux
0 siblings, 1 reply; 6+ messages in thread
From: Jamie Iles @ 2011-09-29 15:13 UTC (permalink / raw)
To: linux-arm-kernel
__exception_irq_entry uses __irq_entry which is defined in
linux/ftrace.h.
Reported-by: Zoltan Devai <zdevai@gmail.com>
Cc: Rabin Vincent <rabin@rab.in>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
arch/arm/include/asm/system.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 832888d..129e5e5 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -59,6 +59,7 @@
#include <linux/linkage.h>
#include <linux/irqflags.h>
+#include <linux/ftrace.h>
#include <asm/outercache.h>
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] Add missing include of linux/ftrace.h
2011-09-29 15:13 [PATCH] Add missing include of linux/ftrace.h Jamie Iles
@ 2011-10-01 16:35 ` Russell King - ARM Linux
2011-10-01 17:12 ` Jamie Iles
0 siblings, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux @ 2011-10-01 16:35 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 29, 2011 at 04:13:22PM +0100, Jamie Iles wrote:
> __exception_irq_entry uses __irq_entry which is defined in
> linux/ftrace.h.
>
> Reported-by: Zoltan Devai <zdevai@gmail.com>
> Cc: Rabin Vincent <rabin@rab.in>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
This introduces a circular dependency:
linux/ftrace.h -> linux/kallsyms.h -> linux/kernel.h -> linux/bitops.h
-> asm/bitops.h -> asm/system.h -> linux/ftrace.h
This is not good as it means that we end up with indeterminant effects
happening depending on where in that cycle the first include happens.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Add missing include of linux/ftrace.h
2011-10-01 16:35 ` Russell King - ARM Linux
@ 2011-10-01 17:12 ` Jamie Iles
2011-10-01 17:16 ` Russell King - ARM Linux
2011-10-01 19:04 ` Rabin Vincent
0 siblings, 2 replies; 6+ messages in thread
From: Jamie Iles @ 2011-10-01 17:12 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 01, 2011 at 05:35:11PM +0100, Russell King - ARM Linux wrote:
> On Thu, Sep 29, 2011 at 04:13:22PM +0100, Jamie Iles wrote:
> > __exception_irq_entry uses __irq_entry which is defined in
> > linux/ftrace.h.
> >
> > Reported-by: Zoltan Devai <zdevai@gmail.com>
> > Cc: Rabin Vincent <rabin@rab.in>
> > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
>
> This introduces a circular dependency:
>
> linux/ftrace.h -> linux/kallsyms.h -> linux/kernel.h -> linux/bitops.h
> -> asm/bitops.h -> asm/system.h -> linux/ftrace.h
>
> This is not good as it means that we end up with indeterminant effects
> happening depending on where in that cycle the first include happens.
Crap. I don't think having users of __exception_irq_entry include
linux/ftrace.h is great, so how about this instead?
Jamie
8<----
From: Jamie Iles <jamie@jamieiles.com>
Subject: [PATCH] move __exception and friends to asm/exception.h
The definition of __exception_irq_entry for
CONFIG_FUNCTION_GRAPH_TRACER=y needs linux/ftrace.h, but this creates a
circular dependency with it's current home in asm/system.h. Create
asm/exception.h and update all current users.
Reported-by: Zoltan Devai <zdevai@gmail.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
arch/arm/include/asm/exception.h | 13 +++++++++++++
arch/arm/include/asm/system.h | 7 -------
arch/arm/kernel/irq.c | 1 +
arch/arm/kernel/smp.c | 1 +
arch/arm/kernel/traps.c | 1 +
arch/arm/mach-pxa/irq.c | 2 ++
arch/arm/mm/fault.c | 1 +
7 files changed, 19 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/include/asm/exception.h
diff --git a/arch/arm/include/asm/exception.h b/arch/arm/include/asm/exception.h
new file mode 100644
index 0000000..7d6fd97
--- /dev/null
+++ b/arch/arm/include/asm/exception.h
@@ -0,0 +1,13 @@
+#ifndef __ASM_ARM_EXCEPTION_H
+#define __ASM_ARM_EXCEPTION_H
+
+#include <linux/ftrace.h>
+
+#define __exception __attribute__((section(".exception.text")))
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+#define __exception_irq_entry __irq_entry
+#else
+#define __exception_irq_entry __exception
+#endif
+
+#endif /* __ASM_ARM_EXCEPTION_H */
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 832888d..ed6b049 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -62,13 +62,6 @@
#include <asm/outercache.h>
-#define __exception __attribute__((section(".exception.text")))
-#ifdef CONFIG_FUNCTION_GRAPH_TRACER
-#define __exception_irq_entry __irq_entry
-#else
-#define __exception_irq_entry __exception
-#endif
-
struct thread_info;
struct task_struct;
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index de3dcab..61c1468 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -37,6 +37,7 @@
#include <linux/proc_fs.h>
#include <linux/ftrace.h>
+#include <asm/exception.h>
#include <asm/system.h>
#include <asm/mach/arch.h>
#include <asm/mach/irq.h>
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index d88ff02..1122faf 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -31,6 +31,7 @@
#include <asm/cacheflush.h>
#include <asm/cpu.h>
#include <asm/cputype.h>
+#include <asm/exception.h>
#include <asm/mmu_context.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index bc9f9da..2103825 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -27,6 +27,7 @@
#include <linux/atomic.h>
#include <asm/cacheflush.h>
+#include <asm/exception.h>
#include <asm/system.h>
#include <asm/unistd.h>
#include <asm/traps.h>
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index b09e848..ca60757 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -19,6 +19,8 @@
#include <linux/io.h>
#include <linux/irq.h>
+#include <asm/exception.h>
+
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/gpio.h>
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 3b5ea68..aa33949 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -20,6 +20,7 @@
#include <linux/highmem.h>
#include <linux/perf_event.h>
+#include <asm/exception.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] Add missing include of linux/ftrace.h
2011-10-01 17:12 ` Jamie Iles
@ 2011-10-01 17:16 ` Russell King - ARM Linux
2011-10-01 19:04 ` Rabin Vincent
1 sibling, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2011-10-01 17:16 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 01, 2011 at 06:12:02PM +0100, Jamie Iles wrote:
> On Sat, Oct 01, 2011 at 05:35:11PM +0100, Russell King - ARM Linux wrote:
> > On Thu, Sep 29, 2011 at 04:13:22PM +0100, Jamie Iles wrote:
> > > __exception_irq_entry uses __irq_entry which is defined in
> > > linux/ftrace.h.
> > >
> > > Reported-by: Zoltan Devai <zdevai@gmail.com>
> > > Cc: Rabin Vincent <rabin@rab.in>
> > > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> >
> > This introduces a circular dependency:
> >
> > linux/ftrace.h -> linux/kallsyms.h -> linux/kernel.h -> linux/bitops.h
> > -> asm/bitops.h -> asm/system.h -> linux/ftrace.h
> >
> > This is not good as it means that we end up with indeterminant effects
> > happening depending on where in that cycle the first include happens.
>
> Crap. I don't think having users of __exception_irq_entry include
> linux/ftrace.h is great, so how about this instead?
This looks much better - and won't involve any circular dependencies.
It might be worth adding a comment in the new header file that this
should only be used on functions called from the low level entry code
and not from intervening C code.
Finally, could you stick it in the patch system please?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Add missing include of linux/ftrace.h
2011-10-01 17:12 ` Jamie Iles
2011-10-01 17:16 ` Russell King - ARM Linux
@ 2011-10-01 19:04 ` Rabin Vincent
2011-10-04 8:57 ` Jamie Iles
1 sibling, 1 reply; 6+ messages in thread
From: Rabin Vincent @ 2011-10-01 19:04 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 1, 2011 at 22:42, Jamie Iles <jamie@jamieiles.com> wrote:
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index de3dcab..61c1468 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -37,6 +37,7 @@
> ?#include <linux/proc_fs.h>
> ?#include <linux/ftrace.h>
You can probably git rid of this inclusion of ftrace.h from
here and from smp.c, because they were added only for
__exception_irq_entry.
>
> +#include <asm/exception.h>
> ?#include <asm/system.h>
> ?#include <asm/mach/arch.h>
> ?#include <asm/mach/irq.h>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Add missing include of linux/ftrace.h
2011-10-01 19:04 ` Rabin Vincent
@ 2011-10-04 8:57 ` Jamie Iles
0 siblings, 0 replies; 6+ messages in thread
From: Jamie Iles @ 2011-10-04 8:57 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 02, 2011 at 12:34:45AM +0530, Rabin Vincent wrote:
> On Sat, Oct 1, 2011 at 22:42, Jamie Iles <jamie@jamieiles.com> wrote:
> > diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> > index de3dcab..61c1468 100644
> > --- a/arch/arm/kernel/irq.c
> > +++ b/arch/arm/kernel/irq.c
> > @@ -37,6 +37,7 @@
> > ?#include <linux/proc_fs.h>
> > ?#include <linux/ftrace.h>
>
> You can probably git rid of this inclusion of ftrace.h from
> here and from smp.c, because they were added only for
> __exception_irq_entry.
OK, I've updated the patch in Russell's tracker removing these includes.
Jamie
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-10-04 8:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-29 15:13 [PATCH] Add missing include of linux/ftrace.h Jamie Iles
2011-10-01 16:35 ` Russell King - ARM Linux
2011-10-01 17:12 ` Jamie Iles
2011-10-01 17:16 ` Russell King - ARM Linux
2011-10-01 19:04 ` Rabin Vincent
2011-10-04 8:57 ` Jamie Iles
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).