This source file includes following definitions.
- start_thread
- thread_saved_pc
1
2
3
4
5
6
7 #ifndef __ASM_M68K_PROCESSOR_H
8 #define __ASM_M68K_PROCESSOR_H
9
10 #include <asm/segment.h>
11
12
13
14
15
16 #define TASK_SIZE (0xF0000000UL)
17
18
19
20
21 #define EISA_bus__is_a_macro 1
22 #define EISA_bus 0
23 #define MCA_bus__is_a_macro 1
24 #define MCA_bus 0
25
26
27
28
29 #define wp_works_ok__is_a_macro 1
30 #define wp_works_ok 1
31
32
33 #define FPSTATESIZE (216/sizeof(unsigned short))
34
35
36
37
38
39
40 struct thread_struct {
41 unsigned long ksp;
42 unsigned long usp;
43 unsigned short sr;
44 unsigned short fs;
45 unsigned long *pagedir_v;
46 unsigned long pagedir_p;
47 unsigned long crp[2];
48 unsigned long esp0;
49 unsigned long fp[8*3];
50 unsigned long fpcntl[3];
51 unsigned short fpstate[FPSTATESIZE];
52 };
53
54 #define INIT_MMAP { &init_mm, 0, 0x40000000, __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED), VM_READ | VM_WRITE | VM_EXEC }
55
56 #define INIT_TSS { \
57 sizeof(init_kernel_stack) + (long) init_kernel_stack, 0, \
58 PS_S, KERNEL_DS, \
59 NULL, 0, {0, 0}, 0 \
60 }
61
62 #define alloc_kernel_stack() get_free_page(GFP_KERNEL)
63 #define free_kernel_stack(page) free_page((page))
64
65
66
67
68 static inline void start_thread(struct pt_regs * regs, unsigned long pc,
69 unsigned long usp)
70 {
71 unsigned long nilstate = 0;
72
73
74 __asm__ __volatile__ ("frestore %0@" : : "a" (&nilstate));
75
76
77 set_fs(USER_DS);
78
79 regs->pc = pc;
80 regs->sr &= ~0x2000;
81 wrusp(usp);
82 }
83
84
85
86
87 extern inline unsigned long thread_saved_pc(struct thread_struct *t)
88 {
89 return ((unsigned long *)((struct switch_stack *)t->ksp)->a6)[1];
90 }
91
92 #endif