linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: vitb@kernel.crashing.org, benh@kernel.crashing.org
Cc: linuxppc-dev@ozlabs.org
Subject: [POWERPC] [RFC] Fix 8xx tlbie definition
Date: Fri, 16 Nov 2007 11:28:22 -0600	[thread overview]
Message-ID: <20071116112822.37a238c0@weaponx> (raw)

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@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)
 {

             reply	other threads:[~2007-11-16 17:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-16 17:28 Josh Boyer [this message]
2007-11-16 21:06 ` [POWERPC] [RFC] Fix 8xx tlbie definition Benjamin Herrenschmidt
2007-11-16 21:29   ` Kumar Gala
2007-11-16 22:28   ` Vitaly Bordug
2007-11-17  1:05     ` Benjamin Herrenschmidt
2007-11-17 17:06       ` Josh Boyer
2007-11-18 16:51         ` Kumar Gala

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=20071116112822.37a238c0@weaponx \
    --to=jwboyer@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=vitb@kernel.crashing.org \
    /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;
as well as URLs for NNTP newsgroup(s).