]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] SPARC64: Fix _PAGE_EXEC_4U check in sun4u I-TLB miss handler.
authorDavid Miller <davem@davemloft.net>
Thu, 7 Jun 2007 05:56:19 +0000 (22:56 -0700)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Jun 2007 18:37:13 +0000 (11:37 -0700)
It was using an immediate _PAGE_EXEC_4U value in an 'and'
instruction to perform the test.  This doesn't work because
the immediate field is signed 13-bit, this the mask being
tested against the PTE was 0x1000 sign-extended to 32-bits
instead of just plain 0x1000.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
arch/sparc64/kernel/itlb_miss.S

index ad46e2024f4b7400f1c6c44176fa3a0c7c3d970f..5a8377b54955b3ff57ff82414575a237b1c0d787 100644 (file)
 /* ITLB ** ICACHE line 2: TSB compare and TLB load     */
        bne,pn  %xcc, tsb_miss_itlb             ! Miss
         mov    FAULT_CODE_ITLB, %g3
-       andcc   %g5, _PAGE_EXEC_4U, %g0         ! Executable?
+       sethi   %hi(_PAGE_EXEC_4U), %g4
+       andcc   %g5, %g4, %g0                   ! Executable?
        be,pn   %xcc, tsb_do_fault
         nop                                    ! Delay slot, fill me
        stxa    %g5, [%g0] ASI_ITLB_DATA_IN     ! Load TLB
        retry                                   ! Trap done
-       nop
 
 /* ITLB ** ICACHE line 3:                              */
        nop