Go to the documentation of this file.
11 #ifndef __ASM_H8300_PROCESSOR_H
12 #define __ASM_H8300_PROCESSOR_H
18 #define current_text_addr() ({ __label__ _l; _l: &&_l;})
20 #include <linux/compiler.h>
21 #include <asm/segment.h>
23 #include <asm/ptrace.h>
24 #include <asm/current.h>
26 static inline unsigned long rdusp(
void) {
27 extern unsigned int sw_usp;
31 static inline void wrusp(
unsigned long usp) {
32 extern unsigned int sw_usp;
40 #define TASK_SIZE (0xFFFFFFFFUL)
43 #define STACK_TOP TASK_SIZE
44 #define STACK_TOP_MAX STACK_TOP
51 #define TASK_UNMAPPED_BASE 0
64 #define INIT_THREAD { \
65 .ksp = sizeof(init_stack) + (unsigned long)init_stack, \
70 .addr = (unsigned short *)-1, \
81 #if defined(__H8300H__)
82 #define start_thread(_regs, _pc, _usp) \
84 (_regs)->pc = (_pc); \
85 (_regs)->ccr = 0x00; \
86 (_regs)->er5 = current->mm->start_data; \
87 wrusp((unsigned long)(_usp) - sizeof(unsigned long)*3); \
90 #if defined(__H8300S__)
91 #define start_thread(_regs, _pc, _usp) \
93 (_regs)->pc = (_pc); \
94 (_regs)->ccr = 0x00; \
95 (_regs)->exr = 0x78; \
96 (_regs)->er5 = current->mm->start_data; \
98 wrusp(((unsigned long)(_usp)) - 14); \
125 #define KSTK_EIP(tsk) \
127 unsigned long eip = 0; \
128 if ((tsk)->thread.esp0 > PAGE_SIZE && \
129 MAP_NR((tsk)->thread.esp0) < max_mapnr) \
130 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
132 #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
134 #define cpu_relax() barrier()
136 #define HARD_RESET_NOW() ({ \
137 local_irq_disable(); \