aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/proc-fns.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/proc-fns.h')
-rw-r--r--include/asm-arm/proc-fns.h174
1 files changed, 174 insertions, 0 deletions
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
new file mode 100644
index 000000000000..7bef2bf6be51
--- /dev/null
+++ b/include/asm-arm/proc-fns.h
@@ -0,0 +1,174 @@
1/*
2 * linux/include/asm-arm/proc-fns.h
3 *
4 * Copyright (C) 1997-1999 Russell King
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
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.
10 */
11#ifndef __ASM_PROCFNS_H
12#define __ASM_PROCFNS_H
13
14#ifdef __KERNEL__
15
16#include <linux/config.h>
17
18/*
19 * Work out if we need multiple CPU support
20 */
21#undef MULTI_CPU
22#undef CPU_NAME
23
24/*
25 * CPU_NAME - the prefix for CPU related functions
26 */
27
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
149#endif
150
151#ifndef __ASSEMBLY__
152
153#ifndef MULTI_CPU
154#include "asm/cpu-single.h"
155#else
156#include "asm/cpu-multi32.h"
157#endif
158
159#include <asm/memory.h>
160
161#define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
162
163#define cpu_get_pgd() \
164 ({ \
165 unsigned long pg; \
166 __asm__("mrc p15, 0, %0, c2, c0, 0" \
167 : "=r" (pg) : : "cc"); \
168 pg &= ~0x3fff; \
169 (pgd_t *)phys_to_virt(pg); \
170 })
171
172#endif /* __ASSEMBLY__ */
173#endif /* __KERNEL__ */
174#endif /* __ASM_PROCFNS_H */