aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/processor_64.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/sparc/include/asm/processor_64.h
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'arch/sparc/include/asm/processor_64.h')
-rw-r--r--arch/sparc/include/asm/processor_64.h38
1 files changed, 7 insertions, 31 deletions
diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h
index cce72ce4c33..59fcebb8f44 100644
--- a/arch/sparc/include/asm/processor_64.h
+++ b/arch/sparc/include/asm/processor_64.h
@@ -18,9 +18,6 @@
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19#include <asm/page.h> 19#include <asm/page.h>
20 20
21/* Don't hold the runqueue lock over context switch */
22#define __ARCH_WANT_UNLOCKED_CTXSW
23
24/* The sparc has no problems with write protection */ 21/* The sparc has no problems with write protection */
25#define wp_works_ok 1 22#define wp_works_ok 1
26#define wp_works_ok__is_a_macro /* for versions in ksyms.c */ 23#define wp_works_ok__is_a_macro /* for versions in ksyms.c */
@@ -42,9 +39,7 @@
42#define TASK_SIZE_OF(tsk) \ 39#define TASK_SIZE_OF(tsk) \
43 (test_tsk_thread_flag(tsk,TIF_32BIT) ? \ 40 (test_tsk_thread_flag(tsk,TIF_32BIT) ? \
44 (1UL << 32UL) : ((unsigned long)-VPTE_SIZE)) 41 (1UL << 32UL) : ((unsigned long)-VPTE_SIZE))
45#define TASK_SIZE \ 42#define TASK_SIZE TASK_SIZE_OF(current)
46 (test_thread_flag(TIF_32BIT) ? \
47 (1UL << 32UL) : ((unsigned long)-VPTE_SIZE))
48#ifdef __KERNEL__ 43#ifdef __KERNEL__
49 44
50#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE) 45#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE)
@@ -94,7 +89,6 @@ struct thread_struct {
94#ifndef __ASSEMBLY__ 89#ifndef __ASSEMBLY__
95 90
96#include <linux/types.h> 91#include <linux/types.h>
97#include <asm/fpumacro.h>
98 92
99/* Return saved PC of a blocked thread. */ 93/* Return saved PC of a blocked thread. */
100struct task_struct; 94struct task_struct;
@@ -144,10 +138,6 @@ do { \
144 : \ 138 : \
145 : "r" (regs), "r" (sp - sizeof(struct reg_window) - STACK_BIAS), \ 139 : "r" (regs), "r" (sp - sizeof(struct reg_window) - STACK_BIAS), \
146 "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0]))); \ 140 "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0]))); \
147 fprs_write(0); \
148 current_thread_info()->xfsr[0] = 0; \
149 current_thread_info()->fpsaved[0] = 0; \
150 regs->tstate &= ~TSTATE_PEF; \
151} while (0) 141} while (0)
152 142
153#define start_thread32(regs, pc, sp) \ 143#define start_thread32(regs, pc, sp) \
@@ -188,37 +178,23 @@ do { \
188 : \ 178 : \
189 : "r" (regs), "r" (sp - sizeof(struct reg_window32)), \ 179 : "r" (regs), "r" (sp - sizeof(struct reg_window32)), \
190 "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0]))); \ 180 "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0]))); \
191 fprs_write(0); \
192 current_thread_info()->xfsr[0] = 0; \
193 current_thread_info()->fpsaved[0] = 0; \
194 regs->tstate &= ~TSTATE_PEF; \
195} while (0) 181} while (0)
196 182
197/* Free all resources held by a thread. */ 183/* Free all resources held by a thread. */
198#define release_thread(tsk) do { } while (0) 184#define release_thread(tsk) do { } while (0)
199 185
186/* Prepare to copy thread state - unlazy all lazy status */
187#define prepare_to_copy(tsk) do { } while (0)
188
189extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
190
200extern unsigned long get_wchan(struct task_struct *task); 191extern unsigned long get_wchan(struct task_struct *task);
201 192
202#define task_pt_regs(tsk) (task_thread_info(tsk)->kregs) 193#define task_pt_regs(tsk) (task_thread_info(tsk)->kregs)
203#define KSTK_EIP(tsk) (task_pt_regs(tsk)->tpc) 194#define KSTK_EIP(tsk) (task_pt_regs(tsk)->tpc)
204#define KSTK_ESP(tsk) (task_pt_regs(tsk)->u_regs[UREG_FP]) 195#define KSTK_ESP(tsk) (task_pt_regs(tsk)->u_regs[UREG_FP])
205 196
206/* Please see the commentary in asm/backoff.h for a description of 197#define cpu_relax() barrier()
207 * what these instructions are doing and how they have been choosen.
208 * To make a long story short, we are trying to yield the current cpu
209 * strand during busy loops.
210 */
211#define cpu_relax() asm volatile("\n99:\n\t" \
212 "rd %%ccr, %%g0\n\t" \
213 "rd %%ccr, %%g0\n\t" \
214 "rd %%ccr, %%g0\n\t" \
215 ".section .pause_3insn_patch,\"ax\"\n\t"\
216 ".word 99b\n\t" \
217 "wr %%g0, 128, %%asr27\n\t" \
218 "nop\n\t" \
219 "nop\n\t" \
220 ".previous" \
221 ::: "memory")
222 198
223/* Prefetch support. This is tuned for UltraSPARC-III and later. 199/* Prefetch support. This is tuned for UltraSPARC-III and later.
224 * UltraSPARC-I will treat these as nops, and UltraSPARC-II has 200 * UltraSPARC-I will treat these as nops, and UltraSPARC-II has