Add missing include of linux/ftrace.h
Subsystems (3)
PATCH 1/1 Add missing include of linux/ftrace.h
__exception_irq_entry uses __irq_entry which is defined in linux/ftrace.h.
--- arch/arm/include/asm/system.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/system.h +1 -0
@@ -59,6 +59,7 @@#include <linux/linkage.h> #include <linux/irqflags.h> +#include <linux/ftrace.h> #include <asm/outercache.h>
Signature · 1 line
1.7.4.1
PATCH 1/1 Add missing include of linux/ftrace.h
Quoted 6 lines · Jamie Iles
__exception_irq_entryuses__irq_entrywhich is defined inlinux/ftrace.h.Reported-by Zoltan Devai <[email protected]>Cc Rabin Vincent <[email protected]>Signed-off-by Jamie Iles <[email protected]>
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.
PATCH 1/1 Add missing include of linux/ftrace.h
Quoted 8 lines · Russell King - ARM Linux
Quoted 6 lines · Jamie Iles
__exception_irq_entryuses__irq_entrywhich is defined inlinux/ftrace.h.Reported-by Zoltan Devai <[email protected]>Cc Rabin Vincent <[email protected]>Signed-off-by Jamie Iles <[email protected]>
Quoted 7 lines
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.hThis 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 <[email protected]>
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.
--- 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
arch/arm/include/asm/exception.h new file +13 -0
@@ -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 */
arch/arm/include/asm/system.h +0 -7
@@ -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 ;
arch/arm/kernel/irq.c +1 -0
@@ -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>
arch/arm/kernel/smp.c +1 -0
@@ -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>
arch/arm/kernel/traps.c +1 -0
@@ -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>
arch/arm/mach-pxa/irq.c +2 -0
@@ -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>
arch/arm/mm/fault.c +1 -0
@@ -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>
Signature · 1 line
1.7.4.1
PATCH 1/1 Add missing include of linux/ftrace.h
Quoted 11 lines · Jamie Iles
Quoted 10 lines · Russell King - ARM Linux
Quoted 6 lines · Jamie Iles
__exception_irq_entryuses__irq_entrywhich is defined inlinux/ftrace.h.Reported-by Zoltan Devai <[email protected]>Cc Rabin Vincent <[email protected]>Signed-off-by Jamie Iles <[email protected]>This introduces a circular dependency:
Quoted 8 lines
Quoted 5 lines
linux/ftrace.h->linux/kallsyms.h->linux/kernel.h->linux/bitops.h
->asm/bitops.h->asm/system.h->linux/ftrace.hThis 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_entryincludelinux/ftrace.his 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.
PATCH 1/1 Add missing include of linux/ftrace.h
In reply to Jamie IlesQuoted 7 lines · Jamie Iles
arch/arm/kernel/irq.c +0
-0@@ -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.
Quoted 5 lines
+#include <
asm/exception.h>
?#include <asm/system.h>
?#include <asm/mach/arch.h>
?#include <asm/mach/irq.h>
PATCH 1/1 Add missing include of linux/ftrace.h
Quoted 12 lines · Rabin Vincent
Quoted 7 lines · Jamie Iles
arch/arm/kernel/irq.c +0
-0@@ -37,6 +37,7 @@?#include <
linux/proc_fs.h>
?#include <linux/ftrace.h>You can probably git rid of this inclusion of
ftrace.hfrom here and fromsmp.c, because they were added only for__exception_irq_entry.
OK, I've updated the patch in Russell's tracker removing these includes.
Jamie