Go to the documentation of this file.
6 #ifndef __ASM_SPARC_PROCESSOR_H
7 #define __ASM_SPARC_PROCESSOR_H
13 #define current_text_addr() ({ void *pc; __asm__("sethi %%hi(1f), %0; or %0, %%lo(1f), %0;\n1:" : "=r" (pc)); pc; })
16 #include <asm/ptrace.h>
18 #include <asm/signal.h>
25 #define wp_works_ok__is_a_macro
31 #define TASK_SIZE PAGE_OFFSET
33 #define STACK_TOP (PAGE_OFFSET - PAGE_SIZE)
34 #define STACK_TOP_MAX STACK_TOP
41 unsigned long *insn_addr;
68 #define SPARC_FLAG_KTHREAD 0x1
69 #define SPARC_FLAG_UNALIGNED 0x2
71 #define INIT_THREAD { \
72 .flags = SPARC_FLAG_KTHREAD, \
73 .current_ds = KERNEL_DS, \
83 register unsigned long zero asm(
"g1");
86 regs->
pc = ((pc & (~3)) - 4);
87 regs->
npc = regs->
pc + 4;
90 __asm__ __volatile__(
"std\t%%g0, [%0 + %3 + 0x00]\n\t"
91 "std\t%%g0, [%0 + %3 + 0x08]\n\t"
92 "std\t%%g0, [%0 + %3 + 0x10]\n\t"
93 "std\t%%g0, [%0 + %3 + 0x18]\n\t"
94 "std\t%%g0, [%0 + %3 + 0x20]\n\t"
95 "std\t%%g0, [%0 + %3 + 0x28]\n\t"
96 "std\t%%g0, [%0 + %3 + 0x30]\n\t"
97 "st\t%1, [%0 + %3 + 0x38]\n\t"
98 "st\t%%g0, [%0 + %3 + 0x3c]"
103 "i" ((
const unsigned long)(&((
struct pt_regs *)0)->u_regs[0]))
108 #define release_thread(tsk) do { } while(0)
113 #define task_pt_regs(tsk) ((tsk)->thread.kregs)
114 #define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc)
115 #define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP])
121 #define cpu_relax() barrier()