1
2
3
4
5
6
7
8
9#ifndef _ASM_PROCESSOR_H
10#define _ASM_PROCESSOR_H
11
12#include <asm/isadep.h>
13
14#include <asm/cachectl.h>
15#include <asm/mipsregs.h>
16#include <asm/reg.h>
17#include <asm/system.h>
18
19
20
21
22#define current_text_addr() ({ __label__ _l; _l: &&_l;})
23
24
25
26
27extern void (*cpu_wait)(void);
28
29extern unsigned int vced_count, vcei_count;
30
31#define NUM_FPU_REGS 32
32
33typedef __u64 fpureg_t;
34
35
36
37
38
39
40
41
42struct mips_fpu_struct {
43 fpureg_t fpr[NUM_FPU_REGS];
44 unsigned int fcr31;
45};
46
47#define NUM_DSP_REGS 6
48
49typedef __u32 dspreg_t;
50
51struct mips_dsp_state {
52 dspreg_t dspr[NUM_DSP_REGS];
53 unsigned int dspcontrol;
54};
55
56typedef struct {
57 unsigned long seg;
58} mm_segment_t;
59
60#define ARCH_MIN_TASKALIGN 8
61
62struct mips_abi;
63
64
65
66
67struct thread_struct {
68
69 unsigned long reg16;
70 unsigned long reg17, reg18, reg19, reg20, reg21, reg22, reg23;
71 unsigned long reg29, reg30, reg31;
72
73
74 unsigned long cp0_status;
75
76
77 struct mips_fpu_struct fpu;
78#ifdef CONFIG_MIPS_MT_FPAFF
79
80 unsigned long emulated_fp;
81
82 cpumask_t user_cpus_allowed;
83#endif
84
85
86 struct mips_dsp_state dsp;
87
88
89 unsigned long cp0_badvaddr;
90 unsigned long cp0_baduaddr;
91 unsigned long error_code;
92 unsigned long trap_no;
93 unsigned long irix_trampoline;
94 unsigned long irix_oldctx;
95 struct mips_abi *abi;
96};
97
98struct task_struct;
99
100
101#define release_thread(thread) do { } while(0)
102
103
104#define prepare_to_copy(tsk) do { } while (0)
105
106#define cpu_relax() barrier()
107
108
109
110
111
112
113
114
115
116
117
118
119
120#define return_address() ({__asm__ __volatile__("":::"$31");__builtin_return_address(0);})
121
122#ifdef CONFIG_CPU_HAS_PREFETCH
123
124#define ARCH_HAS_PREFETCH
125
126static inline void prefetch(const void *addr)
127{
128 __asm__ __volatile__(
129 " .set mips4 \n"
130 " pref %0, (%1) \n"
131 " .set mips0 \n"
132 :
133 : "i" (Pref_Load), "r" (addr));
134}
135
136#endif
137
138#endif
139