Merge remote-tracking branch 'lsk/v3.10/topic/arm64-misc' into linux-linaro-lsk
authorMark Brown <broonie@linaro.org>
Tue, 20 May 2014 16:21:25 +0000 (17:21 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 20 May 2014 16:21:25 +0000 (17:21 +0100)
1  2 
arch/arm64/mm/cache.S
arch/arm64/mm/proc.S

Simple merge
index bed1f1de1caf07139e04ba52a6e7e2a0212e96ac,9ef7633a8eb964d5315702703eae98febe1ec5f5..1333e6f9a8e50bd7e8996a67a392feaa4aaf95e0
@@@ -80,77 -80,8 +80,77 @@@ ENTRY(cpu_do_idle
        ret
  ENDPROC(cpu_do_idle)
  
 +#ifdef CONFIG_ARM64_CPU_SUSPEND
 +/**
 + * cpu_do_suspend - save CPU registers context
 + *
 + * x0: virtual address of context pointer
 + */
 +ENTRY(cpu_do_suspend)
 +      mrs     x2, tpidr_el0
 +      mrs     x3, tpidrro_el0
 +      mrs     x4, contextidr_el1
 +      mrs     x5, mair_el1
 +      mrs     x6, cpacr_el1
 +      mrs     x7, ttbr1_el1
 +      mrs     x8, tcr_el1
 +      mrs     x9, vbar_el1
 +      mrs     x10, mdscr_el1
 +      mrs     x11, oslsr_el1
 +      mrs     x12, sctlr_el1
 +      stp     x2, x3, [x0]
 +      stp     x4, x5, [x0, #16]
 +      stp     x6, x7, [x0, #32]
 +      stp     x8, x9, [x0, #48]
 +      stp     x10, x11, [x0, #64]
 +      str     x12, [x0, #80]
 +      ret
 +ENDPROC(cpu_do_suspend)
 +
 +/**
 + * cpu_do_resume - restore CPU register context
 + *
 + * x0: Physical address of context pointer
 + * x1: ttbr0_el1 to be restored
 + *
 + * Returns:
 + *    sctlr_el1 value in x0
 + */
 +ENTRY(cpu_do_resume)
 +      /*
 +       * Invalidate local tlb entries before turning on MMU
 +       */
 +      tlbi    vmalle1
 +      ldp     x2, x3, [x0]
 +      ldp     x4, x5, [x0, #16]
 +      ldp     x6, x7, [x0, #32]
 +      ldp     x8, x9, [x0, #48]
 +      ldp     x10, x11, [x0, #64]
 +      ldr     x12, [x0, #80]
 +      msr     tpidr_el0, x2
 +      msr     tpidrro_el0, x3
 +      msr     contextidr_el1, x4
 +      msr     mair_el1, x5
 +      msr     cpacr_el1, x6
 +      msr     ttbr0_el1, x1
 +      msr     ttbr1_el1, x7
 +      msr     tcr_el1, x8
 +      msr     vbar_el1, x9
 +      msr     mdscr_el1, x10
 +      /*
 +       * Restore oslsr_el1 by writing oslar_el1
 +       */
 +      ubfx    x11, x11, #1, #1
 +      msr     oslar_el1, x11
 +      mov     x0, x12
 +      dsb     nsh             // Make sure local tlb invalidation completed
 +      isb
 +      ret
 +ENDPROC(cpu_do_resume)
 +#endif
 +
  /*
-  *    cpu_switch_mm(pgd_phys, tsk)
+  *    cpu_do_switch_mm(pgd_phys, tsk)
   *
   *    Set the translation table base pointer to be pgd_phys.
   *