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

« back to all changes in this revision

Viewing changes to arch/sparc/kernel/head_32.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:
810
810
got_prop:
811
811
#ifdef CONFIG_SPARC_LEON
812
812
                /* no cpu-type check is needed, it is a SPARC-LEON */
 
813
 
 
814
                sethi   %hi(boot_cpu_id), %g2   ! boot-cpu index
 
815
 
813
816
#ifdef CONFIG_SMP
814
 
                ba leon_smp_init
815
 
                 nop
816
 
 
817
 
                .global leon_smp_init
818
 
leon_smp_init:
819
 
                sethi   %hi(boot_cpu_id), %g1    ! master always 0
820
 
                stb     %g0, [%g1 + %lo(boot_cpu_id)]
821
 
                sethi   %hi(boot_cpu_id4), %g1   ! master always 0
822
 
                stb     %g0, [%g1 + %lo(boot_cpu_id4)]
823
 
 
824
 
                rd     %asr17,%g1
825
 
                srl    %g1,28,%g1
826
 
 
827
 
                cmp %g0,%g1
828
 
                 beq sun4c_continue_boot         !continue with master
829
 
                nop
830
 
 
831
 
                ba leon_smp_cpu_startup
832
 
                 nop
833
 
#else
 
817
                ldub    [%g2 + %lo(boot_cpu_id)], %g1
 
818
                cmp     %g1, 0xff               ! unset means first CPU
 
819
                bne     leon_smp_cpu_startup    ! continue only with master
 
820
                 nop
 
821
#endif
 
822
                /* Get CPU-ID from most significant 4-bit of ASR17 */
 
823
                rd     %asr17, %g1
 
824
                srl    %g1, 28, %g1
 
825
 
 
826
                /* Update boot_cpu_id only on boot cpu */
 
827
                stub    %g1, [%g2 + %lo(boot_cpu_id)]
 
828
 
834
829
                ba sun4c_continue_boot
835
830
                 nop
836
831
#endif
837
 
#endif
838
832
                set     cputypval, %o2
839
833
                ldub    [%o2 + 0x4], %l1
840
834
 
893
887
        sta     %g4, [%g0] ASI_M_VIKING_TMP1
894
888
        sethi   %hi(boot_cpu_id), %g5
895
889
        stb     %g4, [%g5 + %lo(boot_cpu_id)]
896
 
        sll     %g4, 2, %g4
897
 
        sethi   %hi(boot_cpu_id4), %g5
898
 
        stb     %g4, [%g5 + %lo(boot_cpu_id4)]
899
890
#endif
900
891
 
901
892
        /* Fall through to sun4m_init */
1024
1015
                bl      1b
1025
1016
                 add    %o0, 0x1, %o0
1026
1017
 
 
1018
                /* If boot_cpu_id has not been setup by machine specific
 
1019
                 * init-code above we default it to zero.
 
1020
                 */
 
1021
                sethi   %hi(boot_cpu_id), %g2
 
1022
                ldub    [%g2 + %lo(boot_cpu_id)], %g3
 
1023
                cmp     %g3, 0xff
 
1024
                bne     1f
 
1025
                 nop
 
1026
                mov     %g0, %g3
 
1027
                stub    %g3, [%g2 + %lo(boot_cpu_id)]
 
1028
 
 
1029
1:              /* boot_cpu_id set. calculate boot_cpu_id4 = boot_cpu_id*4 */
 
1030
                sll     %g3, 2, %g3
 
1031
                sethi   %hi(boot_cpu_id4), %g2
 
1032
                stub    %g3, [%g2 + %lo(boot_cpu_id4)]
 
1033
 
1027
1034
                /* Initialize the uwinmask value for init task just in case.
1028
1035
                 * But first make current_set[boot_cpu_id] point to something useful.
1029
1036
                 */
1030
1037
                set     init_thread_union, %g6
1031
1038
                set     current_set, %g2
1032
1039
#ifdef CONFIG_SMP
1033
 
                sethi   %hi(boot_cpu_id4), %g3
1034
 
                ldub    [%g3 + %lo(boot_cpu_id4)], %g3
1035
1040
                st      %g6, [%g2]
1036
1041
                add     %g2, %g3, %g2
1037
1042
#endif