linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: Flush huge TLB

To: Hillf Danton <dhillf@gmail.com>
Subject: Re: [PATCH] MIPS: Flush huge TLB
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Mon, 21 Nov 2011 14:48:07 +0400
Cc: Ralf Baechle <ralf@linux-mips.org>, David Daney <david.daney@cavium.com>, "Jayachandran C." <jayachandranc@netlogicmicro.com>, linux-mips@linux-mips.org
In-reply-to: <CAJd=RBBTx8zWrFfVQGMK=aj=iPO_+i6nvqkhGDfYp_9=d1hyEw@mail.gmail.com>
References: <CAJd=RBBTx8zWrFfVQGMK=aj=iPO_+i6nvqkhGDfYp_9=d1hyEw@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
Hello.

On 18-11-2011 17:15, Hillf Danton wrote:

When flushing TLB, if @vma is backed by huge page, we could flush huge TLB,
due to that huge page is defined to be far from normal page.

Signed-off-by: Hillf Danton<dhillf@gmail.com>
---

--- a/arch/mips/mm/tlb-r4k.c    Mon May 30 21:17:04 2011
+++ b/arch/mips/mm/tlb-r4k.c    Fri Nov 18 21:13:13 2011
@@ -120,22 +120,30 @@ void local_flush_tlb_range(struct vm_are
[...]
                                write_c0_entryhi(start | newpid);
-                               start += (PAGE_SIZE<<  1);
+                               if (huge)
+                                       start += HPAGE_SIZE;
+                               else
+                                       start += (PAGE_SIZE << 1);

   Parens not needed.

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>