]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc/book3e: Fix check for linear mapping in TLB miss handler
authorBenjamin Krill <ben@codiert.org>
Thu, 27 Feb 2014 14:49:21 +0000 (15:49 +0100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 7 Mar 2014 04:54:51 +0000 (15:54 +1100)
The previous code added wrong TLBs and causes machine check errors if
a driver accessed passed the end of the linear mapping instead of
a clean page fault.

Signed-off-by: Ralph E. Bellofatto <ralphbel@us.ibm.com>
Signed-off-by: Benjamin Krill <ben@codiert.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/tlb_low_64e.S

index c95eb323e9ae5ac8e07feb28c024127266e405a8..6bf50507a4b5a40c42e5a2373f6e8d7a684f3fc0 100644 (file)
@@ -1091,7 +1091,8 @@ tlb_load_linear:
        ld      r11,PACATOC(r13)
        ld      r11,linear_map_top@got(r11)
        ld      r10,0(r11)
-       cmpld   cr0,r10,r16
+       tovirt(10,10)
+       cmpld   cr0,r16,r10
        bge     tlb_load_linear_fault
 
        /* MAS1 need whole new setup. */