MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / include / asm-arm / proc-fns.h
blob7a9c54ef505bc40ea5020731e521c639ef08ef49
1 /*
2 * linux/include/asm-arm/proc-fns.h
4 * Copyright (C) 1997-1999 Russell King
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 #ifndef __ASM_PROCFNS_H
12 #define __ASM_PROCFNS_H
14 #ifdef __KERNEL__
16 #include <linux/config.h>
19 * Work out if we need multiple CPU support
21 #undef MULTI_CPU
22 #undef CPU_NAME
25 * CPU_NAME - the prefix for CPU related functions
28 #ifdef CONFIG_CPU_32
29 # ifdef CONFIG_CPU_ARM610
30 # ifdef CPU_NAME
31 # undef MULTI_CPU
32 # define MULTI_CPU
33 # else
34 # define CPU_NAME cpu_arm6
35 # endif
36 # endif
37 # ifdef CONFIG_CPU_ARM710
38 # ifdef CPU_NAME
39 # undef MULTI_CPU
40 # define MULTI_CPU
41 # else
42 # define CPU_NAME cpu_arm7
43 # endif
44 # endif
45 # ifdef CONFIG_CPU_ARM720T
46 # ifdef CPU_NAME
47 # undef MULTI_CPU
48 # define MULTI_CPU
49 # else
50 # define CPU_NAME cpu_arm720
51 # endif
52 # endif
53 # ifdef CONFIG_CPU_ARM920T
54 # ifdef CPU_NAME
55 # undef MULTI_CPU
56 # define MULTI_CPU
57 # else
58 # define CPU_NAME cpu_arm920
59 # endif
60 # endif
61 # ifdef CONFIG_CPU_ARM922T
62 # ifdef CPU_NAME
63 # undef MULTI_CPU
64 # define MULTI_CPU
65 # else
66 # define CPU_NAME cpu_arm922
67 # endif
68 # endif
69 # ifdef CONFIG_CPU_ARM925T
70 # ifdef CPU_NAME
71 # undef MULTI_CPU
72 # define MULTI_CPU
73 # else
74 # define CPU_NAME cpu_arm925
75 # endif
76 # endif
77 # ifdef CONFIG_CPU_ARM926T
78 # ifdef CPU_NAME
79 # undef MULTI_CPU
80 # define MULTI_CPU
81 # else
82 # define CPU_NAME cpu_arm926
83 # endif
84 # endif
85 # ifdef CONFIG_CPU_SA110
86 # ifdef CPU_NAME
87 # undef MULTI_CPU
88 # define MULTI_CPU
89 # else
90 # define CPU_NAME cpu_sa110
91 # endif
92 # endif
93 # ifdef CONFIG_CPU_SA1100
94 # ifdef CPU_NAME
95 # undef MULTI_CPU
96 # define MULTI_CPU
97 # else
98 # define CPU_NAME cpu_sa1100
99 # endif
100 # endif
101 # ifdef CONFIG_CPU_ARM1020
102 # ifdef CPU_NAME
103 # undef MULTI_CPU
104 # define MULTI_CPU
105 # else
106 # define CPU_NAME cpu_arm1020
107 # endif
108 # endif
109 # ifdef CONFIG_CPU_ARM1020E
110 # ifdef CPU_NAME
111 # undef MULTI_CPU
112 # define MULTI_CPU
113 # else
114 # define CPU_NAME cpu_arm1020e
115 # endif
116 # endif
117 # ifdef CONFIG_CPU_ARM1022
118 # ifdef CPU_NAME
119 # undef MULTI_CPU
120 # define MULTI_CPU
121 # else
122 # define CPU_NAME cpu_arm1022
123 # endif
124 # endif
125 # ifdef CONFIG_CPU_ARM1026
126 # ifdef CPU_NAME
127 # undef MULTI_CPU
128 # define MULTI_CPU
129 # else
130 # define CPU_NAME cpu_arm1026
131 # endif
132 # endif
133 # ifdef CONFIG_CPU_XSCALE
134 # ifdef CPU_NAME
135 # undef MULTI_CPU
136 # define MULTI_CPU
137 # else
138 # define CPU_NAME cpu_xscale
139 # endif
140 # endif
141 # ifdef CONFIG_CPU_V6
142 # ifdef CPU_NAME
143 # undef MULTI_CPU
144 # define MULTI_CPU
145 # else
146 # define CPU_NAME cpu_v6
147 # endif
148 # endif
150 #if 1 // add by Victor Yu. 06-08-2005
151 # ifdef CONFIG_CPU_FA520
152 # ifdef CPU_NAME
153 # undef MULTI_CPU
154 # define MULTI_CPU
155 # else
156 # define CPU_NAME cpu_fa520
157 # endif
158 # endif
159 # ifdef CONFIG_CPU_FA526
160 # ifdef CPU_NAME
161 # undef MULTI_CPU
162 # define MULTI_CPU
163 # else
164 # define CPU_NAME cpu_fa526
165 # endif
166 # endif
167 # ifdef CONFIG_CPU_FA626
168 # ifdef CPU_NAME
169 # undef MULTI_CPU
170 # define MULTI_CPU
171 # else
172 # define CPU_NAME cpu_fa626
173 # endif
174 # endif
175 #endif
177 #endif
179 #ifndef __ASSEMBLY__
181 #ifndef MULTI_CPU
182 #include "asm/cpu-single.h"
183 #else
184 #include "asm/cpu-multi32.h"
185 #endif
187 #include <asm/memory.h>
189 #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
191 #define cpu_get_pgd() \
192 ({ \
193 unsigned long pg; \
194 __asm__("mrc p15, 0, %0, c2, c0, 0" \
195 : "=r" (pg) : : "cc"); \
196 pg &= ~0x3fff; \
197 (pgd_t *)phys_to_virt(pg); \
200 #endif /* __ASSEMBLY__ */
201 #endif /* __KERNEL__ */
202 #endif /* __ASM_PROCFNS_H */