sh: Use correct mask when comparing PMB DATA array values
authorMatt Fleming <matt@console-pimps.org>
Sun, 25 Apr 2010 19:18:41 +0000 (20:18 +0100)
committerMatt Fleming <matt@console-pimps.org>
Sun, 25 Apr 2010 19:44:23 +0000 (20:44 +0100)
Previously we were masking the PMB DATA array values with the value of
__MEMORY_START | PMB_V, which misses some PFN bits off the mask.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
arch/sh/kernel/head_32.S

index 8c1fc9a9fab238ebe6c4f6c530c371b2888e976a..6e35f012cc0361150804c9f6084ac176c0ba75f0 100644 (file)
@@ -131,6 +131,7 @@ ENTRY(_stext)
  *     r8 = scratch register
  *     r9 = scratch register
  *     r10 = number of PMB entries we've setup
+ *     r11 = scratch register
  */
 
        mov.l   .LMMUCR, r1     /* Flush the TLB */
@@ -167,8 +168,9 @@ ENTRY(_stext)
 
 .Lvalidate_existing_mappings:
 
+       mov.l   .LPMB_DATA_MASK, r11
        mov.l   @r7, r8
-       and     r0, r8
+       and     r11, r8
        cmp/eq  r0, r8          /* Check for valid __MEMORY_START mappings */
        bt      .Lpmb_done
 
@@ -341,6 +343,7 @@ ENTRY(stack_start)
 #ifdef CONFIG_PMB
 .LPMB_ADDR:            .long   PMB_ADDR
 .LPMB_DATA:            .long   PMB_DATA
+.LPMB_DATA_MASK:       .long   PMB_PFN_MASK | PMB_V
 .LFIRST_ADDR_ENTRY:    .long   PAGE_OFFSET | PMB_V
 .LFIRST_DATA_ENTRY:    .long   __MEMORY_START | PMB_V
 .LMMUCR:               .long   MMUCR