~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/kernel/entry_64.S

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
421
421
        std     r24,THREAD_VRSAVE(r3)
422
422
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
423
423
#endif /* CONFIG_ALTIVEC */
 
424
#ifdef CONFIG_PPC64
 
425
BEGIN_FTR_SECTION
 
426
        mfspr   r25,SPRN_DSCR
 
427
        std     r25,THREAD_DSCR(r3)
 
428
END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
 
429
#endif
424
430
        and.    r0,r0,r22
425
431
        beq+    1f
426
432
        andc    r22,r22,r0
462
468
  FTR_SECTION_ELSE_NESTED(95)
463
469
        clrrdi  r6,r8,40        /* get its 1T ESID */
464
470
        clrrdi  r9,r1,40        /* get current sp 1T ESID */
465
 
  ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_1T_SEGMENT, 95)
 
471
  ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_1T_SEGMENT, 95)
466
472
FTR_SECTION_ELSE
467
473
        b       2f
468
 
ALT_FTR_SECTION_END_IFSET(CPU_FTR_SLB)
 
474
ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_SLB)
469
475
        clrldi. r0,r6,2         /* is new ESID c00000000? */
470
476
        cmpd    cr1,r6,r9       /* or is new ESID the same as current ESID? */
471
477
        cror    eq,4*cr1+eq,eq
479
485
        li      r9,MMU_SEGSIZE_1T       /* insert B field */
480
486
        oris    r6,r6,(MMU_SEGSIZE_1T << SLBIE_SSIZE_SHIFT)@h
481
487
        rldimi  r7,r9,SLB_VSID_SSIZE_SHIFT,0
482
 
END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT)
 
488
END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
483
489
 
484
490
        /* Update the last bolted SLB.  No write barriers are needed
485
491
         * here, provided we only update the current CPU's SLB shadow
491
497
        std     r7,SLBSHADOW_STACKVSID(r9)  /* Save VSID */
492
498
        std     r0,SLBSHADOW_STACKESID(r9)  /* Save ESID */
493
499
 
494
 
        /* No need to check for CPU_FTR_NO_SLBIE_B here, since when
 
500
        /* No need to check for MMU_FTR_NO_SLBIE_B here, since when
495
501
         * we have 1TB segments, the only CPUs known to have the errata
496
502
         * only support less than 1TB of system memory and we'll never
497
503
         * actually hit this code path.
522
528
        mtspr   SPRN_VRSAVE,r0          /* if G4, restore VRSAVE reg */
523
529
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
524
530
#endif /* CONFIG_ALTIVEC */
 
531
#ifdef CONFIG_PPC64
 
532
BEGIN_FTR_SECTION
 
533
        ld      r0,THREAD_DSCR(r4)
 
534
        cmpd    r0,r25
 
535
        beq     1f
 
536
        mtspr   SPRN_DSCR,r0
 
537
1:      
 
538
END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
 
539
#endif
525
540
 
526
541
        /* r3-r13 are destroyed -- Cort */
527
542
        REST_8GPRS(14, r1)
838
853
 
839
854
_STATIC(rtas_return_loc)
840
855
        /* relocation is off at this point */
841
 
        mfspr   r4,SPRN_SPRG_PACA       /* Get PACA */
 
856
        GET_PACA(r4)
842
857
        clrldi  r4,r4,2                 /* convert to realmode address */
843
858
 
844
859
        bcl     20,31,$+4
869
884
        REST_8GPRS(14, r1)              /* Restore the non-volatiles */
870
885
        REST_10GPRS(22, r1)             /* ditto */
871
886
 
872
 
        mfspr   r13,SPRN_SPRG_PACA
 
887
        GET_PACA(r13)
873
888
 
874
889
        ld      r4,_CCR(r1)
875
890
        mtcr    r4