* [PATCH] ARM: tlb: Compile out MULTI_TLB specific code when MULTI_TLB is undefined
@ 2011-09-16 16:31 Tzu-Jung Lee
2011-09-16 20:00 ` Russell King
0 siblings, 1 reply; 4+ messages in thread
From: Tzu-Jung Lee @ 2011-09-16 16:31 UTC (permalink / raw)
To: linux-kernel; +Cc: rmk+kernel, Tzu-Jung Lee
To eliminate the 'undefined cpu_tlb' errors when the kernel is built with -O0
Change-Id: Ie5afea022b30dbe23a7ee3f3fc6af0dd6479b980
Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
index d2005de..a3f7aea 100644
--- a/arch/arm/include/asm/tlbflush.h
+++ b/arch/arm/include/asm/tlbflush.h
@@ -230,23 +230,22 @@ struct cpu_tlb_fns {
*/
#ifdef MULTI_TLB
+extern struct cpu_tlb_fns cpu_tlb;
#define __cpu_flush_user_tlb_range cpu_tlb.flush_user_range
#define __cpu_flush_kern_tlb_range cpu_tlb.flush_kern_range
+#define __cpu_tlb_flags cpu_tlb.tlb_flags
#else
#define __cpu_flush_user_tlb_range __glue(_TLB,_flush_user_tlb_range)
#define __cpu_flush_kern_tlb_range __glue(_TLB,_flush_kern_tlb_range)
+#define __cpu_tlb_flags 0
extern void __cpu_flush_user_tlb_range(unsigned long, unsigned long, struct vm_area_struct *);
extern void __cpu_flush_kern_tlb_range(unsigned long, unsigned long);
#endif
-extern struct cpu_tlb_fns cpu_tlb;
-
-#define __cpu_tlb_flags cpu_tlb.tlb_flags
-
/*
* TLB Management
* ==============
--
1.7.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ARM: tlb: Compile out MULTI_TLB specific code when MULTI_TLB is undefined
2011-09-16 16:31 [PATCH] ARM: tlb: Compile out MULTI_TLB specific code when MULTI_TLB is undefined Tzu-Jung Lee
@ 2011-09-16 20:00 ` Russell King
2011-09-17 3:19 ` Tzu-Jung Lee
0 siblings, 1 reply; 4+ messages in thread
From: Russell King @ 2011-09-16 20:00 UTC (permalink / raw)
To: Tzu-Jung Lee; +Cc: linux-kernel, Tzu-Jung Lee
On Sat, Sep 17, 2011 at 12:31:06AM +0800, Tzu-Jung Lee wrote:
> To eliminate the 'undefined cpu_tlb' errors when the kernel is built with -O0
The kernel requires to be built with optimization in many places, and so
this is an option we don't support.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: tlb: Compile out MULTI_TLB specific code when MULTI_TLB is undefined
2011-09-16 20:00 ` Russell King
@ 2011-09-17 3:19 ` Tzu-Jung Lee
2011-09-17 8:58 ` Russell King
0 siblings, 1 reply; 4+ messages in thread
From: Tzu-Jung Lee @ 2011-09-17 3:19 UTC (permalink / raw)
To: Russell King; +Cc: linux-kernel, Tzu-Jung Lee
On Sat, Sep 17, 2011 at 4:00 AM, Russell King <rmk@arm.linux.org.uk> wrote:
> On Sat, Sep 17, 2011 at 12:31:06AM +0800, Tzu-Jung Lee wrote:
>> To eliminate the 'undefined cpu_tlb' errors when the kernel is built with -O0
>
> The kernel requires to be built with optimization in many places, and so
> this is an option we don't support.
>
> --
> Russell King
> Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
> maintainer of:
>
Hi Russell,
Indeed, this is only one of the places where we used to particularly
build with higher optimization level. More than often, we only disable
the optimization for interested object files with CFLAGS_foo.o += -g
-O0. While porting kernel to different platforms, however, failures at
the early booting stage usually makes low level
initialization(mm/tlb/cache/cpu...) become the objects that we want to
disable the optimization for the ease of diagnostic with source level
debugger. In this cases, patches to the source code become required to
get the -O0 work for them. Would you consider to have these patches
merged if they doesn't have side effect.
Thanks,
Roy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: tlb: Compile out MULTI_TLB specific code when MULTI_TLB is undefined
2011-09-17 3:19 ` Tzu-Jung Lee
@ 2011-09-17 8:58 ` Russell King
0 siblings, 0 replies; 4+ messages in thread
From: Russell King @ 2011-09-17 8:58 UTC (permalink / raw)
To: Tzu-Jung Lee; +Cc: linux-kernel, Tzu-Jung Lee
On Sat, Sep 17, 2011 at 11:19:02AM +0800, Tzu-Jung Lee wrote:
> Indeed, this is only one of the places where we used to particularly
> build with higher optimization level. More than often, we only disable
> the optimization for interested object files with CFLAGS_foo.o += -g
> -O0. While porting kernel to different platforms, however, failures at
> the early booting stage usually makes low level
> initialization(mm/tlb/cache/cpu...) become the objects that we want to
> disable the optimization for the ease of diagnostic with source level
> debugger. In this cases, patches to the source code become required to
> get the -O0 work for them. Would you consider to have these patches
> merged if they doesn't have side effect.
We've gone some 17 or so years without needing -O0 to debug the kernel.
Why has it now become necessary?
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-17 8:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-16 16:31 [PATCH] ARM: tlb: Compile out MULTI_TLB specific code when MULTI_TLB is undefined Tzu-Jung Lee
2011-09-16 20:00 ` Russell King
2011-09-17 3:19 ` Tzu-Jung Lee
2011-09-17 8:58 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox