]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/kernel/entry.S
[SPARC64]: Call real_setup_per_cpu_areas() earlier and use lmb_alloc().
[linux-2.6-omap-h63xx.git] / arch / sparc64 / kernel / entry.S
index c9b0d7af64ae217897c9fff0d5c94576619f7a69..fb43c76bdc261b5be56428305d8192f8e1a03504 100644 (file)
@@ -1353,63 +1353,6 @@ breakpoint_trap:
        ba,pt           %xcc, rtrap
         nop
 
-#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
-    defined(CONFIG_SOLARIS_EMUL_MODULE)
-       /* SunOS uses syscall zero as the 'indirect syscall' it looks
-        * like indir_syscall(scall_num, arg0, arg1, arg2...);  etc.
-        * This is complete brain damage.
-        */
-       .globl  sunos_indir
-sunos_indir:
-       srl             %o0, 0, %o0
-       mov             %o7, %l4
-       cmp             %o0, NR_SYSCALLS
-       blu,a,pt        %icc, 1f
-        sll            %o0, 0x2, %o0
-       sethi           %hi(sunos_nosys), %l6
-       b,pt            %xcc, 2f
-        or             %l6, %lo(sunos_nosys), %l6
-1:     sethi           %hi(sunos_sys_table), %l7
-       or              %l7, %lo(sunos_sys_table), %l7
-       lduw            [%l7 + %o0], %l6
-2:     mov             %o1, %o0
-       mov             %o2, %o1
-       mov             %o3, %o2
-       mov             %o4, %o3
-       mov             %o5, %o4
-       call            %l6
-        mov            %l4, %o7
-
-       .globl  sunos_getpid
-sunos_getpid:
-       call    sys_getppid
-        nop
-       call    sys_getpid
-        stx    %o0, [%sp + PTREGS_OFF + PT_V9_I1]
-       b,pt    %xcc, ret_sys_call
-        stx    %o0, [%sp + PTREGS_OFF + PT_V9_I0]
-
-       /* SunOS getuid() returns uid in %o0 and euid in %o1 */
-       .globl  sunos_getuid
-sunos_getuid:
-       call    sys32_geteuid16
-        nop
-       call    sys32_getuid16
-        stx    %o0, [%sp + PTREGS_OFF + PT_V9_I1]
-       b,pt    %xcc, ret_sys_call
-        stx    %o0, [%sp + PTREGS_OFF + PT_V9_I0]
-
-       /* SunOS getgid() returns gid in %o0 and egid in %o1 */
-       .globl  sunos_getgid
-sunos_getgid:
-       call    sys32_getegid16
-        nop
-       call    sys32_getgid16
-        stx    %o0, [%sp + PTREGS_OFF + PT_V9_I1]
-       b,pt    %xcc, ret_sys_call
-        stx    %o0, [%sp + PTREGS_OFF + PT_V9_I0]
-#endif
-
        /* SunOS's execv() call only specifies the argv argument, the
         * environment settings are the same as the calling processes.
         */
@@ -1477,10 +1420,6 @@ sys32_rt_sigreturn:
                 add            %o7, 1f-.-4, %o7
                nop
 #endif
-sys_ptrace:    add             %sp, PTREGS_OFF, %o0
-               call            do_ptrace
-                add            %o7, 1f-.-4, %o7
-               nop
                .align          32
 1:             ldx             [%curptr + TI_FLAGS], %l5
                andcc           %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0
@@ -1595,7 +1534,7 @@ linux_syscall_trace:
         mov            %i4, %o4
 
 
-       /* Linux 32-bit and SunOS system calls enter here... */
+       /* Linux 32-bit system calls enter here... */
        .align  32
        .globl  linux_sparc_syscall32
 linux_sparc_syscall32:
@@ -1618,7 +1557,7 @@ linux_sparc_syscall32:
         srl            %i3, 0, %o3                             ! IEU0
        ba,a,pt         %xcc, 3f
 
-       /* Linux native and SunOS system calls enter here... */
+       /* Linux native system calls enter here... */
        .align  32
        .globl  linux_sparc_syscall, ret_sys_call
 linux_sparc_syscall:
@@ -1709,6 +1648,36 @@ __flushw_user:
 2:     retl
         nop
 
+       /* Flush %fp and %i7 to the stack for all register
+        * windows active inside of the cpu.  This allows
+        * show_stack_trace() to avoid using an expensive
+        * 'flushw'.
+        */
+       .globl          stack_trace_flush
+       .type           stack_trace_flush,#function
+stack_trace_flush:
+       rdpr            %pstate, %o0
+       wrpr            %o0, PSTATE_IE, %pstate
+
+       rdpr            %cwp, %g1
+       rdpr            %canrestore, %g2
+       sub             %g1, 1, %g3
+
+1:     brz,pn          %g2, 2f
+        sub            %g2, 1, %g2
+       wrpr            %g3, %cwp
+       stx             %fp, [%sp + STACK_BIAS + RW_V9_I6]
+       stx             %i7, [%sp + STACK_BIAS + RW_V9_I7]
+       ba,pt           %xcc, 1b
+        sub            %g3, 1, %g3
+
+2:     wrpr            %g1, %cwp
+       wrpr            %o0, %pstate
+
+       retl
+        nop
+       .size           stack_trace_flush,.-stack_trace_flush
+
 #ifdef CONFIG_SMP
        .globl          hard_smp_processor_id
 hard_smp_processor_id:
@@ -2593,3 +2562,15 @@ sun4v_mmustat_info:
        retl
         nop
        .size   sun4v_mmustat_info, .-sun4v_mmustat_info
+
+       .globl  sun4v_mmu_demap_all
+       .type   sun4v_mmu_demap_all,#function
+sun4v_mmu_demap_all:
+       clr     %o0
+       clr     %o1
+       mov     HV_MMU_ALL, %o2
+       mov     HV_FAST_MMU_DEMAP_ALL, %o5
+       ta      HV_FAST_TRAP
+       retl
+        nop
+       .size   sun4v_mmu_demap_all, .-sun4v_mmu_demap_all