From: Tzu-Jung Lee <roylee17@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: rmk+kernel@arm.linux.org.uk, Tzu-Jung Lee <tjlee@ambarella.com>
Subject: [PATCH] ARM: tlb: Compile out MULTI_TLB specific code when MULTI_TLB is undefined
Date: Sat, 17 Sep 2011 00:31:06 +0800 [thread overview]
Message-ID: <1316190666-18905-1-git-send-email-tjlee@ambarella.com> (raw)
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
next reply other threads:[~2011-09-16 16:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 16:31 Tzu-Jung Lee [this message]
2011-09-16 20:00 ` Russell King
2011-09-17 3:19 ` Tzu-Jung Lee
2011-09-17 8:58 ` Russell King
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=1316190666-18905-1-git-send-email-tjlee@ambarella.com \
--to=roylee17@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=tjlee@ambarella.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
all inboxes | Powered by JetHome®