summaryrefslogtreecommitdiff
path: root/target/linux/coldfire/files-2.6.31/arch/m68k/include/asm/cf_tlbflush.h
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2010-11-22 13:29:58 +0000
committerImre Kaloz <kaloz@openwrt.org>2010-11-22 13:29:58 +0000
commitd066a4c712aae3cd1aaa5108f7cd2cae81c6343b (patch)
treec3a6c6cc30b40836df27cf3153582255d11fc161 /target/linux/coldfire/files-2.6.31/arch/m68k/include/asm/cf_tlbflush.h
parentdb689e1d5c4cd828ee29aebe03145c00759b5dd4 (diff)
downloadmtk-20170518-d066a4c712aae3cd1aaa5108f7cd2cae81c6343b.zip
mtk-20170518-d066a4c712aae3cd1aaa5108f7cd2cae81c6343b.tar.gz
mtk-20170518-d066a4c712aae3cd1aaa5108f7cd2cae81c6343b.tar.bz2
2.6.31 support (WiP)
SVN-Revision: 24087
Diffstat (limited to 'target/linux/coldfire/files-2.6.31/arch/m68k/include/asm/cf_tlbflush.h')
-rw-r--r--target/linux/coldfire/files-2.6.31/arch/m68k/include/asm/cf_tlbflush.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/coldfire/files-2.6.31/arch/m68k/include/asm/cf_tlbflush.h b/target/linux/coldfire/files-2.6.31/arch/m68k/include/asm/cf_tlbflush.h
new file mode 100644
index 0000000..ae253d4
--- /dev/null
+++ b/target/linux/coldfire/files-2.6.31/arch/m68k/include/asm/cf_tlbflush.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007-2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+#ifndef M68K_CF_TLBFLUSH_H
+#define M68K_CF_TLBFLUSH_H
+
+#include <asm/coldfire.h>
+
+/* Flush all userspace mappings. */
+static inline void flush_tlb_all(void)
+{
+ preempt_disable();
+ *MMUOR = MMUOR_CNL;
+ preempt_enable();
+}
+
+/* Clear user TLB entries within the context named in mm */
+static inline void flush_tlb_mm(struct mm_struct *mm)
+{
+ preempt_disable();
+ *MMUOR = MMUOR_CNL;
+ preempt_enable();
+}
+
+/* Flush a single TLB page. */
+static inline void flush_tlb_page(struct vm_area_struct *vma,
+ unsigned long addr)
+{
+ preempt_disable();
+ *MMUOR = MMUOR_CNL;
+ preempt_enable();
+}
+/* Flush a range of pages from TLB. */
+
+static inline void flush_tlb_range(struct mm_struct *mm,
+ unsigned long start, unsigned long end)
+{
+ preempt_disable();
+ *MMUOR = MMUOR_CNL;
+ preempt_enable();
+}
+
+/* Flush kernel page from TLB. */
+static inline void flush_tlb_kernel_page(void *addr)
+{
+ preempt_disable();
+ *MMUOR = MMUOR_CNL;
+ preempt_enable();
+}
+
+static inline void flush_tlb_kernel_range(unsigned long start,
+ unsigned long end)
+{
+ flush_tlb_all();
+}
+
+extern inline void flush_tlb_pgtables(struct mm_struct *mm,
+ unsigned long start, unsigned long end)
+{
+}
+
+#endif /* M68K_CF_TLBFLUSH_H */