[POWERPC] [RFC] Fix 8xx tlbie definition
Josh Boyer
jwboyer at linux.vnet.ibm.com
Sat Nov 17 04:28:22 EST 2007
Git commit e701d269aa28996f3502780951fe1b12d5d66b49 introduced an incorrect
definition for _tlbie on PowerPC 8xx platforms. Only the address should be
passed to the function. This patch corrects the definition of _tlbie and the
related tlb flushing functions for 8xx.
Signed-off-by: Josh Boyer <jwboyer at linux.vnet.ibm.com>
Index: linux-2.6/include/asm-powerpc/tlbflush.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/tlbflush.h
+++ linux-2.6/include/asm-powerpc/tlbflush.h
@@ -28,19 +28,33 @@
#include <linux/mm.h>
+#if defined(CONFIG_8xx)
+/* 8xx doesn't use PID for TLB invalidates */
+extern void _tlbie(unsigned address);
+#define _tlbia() asm volatile ("tlbia; sync" : : : "memory")
+
+static inline void flush_tlb_page(struct vm_area_struct *vma,
+ unsigned long vmaddr)
+{
+ _tlbie(vmaddr);
+}
+
+static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
+ unsigned long vmaddr)
+{
+ _tlbie(vmaddr);
+}
+
+#else /* 4xx or FSL_BOOKE */
+
extern void _tlbie(unsigned long address, unsigned int pid);
-#if defined(CONFIG_40x) || defined(CONFIG_8xx)
+#if defined(CONFIG_40x)
#define _tlbia() asm volatile ("tlbia; sync" : : : "memory")
#else /* CONFIG_44x || CONFIG_FSL_BOOKE */
extern void _tlbia(void);
#endif
-static inline void flush_tlb_mm(struct mm_struct *mm)
-{
- _tlbia();
-}
-
static inline void flush_tlb_page(struct vm_area_struct *vma,
unsigned long vmaddr)
{
@@ -53,6 +67,13 @@ static inline void flush_tlb_page_nohash
_tlbie(vmaddr, vma->vm_mm->context.id);
}
+#endif /* CONFIG_8xx */
+
+static inline void flush_tlb_mm(struct mm_struct *mm)
+{
+ _tlbia();
+}
+
static inline void flush_tlb_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end)
{
More information about the Linuxppc-dev
mailing list