linux-mips
[Top] [All Lists]

Re: mips64 LOAD_KPTE2 fix

To: macro@ds2.pg.gda.pl
Subject: Re: mips64 LOAD_KPTE2 fix
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Wed, 04 Jun 2003 10:02:04 +0900 (JST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <Pine.GSO.3.96.1030603141712.29576C-100000@delta.ds2.pg.gda.pl>
Organization: TOSHIBA Personal Computer System Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030602.202345.08315331.nemoto@toshiba-tops.co.jp> <Pine.GSO.3.96.1030603141712.29576C-100000@delta.ds2.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
>>>>> On Tue, 3 Jun 2003 14:58:44 +0200 (MET DST), "Maciej W. Rozycki" 
>>>>> <macro@ds2.pg.gda.pl> said:
macro>  I don't think a separate overflow check is needed, even I see
macro> how the code can fail for large offsets into XKSEG.  How about
macro> this patch?  Does it work for you?  It would not incur
macro> unnecessary overhead.

macro> diff -up --recursive --new-file 
linux-mips-2.4.21-pre4-20030505.macro/arch/mips64/mm/tlbex-r4k.S 
linux-mips-2.4.21-pre4-20030505/arch/mips64/mm/tlbex-r4k.S
macro> --- linux-mips-2.4.21-pre4-20030505.macro/arch/mips64/mm/tlbex-r4k.S     
2003-04-27 02:56:39.000000000 +0000
macro> +++ linux-mips-2.4.21-pre4-20030505/arch/mips64/mm/tlbex-r4k.S   
2003-06-03 12:54:41.000000000 +0000
macro> @@ -73,8 +73,9 @@
macro>           * Determine that fault address is within vmalloc range.
macro>           */
macro>          dla     \tmp, ekptbl
macro> -        sltu    \tmp, \ptr, \tmp
macro> +        slt     \tmp, \ptr, \tmp
macro>          beqz    \tmp, \not_vmalloc              # not vmalloc
macro> +         nop
macro>          .endm


Thank you for pointing out this.  I did not think very much.  But you
mean "slt \tmp, \tmp, \ptr", don't you?

diff -u linux-mips-cvs/arch/mips64/mm/tlbex-r4k.S 
linux.new/arch/mips64/mm/tlbex-r4k.S
--- linux-mips-cvs/arch/mips64/mm/tlbex-r4k.S   Mon Apr 28 09:44:54 2003
+++ linux.new/arch/mips64/mm/tlbex-r4k.S        Wed Jun  4 09:45:48 2003
@@ -73,8 +73,9 @@
         * Determine that fault address is within vmalloc range.
         */
        dla     \tmp, ekptbl
-       sltu    \tmp, \ptr, \tmp
+       slt     \tmp, \tmp, \ptr
        beqz    \tmp, \not_vmalloc              # not vmalloc
+        nop
        .endm
 
 
---
Atsushi Nemoto

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