aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/entry.S17
-rw-r--r--arch/sparc64/kernel/irq.c20
-rw-r--r--arch/sparc64/kernel/power.c2
-rw-r--r--arch/sparc64/kernel/process.c6
-rw-r--r--arch/sparc64/kernel/smp.c2
-rw-r--r--arch/sparc64/kernel/traps.c2
6 files changed, 19 insertions, 30 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index d781f10adc52..88332f00094a 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -1600,11 +1600,11 @@ sys_clone: flushw
1600 ba,pt %xcc, sparc_do_fork 1600 ba,pt %xcc, sparc_do_fork
1601 add %sp, PTREGS_OFF, %o2 1601 add %sp, PTREGS_OFF, %o2
1602ret_from_syscall: 1602ret_from_syscall:
1603 /* Clear SPARC_FLAG_NEWCHILD, switch_to leaves thread.flags in 1603 /* Clear current_thread_info()->new_child, and
1604 * %o7 for us. Check performance counter stuff too. 1604 * check performance counter stuff too.
1605 */ 1605 */
1606 andn %o7, _TIF_NEWCHILD, %l0 1606 stb %g0, [%g6 + TI_NEW_CHILD]
1607 stx %l0, [%g6 + TI_FLAGS] 1607 ldx [%g6 + TI_FLAGS], %l0
1608 call schedule_tail 1608 call schedule_tail
1609 mov %g7, %o0 1609 mov %g7, %o0
1610 andcc %l0, _TIF_PERFCTR, %g0 1610 andcc %l0, _TIF_PERFCTR, %g0
@@ -1720,12 +1720,11 @@ ret_sys_call:
1720 /* Check if force_successful_syscall_return() 1720 /* Check if force_successful_syscall_return()
1721 * was invoked. 1721 * was invoked.
1722 */ 1722 */
1723 ldx [%curptr + TI_FLAGS], %l0 1723 ldub [%curptr + TI_SYS_NOERROR], %l0
1724 andcc %l0, _TIF_SYSCALL_SUCCESS, %g0 1724 brz,pt %l0, 1f
1725 be,pt %icc, 1f 1725 nop
1726 andn %l0, _TIF_SYSCALL_SUCCESS, %l0
1727 ba,pt %xcc, 80f 1726 ba,pt %xcc, 80f
1728 stx %l0, [%curptr + TI_FLAGS] 1727 stb %g0, [%curptr + TI_SYS_NOERROR]
1729 1728
17301: 17291:
1731 cmp %o0, -ERESTART_RESTARTBLOCK 1730 cmp %o0, -ERESTART_RESTARTBLOCK
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index daa2fb93052c..c9b69167632a 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -782,8 +782,14 @@ static void distribute_irqs(void)
782} 782}
783#endif 783#endif
784 784
785struct sun5_timer {
786 u64 count0;
787 u64 limit0;
788 u64 count1;
789 u64 limit1;
790};
785 791
786struct sun5_timer *prom_timers; 792static struct sun5_timer *prom_timers;
787static u64 prom_limit0, prom_limit1; 793static u64 prom_limit0, prom_limit1;
788 794
789static void map_prom_timers(void) 795static void map_prom_timers(void)
@@ -839,18 +845,6 @@ static void kill_prom_timer(void)
839 : "g1", "g2"); 845 : "g1", "g2");
840} 846}
841 847
842void enable_prom_timer(void)
843{
844 if (!prom_timers)
845 return;
846
847 /* Set it to whatever was there before. */
848 prom_timers->limit1 = prom_limit1;
849 prom_timers->count1 = 0;
850 prom_timers->limit0 = prom_limit0;
851 prom_timers->count0 = 0;
852}
853
854void init_irqwork_curcpu(void) 848void init_irqwork_curcpu(void)
855{ 849{
856 register struct irq_work_struct *workp asm("o2"); 850 register struct irq_work_struct *workp asm("o2");
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 533104c7907d..946cee0257ea 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -69,8 +69,6 @@ void machine_power_off(void)
69 machine_halt(); 69 machine_halt();
70} 70}
71 71
72EXPORT_SYMBOL(machine_power_off);
73
74#ifdef CONFIG_PCI 72#ifdef CONFIG_PCI
75static int powerd(void *__unused) 73static int powerd(void *__unused)
76{ 74{
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index a0cd2b2494d6..07424b075938 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -124,8 +124,6 @@ void machine_halt(void)
124 panic("Halt failed!"); 124 panic("Halt failed!");
125} 125}
126 126
127EXPORT_SYMBOL(machine_halt);
128
129void machine_alt_power_off(void) 127void machine_alt_power_off(void)
130{ 128{
131 if (!serial_console && prom_palette) 129 if (!serial_console && prom_palette)
@@ -154,8 +152,6 @@ void machine_restart(char * cmd)
154 panic("Reboot failed!"); 152 panic("Reboot failed!");
155} 153}
156 154
157EXPORT_SYMBOL(machine_restart);
158
159static void show_regwindow32(struct pt_regs *regs) 155static void show_regwindow32(struct pt_regs *regs)
160{ 156{
161 struct reg_window32 __user *rw; 157 struct reg_window32 __user *rw;
@@ -621,8 +617,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
621 memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ)); 617 memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));
622 618
623 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | 619 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
624 _TIF_NEWCHILD |
625 (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT); 620 (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT);
621 t->new_child = 1;
626 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; 622 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS;
627 t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf)); 623 t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf));
628 t->fpsaved[0] = 0; 624 t->fpsaved[0] = 0;
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 7e8e2919e186..b9b42491e118 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -137,7 +137,7 @@ void __init smp_callin(void)
137 /* Clear this or we will die instantly when we 137 /* Clear this or we will die instantly when we
138 * schedule back to this idler... 138 * schedule back to this idler...
139 */ 139 */
140 clear_thread_flag(TIF_NEWCHILD); 140 current_thread_info()->new_child = 0;
141 141
142 /* Attach to the address space of init_task. */ 142 /* Attach to the address space of init_task. */
143 atomic_inc(&init_mm.mm_count); 143 atomic_inc(&init_mm.mm_count);
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index a9f4596d7c2b..100b0107c4be 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -2125,6 +2125,8 @@ void __init trap_init(void)
2125 TI_PCR != offsetof(struct thread_info, pcr_reg) || 2125 TI_PCR != offsetof(struct thread_info, pcr_reg) ||
2126 TI_CEE_STUFF != offsetof(struct thread_info, cee_stuff) || 2126 TI_CEE_STUFF != offsetof(struct thread_info, cee_stuff) ||
2127 TI_PRE_COUNT != offsetof(struct thread_info, preempt_count) || 2127 TI_PRE_COUNT != offsetof(struct thread_info, preempt_count) ||
2128 TI_NEW_CHILD != offsetof(struct thread_info, new_child) ||
2129 TI_SYS_NOERROR != offsetof(struct thread_info, syscall_noerror) ||
2128 TI_FPREGS != offsetof(struct thread_info, fpregs) || 2130 TI_FPREGS != offsetof(struct thread_info, fpregs) ||
2129 (TI_FPREGS & (64 - 1))) 2131 (TI_FPREGS & (64 - 1)))
2130 thread_info_offsets_are_bolixed_dave(); 2132 thread_info_offsets_are_bolixed_dave();