diff options
88 files changed, 1589 insertions, 2189 deletions
diff --git a/arch/m68k/include/asm/bootinfo.h b/arch/m68k/include/asm/bootinfo.h index fedf3e326121..fb8a06b9ab6a 100644 --- a/arch/m68k/include/asm/bootinfo.h +++ b/arch/m68k/include/asm/bootinfo.h | |||
@@ -1,5 +1,378 @@ | |||
1 | #ifdef __uClinux__ | 1 | /* |
2 | #include "bootinfo_no.h" | 2 | ** asm/bootinfo.h -- Definition of the Linux/m68k boot information structure |
3 | #else | 3 | ** |
4 | #include "bootinfo_mm.h" | 4 | ** Copyright 1992 by Greg Harp |
5 | ** | ||
6 | ** This file is subject to the terms and conditions of the GNU General Public | ||
7 | ** License. See the file COPYING in the main directory of this archive | ||
8 | ** for more details. | ||
9 | ** | ||
10 | ** Created 09/29/92 by Greg Harp | ||
11 | ** | ||
12 | ** 5/2/94 Roman Hodek: | ||
13 | ** Added bi_atari part of the machine dependent union bi_un; for now it | ||
14 | ** contains just a model field to distinguish between TT and Falcon. | ||
15 | ** 26/7/96 Roman Zippel: | ||
16 | ** Renamed to setup.h; added some useful macros to allow gcc some | ||
17 | ** optimizations if possible. | ||
18 | ** 5/10/96 Geert Uytterhoeven: | ||
19 | ** Redesign of the boot information structure; renamed to bootinfo.h again | ||
20 | ** 27/11/96 Geert Uytterhoeven: | ||
21 | ** Backwards compatibility with bootinfo interface version 1.0 | ||
22 | */ | ||
23 | |||
24 | #ifndef _M68K_BOOTINFO_H | ||
25 | #define _M68K_BOOTINFO_H | ||
26 | |||
27 | |||
28 | /* | ||
29 | * Bootinfo definitions | ||
30 | * | ||
31 | * This is an easily parsable and extendable structure containing all | ||
32 | * information to be passed from the bootstrap to the kernel. | ||
33 | * | ||
34 | * This way I hope to keep all future changes back/forewards compatible. | ||
35 | * Thus, keep your fingers crossed... | ||
36 | * | ||
37 | * This structure is copied right after the kernel bss by the bootstrap | ||
38 | * routine. | ||
39 | */ | ||
40 | |||
41 | #ifndef __ASSEMBLY__ | ||
42 | |||
43 | struct bi_record { | ||
44 | unsigned short tag; /* tag ID */ | ||
45 | unsigned short size; /* size of record (in bytes) */ | ||
46 | unsigned long data[0]; /* data */ | ||
47 | }; | ||
48 | |||
49 | #endif /* __ASSEMBLY__ */ | ||
50 | |||
51 | |||
52 | /* | ||
53 | * Tag Definitions | ||
54 | * | ||
55 | * Machine independent tags start counting from 0x0000 | ||
56 | * Machine dependent tags start counting from 0x8000 | ||
57 | */ | ||
58 | |||
59 | #define BI_LAST 0x0000 /* last record (sentinel) */ | ||
60 | #define BI_MACHTYPE 0x0001 /* machine type (u_long) */ | ||
61 | #define BI_CPUTYPE 0x0002 /* cpu type (u_long) */ | ||
62 | #define BI_FPUTYPE 0x0003 /* fpu type (u_long) */ | ||
63 | #define BI_MMUTYPE 0x0004 /* mmu type (u_long) */ | ||
64 | #define BI_MEMCHUNK 0x0005 /* memory chunk address and size */ | ||
65 | /* (struct mem_info) */ | ||
66 | #define BI_RAMDISK 0x0006 /* ramdisk address and size */ | ||
67 | /* (struct mem_info) */ | ||
68 | #define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */ | ||
69 | /* (string) */ | ||
70 | |||
71 | /* | ||
72 | * Amiga-specific tags | ||
73 | */ | ||
74 | |||
75 | #define BI_AMIGA_MODEL 0x8000 /* model (u_long) */ | ||
76 | #define BI_AMIGA_AUTOCON 0x8001 /* AutoConfig device */ | ||
77 | /* (struct ConfigDev) */ | ||
78 | #define BI_AMIGA_CHIP_SIZE 0x8002 /* size of Chip RAM (u_long) */ | ||
79 | #define BI_AMIGA_VBLANK 0x8003 /* VBLANK frequency (u_char) */ | ||
80 | #define BI_AMIGA_PSFREQ 0x8004 /* power supply frequency (u_char) */ | ||
81 | #define BI_AMIGA_ECLOCK 0x8005 /* EClock frequency (u_long) */ | ||
82 | #define BI_AMIGA_CHIPSET 0x8006 /* native chipset present (u_long) */ | ||
83 | #define BI_AMIGA_SERPER 0x8007 /* serial port period (u_short) */ | ||
84 | |||
85 | /* | ||
86 | * Atari-specific tags | ||
87 | */ | ||
88 | |||
89 | #define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (u_long) */ | ||
90 | #define BI_ATARI_MCH_TYPE 0x8001 /* special machine type (u_long) */ | ||
91 | /* (values are ATARI_MACH_* defines */ | ||
92 | |||
93 | /* mch_cookie values (upper word) */ | ||
94 | #define ATARI_MCH_ST 0 | ||
95 | #define ATARI_MCH_STE 1 | ||
96 | #define ATARI_MCH_TT 2 | ||
97 | #define ATARI_MCH_FALCON 3 | ||
98 | |||
99 | /* mch_type values */ | ||
100 | #define ATARI_MACH_NORMAL 0 /* no special machine type */ | ||
101 | #define ATARI_MACH_MEDUSA 1 /* Medusa 040 */ | ||
102 | #define ATARI_MACH_HADES 2 /* Hades 040 or 060 */ | ||
103 | #define ATARI_MACH_AB40 3 /* Afterburner040 on Falcon */ | ||
104 | |||
105 | /* | ||
106 | * VME-specific tags | ||
107 | */ | ||
108 | |||
109 | #define BI_VME_TYPE 0x8000 /* VME sub-architecture (u_long) */ | ||
110 | #define BI_VME_BRDINFO 0x8001 /* VME board information (struct) */ | ||
111 | |||
112 | /* BI_VME_TYPE codes */ | ||
113 | #define VME_TYPE_TP34V 0x0034 /* Tadpole TP34V */ | ||
114 | #define VME_TYPE_MVME147 0x0147 /* Motorola MVME147 */ | ||
115 | #define VME_TYPE_MVME162 0x0162 /* Motorola MVME162 */ | ||
116 | #define VME_TYPE_MVME166 0x0166 /* Motorola MVME166 */ | ||
117 | #define VME_TYPE_MVME167 0x0167 /* Motorola MVME167 */ | ||
118 | #define VME_TYPE_MVME172 0x0172 /* Motorola MVME172 */ | ||
119 | #define VME_TYPE_MVME177 0x0177 /* Motorola MVME177 */ | ||
120 | #define VME_TYPE_BVME4000 0x4000 /* BVM Ltd. BVME4000 */ | ||
121 | #define VME_TYPE_BVME6000 0x6000 /* BVM Ltd. BVME6000 */ | ||
122 | |||
123 | /* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on | ||
124 | * Motorola VME boards. Contains board number, Bug version, board | ||
125 | * configuration options, etc. See include/asm/mvme16xhw.h for details. | ||
126 | */ | ||
127 | |||
128 | |||
129 | /* | ||
130 | * Macintosh-specific tags (all u_long) | ||
131 | */ | ||
132 | |||
133 | #define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */ | ||
134 | #define BI_MAC_VADDR 0x8001 /* Mac video base address */ | ||
135 | #define BI_MAC_VDEPTH 0x8002 /* Mac video depth */ | ||
136 | #define BI_MAC_VROW 0x8003 /* Mac video rowbytes */ | ||
137 | #define BI_MAC_VDIM 0x8004 /* Mac video dimensions */ | ||
138 | #define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */ | ||
139 | #define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */ | ||
140 | #define BI_MAC_BTIME 0x8007 /* Mac boot time */ | ||
141 | #define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */ | ||
142 | #define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */ | ||
143 | #define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */ | ||
144 | #define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */ | ||
145 | |||
146 | /* | ||
147 | * Macintosh hardware profile data - unused, see macintosh.h for | ||
148 | * resonable type values | ||
149 | */ | ||
150 | |||
151 | #define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */ | ||
152 | #define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */ | ||
153 | #define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */ | ||
154 | #define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */ | ||
155 | #define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */ | ||
156 | #define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */ | ||
157 | #define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */ | ||
158 | #define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */ | ||
159 | #define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */ | ||
160 | #define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */ | ||
161 | #define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */ | ||
162 | #define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */ | ||
163 | #define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */ | ||
164 | #define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */ | ||
165 | #define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */ | ||
166 | #define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */ | ||
167 | #define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */ | ||
168 | #define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */ | ||
169 | |||
170 | /* | ||
171 | * Mac: compatibility with old booter data format (temporarily) | ||
172 | * Fields unused with the new bootinfo can be deleted now; instead of | ||
173 | * adding new fields the struct might be splitted into a hardware address | ||
174 | * part and a hardware type part | ||
175 | */ | ||
176 | |||
177 | #ifndef __ASSEMBLY__ | ||
178 | |||
179 | struct mac_booter_data | ||
180 | { | ||
181 | unsigned long videoaddr; | ||
182 | unsigned long videorow; | ||
183 | unsigned long videodepth; | ||
184 | unsigned long dimensions; | ||
185 | unsigned long args; | ||
186 | unsigned long boottime; | ||
187 | unsigned long gmtbias; | ||
188 | unsigned long bootver; | ||
189 | unsigned long videological; | ||
190 | unsigned long sccbase; | ||
191 | unsigned long id; | ||
192 | unsigned long memsize; | ||
193 | unsigned long serialmf; | ||
194 | unsigned long serialhsk; | ||
195 | unsigned long serialgpi; | ||
196 | unsigned long printmf; | ||
197 | unsigned long printhsk; | ||
198 | unsigned long printgpi; | ||
199 | unsigned long cpuid; | ||
200 | unsigned long rombase; | ||
201 | unsigned long adbdelay; | ||
202 | unsigned long timedbra; | ||
203 | }; | ||
204 | |||
205 | extern struct mac_booter_data | ||
206 | mac_bi_data; | ||
207 | |||
5 | #endif | 208 | #endif |
209 | |||
210 | /* | ||
211 | * Apollo-specific tags | ||
212 | */ | ||
213 | |||
214 | #define BI_APOLLO_MODEL 0x8000 /* model (u_long) */ | ||
215 | |||
216 | /* | ||
217 | * HP300-specific tags | ||
218 | */ | ||
219 | |||
220 | #define BI_HP300_MODEL 0x8000 /* model (u_long) */ | ||
221 | #define BI_HP300_UART_SCODE 0x8001 /* UART select code (u_long) */ | ||
222 | #define BI_HP300_UART_ADDR 0x8002 /* phys. addr of UART (u_long) */ | ||
223 | |||
224 | /* | ||
225 | * Stuff for bootinfo interface versioning | ||
226 | * | ||
227 | * At the start of kernel code, a 'struct bootversion' is located. | ||
228 | * bootstrap checks for a matching version of the interface before booting | ||
229 | * a kernel, to avoid user confusion if kernel and bootstrap don't work | ||
230 | * together :-) | ||
231 | * | ||
232 | * If incompatible changes are made to the bootinfo interface, the major | ||
233 | * number below should be stepped (and the minor reset to 0) for the | ||
234 | * appropriate machine. If a change is backward-compatible, the minor | ||
235 | * should be stepped. "Backwards-compatible" means that booting will work, | ||
236 | * but certain features may not. | ||
237 | */ | ||
238 | |||
239 | #define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */ | ||
240 | #define MK_BI_VERSION(major,minor) (((major)<<16)+(minor)) | ||
241 | #define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff) | ||
242 | #define BI_VERSION_MINOR(v) ((v) & 0xffff) | ||
243 | |||
244 | #ifndef __ASSEMBLY__ | ||
245 | |||
246 | struct bootversion { | ||
247 | unsigned short branch; | ||
248 | unsigned long magic; | ||
249 | struct { | ||
250 | unsigned long machtype; | ||
251 | unsigned long version; | ||
252 | } machversions[0]; | ||
253 | }; | ||
254 | |||
255 | #endif /* __ASSEMBLY__ */ | ||
256 | |||
257 | #define AMIGA_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
258 | #define ATARI_BOOTI_VERSION MK_BI_VERSION( 2, 1 ) | ||
259 | #define MAC_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
260 | #define MVME147_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
261 | #define MVME16x_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
262 | #define BVME6000_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
263 | #define Q40_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
264 | #define HP300_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
265 | |||
266 | #ifdef BOOTINFO_COMPAT_1_0 | ||
267 | |||
268 | /* | ||
269 | * Backwards compatibility with bootinfo interface version 1.0 | ||
270 | */ | ||
271 | |||
272 | #define COMPAT_AMIGA_BOOTI_VERSION MK_BI_VERSION( 1, 0 ) | ||
273 | #define COMPAT_ATARI_BOOTI_VERSION MK_BI_VERSION( 1, 0 ) | ||
274 | #define COMPAT_MAC_BOOTI_VERSION MK_BI_VERSION( 1, 0 ) | ||
275 | |||
276 | #include <linux/zorro.h> | ||
277 | |||
278 | #define COMPAT_NUM_AUTO 16 | ||
279 | |||
280 | struct compat_bi_Amiga { | ||
281 | int model; | ||
282 | int num_autocon; | ||
283 | struct ConfigDev autocon[COMPAT_NUM_AUTO]; | ||
284 | unsigned long chip_size; | ||
285 | unsigned char vblank; | ||
286 | unsigned char psfreq; | ||
287 | unsigned long eclock; | ||
288 | unsigned long chipset; | ||
289 | unsigned long hw_present; | ||
290 | }; | ||
291 | |||
292 | struct compat_bi_Atari { | ||
293 | unsigned long hw_present; | ||
294 | unsigned long mch_cookie; | ||
295 | }; | ||
296 | |||
297 | #ifndef __ASSEMBLY__ | ||
298 | |||
299 | struct compat_bi_Macintosh | ||
300 | { | ||
301 | unsigned long videoaddr; | ||
302 | unsigned long videorow; | ||
303 | unsigned long videodepth; | ||
304 | unsigned long dimensions; | ||
305 | unsigned long args; | ||
306 | unsigned long boottime; | ||
307 | unsigned long gmtbias; | ||
308 | unsigned long bootver; | ||
309 | unsigned long videological; | ||
310 | unsigned long sccbase; | ||
311 | unsigned long id; | ||
312 | unsigned long memsize; | ||
313 | unsigned long serialmf; | ||
314 | unsigned long serialhsk; | ||
315 | unsigned long serialgpi; | ||
316 | unsigned long printmf; | ||
317 | unsigned long printhsk; | ||
318 | unsigned long printgpi; | ||
319 | unsigned long cpuid; | ||
320 | unsigned long rombase; | ||
321 | unsigned long adbdelay; | ||
322 | unsigned long timedbra; | ||
323 | }; | ||
324 | |||
325 | #endif | ||
326 | |||
327 | struct compat_mem_info { | ||
328 | unsigned long addr; | ||
329 | unsigned long size; | ||
330 | }; | ||
331 | |||
332 | #define COMPAT_NUM_MEMINFO 4 | ||
333 | |||
334 | #define COMPAT_CPUB_68020 0 | ||
335 | #define COMPAT_CPUB_68030 1 | ||
336 | #define COMPAT_CPUB_68040 2 | ||
337 | #define COMPAT_CPUB_68060 3 | ||
338 | #define COMPAT_FPUB_68881 5 | ||
339 | #define COMPAT_FPUB_68882 6 | ||
340 | #define COMPAT_FPUB_68040 7 | ||
341 | #define COMPAT_FPUB_68060 8 | ||
342 | |||
343 | #define COMPAT_CPU_68020 (1<<COMPAT_CPUB_68020) | ||
344 | #define COMPAT_CPU_68030 (1<<COMPAT_CPUB_68030) | ||
345 | #define COMPAT_CPU_68040 (1<<COMPAT_CPUB_68040) | ||
346 | #define COMPAT_CPU_68060 (1<<COMPAT_CPUB_68060) | ||
347 | #define COMPAT_CPU_MASK (31) | ||
348 | #define COMPAT_FPU_68881 (1<<COMPAT_FPUB_68881) | ||
349 | #define COMPAT_FPU_68882 (1<<COMPAT_FPUB_68882) | ||
350 | #define COMPAT_FPU_68040 (1<<COMPAT_FPUB_68040) | ||
351 | #define COMPAT_FPU_68060 (1<<COMPAT_FPUB_68060) | ||
352 | #define COMPAT_FPU_MASK (0xfe0) | ||
353 | |||
354 | #define COMPAT_CL_SIZE (256) | ||
355 | |||
356 | struct compat_bootinfo { | ||
357 | unsigned long machtype; | ||
358 | unsigned long cputype; | ||
359 | struct compat_mem_info memory[COMPAT_NUM_MEMINFO]; | ||
360 | int num_memory; | ||
361 | unsigned long ramdisk_size; | ||
362 | unsigned long ramdisk_addr; | ||
363 | char command_line[COMPAT_CL_SIZE]; | ||
364 | union { | ||
365 | struct compat_bi_Amiga bi_ami; | ||
366 | struct compat_bi_Atari bi_ata; | ||
367 | struct compat_bi_Macintosh bi_mac; | ||
368 | } bi_un; | ||
369 | }; | ||
370 | |||
371 | #define bi_amiga bi_un.bi_ami | ||
372 | #define bi_atari bi_un.bi_ata | ||
373 | #define bi_mac bi_un.bi_mac | ||
374 | |||
375 | #endif /* BOOTINFO_COMPAT_1_0 */ | ||
376 | |||
377 | |||
378 | #endif /* _M68K_BOOTINFO_H */ | ||
diff --git a/arch/m68k/include/asm/bootinfo_mm.h b/arch/m68k/include/asm/bootinfo_mm.h deleted file mode 100644 index fb8a06b9ab6a..000000000000 --- a/arch/m68k/include/asm/bootinfo_mm.h +++ /dev/null | |||
@@ -1,378 +0,0 @@ | |||
1 | /* | ||
2 | ** asm/bootinfo.h -- Definition of the Linux/m68k boot information structure | ||
3 | ** | ||
4 | ** Copyright 1992 by Greg Harp | ||
5 | ** | ||
6 | ** This file is subject to the terms and conditions of the GNU General Public | ||
7 | ** License. See the file COPYING in the main directory of this archive | ||
8 | ** for more details. | ||
9 | ** | ||
10 | ** Created 09/29/92 by Greg Harp | ||
11 | ** | ||
12 | ** 5/2/94 Roman Hodek: | ||
13 | ** Added bi_atari part of the machine dependent union bi_un; for now it | ||
14 | ** contains just a model field to distinguish between TT and Falcon. | ||
15 | ** 26/7/96 Roman Zippel: | ||
16 | ** Renamed to setup.h; added some useful macros to allow gcc some | ||
17 | ** optimizations if possible. | ||
18 | ** 5/10/96 Geert Uytterhoeven: | ||
19 | ** Redesign of the boot information structure; renamed to bootinfo.h again | ||
20 | ** 27/11/96 Geert Uytterhoeven: | ||
21 | ** Backwards compatibility with bootinfo interface version 1.0 | ||
22 | */ | ||
23 | |||
24 | #ifndef _M68K_BOOTINFO_H | ||
25 | #define _M68K_BOOTINFO_H | ||
26 | |||
27 | |||
28 | /* | ||
29 | * Bootinfo definitions | ||
30 | * | ||
31 | * This is an easily parsable and extendable structure containing all | ||
32 | * information to be passed from the bootstrap to the kernel. | ||
33 | * | ||
34 | * This way I hope to keep all future changes back/forewards compatible. | ||
35 | * Thus, keep your fingers crossed... | ||
36 | * | ||
37 | * This structure is copied right after the kernel bss by the bootstrap | ||
38 | * routine. | ||
39 | */ | ||
40 | |||
41 | #ifndef __ASSEMBLY__ | ||
42 | |||
43 | struct bi_record { | ||
44 | unsigned short tag; /* tag ID */ | ||
45 | unsigned short size; /* size of record (in bytes) */ | ||
46 | unsigned long data[0]; /* data */ | ||
47 | }; | ||
48 | |||
49 | #endif /* __ASSEMBLY__ */ | ||
50 | |||
51 | |||
52 | /* | ||
53 | * Tag Definitions | ||
54 | * | ||
55 | * Machine independent tags start counting from 0x0000 | ||
56 | * Machine dependent tags start counting from 0x8000 | ||
57 | */ | ||
58 | |||
59 | #define BI_LAST 0x0000 /* last record (sentinel) */ | ||
60 | #define BI_MACHTYPE 0x0001 /* machine type (u_long) */ | ||
61 | #define BI_CPUTYPE 0x0002 /* cpu type (u_long) */ | ||
62 | #define BI_FPUTYPE 0x0003 /* fpu type (u_long) */ | ||
63 | #define BI_MMUTYPE 0x0004 /* mmu type (u_long) */ | ||
64 | #define BI_MEMCHUNK 0x0005 /* memory chunk address and size */ | ||
65 | /* (struct mem_info) */ | ||
66 | #define BI_RAMDISK 0x0006 /* ramdisk address and size */ | ||
67 | /* (struct mem_info) */ | ||
68 | #define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */ | ||
69 | /* (string) */ | ||
70 | |||
71 | /* | ||
72 | * Amiga-specific tags | ||
73 | */ | ||
74 | |||
75 | #define BI_AMIGA_MODEL 0x8000 /* model (u_long) */ | ||
76 | #define BI_AMIGA_AUTOCON 0x8001 /* AutoConfig device */ | ||
77 | /* (struct ConfigDev) */ | ||
78 | #define BI_AMIGA_CHIP_SIZE 0x8002 /* size of Chip RAM (u_long) */ | ||
79 | #define BI_AMIGA_VBLANK 0x8003 /* VBLANK frequency (u_char) */ | ||
80 | #define BI_AMIGA_PSFREQ 0x8004 /* power supply frequency (u_char) */ | ||
81 | #define BI_AMIGA_ECLOCK 0x8005 /* EClock frequency (u_long) */ | ||
82 | #define BI_AMIGA_CHIPSET 0x8006 /* native chipset present (u_long) */ | ||
83 | #define BI_AMIGA_SERPER 0x8007 /* serial port period (u_short) */ | ||
84 | |||
85 | /* | ||
86 | * Atari-specific tags | ||
87 | */ | ||
88 | |||
89 | #define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (u_long) */ | ||
90 | #define BI_ATARI_MCH_TYPE 0x8001 /* special machine type (u_long) */ | ||
91 | /* (values are ATARI_MACH_* defines */ | ||
92 | |||
93 | /* mch_cookie values (upper word) */ | ||
94 | #define ATARI_MCH_ST 0 | ||
95 | #define ATARI_MCH_STE 1 | ||
96 | #define ATARI_MCH_TT 2 | ||
97 | #define ATARI_MCH_FALCON 3 | ||
98 | |||
99 | /* mch_type values */ | ||
100 | #define ATARI_MACH_NORMAL 0 /* no special machine type */ | ||
101 | #define ATARI_MACH_MEDUSA 1 /* Medusa 040 */ | ||
102 | #define ATARI_MACH_HADES 2 /* Hades 040 or 060 */ | ||
103 | #define ATARI_MACH_AB40 3 /* Afterburner040 on Falcon */ | ||
104 | |||
105 | /* | ||
106 | * VME-specific tags | ||
107 | */ | ||
108 | |||
109 | #define BI_VME_TYPE 0x8000 /* VME sub-architecture (u_long) */ | ||
110 | #define BI_VME_BRDINFO 0x8001 /* VME board information (struct) */ | ||
111 | |||
112 | /* BI_VME_TYPE codes */ | ||
113 | #define VME_TYPE_TP34V 0x0034 /* Tadpole TP34V */ | ||
114 | #define VME_TYPE_MVME147 0x0147 /* Motorola MVME147 */ | ||
115 | #define VME_TYPE_MVME162 0x0162 /* Motorola MVME162 */ | ||
116 | #define VME_TYPE_MVME166 0x0166 /* Motorola MVME166 */ | ||
117 | #define VME_TYPE_MVME167 0x0167 /* Motorola MVME167 */ | ||
118 | #define VME_TYPE_MVME172 0x0172 /* Motorola MVME172 */ | ||
119 | #define VME_TYPE_MVME177 0x0177 /* Motorola MVME177 */ | ||
120 | #define VME_TYPE_BVME4000 0x4000 /* BVM Ltd. BVME4000 */ | ||
121 | #define VME_TYPE_BVME6000 0x6000 /* BVM Ltd. BVME6000 */ | ||
122 | |||
123 | /* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on | ||
124 | * Motorola VME boards. Contains board number, Bug version, board | ||
125 | * configuration options, etc. See include/asm/mvme16xhw.h for details. | ||
126 | */ | ||
127 | |||
128 | |||
129 | /* | ||
130 | * Macintosh-specific tags (all u_long) | ||
131 | */ | ||
132 | |||
133 | #define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */ | ||
134 | #define BI_MAC_VADDR 0x8001 /* Mac video base address */ | ||
135 | #define BI_MAC_VDEPTH 0x8002 /* Mac video depth */ | ||
136 | #define BI_MAC_VROW 0x8003 /* Mac video rowbytes */ | ||
137 | #define BI_MAC_VDIM 0x8004 /* Mac video dimensions */ | ||
138 | #define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */ | ||
139 | #define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */ | ||
140 | #define BI_MAC_BTIME 0x8007 /* Mac boot time */ | ||
141 | #define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */ | ||
142 | #define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */ | ||
143 | #define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */ | ||
144 | #define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */ | ||
145 | |||
146 | /* | ||
147 | * Macintosh hardware profile data - unused, see macintosh.h for | ||
148 | * resonable type values | ||
149 | */ | ||
150 | |||
151 | #define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */ | ||
152 | #define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */ | ||
153 | #define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */ | ||
154 | #define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */ | ||
155 | #define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */ | ||
156 | #define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */ | ||
157 | #define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */ | ||
158 | #define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */ | ||
159 | #define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */ | ||
160 | #define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */ | ||
161 | #define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */ | ||
162 | #define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */ | ||
163 | #define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */ | ||
164 | #define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */ | ||
165 | #define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */ | ||
166 | #define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */ | ||
167 | #define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */ | ||
168 | #define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */ | ||
169 | |||
170 | /* | ||
171 | * Mac: compatibility with old booter data format (temporarily) | ||
172 | * Fields unused with the new bootinfo can be deleted now; instead of | ||
173 | * adding new fields the struct might be splitted into a hardware address | ||
174 | * part and a hardware type part | ||
175 | */ | ||
176 | |||
177 | #ifndef __ASSEMBLY__ | ||
178 | |||
179 | struct mac_booter_data | ||
180 | { | ||
181 | unsigned long videoaddr; | ||
182 | unsigned long videorow; | ||
183 | unsigned long videodepth; | ||
184 | unsigned long dimensions; | ||
185 | unsigned long args; | ||
186 | unsigned long boottime; | ||
187 | unsigned long gmtbias; | ||
188 | unsigned long bootver; | ||
189 | unsigned long videological; | ||
190 | unsigned long sccbase; | ||
191 | unsigned long id; | ||
192 | unsigned long memsize; | ||
193 | unsigned long serialmf; | ||
194 | unsigned long serialhsk; | ||
195 | unsigned long serialgpi; | ||
196 | unsigned long printmf; | ||
197 | unsigned long printhsk; | ||
198 | unsigned long printgpi; | ||
199 | unsigned long cpuid; | ||
200 | unsigned long rombase; | ||
201 | unsigned long adbdelay; | ||
202 | unsigned long timedbra; | ||
203 | }; | ||
204 | |||
205 | extern struct mac_booter_data | ||
206 | mac_bi_data; | ||
207 | |||
208 | #endif | ||
209 | |||
210 | /* | ||
211 | * Apollo-specific tags | ||
212 | */ | ||
213 | |||
214 | #define BI_APOLLO_MODEL 0x8000 /* model (u_long) */ | ||
215 | |||
216 | /* | ||
217 | * HP300-specific tags | ||
218 | */ | ||
219 | |||
220 | #define BI_HP300_MODEL 0x8000 /* model (u_long) */ | ||
221 | #define BI_HP300_UART_SCODE 0x8001 /* UART select code (u_long) */ | ||
222 | #define BI_HP300_UART_ADDR 0x8002 /* phys. addr of UART (u_long) */ | ||
223 | |||
224 | /* | ||
225 | * Stuff for bootinfo interface versioning | ||
226 | * | ||
227 | * At the start of kernel code, a 'struct bootversion' is located. | ||
228 | * bootstrap checks for a matching version of the interface before booting | ||
229 | * a kernel, to avoid user confusion if kernel and bootstrap don't work | ||
230 | * together :-) | ||
231 | * | ||
232 | * If incompatible changes are made to the bootinfo interface, the major | ||
233 | * number below should be stepped (and the minor reset to 0) for the | ||
234 | * appropriate machine. If a change is backward-compatible, the minor | ||
235 | * should be stepped. "Backwards-compatible" means that booting will work, | ||
236 | * but certain features may not. | ||
237 | */ | ||
238 | |||
239 | #define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */ | ||
240 | #define MK_BI_VERSION(major,minor) (((major)<<16)+(minor)) | ||
241 | #define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff) | ||
242 | #define BI_VERSION_MINOR(v) ((v) & 0xffff) | ||
243 | |||
244 | #ifndef __ASSEMBLY__ | ||
245 | |||
246 | struct bootversion { | ||
247 | unsigned short branch; | ||
248 | unsigned long magic; | ||
249 | struct { | ||
250 | unsigned long machtype; | ||
251 | unsigned long version; | ||
252 | } machversions[0]; | ||
253 | }; | ||
254 | |||
255 | #endif /* __ASSEMBLY__ */ | ||
256 | |||
257 | #define AMIGA_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
258 | #define ATARI_BOOTI_VERSION MK_BI_VERSION( 2, 1 ) | ||
259 | #define MAC_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
260 | #define MVME147_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
261 | #define MVME16x_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
262 | #define BVME6000_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
263 | #define Q40_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
264 | #define HP300_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) | ||
265 | |||
266 | #ifdef BOOTINFO_COMPAT_1_0 | ||
267 | |||
268 | /* | ||
269 | * Backwards compatibility with bootinfo interface version 1.0 | ||
270 | */ | ||
271 | |||
272 | #define COMPAT_AMIGA_BOOTI_VERSION MK_BI_VERSION( 1, 0 ) | ||
273 | #define COMPAT_ATARI_BOOTI_VERSION MK_BI_VERSION( 1, 0 ) | ||
274 | #define COMPAT_MAC_BOOTI_VERSION MK_BI_VERSION( 1, 0 ) | ||
275 | |||
276 | #include <linux/zorro.h> | ||
277 | |||
278 | #define COMPAT_NUM_AUTO 16 | ||
279 | |||
280 | struct compat_bi_Amiga { | ||
281 | int model; | ||
282 | int num_autocon; | ||
283 | struct ConfigDev autocon[COMPAT_NUM_AUTO]; | ||
284 | unsigned long chip_size; | ||
285 | unsigned char vblank; | ||
286 | unsigned char psfreq; | ||
287 | unsigned long eclock; | ||
288 | unsigned long chipset; | ||
289 | unsigned long hw_present; | ||
290 | }; | ||
291 | |||
292 | struct compat_bi_Atari { | ||
293 | unsigned long hw_present; | ||
294 | unsigned long mch_cookie; | ||
295 | }; | ||
296 | |||
297 | #ifndef __ASSEMBLY__ | ||
298 | |||
299 | struct compat_bi_Macintosh | ||
300 | { | ||
301 | unsigned long videoaddr; | ||
302 | unsigned long videorow; | ||
303 | unsigned long videodepth; | ||
304 | unsigned long dimensions; | ||
305 | unsigned long args; | ||
306 | unsigned long boottime; | ||
307 | unsigned long gmtbias; | ||
308 | unsigned long bootver; | ||
309 | unsigned long videological; | ||
310 | unsigned long sccbase; | ||
311 | unsigned long id; | ||
312 | unsigned long memsize; | ||
313 | unsigned long serialmf; | ||
314 | unsigned long serialhsk; | ||
315 | unsigned long serialgpi; | ||
316 | unsigned long printmf; | ||
317 | unsigned long printhsk; | ||
318 | unsigned long printgpi; | ||
319 | unsigned long cpuid; | ||
320 | unsigned long rombase; | ||
321 | unsigned long adbdelay; | ||
322 | unsigned long timedbra; | ||
323 | }; | ||
324 | |||
325 | #endif | ||
326 | |||
327 | struct compat_mem_info { | ||
328 | unsigned long addr; | ||
329 | unsigned long size; | ||
330 | }; | ||
331 | |||
332 | #define COMPAT_NUM_MEMINFO 4 | ||
333 | |||
334 | #define COMPAT_CPUB_68020 0 | ||
335 | #define COMPAT_CPUB_68030 1 | ||
336 | #define COMPAT_CPUB_68040 2 | ||
337 | #define COMPAT_CPUB_68060 3 | ||
338 | #define COMPAT_FPUB_68881 5 | ||
339 | #define COMPAT_FPUB_68882 6 | ||
340 | #define COMPAT_FPUB_68040 7 | ||
341 | #define COMPAT_FPUB_68060 8 | ||
342 | |||
343 | #define COMPAT_CPU_68020 (1<<COMPAT_CPUB_68020) | ||
344 | #define COMPAT_CPU_68030 (1<<COMPAT_CPUB_68030) | ||
345 | #define COMPAT_CPU_68040 (1<<COMPAT_CPUB_68040) | ||
346 | #define COMPAT_CPU_68060 (1<<COMPAT_CPUB_68060) | ||
347 | #define COMPAT_CPU_MASK (31) | ||
348 | #define COMPAT_FPU_68881 (1<<COMPAT_FPUB_68881) | ||
349 | #define COMPAT_FPU_68882 (1<<COMPAT_FPUB_68882) | ||
350 | #define COMPAT_FPU_68040 (1<<COMPAT_FPUB_68040) | ||
351 | #define COMPAT_FPU_68060 (1<<COMPAT_FPUB_68060) | ||
352 | #define COMPAT_FPU_MASK (0xfe0) | ||
353 | |||
354 | #define COMPAT_CL_SIZE (256) | ||
355 | |||
356 | struct compat_bootinfo { | ||
357 | unsigned long machtype; | ||
358 | unsigned long cputype; | ||
359 | struct compat_mem_info memory[COMPAT_NUM_MEMINFO]; | ||
360 | int num_memory; | ||
361 | unsigned long ramdisk_size; | ||
362 | unsigned long ramdisk_addr; | ||
363 | char command_line[COMPAT_CL_SIZE]; | ||
364 | union { | ||
365 | struct compat_bi_Amiga bi_ami; | ||
366 | struct compat_bi_Atari bi_ata; | ||
367 | struct compat_bi_Macintosh bi_mac; | ||
368 | } bi_un; | ||
369 | }; | ||
370 | |||
371 | #define bi_amiga bi_un.bi_ami | ||
372 | #define bi_atari bi_un.bi_ata | ||
373 | #define bi_mac bi_un.bi_mac | ||
374 | |||
375 | #endif /* BOOTINFO_COMPAT_1_0 */ | ||
376 | |||
377 | |||
378 | #endif /* _M68K_BOOTINFO_H */ | ||
diff --git a/arch/m68k/include/asm/bootinfo_no.h b/arch/m68k/include/asm/bootinfo_no.h deleted file mode 100644 index c12e526f5189..000000000000 --- a/arch/m68k/include/asm/bootinfo_no.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | |||
2 | /* Nothing for m68knommu */ | ||
diff --git a/arch/m68k/include/asm/bug.h b/arch/m68k/include/asm/bug.h index 997e0944ebc1..ef9a2e47352f 100644 --- a/arch/m68k/include/asm/bug.h +++ b/arch/m68k/include/asm/bug.h | |||
@@ -1,5 +1,30 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_BUG_H |
2 | #include "bug_no.h" | 2 | #define _M68K_BUG_H |
3 | |||
4 | #ifdef CONFIG_MMU | ||
5 | #ifdef CONFIG_BUG | ||
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
7 | #ifndef CONFIG_SUN3 | ||
8 | #define BUG() do { \ | ||
9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | ||
10 | __builtin_trap(); \ | ||
11 | } while (0) | ||
3 | #else | 12 | #else |
4 | #include "bug_mm.h" | 13 | #define BUG() do { \ |
14 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | ||
15 | panic("BUG!"); \ | ||
16 | } while (0) | ||
17 | #endif | ||
18 | #else | ||
19 | #define BUG() do { \ | ||
20 | __builtin_trap(); \ | ||
21 | } while (0) | ||
22 | #endif | ||
23 | |||
24 | #define HAVE_ARCH_BUG | ||
25 | #endif | ||
26 | #endif /* CONFIG_MMU */ | ||
27 | |||
28 | #include <asm-generic/bug.h> | ||
29 | |||
5 | #endif | 30 | #endif |
diff --git a/arch/m68k/include/asm/bug_mm.h b/arch/m68k/include/asm/bug_mm.h deleted file mode 100644 index e5b528deb8a8..000000000000 --- a/arch/m68k/include/asm/bug_mm.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef _M68K_BUG_H | ||
2 | #define _M68K_BUG_H | ||
3 | |||
4 | |||
5 | #ifdef CONFIG_BUG | ||
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
7 | #ifndef CONFIG_SUN3 | ||
8 | #define BUG() do { \ | ||
9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | ||
10 | __builtin_trap(); \ | ||
11 | } while (0) | ||
12 | #else | ||
13 | #define BUG() do { \ | ||
14 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | ||
15 | panic("BUG!"); \ | ||
16 | } while (0) | ||
17 | #endif | ||
18 | #else | ||
19 | #define BUG() do { \ | ||
20 | __builtin_trap(); \ | ||
21 | } while (0) | ||
22 | #endif | ||
23 | |||
24 | #define HAVE_ARCH_BUG | ||
25 | #endif | ||
26 | |||
27 | #include <asm-generic/bug.h> | ||
28 | |||
29 | #endif | ||
diff --git a/arch/m68k/include/asm/bug_no.h b/arch/m68k/include/asm/bug_no.h deleted file mode 100644 index 70e7dc0af21a..000000000000 --- a/arch/m68k/include/asm/bug_no.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _M68KNOMMU_BUG_H | ||
2 | #define _M68KNOMMU_BUG_H | ||
3 | #include <asm-generic/bug.h> | ||
4 | #endif | ||
diff --git a/arch/m68k/include/asm/bugs.h b/arch/m68k/include/asm/bugs.h index 01f047d784ec..d06207b9ba5a 100644 --- a/arch/m68k/include/asm/bugs.h +++ b/arch/m68k/include/asm/bugs.h | |||
@@ -1,5 +1,20 @@ | |||
1 | #ifdef __uClinux__ | 1 | /* |
2 | #include "bugs_no.h" | 2 | * include/asm-m68k/bugs.h |
3 | * | ||
4 | * Copyright (C) 1994 Linus Torvalds | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This is included by init/main.c to check for architecture-dependent bugs. | ||
9 | * | ||
10 | * Needs: | ||
11 | * void check_bugs(void); | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MMU | ||
15 | extern void check_bugs(void); /* in arch/m68k/kernel/setup.c */ | ||
3 | #else | 16 | #else |
4 | #include "bugs_mm.h" | 17 | static void check_bugs(void) |
18 | { | ||
19 | } | ||
5 | #endif | 20 | #endif |
diff --git a/arch/m68k/include/asm/bugs_mm.h b/arch/m68k/include/asm/bugs_mm.h deleted file mode 100644 index d01935592410..000000000000 --- a/arch/m68k/include/asm/bugs_mm.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-m68k/bugs.h | ||
3 | * | ||
4 | * Copyright (C) 1994 Linus Torvalds | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This is included by init/main.c to check for architecture-dependent bugs. | ||
9 | * | ||
10 | * Needs: | ||
11 | * void check_bugs(void); | ||
12 | */ | ||
13 | |||
14 | extern void check_bugs(void); /* in arch/m68k/kernel/setup.c */ | ||
diff --git a/arch/m68k/include/asm/bugs_no.h b/arch/m68k/include/asm/bugs_no.h deleted file mode 100644 index 5f382dac3a60..000000000000 --- a/arch/m68k/include/asm/bugs_no.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-m68k/bugs.h | ||
3 | * | ||
4 | * Copyright (C) 1994 Linus Torvalds | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This is included by init/main.c to check for architecture-dependent bugs. | ||
9 | * | ||
10 | * Needs: | ||
11 | * void check_bugs(void); | ||
12 | */ | ||
13 | |||
14 | static void check_bugs(void) | ||
15 | { | ||
16 | } | ||
diff --git a/arch/m68k/include/asm/cache.h b/arch/m68k/include/asm/cache.h index 599c29bc8f40..fed3fd30de7e 100644 --- a/arch/m68k/include/asm/cache.h +++ b/arch/m68k/include/asm/cache.h | |||
@@ -1,5 +1,11 @@ | |||
1 | #ifdef __uClinux__ | 1 | /* |
2 | #include "cache_no.h" | 2 | * include/asm-m68k/cache.h |
3 | #else | 3 | */ |
4 | #include "cache_mm.h" | 4 | #ifndef __ARCH_M68K_CACHE_H |
5 | #define __ARCH_M68K_CACHE_H | ||
6 | |||
7 | /* bytes per L1 cache line */ | ||
8 | #define L1_CACHE_SHIFT 4 | ||
9 | #define L1_CACHE_BYTES (1<< L1_CACHE_SHIFT) | ||
10 | |||
5 | #endif | 11 | #endif |
diff --git a/arch/m68k/include/asm/cache_mm.h b/arch/m68k/include/asm/cache_mm.h deleted file mode 100644 index fed3fd30de7e..000000000000 --- a/arch/m68k/include/asm/cache_mm.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-m68k/cache.h | ||
3 | */ | ||
4 | #ifndef __ARCH_M68K_CACHE_H | ||
5 | #define __ARCH_M68K_CACHE_H | ||
6 | |||
7 | /* bytes per L1 cache line */ | ||
8 | #define L1_CACHE_SHIFT 4 | ||
9 | #define L1_CACHE_BYTES (1<< L1_CACHE_SHIFT) | ||
10 | |||
11 | #endif | ||
diff --git a/arch/m68k/include/asm/cache_no.h b/arch/m68k/include/asm/cache_no.h deleted file mode 100644 index 24e9eace5f8c..000000000000 --- a/arch/m68k/include/asm/cache_no.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef __ARCH_M68KNOMMU_CACHE_H | ||
2 | #define __ARCH_M68KNOMMU_CACHE_H | ||
3 | |||
4 | /* bytes per L1 cache line */ | ||
5 | #define L1_CACHE_BYTES 16 /* this need to be at least 1 */ | ||
6 | |||
7 | /* m68k-elf-gcc 2.95.2 doesn't like these */ | ||
8 | |||
9 | #define __cacheline_aligned | ||
10 | #define ____cacheline_aligned | ||
11 | |||
12 | #endif | ||
diff --git a/arch/m68k/include/asm/current.h b/arch/m68k/include/asm/current.h index 51b056dfaedd..91fcc5358cfe 100644 --- a/arch/m68k/include/asm/current.h +++ b/arch/m68k/include/asm/current.h | |||
@@ -1,5 +1,28 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_CURRENT_H |
2 | #include "current_no.h" | 2 | #define _M68K_CURRENT_H |
3 | |||
4 | #ifdef CONFIG_MMU | ||
5 | |||
6 | register struct task_struct *current __asm__("%a2"); | ||
7 | |||
3 | #else | 8 | #else |
4 | #include "current_mm.h" | 9 | |
5 | #endif | 10 | /* |
11 | * Rather than dedicate a register (as the m68k source does), we | ||
12 | * just keep a global, we should probably just change it all to be | ||
13 | * current and lose _current_task. | ||
14 | */ | ||
15 | #include <linux/thread_info.h> | ||
16 | |||
17 | struct task_struct; | ||
18 | |||
19 | static inline struct task_struct *get_current(void) | ||
20 | { | ||
21 | return(current_thread_info()->task); | ||
22 | } | ||
23 | |||
24 | #define current get_current() | ||
25 | |||
26 | #endif /* CONFNIG_MMU */ | ||
27 | |||
28 | #endif /* !(_M68K_CURRENT_H) */ | ||
diff --git a/arch/m68k/include/asm/current_mm.h b/arch/m68k/include/asm/current_mm.h deleted file mode 100644 index 8de8f8ceda61..000000000000 --- a/arch/m68k/include/asm/current_mm.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _M68K_CURRENT_H | ||
2 | #define _M68K_CURRENT_H | ||
3 | |||
4 | register struct task_struct *current __asm__("%a2"); | ||
5 | |||
6 | #endif /* !(_M68K_CURRENT_H) */ | ||
diff --git a/arch/m68k/include/asm/current_no.h b/arch/m68k/include/asm/current_no.h deleted file mode 100644 index 53ee0f9f7cef..000000000000 --- a/arch/m68k/include/asm/current_no.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef _M68KNOMMU_CURRENT_H | ||
2 | #define _M68KNOMMU_CURRENT_H | ||
3 | /* | ||
4 | * current.h | ||
5 | * (C) Copyright 2000, Lineo, David McCullough <davidm@uclinux.org> | ||
6 | * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) | ||
7 | * | ||
8 | * rather than dedicate a register (as the m68k source does), we | ||
9 | * just keep a global, we should probably just change it all to be | ||
10 | * current and lose _current_task. | ||
11 | */ | ||
12 | |||
13 | #include <linux/thread_info.h> | ||
14 | |||
15 | struct task_struct; | ||
16 | |||
17 | static inline struct task_struct *get_current(void) | ||
18 | { | ||
19 | return(current_thread_info()->task); | ||
20 | } | ||
21 | |||
22 | #define current get_current() | ||
23 | |||
24 | #endif /* _M68KNOMMU_CURRENT_H */ | ||
diff --git a/arch/m68k/include/asm/div64.h b/arch/m68k/include/asm/div64.h index d211d9f54276..edb66148a71d 100644 --- a/arch/m68k/include/asm/div64.h +++ b/arch/m68k/include/asm/div64.h | |||
@@ -1,5 +1,34 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_DIV64_H |
2 | #include "div64_no.h" | 2 | #define _M68K_DIV64_H |
3 | |||
4 | #ifdef CONFIG_MMU | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | |||
8 | /* n = n / base; return rem; */ | ||
9 | |||
10 | #define do_div(n, base) ({ \ | ||
11 | union { \ | ||
12 | unsigned long n32[2]; \ | ||
13 | unsigned long long n64; \ | ||
14 | } __n; \ | ||
15 | unsigned long __rem, __upper; \ | ||
16 | \ | ||
17 | __n.n64 = (n); \ | ||
18 | if ((__upper = __n.n32[0])) { \ | ||
19 | asm ("divul.l %2,%1:%0" \ | ||
20 | : "=d" (__n.n32[0]), "=d" (__upper) \ | ||
21 | : "d" (base), "0" (__n.n32[0])); \ | ||
22 | } \ | ||
23 | asm ("divu.l %2,%1:%0" \ | ||
24 | : "=d" (__n.n32[1]), "=d" (__rem) \ | ||
25 | : "d" (base), "1" (__upper), "0" (__n.n32[1])); \ | ||
26 | (n) = __n.n64; \ | ||
27 | __rem; \ | ||
28 | }) | ||
29 | |||
3 | #else | 30 | #else |
4 | #include "div64_mm.h" | 31 | #include <asm-generic/div64.h> |
5 | #endif | 32 | #endif /* CONFIG_MMU */ |
33 | |||
34 | #endif /* _M68K_DIV64_H */ | ||
diff --git a/arch/m68k/include/asm/div64_mm.h b/arch/m68k/include/asm/div64_mm.h deleted file mode 100644 index 8243c931b5c0..000000000000 --- a/arch/m68k/include/asm/div64_mm.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #ifndef _M68K_DIV64_H | ||
2 | #define _M68K_DIV64_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* n = n / base; return rem; */ | ||
7 | |||
8 | #define do_div(n, base) ({ \ | ||
9 | union { \ | ||
10 | unsigned long n32[2]; \ | ||
11 | unsigned long long n64; \ | ||
12 | } __n; \ | ||
13 | unsigned long __rem, __upper; \ | ||
14 | \ | ||
15 | __n.n64 = (n); \ | ||
16 | if ((__upper = __n.n32[0])) { \ | ||
17 | asm ("divul.l %2,%1:%0" \ | ||
18 | : "=d" (__n.n32[0]), "=d" (__upper) \ | ||
19 | : "d" (base), "0" (__n.n32[0])); \ | ||
20 | } \ | ||
21 | asm ("divu.l %2,%1:%0" \ | ||
22 | : "=d" (__n.n32[1]), "=d" (__rem) \ | ||
23 | : "d" (base), "1" (__upper), "0" (__n.n32[1])); \ | ||
24 | (n) = __n.n64; \ | ||
25 | __rem; \ | ||
26 | }) | ||
27 | |||
28 | #endif /* _M68K_DIV64_H */ | ||
diff --git a/arch/m68k/include/asm/div64_no.h b/arch/m68k/include/asm/div64_no.h deleted file mode 100644 index 6cd978cefb28..000000000000 --- a/arch/m68k/include/asm/div64_no.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/div64.h> | ||
diff --git a/arch/m68k/include/asm/dma-mapping.h b/arch/m68k/include/asm/dma-mapping.h index f4a4c7638f89..26f505488c11 100644 --- a/arch/m68k/include/asm/dma-mapping.h +++ b/arch/m68k/include/asm/dma-mapping.h | |||
@@ -1,5 +1,112 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_DMA_MAPPING_H |
2 | #include "dma-mapping_no.h" | 2 | #define _M68K_DMA_MAPPING_H |
3 | |||
4 | #include <asm/cache.h> | ||
5 | |||
6 | struct scatterlist; | ||
7 | |||
8 | #ifndef CONFIG_MMU_SUN3 | ||
9 | static inline int dma_supported(struct device *dev, u64 mask) | ||
10 | { | ||
11 | return 1; | ||
12 | } | ||
13 | |||
14 | static inline int dma_set_mask(struct device *dev, u64 mask) | ||
15 | { | ||
16 | return 0; | ||
17 | } | ||
18 | |||
19 | static inline int dma_get_cache_alignment(void) | ||
20 | { | ||
21 | return 1 << L1_CACHE_SHIFT; | ||
22 | } | ||
23 | |||
24 | static inline int dma_is_consistent(struct device *dev, dma_addr_t dma_addr) | ||
25 | { | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | extern void *dma_alloc_coherent(struct device *, size_t, | ||
30 | dma_addr_t *, gfp_t); | ||
31 | extern void dma_free_coherent(struct device *, size_t, | ||
32 | void *, dma_addr_t); | ||
33 | |||
34 | static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, | ||
35 | dma_addr_t *handle, gfp_t flag) | ||
36 | { | ||
37 | return dma_alloc_coherent(dev, size, handle, flag); | ||
38 | } | ||
39 | static inline void dma_free_noncoherent(struct device *dev, size_t size, | ||
40 | void *addr, dma_addr_t handle) | ||
41 | { | ||
42 | dma_free_coherent(dev, size, addr, handle); | ||
43 | } | ||
44 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | ||
45 | enum dma_data_direction dir) | ||
46 | { | ||
47 | /* we use coherent allocation, so not much to do here. */ | ||
48 | } | ||
49 | |||
50 | extern dma_addr_t dma_map_single(struct device *, void *, size_t, | ||
51 | enum dma_data_direction); | ||
52 | static inline void dma_unmap_single(struct device *dev, dma_addr_t addr, | ||
53 | size_t size, enum dma_data_direction dir) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | extern dma_addr_t dma_map_page(struct device *, struct page *, | ||
58 | unsigned long, size_t size, | ||
59 | enum dma_data_direction); | ||
60 | static inline void dma_unmap_page(struct device *dev, dma_addr_t address, | ||
61 | size_t size, enum dma_data_direction dir) | ||
62 | { | ||
63 | } | ||
64 | |||
65 | extern int dma_map_sg(struct device *, struct scatterlist *, int, | ||
66 | enum dma_data_direction); | ||
67 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
68 | int nhwentries, enum dma_data_direction dir) | ||
69 | { | ||
70 | } | ||
71 | |||
72 | extern void dma_sync_single_for_device(struct device *, dma_addr_t, size_t, | ||
73 | enum dma_data_direction); | ||
74 | extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int, | ||
75 | enum dma_data_direction); | ||
76 | |||
77 | static inline void dma_sync_single_range_for_device(struct device *dev, | ||
78 | dma_addr_t dma_handle, unsigned long offset, size_t size, | ||
79 | enum dma_data_direction direction) | ||
80 | { | ||
81 | /* just sync everything for now */ | ||
82 | dma_sync_single_for_device(dev, dma_handle, offset + size, direction); | ||
83 | } | ||
84 | |||
85 | static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, | ||
86 | size_t size, enum dma_data_direction dir) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | ||
91 | int nents, enum dma_data_direction dir) | ||
92 | { | ||
93 | } | ||
94 | |||
95 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
96 | dma_addr_t dma_handle, unsigned long offset, size_t size, | ||
97 | enum dma_data_direction direction) | ||
98 | { | ||
99 | /* just sync everything for now */ | ||
100 | dma_sync_single_for_cpu(dev, dma_handle, offset + size, direction); | ||
101 | } | ||
102 | |||
103 | static inline int dma_mapping_error(struct device *dev, dma_addr_t handle) | ||
104 | { | ||
105 | return 0; | ||
106 | } | ||
107 | |||
3 | #else | 108 | #else |
4 | #include "dma-mapping_mm.h" | 109 | #include <asm-generic/dma-mapping-broken.h> |
5 | #endif | 110 | #endif |
111 | |||
112 | #endif /* _M68K_DMA_MAPPING_H */ | ||
diff --git a/arch/m68k/include/asm/dma-mapping_mm.h b/arch/m68k/include/asm/dma-mapping_mm.h deleted file mode 100644 index 26f505488c11..000000000000 --- a/arch/m68k/include/asm/dma-mapping_mm.h +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | #ifndef _M68K_DMA_MAPPING_H | ||
2 | #define _M68K_DMA_MAPPING_H | ||
3 | |||
4 | #include <asm/cache.h> | ||
5 | |||
6 | struct scatterlist; | ||
7 | |||
8 | #ifndef CONFIG_MMU_SUN3 | ||
9 | static inline int dma_supported(struct device *dev, u64 mask) | ||
10 | { | ||
11 | return 1; | ||
12 | } | ||
13 | |||
14 | static inline int dma_set_mask(struct device *dev, u64 mask) | ||
15 | { | ||
16 | return 0; | ||
17 | } | ||
18 | |||
19 | static inline int dma_get_cache_alignment(void) | ||
20 | { | ||
21 | return 1 << L1_CACHE_SHIFT; | ||
22 | } | ||
23 | |||
24 | static inline int dma_is_consistent(struct device *dev, dma_addr_t dma_addr) | ||
25 | { | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | extern void *dma_alloc_coherent(struct device *, size_t, | ||
30 | dma_addr_t *, gfp_t); | ||
31 | extern void dma_free_coherent(struct device *, size_t, | ||
32 | void *, dma_addr_t); | ||
33 | |||
34 | static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, | ||
35 | dma_addr_t *handle, gfp_t flag) | ||
36 | { | ||
37 | return dma_alloc_coherent(dev, size, handle, flag); | ||
38 | } | ||
39 | static inline void dma_free_noncoherent(struct device *dev, size_t size, | ||
40 | void *addr, dma_addr_t handle) | ||
41 | { | ||
42 | dma_free_coherent(dev, size, addr, handle); | ||
43 | } | ||
44 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | ||
45 | enum dma_data_direction dir) | ||
46 | { | ||
47 | /* we use coherent allocation, so not much to do here. */ | ||
48 | } | ||
49 | |||
50 | extern dma_addr_t dma_map_single(struct device *, void *, size_t, | ||
51 | enum dma_data_direction); | ||
52 | static inline void dma_unmap_single(struct device *dev, dma_addr_t addr, | ||
53 | size_t size, enum dma_data_direction dir) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | extern dma_addr_t dma_map_page(struct device *, struct page *, | ||
58 | unsigned long, size_t size, | ||
59 | enum dma_data_direction); | ||
60 | static inline void dma_unmap_page(struct device *dev, dma_addr_t address, | ||
61 | size_t size, enum dma_data_direction dir) | ||
62 | { | ||
63 | } | ||
64 | |||
65 | extern int dma_map_sg(struct device *, struct scatterlist *, int, | ||
66 | enum dma_data_direction); | ||
67 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
68 | int nhwentries, enum dma_data_direction dir) | ||
69 | { | ||
70 | } | ||
71 | |||
72 | extern void dma_sync_single_for_device(struct device *, dma_addr_t, size_t, | ||
73 | enum dma_data_direction); | ||
74 | extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int, | ||
75 | enum dma_data_direction); | ||
76 | |||
77 | static inline void dma_sync_single_range_for_device(struct device *dev, | ||
78 | dma_addr_t dma_handle, unsigned long offset, size_t size, | ||
79 | enum dma_data_direction direction) | ||
80 | { | ||
81 | /* just sync everything for now */ | ||
82 | dma_sync_single_for_device(dev, dma_handle, offset + size, direction); | ||
83 | } | ||
84 | |||
85 | static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, | ||
86 | size_t size, enum dma_data_direction dir) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | ||
91 | int nents, enum dma_data_direction dir) | ||
92 | { | ||
93 | } | ||
94 | |||
95 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
96 | dma_addr_t dma_handle, unsigned long offset, size_t size, | ||
97 | enum dma_data_direction direction) | ||
98 | { | ||
99 | /* just sync everything for now */ | ||
100 | dma_sync_single_for_cpu(dev, dma_handle, offset + size, direction); | ||
101 | } | ||
102 | |||
103 | static inline int dma_mapping_error(struct device *dev, dma_addr_t handle) | ||
104 | { | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | #else | ||
109 | #include <asm-generic/dma-mapping-broken.h> | ||
110 | #endif | ||
111 | |||
112 | #endif /* _M68K_DMA_MAPPING_H */ | ||
diff --git a/arch/m68k/include/asm/dma-mapping_no.h b/arch/m68k/include/asm/dma-mapping_no.h deleted file mode 100644 index 1748f2bca940..000000000000 --- a/arch/m68k/include/asm/dma-mapping_no.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _M68KNOMMU_DMA_MAPPING_H | ||
2 | #define _M68KNOMMU_DMA_MAPPING_H | ||
3 | |||
4 | #include <asm-generic/dma-mapping-broken.h> | ||
5 | |||
6 | #endif /* _M68KNOMMU_DMA_MAPPING_H */ | ||
diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h index 04ce488bc63f..0b0f49eb876b 100644 --- a/arch/m68k/include/asm/elf.h +++ b/arch/m68k/include/asm/elf.h | |||
@@ -1,5 +1,119 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef __ASMm68k_ELF_H |
2 | #include "elf_no.h" | 2 | #define __ASMm68k_ELF_H |
3 | |||
4 | /* | ||
5 | * ELF register definitions.. | ||
6 | */ | ||
7 | |||
8 | #include <asm/ptrace.h> | ||
9 | #include <asm/user.h> | ||
10 | |||
11 | /* | ||
12 | * 68k ELF relocation types | ||
13 | */ | ||
14 | #define R_68K_NONE 0 | ||
15 | #define R_68K_32 1 | ||
16 | #define R_68K_16 2 | ||
17 | #define R_68K_8 3 | ||
18 | #define R_68K_PC32 4 | ||
19 | #define R_68K_PC16 5 | ||
20 | #define R_68K_PC8 6 | ||
21 | #define R_68K_GOT32 7 | ||
22 | #define R_68K_GOT16 8 | ||
23 | #define R_68K_GOT8 9 | ||
24 | #define R_68K_GOT32O 10 | ||
25 | #define R_68K_GOT16O 11 | ||
26 | #define R_68K_GOT8O 12 | ||
27 | #define R_68K_PLT32 13 | ||
28 | #define R_68K_PLT16 14 | ||
29 | #define R_68K_PLT8 15 | ||
30 | #define R_68K_PLT32O 16 | ||
31 | #define R_68K_PLT16O 17 | ||
32 | #define R_68K_PLT8O 18 | ||
33 | #define R_68K_COPY 19 | ||
34 | #define R_68K_GLOB_DAT 20 | ||
35 | #define R_68K_JMP_SLOT 21 | ||
36 | #define R_68K_RELATIVE 22 | ||
37 | |||
38 | typedef unsigned long elf_greg_t; | ||
39 | |||
40 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
41 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
42 | |||
43 | typedef struct user_m68kfp_struct elf_fpregset_t; | ||
44 | |||
45 | /* | ||
46 | * This is used to ensure we don't load something for the wrong architecture. | ||
47 | */ | ||
48 | #define elf_check_arch(x) ((x)->e_machine == EM_68K) | ||
49 | |||
50 | /* | ||
51 | * These are used to set parameters in the core dumps. | ||
52 | */ | ||
53 | #define ELF_CLASS ELFCLASS32 | ||
54 | #define ELF_DATA ELFDATA2MSB | ||
55 | #define ELF_ARCH EM_68K | ||
56 | |||
57 | /* For SVR4/m68k the function pointer to be registered with `atexit' is | ||
58 | passed in %a1. Although my copy of the ABI has no such statement, it | ||
59 | is actually used on ASV. */ | ||
60 | #define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0 | ||
61 | |||
62 | #define USE_ELF_CORE_DUMP | ||
63 | #ifndef CONFIG_SUN3 | ||
64 | #define ELF_EXEC_PAGESIZE 4096 | ||
3 | #else | 65 | #else |
4 | #include "elf_mm.h" | 66 | #define ELF_EXEC_PAGESIZE 8192 |
67 | #endif | ||
68 | |||
69 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
70 | use of this is to invoke "./ld.so someprog" to test out a new version of | ||
71 | the loader. We need to make sure that it is out of the way of the program | ||
72 | that it will "exec", and that there is sufficient room for the brk. */ | ||
73 | |||
74 | #ifndef CONFIG_SUN3 | ||
75 | #define ELF_ET_DYN_BASE 0xD0000000UL | ||
76 | #else | ||
77 | #define ELF_ET_DYN_BASE 0x0D800000UL | ||
78 | #endif | ||
79 | |||
80 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | ||
81 | /* Bleech. */ \ | ||
82 | pr_reg[0] = regs->d1; \ | ||
83 | pr_reg[1] = regs->d2; \ | ||
84 | pr_reg[2] = regs->d3; \ | ||
85 | pr_reg[3] = regs->d4; \ | ||
86 | pr_reg[4] = regs->d5; \ | ||
87 | pr_reg[7] = regs->a0; \ | ||
88 | pr_reg[8] = regs->a1; \ | ||
89 | pr_reg[9] = regs->a2; \ | ||
90 | pr_reg[14] = regs->d0; \ | ||
91 | pr_reg[15] = rdusp(); \ | ||
92 | pr_reg[16] = regs->orig_d0; \ | ||
93 | pr_reg[17] = regs->sr; \ | ||
94 | pr_reg[18] = regs->pc; \ | ||
95 | pr_reg[19] = (regs->format << 12) | regs->vector; \ | ||
96 | { \ | ||
97 | struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \ | ||
98 | pr_reg[5] = sw->d6; \ | ||
99 | pr_reg[6] = sw->d7; \ | ||
100 | pr_reg[10] = sw->a3; \ | ||
101 | pr_reg[11] = sw->a4; \ | ||
102 | pr_reg[12] = sw->a5; \ | ||
103 | pr_reg[13] = sw->a6; \ | ||
104 | } | ||
105 | |||
106 | /* This yields a mask that user programs can use to figure out what | ||
107 | instruction set this cpu supports. */ | ||
108 | |||
109 | #define ELF_HWCAP (0) | ||
110 | |||
111 | /* This yields a string that ld.so will use to load implementation | ||
112 | specific libraries for optimization. This is more specific in | ||
113 | intent than poking at uname or /proc/cpuinfo. */ | ||
114 | |||
115 | #define ELF_PLATFORM (NULL) | ||
116 | |||
117 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) | ||
118 | |||
5 | #endif | 119 | #endif |
diff --git a/arch/m68k/include/asm/elf_mm.h b/arch/m68k/include/asm/elf_mm.h deleted file mode 100644 index 0b0f49eb876b..000000000000 --- a/arch/m68k/include/asm/elf_mm.h +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | #ifndef __ASMm68k_ELF_H | ||
2 | #define __ASMm68k_ELF_H | ||
3 | |||
4 | /* | ||
5 | * ELF register definitions.. | ||
6 | */ | ||
7 | |||
8 | #include <asm/ptrace.h> | ||
9 | #include <asm/user.h> | ||
10 | |||
11 | /* | ||
12 | * 68k ELF relocation types | ||
13 | */ | ||
14 | #define R_68K_NONE 0 | ||
15 | #define R_68K_32 1 | ||
16 | #define R_68K_16 2 | ||
17 | #define R_68K_8 3 | ||
18 | #define R_68K_PC32 4 | ||
19 | #define R_68K_PC16 5 | ||
20 | #define R_68K_PC8 6 | ||
21 | #define R_68K_GOT32 7 | ||
22 | #define R_68K_GOT16 8 | ||
23 | #define R_68K_GOT8 9 | ||
24 | #define R_68K_GOT32O 10 | ||
25 | #define R_68K_GOT16O 11 | ||
26 | #define R_68K_GOT8O 12 | ||
27 | #define R_68K_PLT32 13 | ||
28 | #define R_68K_PLT16 14 | ||
29 | #define R_68K_PLT8 15 | ||
30 | #define R_68K_PLT32O 16 | ||
31 | #define R_68K_PLT16O 17 | ||
32 | #define R_68K_PLT8O 18 | ||
33 | #define R_68K_COPY 19 | ||
34 | #define R_68K_GLOB_DAT 20 | ||
35 | #define R_68K_JMP_SLOT 21 | ||
36 | #define R_68K_RELATIVE 22 | ||
37 | |||
38 | typedef unsigned long elf_greg_t; | ||
39 | |||
40 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
41 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
42 | |||
43 | typedef struct user_m68kfp_struct elf_fpregset_t; | ||
44 | |||
45 | /* | ||
46 | * This is used to ensure we don't load something for the wrong architecture. | ||
47 | */ | ||
48 | #define elf_check_arch(x) ((x)->e_machine == EM_68K) | ||
49 | |||
50 | /* | ||
51 | * These are used to set parameters in the core dumps. | ||
52 | */ | ||
53 | #define ELF_CLASS ELFCLASS32 | ||
54 | #define ELF_DATA ELFDATA2MSB | ||
55 | #define ELF_ARCH EM_68K | ||
56 | |||
57 | /* For SVR4/m68k the function pointer to be registered with `atexit' is | ||
58 | passed in %a1. Although my copy of the ABI has no such statement, it | ||
59 | is actually used on ASV. */ | ||
60 | #define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0 | ||
61 | |||
62 | #define USE_ELF_CORE_DUMP | ||
63 | #ifndef CONFIG_SUN3 | ||
64 | #define ELF_EXEC_PAGESIZE 4096 | ||
65 | #else | ||
66 | #define ELF_EXEC_PAGESIZE 8192 | ||
67 | #endif | ||
68 | |||
69 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
70 | use of this is to invoke "./ld.so someprog" to test out a new version of | ||
71 | the loader. We need to make sure that it is out of the way of the program | ||
72 | that it will "exec", and that there is sufficient room for the brk. */ | ||
73 | |||
74 | #ifndef CONFIG_SUN3 | ||
75 | #define ELF_ET_DYN_BASE 0xD0000000UL | ||
76 | #else | ||
77 | #define ELF_ET_DYN_BASE 0x0D800000UL | ||
78 | #endif | ||
79 | |||
80 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | ||
81 | /* Bleech. */ \ | ||
82 | pr_reg[0] = regs->d1; \ | ||
83 | pr_reg[1] = regs->d2; \ | ||
84 | pr_reg[2] = regs->d3; \ | ||
85 | pr_reg[3] = regs->d4; \ | ||
86 | pr_reg[4] = regs->d5; \ | ||
87 | pr_reg[7] = regs->a0; \ | ||
88 | pr_reg[8] = regs->a1; \ | ||
89 | pr_reg[9] = regs->a2; \ | ||
90 | pr_reg[14] = regs->d0; \ | ||
91 | pr_reg[15] = rdusp(); \ | ||
92 | pr_reg[16] = regs->orig_d0; \ | ||
93 | pr_reg[17] = regs->sr; \ | ||
94 | pr_reg[18] = regs->pc; \ | ||
95 | pr_reg[19] = (regs->format << 12) | regs->vector; \ | ||
96 | { \ | ||
97 | struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \ | ||
98 | pr_reg[5] = sw->d6; \ | ||
99 | pr_reg[6] = sw->d7; \ | ||
100 | pr_reg[10] = sw->a3; \ | ||
101 | pr_reg[11] = sw->a4; \ | ||
102 | pr_reg[12] = sw->a5; \ | ||
103 | pr_reg[13] = sw->a6; \ | ||
104 | } | ||
105 | |||
106 | /* This yields a mask that user programs can use to figure out what | ||
107 | instruction set this cpu supports. */ | ||
108 | |||
109 | #define ELF_HWCAP (0) | ||
110 | |||
111 | /* This yields a string that ld.so will use to load implementation | ||
112 | specific libraries for optimization. This is more specific in | ||
113 | intent than poking at uname or /proc/cpuinfo. */ | ||
114 | |||
115 | #define ELF_PLATFORM (NULL) | ||
116 | |||
117 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) | ||
118 | |||
119 | #endif | ||
diff --git a/arch/m68k/include/asm/elf_no.h b/arch/m68k/include/asm/elf_no.h deleted file mode 100644 index b8046837f384..000000000000 --- a/arch/m68k/include/asm/elf_no.h +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | #ifndef __ASMm68k_ELF_H | ||
2 | #define __ASMm68k_ELF_H | ||
3 | |||
4 | /* | ||
5 | * ELF register definitions.. | ||
6 | */ | ||
7 | |||
8 | #include <asm/ptrace.h> | ||
9 | #include <asm/user.h> | ||
10 | |||
11 | /* | ||
12 | * 68k ELF relocation types | ||
13 | */ | ||
14 | #define R_68K_NONE 0 | ||
15 | #define R_68K_32 1 | ||
16 | #define R_68K_16 2 | ||
17 | #define R_68K_8 3 | ||
18 | #define R_68K_PC32 4 | ||
19 | #define R_68K_PC16 5 | ||
20 | #define R_68K_PC8 6 | ||
21 | #define R_68K_GOT32 7 | ||
22 | #define R_68K_GOT16 8 | ||
23 | #define R_68K_GOT8 9 | ||
24 | #define R_68K_GOT32O 10 | ||
25 | #define R_68K_GOT16O 11 | ||
26 | #define R_68K_GOT8O 12 | ||
27 | #define R_68K_PLT32 13 | ||
28 | #define R_68K_PLT16 14 | ||
29 | #define R_68K_PLT8 15 | ||
30 | #define R_68K_PLT32O 16 | ||
31 | #define R_68K_PLT16O 17 | ||
32 | #define R_68K_PLT8O 18 | ||
33 | #define R_68K_COPY 19 | ||
34 | #define R_68K_GLOB_DAT 20 | ||
35 | #define R_68K_JMP_SLOT 21 | ||
36 | #define R_68K_RELATIVE 22 | ||
37 | |||
38 | typedef unsigned long elf_greg_t; | ||
39 | |||
40 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
41 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
42 | |||
43 | typedef struct user_m68kfp_struct elf_fpregset_t; | ||
44 | |||
45 | /* | ||
46 | * This is used to ensure we don't load something for the wrong architecture. | ||
47 | */ | ||
48 | #define elf_check_arch(x) ((x)->e_machine == EM_68K) | ||
49 | |||
50 | /* | ||
51 | * These are used to set parameters in the core dumps. | ||
52 | */ | ||
53 | #define ELF_CLASS ELFCLASS32 | ||
54 | #define ELF_DATA ELFDATA2MSB | ||
55 | #define ELF_ARCH EM_68K | ||
56 | |||
57 | /* For SVR4/m68k the function pointer to be registered with `atexit' is | ||
58 | passed in %a1. Although my copy of the ABI has no such statement, it | ||
59 | is actually used on ASV. */ | ||
60 | #define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0 | ||
61 | |||
62 | #define USE_ELF_CORE_DUMP | ||
63 | #define ELF_EXEC_PAGESIZE 4096 | ||
64 | |||
65 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
66 | use of this is to invoke "./ld.so someprog" to test out a new version of | ||
67 | the loader. We need to make sure that it is out of the way of the program | ||
68 | that it will "exec", and that there is sufficient room for the brk. */ | ||
69 | |||
70 | #define ELF_ET_DYN_BASE 0xD0000000UL | ||
71 | |||
72 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | ||
73 | /* Bleech. */ \ | ||
74 | pr_reg[0] = regs->d1; \ | ||
75 | pr_reg[1] = regs->d2; \ | ||
76 | pr_reg[2] = regs->d3; \ | ||
77 | pr_reg[3] = regs->d4; \ | ||
78 | pr_reg[4] = regs->d5; \ | ||
79 | pr_reg[7] = regs->a0; \ | ||
80 | pr_reg[8] = regs->a1; \ | ||
81 | pr_reg[14] = regs->d0; \ | ||
82 | pr_reg[15] = rdusp(); \ | ||
83 | pr_reg[16] = 0 /* regs->orig_d0 */; \ | ||
84 | pr_reg[17] = regs->sr; \ | ||
85 | pr_reg[18] = regs->pc; \ | ||
86 | /* pr_reg[19] = (regs->format << 12) | regs->vector; */ \ | ||
87 | { \ | ||
88 | struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \ | ||
89 | pr_reg[5] = sw->d6; \ | ||
90 | pr_reg[6] = sw->d7; \ | ||
91 | pr_reg[10] = sw->a3; \ | ||
92 | pr_reg[11] = sw->a4; \ | ||
93 | pr_reg[12] = sw->a5; \ | ||
94 | pr_reg[13] = sw->a6; \ | ||
95 | } | ||
96 | |||
97 | /* This yields a mask that user programs can use to figure out what | ||
98 | instruction set this cpu supports. */ | ||
99 | |||
100 | #define ELF_HWCAP (0) | ||
101 | |||
102 | /* This yields a string that ld.so will use to load implementation | ||
103 | specific libraries for optimization. This is more specific in | ||
104 | intent than poking at uname or /proc/cpuinfo. */ | ||
105 | |||
106 | #define ELF_PLATFORM (NULL) | ||
107 | |||
108 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) | ||
109 | |||
110 | #endif | ||
diff --git a/arch/m68k/include/asm/fb.h b/arch/m68k/include/asm/fb.h index 97bcaefd2064..be4e4c6797e8 100644 --- a/arch/m68k/include/asm/fb.h +++ b/arch/m68k/include/asm/fb.h | |||
@@ -1,5 +1,38 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _ASM_FB_H_ |
2 | #include "fb_no.h" | 2 | #define _ASM_FB_H_ |
3 | |||
4 | #include <linux/fb.h> | ||
5 | #include <linux/fs.h> | ||
6 | #include <asm/page.h> | ||
7 | #include <asm/setup.h> | ||
8 | |||
9 | #ifdef CONFIG_MMU | ||
10 | #ifdef CONFIG_SUN3 | ||
11 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | ||
12 | unsigned long off) | ||
13 | { | ||
14 | pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; | ||
15 | } | ||
3 | #else | 16 | #else |
4 | #include "fb_mm.h" | 17 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
5 | #endif | 18 | unsigned long off) |
19 | { | ||
20 | if (CPU_IS_020_OR_030) | ||
21 | pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; | ||
22 | if (CPU_IS_040_OR_060) { | ||
23 | pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; | ||
24 | /* Use no-cache mode, serialized */ | ||
25 | pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; | ||
26 | } | ||
27 | } | ||
28 | #endif /* CONFIG_SUN3 */ | ||
29 | #else | ||
30 | #define fb_pgprotect(...) do {} while (0) | ||
31 | #endif /* CONFIG_MMU */ | ||
32 | |||
33 | static inline int fb_is_primary_device(struct fb_info *info) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | |||
38 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/arch/m68k/include/asm/fb_mm.h b/arch/m68k/include/asm/fb_mm.h deleted file mode 100644 index 380b97ae8157..000000000000 --- a/arch/m68k/include/asm/fb_mm.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | #ifndef _ASM_FB_H_ | ||
2 | #define _ASM_FB_H_ | ||
3 | |||
4 | #include <linux/fb.h> | ||
5 | #include <linux/fs.h> | ||
6 | #include <asm/page.h> | ||
7 | #include <asm/setup.h> | ||
8 | |||
9 | #ifdef CONFIG_SUN3 | ||
10 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | ||
11 | unsigned long off) | ||
12 | { | ||
13 | pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; | ||
14 | } | ||
15 | #else | ||
16 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | ||
17 | unsigned long off) | ||
18 | { | ||
19 | if (CPU_IS_020_OR_030) | ||
20 | pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; | ||
21 | if (CPU_IS_040_OR_060) { | ||
22 | pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; | ||
23 | /* Use no-cache mode, serialized */ | ||
24 | pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; | ||
25 | } | ||
26 | } | ||
27 | #endif /* CONFIG_SUN3 */ | ||
28 | |||
29 | static inline int fb_is_primary_device(struct fb_info *info) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/arch/m68k/include/asm/fb_no.h b/arch/m68k/include/asm/fb_no.h deleted file mode 100644 index c7df38030992..000000000000 --- a/arch/m68k/include/asm/fb_no.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_FB_H_ | ||
2 | #define _ASM_FB_H_ | ||
3 | #include <linux/fb.h> | ||
4 | |||
5 | #define fb_pgprotect(...) do {} while (0) | ||
6 | |||
7 | static inline int fb_is_primary_device(struct fb_info *info) | ||
8 | { | ||
9 | return 0; | ||
10 | } | ||
11 | |||
12 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/arch/m68k/include/asm/fpu.h b/arch/m68k/include/asm/fpu.h index e19bc5ed9c37..ffb6b8cfc6d5 100644 --- a/arch/m68k/include/asm/fpu.h +++ b/arch/m68k/include/asm/fpu.h | |||
@@ -1,5 +1,21 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef __M68K_FPU_H |
2 | #include "fpu_no.h" | 2 | #define __M68K_FPU_H |
3 | |||
4 | |||
5 | /* | ||
6 | * MAX floating point unit state size (FSAVE/FRESTORE) | ||
7 | */ | ||
8 | |||
9 | #if defined(CONFIG_M68020) || defined(CONFIG_M68030) | ||
10 | #define FPSTATESIZE (216) | ||
11 | #elif defined(CONFIG_M68040) | ||
12 | #define FPSTATESIZE (96) | ||
13 | #elif defined(CONFIG_M68KFPU_EMU) | ||
14 | #define FPSTATESIZE (28) | ||
15 | #elif defined(CONFIG_M68060) | ||
16 | #define FPSTATESIZE (12) | ||
3 | #else | 17 | #else |
4 | #include "fpu_mm.h" | 18 | #define FPSTATESIZE (0) |
5 | #endif | 19 | #endif |
20 | |||
21 | #endif /* __M68K_FPU_H */ | ||
diff --git a/arch/m68k/include/asm/fpu_mm.h b/arch/m68k/include/asm/fpu_mm.h deleted file mode 100644 index ffb6b8cfc6d5..000000000000 --- a/arch/m68k/include/asm/fpu_mm.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef __M68K_FPU_H | ||
2 | #define __M68K_FPU_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * MAX floating point unit state size (FSAVE/FRESTORE) | ||
7 | */ | ||
8 | |||
9 | #if defined(CONFIG_M68020) || defined(CONFIG_M68030) | ||
10 | #define FPSTATESIZE (216) | ||
11 | #elif defined(CONFIG_M68040) | ||
12 | #define FPSTATESIZE (96) | ||
13 | #elif defined(CONFIG_M68KFPU_EMU) | ||
14 | #define FPSTATESIZE (28) | ||
15 | #elif defined(CONFIG_M68060) | ||
16 | #define FPSTATESIZE (12) | ||
17 | #else | ||
18 | #define FPSTATESIZE (0) | ||
19 | #endif | ||
20 | |||
21 | #endif /* __M68K_FPU_H */ | ||
diff --git a/arch/m68k/include/asm/fpu_no.h b/arch/m68k/include/asm/fpu_no.h deleted file mode 100644 index b16b2e4fca2a..000000000000 --- a/arch/m68k/include/asm/fpu_no.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef __M68KNOMMU_FPU_H | ||
2 | #define __M68KNOMMU_FPU_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * MAX floating point unit state size (FSAVE/FRESTORE) | ||
7 | */ | ||
8 | #if defined(CONFIG_M68020) || defined(CONFIG_M68030) | ||
9 | #define FPSTATESIZE (216/sizeof(unsigned char)) | ||
10 | #elif defined(CONFIG_M68040) | ||
11 | #define FPSTATESIZE (96/sizeof(unsigned char)) | ||
12 | #elif defined(CONFIG_M68KFPU_EMU) | ||
13 | #define FPSTATESIZE (28/sizeof(unsigned char)) | ||
14 | #elif defined(CONFIG_M68060) | ||
15 | #define FPSTATESIZE (12/sizeof(unsigned char)) | ||
16 | #else | ||
17 | /* Assume no FP unit present then... */ | ||
18 | #define FPSTATESIZE (2) /* dummy size */ | ||
19 | #endif | ||
20 | |||
21 | #endif /* __M68K_FPU_H */ | ||
diff --git a/arch/m68k/include/asm/hw_irq.h b/arch/m68k/include/asm/hw_irq.h index e19526015890..eacef0951fbf 100644 --- a/arch/m68k/include/asm/hw_irq.h +++ b/arch/m68k/include/asm/hw_irq.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef __ASM_M68K_HW_IRQ_H |
2 | #include "hw_irq_no.h" | 2 | #define __ASM_M68K_HW_IRQ_H |
3 | #else | 3 | |
4 | #include "hw_irq_mm.h" | 4 | /* Dummy include. */ |
5 | |||
5 | #endif | 6 | #endif |
diff --git a/arch/m68k/include/asm/hw_irq_mm.h b/arch/m68k/include/asm/hw_irq_mm.h deleted file mode 100644 index eacef0951fbf..000000000000 --- a/arch/m68k/include/asm/hw_irq_mm.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_M68K_HW_IRQ_H | ||
2 | #define __ASM_M68K_HW_IRQ_H | ||
3 | |||
4 | /* Dummy include. */ | ||
5 | |||
6 | #endif | ||
diff --git a/arch/m68k/include/asm/hw_irq_no.h b/arch/m68k/include/asm/hw_irq_no.h deleted file mode 100644 index f3ec9e5ae049..000000000000 --- a/arch/m68k/include/asm/hw_irq_no.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef __M68KNOMMU_HW_IRQ_H__ | ||
2 | #define __M68KNOMMU_HW_IRQ_H__ | ||
3 | |||
4 | #endif /* __M68KNOMMU_HW_IRQ_H__ */ | ||
diff --git a/arch/m68k/include/asm/kmap_types.h b/arch/m68k/include/asm/kmap_types.h index 045d9fd122a2..c843c63d3801 100644 --- a/arch/m68k/include/asm/kmap_types.h +++ b/arch/m68k/include/asm/kmap_types.h | |||
@@ -1,5 +1,21 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef __ASM_M68K_KMAP_TYPES_H |
2 | #include "kmap_types_no.h" | 2 | #define __ASM_M68K_KMAP_TYPES_H |
3 | #else | 3 | |
4 | #include "kmap_types_mm.h" | 4 | enum km_type { |
5 | #endif | 5 | KM_BOUNCE_READ, |
6 | KM_SKB_SUNRPC_DATA, | ||
7 | KM_SKB_DATA_SOFTIRQ, | ||
8 | KM_USER0, | ||
9 | KM_USER1, | ||
10 | KM_BIO_SRC_IRQ, | ||
11 | KM_BIO_DST_IRQ, | ||
12 | KM_PTE0, | ||
13 | KM_PTE1, | ||
14 | KM_IRQ0, | ||
15 | KM_IRQ1, | ||
16 | KM_SOFTIRQ0, | ||
17 | KM_SOFTIRQ1, | ||
18 | KM_TYPE_NR | ||
19 | }; | ||
20 | |||
21 | #endif /* __ASM_M68K_KMAP_TYPES_H */ | ||
diff --git a/arch/m68k/include/asm/kmap_types_mm.h b/arch/m68k/include/asm/kmap_types_mm.h deleted file mode 100644 index c843c63d3801..000000000000 --- a/arch/m68k/include/asm/kmap_types_mm.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef __ASM_M68K_KMAP_TYPES_H | ||
2 | #define __ASM_M68K_KMAP_TYPES_H | ||
3 | |||
4 | enum km_type { | ||
5 | KM_BOUNCE_READ, | ||
6 | KM_SKB_SUNRPC_DATA, | ||
7 | KM_SKB_DATA_SOFTIRQ, | ||
8 | KM_USER0, | ||
9 | KM_USER1, | ||
10 | KM_BIO_SRC_IRQ, | ||
11 | KM_BIO_DST_IRQ, | ||
12 | KM_PTE0, | ||
13 | KM_PTE1, | ||
14 | KM_IRQ0, | ||
15 | KM_IRQ1, | ||
16 | KM_SOFTIRQ0, | ||
17 | KM_SOFTIRQ1, | ||
18 | KM_TYPE_NR | ||
19 | }; | ||
20 | |||
21 | #endif /* __ASM_M68K_KMAP_TYPES_H */ | ||
diff --git a/arch/m68k/include/asm/kmap_types_no.h b/arch/m68k/include/asm/kmap_types_no.h deleted file mode 100644 index bfb6707575d1..000000000000 --- a/arch/m68k/include/asm/kmap_types_no.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef __ASM_M68K_KMAP_TYPES_H | ||
2 | #define __ASM_M68K_KMAP_TYPES_H | ||
3 | |||
4 | enum km_type { | ||
5 | KM_BOUNCE_READ, | ||
6 | KM_SKB_SUNRPC_DATA, | ||
7 | KM_SKB_DATA_SOFTIRQ, | ||
8 | KM_USER0, | ||
9 | KM_USER1, | ||
10 | KM_BIO_SRC_IRQ, | ||
11 | KM_BIO_DST_IRQ, | ||
12 | KM_PTE0, | ||
13 | KM_PTE1, | ||
14 | KM_IRQ0, | ||
15 | KM_IRQ1, | ||
16 | KM_SOFTIRQ0, | ||
17 | KM_SOFTIRQ1, | ||
18 | KM_TYPE_NR | ||
19 | }; | ||
20 | |||
21 | #endif | ||
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h index 1835fd20a82c..ce603451b55e 100644 --- a/arch/m68k/include/asm/m532xsim.h +++ b/arch/m68k/include/asm/m532xsim.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define MCFINT_VECBASE 64 | 16 | #define MCFINT_VECBASE 64 |
17 | #define MCFINT_UART0 26 /* Interrupt number for UART0 */ | 17 | #define MCFINT_UART0 26 /* Interrupt number for UART0 */ |
18 | #define MCFINT_UART1 27 /* Interrupt number for UART1 */ | 18 | #define MCFINT_UART1 27 /* Interrupt number for UART1 */ |
19 | #define MCFINT_UART2 28 /* Interrupt number for UART2 */ | ||
19 | 20 | ||
20 | #define MCF_WTM_WCR MCF_REG16(0xFC098000) | 21 | #define MCF_WTM_WCR MCF_REG16(0xFC098000) |
21 | 22 | ||
diff --git a/arch/m68k/include/asm/mc146818rtc.h b/arch/m68k/include/asm/mc146818rtc.h index fb90dcf78426..9f70a01f73dc 100644 --- a/arch/m68k/include/asm/mc146818rtc.h +++ b/arch/m68k/include/asm/mc146818rtc.h | |||
@@ -1,5 +1,26 @@ | |||
1 | #ifdef __uClinux__ | 1 | /* |
2 | #include "mc146818rtc_no.h" | 2 | * Machine dependent access functions for RTC registers. |
3 | #else | 3 | */ |
4 | #include "mc146818rtc_mm.h" | 4 | #ifndef _ASM_MC146818RTC_H |
5 | #endif | 5 | #define _ASM_MC146818RTC_H |
6 | |||
7 | |||
8 | #ifdef CONFIG_ATARI | ||
9 | /* RTC in Atari machines */ | ||
10 | |||
11 | #include <asm/atarihw.h> | ||
12 | |||
13 | #define RTC_PORT(x) (TT_RTC_BAS + 2*(x)) | ||
14 | #define RTC_ALWAYS_BCD 0 | ||
15 | |||
16 | #define CMOS_READ(addr) ({ \ | ||
17 | atari_outb_p((addr),RTC_PORT(0)); \ | ||
18 | atari_inb_p(RTC_PORT(1)); \ | ||
19 | }) | ||
20 | #define CMOS_WRITE(val, addr) ({ \ | ||
21 | atari_outb_p((addr),RTC_PORT(0)); \ | ||
22 | atari_outb_p((val),RTC_PORT(1)); \ | ||
23 | }) | ||
24 | #endif /* CONFIG_ATARI */ | ||
25 | |||
26 | #endif /* _ASM_MC146818RTC_H */ | ||
diff --git a/arch/m68k/include/asm/mc146818rtc_mm.h b/arch/m68k/include/asm/mc146818rtc_mm.h deleted file mode 100644 index 9f70a01f73dc..000000000000 --- a/arch/m68k/include/asm/mc146818rtc_mm.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Machine dependent access functions for RTC registers. | ||
3 | */ | ||
4 | #ifndef _ASM_MC146818RTC_H | ||
5 | #define _ASM_MC146818RTC_H | ||
6 | |||
7 | |||
8 | #ifdef CONFIG_ATARI | ||
9 | /* RTC in Atari machines */ | ||
10 | |||
11 | #include <asm/atarihw.h> | ||
12 | |||
13 | #define RTC_PORT(x) (TT_RTC_BAS + 2*(x)) | ||
14 | #define RTC_ALWAYS_BCD 0 | ||
15 | |||
16 | #define CMOS_READ(addr) ({ \ | ||
17 | atari_outb_p((addr),RTC_PORT(0)); \ | ||
18 | atari_inb_p(RTC_PORT(1)); \ | ||
19 | }) | ||
20 | #define CMOS_WRITE(val, addr) ({ \ | ||
21 | atari_outb_p((addr),RTC_PORT(0)); \ | ||
22 | atari_outb_p((val),RTC_PORT(1)); \ | ||
23 | }) | ||
24 | #endif /* CONFIG_ATARI */ | ||
25 | |||
26 | #endif /* _ASM_MC146818RTC_H */ | ||
diff --git a/arch/m68k/include/asm/mc146818rtc_no.h b/arch/m68k/include/asm/mc146818rtc_no.h deleted file mode 100644 index 907a0481a140..000000000000 --- a/arch/m68k/include/asm/mc146818rtc_no.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * Machine dependent access functions for RTC registers. | ||
3 | */ | ||
4 | #ifndef _M68KNOMMU_MC146818RTC_H | ||
5 | #define _M68KNOMMU_MC146818RTC_H | ||
6 | |||
7 | /* empty include file to satisfy the include in genrtc.c/ide-geometry.c */ | ||
8 | |||
9 | #endif /* _M68KNOMMU_MC146818RTC_H */ | ||
diff --git a/arch/m68k/include/asm/mcfpci.h b/arch/m68k/include/asm/mcfpci.h deleted file mode 100644 index f1507dd06ec6..000000000000 --- a/arch/m68k/include/asm/mcfpci.h +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | /****************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * mcfpci.h -- PCI bridge on ColdFire eval boards. | ||
5 | * | ||
6 | * (C) Copyright 2000, Greg Ungerer (gerg@snapgear.com) | ||
7 | * (C) Copyright 2000, Lineo Inc. (www.lineo.com) | ||
8 | */ | ||
9 | |||
10 | /****************************************************************************/ | ||
11 | #ifndef mcfpci_h | ||
12 | #define mcfpci_h | ||
13 | /****************************************************************************/ | ||
14 | |||
15 | |||
16 | #ifdef CONFIG_PCI | ||
17 | |||
18 | /* | ||
19 | * Address regions in the PCI address space are not mapped into the | ||
20 | * normal memory space of the ColdFire. They must be accessed via | ||
21 | * handler routines. This is easy for I/O space (inb/outb/etc) but | ||
22 | * needs some code changes to support ordinary memory. Interrupts | ||
23 | * also need to be vectored through the PCI handler first, then it | ||
24 | * will call the actual driver sub-handlers. | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * Un-define all the standard I/O access routines. | ||
29 | */ | ||
30 | #undef inb | ||
31 | #undef inw | ||
32 | #undef inl | ||
33 | #undef inb_p | ||
34 | #undef inw_p | ||
35 | #undef insb | ||
36 | #undef insw | ||
37 | #undef insl | ||
38 | #undef outb | ||
39 | #undef outw | ||
40 | #undef outl | ||
41 | #undef outb_p | ||
42 | #undef outw_p | ||
43 | #undef outsb | ||
44 | #undef outsw | ||
45 | #undef outsl | ||
46 | |||
47 | #undef request_irq | ||
48 | #undef free_irq | ||
49 | |||
50 | #undef bus_to_virt | ||
51 | #undef virt_to_bus | ||
52 | |||
53 | |||
54 | /* | ||
55 | * Re-direct all I/O memory accesses functions to PCI specific ones. | ||
56 | */ | ||
57 | #define inb pci_inb | ||
58 | #define inw pci_inw | ||
59 | #define inl pci_inl | ||
60 | #define inb_p pci_inb | ||
61 | #define inw_p pci_inw | ||
62 | #define insb pci_insb | ||
63 | #define insw pci_insw | ||
64 | #define insl pci_insl | ||
65 | |||
66 | #define outb pci_outb | ||
67 | #define outw pci_outw | ||
68 | #define outl pci_outl | ||
69 | #define outb_p pci_outb | ||
70 | #define outw_p pci_outw | ||
71 | #define outsb pci_outsb | ||
72 | #define outsw pci_outsw | ||
73 | #define outsl pci_outsl | ||
74 | |||
75 | #define request_irq pci_request_irq | ||
76 | #define free_irq pci_free_irq | ||
77 | |||
78 | #define virt_to_bus pci_virt_to_bus | ||
79 | #define bus_to_virt pci_bus_to_virt | ||
80 | |||
81 | #define CONFIG_COMEMPCI 1 | ||
82 | |||
83 | |||
84 | /* | ||
85 | * Prototypes of the real PCI functions (defined in bios32.c). | ||
86 | */ | ||
87 | unsigned char pci_inb(unsigned int addr); | ||
88 | unsigned short pci_inw(unsigned int addr); | ||
89 | unsigned int pci_inl(unsigned int addr); | ||
90 | void pci_insb(void *addr, void *buf, int len); | ||
91 | void pci_insw(void *addr, void *buf, int len); | ||
92 | void pci_insl(void *addr, void *buf, int len); | ||
93 | |||
94 | void pci_outb(unsigned char val, unsigned int addr); | ||
95 | void pci_outw(unsigned short val, unsigned int addr); | ||
96 | void pci_outl(unsigned int val, unsigned int addr); | ||
97 | void pci_outsb(void *addr, void *buf, int len); | ||
98 | void pci_outsw(void *addr, void *buf, int len); | ||
99 | void pci_outsl(void *addr, void *buf, int len); | ||
100 | |||
101 | int pci_request_irq(unsigned int irq, | ||
102 | void (*handler)(int, void *, struct pt_regs *), | ||
103 | unsigned long flags, | ||
104 | const char *device, | ||
105 | void *dev_id); | ||
106 | void pci_free_irq(unsigned int irq, void *dev_id); | ||
107 | |||
108 | void *pci_bmalloc(int size); | ||
109 | void pci_bmfree(void *bmp, int len); | ||
110 | void pci_copytoshmem(unsigned long bmp, void *src, int size); | ||
111 | void pci_copyfromshmem(void *dst, unsigned long bmp, int size); | ||
112 | unsigned long pci_virt_to_bus(volatile void *address); | ||
113 | void *pci_bus_to_virt(unsigned long address); | ||
114 | void pci_bmcpyto(void *dst, void *src, int len); | ||
115 | void pci_bmcpyfrom(void *dst, void *src, int len); | ||
116 | |||
117 | #endif /* CONFIG_PCI */ | ||
118 | /****************************************************************************/ | ||
119 | #endif /* mcfpci_h */ | ||
diff --git a/arch/m68k/include/asm/mmu.h b/arch/m68k/include/asm/mmu.h index a81d3946675f..8a11a63ee15a 100644 --- a/arch/m68k/include/asm/mmu.h +++ b/arch/m68k/include/asm/mmu.h | |||
@@ -1,5 +1,13 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef __MMU_H |
2 | #include "mmu_no.h" | 2 | #define __MMU_H |
3 | |||
4 | #ifdef CONFIG_MMU | ||
5 | /* Default "unsigned long" context */ | ||
6 | typedef unsigned long mm_context_t; | ||
3 | #else | 7 | #else |
4 | #include "mmu_mm.h" | 8 | typedef struct { |
9 | unsigned long end_brk; | ||
10 | } mm_context_t; | ||
11 | #endif | ||
12 | |||
5 | #endif | 13 | #endif |
diff --git a/arch/m68k/include/asm/mmu_context.h b/arch/m68k/include/asm/mmu_context.h index b440928fc6c7..7d4341e55a99 100644 --- a/arch/m68k/include/asm/mmu_context.h +++ b/arch/m68k/include/asm/mmu_context.h | |||
@@ -1,5 +1,175 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef __M68K_MMU_CONTEXT_H |
2 | #include "mmu_context_no.h" | 2 | #define __M68K_MMU_CONTEXT_H |
3 | |||
4 | #include <asm-generic/mm_hooks.h> | ||
5 | |||
6 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | ||
7 | { | ||
8 | } | ||
9 | |||
10 | #ifdef CONFIG_MMU | ||
11 | #ifndef CONFIG_SUN3 | ||
12 | |||
13 | #include <asm/setup.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/pgalloc.h> | ||
16 | |||
17 | static inline int init_new_context(struct task_struct *tsk, | ||
18 | struct mm_struct *mm) | ||
19 | { | ||
20 | mm->context = virt_to_phys(mm->pgd); | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | #define destroy_context(mm) do { } while(0) | ||
25 | |||
26 | static inline void switch_mm_0230(struct mm_struct *mm) | ||
27 | { | ||
28 | unsigned long crp[2] = { | ||
29 | 0x80000000 | _PAGE_TABLE, mm->context | ||
30 | }; | ||
31 | unsigned long tmp; | ||
32 | |||
33 | asm volatile (".chip 68030"); | ||
34 | |||
35 | /* flush MC68030/MC68020 caches (they are virtually addressed) */ | ||
36 | asm volatile ( | ||
37 | "movec %%cacr,%0;" | ||
38 | "orw %1,%0; " | ||
39 | "movec %0,%%cacr" | ||
40 | : "=d" (tmp) : "di" (FLUSH_I_AND_D)); | ||
41 | |||
42 | /* Switch the root pointer. For a 030-only kernel, | ||
43 | * avoid flushing the whole ATC, we only need to | ||
44 | * flush the user entries. The 68851 does this by | ||
45 | * itself. Avoid a runtime check here. | ||
46 | */ | ||
47 | asm volatile ( | ||
48 | #ifdef CPU_M68030_ONLY | ||
49 | "pmovefd %0,%%crp; " | ||
50 | "pflush #0,#4" | ||
3 | #else | 51 | #else |
4 | #include "mmu_context_mm.h" | 52 | "pmove %0,%%crp" |
5 | #endif | 53 | #endif |
54 | : : "m" (crp[0])); | ||
55 | |||
56 | asm volatile (".chip 68k"); | ||
57 | } | ||
58 | |||
59 | static inline void switch_mm_0460(struct mm_struct *mm) | ||
60 | { | ||
61 | asm volatile (".chip 68040"); | ||
62 | |||
63 | /* flush address translation cache (user entries) */ | ||
64 | asm volatile ("pflushan"); | ||
65 | |||
66 | /* switch the root pointer */ | ||
67 | asm volatile ("movec %0,%%urp" : : "r" (mm->context)); | ||
68 | |||
69 | if (CPU_IS_060) { | ||
70 | unsigned long tmp; | ||
71 | |||
72 | /* clear user entries in the branch cache */ | ||
73 | asm volatile ( | ||
74 | "movec %%cacr,%0; " | ||
75 | "orl %1,%0; " | ||
76 | "movec %0,%%cacr" | ||
77 | : "=d" (tmp): "di" (0x00200000)); | ||
78 | } | ||
79 | |||
80 | asm volatile (".chip 68k"); | ||
81 | } | ||
82 | |||
83 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
84 | { | ||
85 | if (prev != next) { | ||
86 | if (CPU_IS_020_OR_030) | ||
87 | switch_mm_0230(next); | ||
88 | else | ||
89 | switch_mm_0460(next); | ||
90 | } | ||
91 | } | ||
92 | |||
93 | #define deactivate_mm(tsk,mm) do { } while (0) | ||
94 | |||
95 | static inline void activate_mm(struct mm_struct *prev_mm, | ||
96 | struct mm_struct *next_mm) | ||
97 | { | ||
98 | next_mm->context = virt_to_phys(next_mm->pgd); | ||
99 | |||
100 | if (CPU_IS_020_OR_030) | ||
101 | switch_mm_0230(next_mm); | ||
102 | else | ||
103 | switch_mm_0460(next_mm); | ||
104 | } | ||
105 | |||
106 | #else /* CONFIG_SUN3 */ | ||
107 | #include <asm/sun3mmu.h> | ||
108 | #include <linux/sched.h> | ||
109 | |||
110 | extern unsigned long get_free_context(struct mm_struct *mm); | ||
111 | extern void clear_context(unsigned long context); | ||
112 | |||
113 | /* set the context for a new task to unmapped */ | ||
114 | static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) | ||
115 | { | ||
116 | mm->context = SUN3_INVALID_CONTEXT; | ||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | /* find the context given to this process, and if it hasn't already | ||
121 | got one, go get one for it. */ | ||
122 | static inline void get_mmu_context(struct mm_struct *mm) | ||
123 | { | ||
124 | if(mm->context == SUN3_INVALID_CONTEXT) | ||
125 | mm->context = get_free_context(mm); | ||
126 | } | ||
127 | |||
128 | /* flush context if allocated... */ | ||
129 | static inline void destroy_context(struct mm_struct *mm) | ||
130 | { | ||
131 | if(mm->context != SUN3_INVALID_CONTEXT) | ||
132 | clear_context(mm->context); | ||
133 | } | ||
134 | |||
135 | static inline void activate_context(struct mm_struct *mm) | ||
136 | { | ||
137 | get_mmu_context(mm); | ||
138 | sun3_put_context(mm->context); | ||
139 | } | ||
140 | |||
141 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
142 | { | ||
143 | activate_context(tsk->mm); | ||
144 | } | ||
145 | |||
146 | #define deactivate_mm(tsk,mm) do { } while (0) | ||
147 | |||
148 | static inline void activate_mm(struct mm_struct *prev_mm, | ||
149 | struct mm_struct *next_mm) | ||
150 | { | ||
151 | activate_context(next_mm); | ||
152 | } | ||
153 | |||
154 | #endif | ||
155 | #else /* !CONFIG_MMU */ | ||
156 | |||
157 | static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) | ||
158 | { | ||
159 | return 0; | ||
160 | } | ||
161 | |||
162 | |||
163 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
164 | { | ||
165 | } | ||
166 | |||
167 | #define destroy_context(mm) do { } while (0) | ||
168 | #define deactivate_mm(tsk,mm) do { } while (0) | ||
169 | |||
170 | static inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) | ||
171 | { | ||
172 | } | ||
173 | |||
174 | #endif /* CONFIG_MMU */ | ||
175 | #endif /* __M68K_MMU_CONTEXT_H */ | ||
diff --git a/arch/m68k/include/asm/mmu_context_mm.h b/arch/m68k/include/asm/mmu_context_mm.h deleted file mode 100644 index 894dacbcee14..000000000000 --- a/arch/m68k/include/asm/mmu_context_mm.h +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | #ifndef __M68K_MMU_CONTEXT_H | ||
2 | #define __M68K_MMU_CONTEXT_H | ||
3 | |||
4 | #include <asm-generic/mm_hooks.h> | ||
5 | |||
6 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | ||
7 | { | ||
8 | } | ||
9 | |||
10 | #ifndef CONFIG_SUN3 | ||
11 | |||
12 | #include <asm/setup.h> | ||
13 | #include <asm/page.h> | ||
14 | #include <asm/pgalloc.h> | ||
15 | |||
16 | static inline int init_new_context(struct task_struct *tsk, | ||
17 | struct mm_struct *mm) | ||
18 | { | ||
19 | mm->context = virt_to_phys(mm->pgd); | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | #define destroy_context(mm) do { } while(0) | ||
24 | |||
25 | static inline void switch_mm_0230(struct mm_struct *mm) | ||
26 | { | ||
27 | unsigned long crp[2] = { | ||
28 | 0x80000000 | _PAGE_TABLE, mm->context | ||
29 | }; | ||
30 | unsigned long tmp; | ||
31 | |||
32 | asm volatile (".chip 68030"); | ||
33 | |||
34 | /* flush MC68030/MC68020 caches (they are virtually addressed) */ | ||
35 | asm volatile ( | ||
36 | "movec %%cacr,%0;" | ||
37 | "orw %1,%0; " | ||
38 | "movec %0,%%cacr" | ||
39 | : "=d" (tmp) : "di" (FLUSH_I_AND_D)); | ||
40 | |||
41 | /* Switch the root pointer. For a 030-only kernel, | ||
42 | * avoid flushing the whole ATC, we only need to | ||
43 | * flush the user entries. The 68851 does this by | ||
44 | * itself. Avoid a runtime check here. | ||
45 | */ | ||
46 | asm volatile ( | ||
47 | #ifdef CPU_M68030_ONLY | ||
48 | "pmovefd %0,%%crp; " | ||
49 | "pflush #0,#4" | ||
50 | #else | ||
51 | "pmove %0,%%crp" | ||
52 | #endif | ||
53 | : : "m" (crp[0])); | ||
54 | |||
55 | asm volatile (".chip 68k"); | ||
56 | } | ||
57 | |||
58 | static inline void switch_mm_0460(struct mm_struct *mm) | ||
59 | { | ||
60 | asm volatile (".chip 68040"); | ||
61 | |||
62 | /* flush address translation cache (user entries) */ | ||
63 | asm volatile ("pflushan"); | ||
64 | |||
65 | /* switch the root pointer */ | ||
66 | asm volatile ("movec %0,%%urp" : : "r" (mm->context)); | ||
67 | |||
68 | if (CPU_IS_060) { | ||
69 | unsigned long tmp; | ||
70 | |||
71 | /* clear user entries in the branch cache */ | ||
72 | asm volatile ( | ||
73 | "movec %%cacr,%0; " | ||
74 | "orl %1,%0; " | ||
75 | "movec %0,%%cacr" | ||
76 | : "=d" (tmp): "di" (0x00200000)); | ||
77 | } | ||
78 | |||
79 | asm volatile (".chip 68k"); | ||
80 | } | ||
81 | |||
82 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
83 | { | ||
84 | if (prev != next) { | ||
85 | if (CPU_IS_020_OR_030) | ||
86 | switch_mm_0230(next); | ||
87 | else | ||
88 | switch_mm_0460(next); | ||
89 | } | ||
90 | } | ||
91 | |||
92 | #define deactivate_mm(tsk,mm) do { } while (0) | ||
93 | |||
94 | static inline void activate_mm(struct mm_struct *prev_mm, | ||
95 | struct mm_struct *next_mm) | ||
96 | { | ||
97 | next_mm->context = virt_to_phys(next_mm->pgd); | ||
98 | |||
99 | if (CPU_IS_020_OR_030) | ||
100 | switch_mm_0230(next_mm); | ||
101 | else | ||
102 | switch_mm_0460(next_mm); | ||
103 | } | ||
104 | |||
105 | #else /* CONFIG_SUN3 */ | ||
106 | #include <asm/sun3mmu.h> | ||
107 | #include <linux/sched.h> | ||
108 | |||
109 | extern unsigned long get_free_context(struct mm_struct *mm); | ||
110 | extern void clear_context(unsigned long context); | ||
111 | |||
112 | /* set the context for a new task to unmapped */ | ||
113 | static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) | ||
114 | { | ||
115 | mm->context = SUN3_INVALID_CONTEXT; | ||
116 | return 0; | ||
117 | } | ||
118 | |||
119 | /* find the context given to this process, and if it hasn't already | ||
120 | got one, go get one for it. */ | ||
121 | static inline void get_mmu_context(struct mm_struct *mm) | ||
122 | { | ||
123 | if(mm->context == SUN3_INVALID_CONTEXT) | ||
124 | mm->context = get_free_context(mm); | ||
125 | } | ||
126 | |||
127 | /* flush context if allocated... */ | ||
128 | static inline void destroy_context(struct mm_struct *mm) | ||
129 | { | ||
130 | if(mm->context != SUN3_INVALID_CONTEXT) | ||
131 | clear_context(mm->context); | ||
132 | } | ||
133 | |||
134 | static inline void activate_context(struct mm_struct *mm) | ||
135 | { | ||
136 | get_mmu_context(mm); | ||
137 | sun3_put_context(mm->context); | ||
138 | } | ||
139 | |||
140 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
141 | { | ||
142 | activate_context(tsk->mm); | ||
143 | } | ||
144 | |||
145 | #define deactivate_mm(tsk,mm) do { } while (0) | ||
146 | |||
147 | static inline void activate_mm(struct mm_struct *prev_mm, | ||
148 | struct mm_struct *next_mm) | ||
149 | { | ||
150 | activate_context(next_mm); | ||
151 | } | ||
152 | |||
153 | #endif | ||
154 | #endif | ||
diff --git a/arch/m68k/include/asm/mmu_context_no.h b/arch/m68k/include/asm/mmu_context_no.h deleted file mode 100644 index 9ccee4278c97..000000000000 --- a/arch/m68k/include/asm/mmu_context_no.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #ifndef __M68KNOMMU_MMU_CONTEXT_H | ||
2 | #define __M68KNOMMU_MMU_CONTEXT_H | ||
3 | |||
4 | #include <asm/setup.h> | ||
5 | #include <asm/page.h> | ||
6 | #include <asm/pgalloc.h> | ||
7 | #include <asm-generic/mm_hooks.h> | ||
8 | |||
9 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | static inline int | ||
14 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | ||
15 | { | ||
16 | // mm->context = virt_to_phys(mm->pgd); | ||
17 | return(0); | ||
18 | } | ||
19 | |||
20 | #define destroy_context(mm) do { } while(0) | ||
21 | |||
22 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
23 | { | ||
24 | } | ||
25 | |||
26 | #define deactivate_mm(tsk,mm) do { } while (0) | ||
27 | |||
28 | static inline void activate_mm(struct mm_struct *prev_mm, | ||
29 | struct mm_struct *next_mm) | ||
30 | { | ||
31 | } | ||
32 | |||
33 | #endif | ||
diff --git a/arch/m68k/include/asm/mmu_mm.h b/arch/m68k/include/asm/mmu_mm.h deleted file mode 100644 index ccd36d26615a..000000000000 --- a/arch/m68k/include/asm/mmu_mm.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __MMU_H | ||
2 | #define __MMU_H | ||
3 | |||
4 | /* Default "unsigned long" context */ | ||
5 | typedef unsigned long mm_context_t; | ||
6 | |||
7 | #endif | ||
diff --git a/arch/m68k/include/asm/mmu_no.h b/arch/m68k/include/asm/mmu_no.h deleted file mode 100644 index e2da1e6f09fe..000000000000 --- a/arch/m68k/include/asm/mmu_no.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef __M68KNOMMU_MMU_H | ||
2 | #define __M68KNOMMU_MMU_H | ||
3 | |||
4 | /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */ | ||
5 | |||
6 | typedef struct { | ||
7 | unsigned long end_brk; | ||
8 | } mm_context_t; | ||
9 | |||
10 | #endif /* __M68KNOMMU_MMU_H */ | ||
diff --git a/arch/m68k/include/asm/module.h b/arch/m68k/include/asm/module.h index 79b59d137dd0..5f21e11071bd 100644 --- a/arch/m68k/include/asm/module.h +++ b/arch/m68k/include/asm/module.h | |||
@@ -1,5 +1,48 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _ASM_M68K_MODULE_H |
2 | #include "module_no.h" | 2 | #define _ASM_M68K_MODULE_H |
3 | |||
4 | #ifdef CONFIG_MMU | ||
5 | |||
6 | struct mod_arch_specific { | ||
7 | struct m68k_fixup_info *fixup_start, *fixup_end; | ||
8 | }; | ||
9 | |||
10 | #define MODULE_ARCH_INIT { \ | ||
11 | .fixup_start = __start_fixup, \ | ||
12 | .fixup_end = __stop_fixup, \ | ||
13 | } | ||
14 | |||
15 | |||
16 | enum m68k_fixup_type { | ||
17 | m68k_fixup_memoffset, | ||
18 | m68k_fixup_vnode_shift, | ||
19 | }; | ||
20 | |||
21 | struct m68k_fixup_info { | ||
22 | enum m68k_fixup_type type; | ||
23 | void *addr; | ||
24 | }; | ||
25 | |||
26 | #define m68k_fixup(type, addr) \ | ||
27 | " .section \".m68k_fixup\",\"aw\"\n" \ | ||
28 | " .long " #type "," #addr "\n" \ | ||
29 | " .previous\n" | ||
30 | |||
31 | extern struct m68k_fixup_info __start_fixup[], __stop_fixup[]; | ||
32 | |||
33 | struct module; | ||
34 | extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, | ||
35 | struct m68k_fixup_info *end); | ||
36 | |||
3 | #else | 37 | #else |
4 | #include "module_mm.h" | 38 | |
5 | #endif | 39 | struct mod_arch_specific { |
40 | }; | ||
41 | |||
42 | #endif /* CONFIG_MMU */ | ||
43 | |||
44 | #define Elf_Shdr Elf32_Shdr | ||
45 | #define Elf_Sym Elf32_Sym | ||
46 | #define Elf_Ehdr Elf32_Ehdr | ||
47 | |||
48 | #endif /* _ASM_M68K_MODULE_H */ | ||
diff --git a/arch/m68k/include/asm/module_mm.h b/arch/m68k/include/asm/module_mm.h deleted file mode 100644 index 382d20a6fc18..000000000000 --- a/arch/m68k/include/asm/module_mm.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | #ifndef _ASM_M68K_MODULE_H | ||
2 | #define _ASM_M68K_MODULE_H | ||
3 | |||
4 | struct mod_arch_specific { | ||
5 | struct m68k_fixup_info *fixup_start, *fixup_end; | ||
6 | }; | ||
7 | |||
8 | #define MODULE_ARCH_INIT { \ | ||
9 | .fixup_start = __start_fixup, \ | ||
10 | .fixup_end = __stop_fixup, \ | ||
11 | } | ||
12 | |||
13 | #define Elf_Shdr Elf32_Shdr | ||
14 | #define Elf_Sym Elf32_Sym | ||
15 | #define Elf_Ehdr Elf32_Ehdr | ||
16 | |||
17 | |||
18 | enum m68k_fixup_type { | ||
19 | m68k_fixup_memoffset, | ||
20 | m68k_fixup_vnode_shift, | ||
21 | }; | ||
22 | |||
23 | struct m68k_fixup_info { | ||
24 | enum m68k_fixup_type type; | ||
25 | void *addr; | ||
26 | }; | ||
27 | |||
28 | #define m68k_fixup(type, addr) \ | ||
29 | " .section \".m68k_fixup\",\"aw\"\n" \ | ||
30 | " .long " #type "," #addr "\n" \ | ||
31 | " .previous\n" | ||
32 | |||
33 | extern struct m68k_fixup_info __start_fixup[], __stop_fixup[]; | ||
34 | |||
35 | struct module; | ||
36 | extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, | ||
37 | struct m68k_fixup_info *end); | ||
38 | |||
39 | #endif /* _ASM_M68K_MODULE_H */ | ||
diff --git a/arch/m68k/include/asm/module_no.h b/arch/m68k/include/asm/module_no.h deleted file mode 100644 index 2e45ab50b232..000000000000 --- a/arch/m68k/include/asm/module_no.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef ASM_M68KNOMMU_MODULE_H | ||
2 | #define ASM_M68KNOMMU_MODULE_H | ||
3 | |||
4 | struct mod_arch_specific { | ||
5 | }; | ||
6 | |||
7 | #define Elf_Shdr Elf32_Shdr | ||
8 | #define Elf_Sym Elf32_Sym | ||
9 | #define Elf_Ehdr Elf32_Ehdr | ||
10 | |||
11 | #endif /* ASM_M68KNOMMU_MODULE_H */ | ||
diff --git a/arch/m68k/include/asm/page_offset.h b/arch/m68k/include/asm/page_offset.h index 66455c849fbb..1780152d81da 100644 --- a/arch/m68k/include/asm/page_offset.h +++ b/arch/m68k/include/asm/page_offset.h | |||
@@ -1,5 +1,11 @@ | |||
1 | #ifdef __uClinux__ | 1 | /* This handles the memory map.. */ |
2 | #include "page_offset_no.h" | 2 | |
3 | #ifdef CONFIG_MMU | ||
4 | #ifndef CONFIG_SUN3 | ||
5 | #define PAGE_OFFSET_RAW 0x00000000 | ||
3 | #else | 6 | #else |
4 | #include "page_offset_mm.h" | 7 | #define PAGE_OFFSET_RAW 0x0E000000 |
8 | #endif | ||
9 | #else | ||
10 | #define PAGE_OFFSET_RAW CONFIG_RAMBASE | ||
5 | #endif | 11 | #endif |
diff --git a/arch/m68k/include/asm/page_offset_mm.h b/arch/m68k/include/asm/page_offset_mm.h deleted file mode 100644 index 1cbdb7f30ac2..000000000000 --- a/arch/m68k/include/asm/page_offset_mm.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | |||
2 | /* This handles the memory map.. */ | ||
3 | #ifndef CONFIG_SUN3 | ||
4 | #define PAGE_OFFSET_RAW 0x00000000 | ||
5 | #else | ||
6 | #define PAGE_OFFSET_RAW 0x0E000000 | ||
7 | #endif | ||
8 | |||
diff --git a/arch/m68k/include/asm/page_offset_no.h b/arch/m68k/include/asm/page_offset_no.h deleted file mode 100644 index d4e73e0ba646..000000000000 --- a/arch/m68k/include/asm/page_offset_no.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | |||
2 | |||
3 | /* This handles the memory map.. */ | ||
4 | #define PAGE_OFFSET_RAW CONFIG_RAMBASE | ||
5 | |||
diff --git a/arch/m68k/include/asm/pci.h b/arch/m68k/include/asm/pci.h index dbea95373080..4ad0aea48ab4 100644 --- a/arch/m68k/include/asm/pci.h +++ b/arch/m68k/include/asm/pci.h | |||
@@ -1,5 +1,12 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _ASM_M68K_PCI_H |
2 | #include "pci_no.h" | 2 | #define _ASM_M68K_PCI_H |
3 | #else | 3 | |
4 | #include "pci_mm.h" | 4 | #include <asm-generic/pci-dma-compat.h> |
5 | #endif | 5 | |
6 | /* The PCI address space does equal the physical memory | ||
7 | * address space. The networking and block device layers use | ||
8 | * this boolean for bounce buffer decisions. | ||
9 | */ | ||
10 | #define PCI_DMA_BUS_IS_PHYS (1) | ||
11 | |||
12 | #endif /* _ASM_M68K_PCI_H */ | ||
diff --git a/arch/m68k/include/asm/pci_mm.h b/arch/m68k/include/asm/pci_mm.h deleted file mode 100644 index 4ad0aea48ab4..000000000000 --- a/arch/m68k/include/asm/pci_mm.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_M68K_PCI_H | ||
2 | #define _ASM_M68K_PCI_H | ||
3 | |||
4 | #include <asm-generic/pci-dma-compat.h> | ||
5 | |||
6 | /* The PCI address space does equal the physical memory | ||
7 | * address space. The networking and block device layers use | ||
8 | * this boolean for bounce buffer decisions. | ||
9 | */ | ||
10 | #define PCI_DMA_BUS_IS_PHYS (1) | ||
11 | |||
12 | #endif /* _ASM_M68K_PCI_H */ | ||
diff --git a/arch/m68k/include/asm/pci_no.h b/arch/m68k/include/asm/pci_no.h deleted file mode 100644 index 9abbc03c73ee..000000000000 --- a/arch/m68k/include/asm/pci_no.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef M68KNOMMU_PCI_H | ||
2 | #define M68KNOMMU_PCI_H | ||
3 | |||
4 | #include <asm/pci_mm.h> | ||
5 | |||
6 | #ifdef CONFIG_COMEMPCI | ||
7 | /* | ||
8 | * These are pretty much arbitary with the CoMEM implementation. | ||
9 | * We have the whole address space to ourselves. | ||
10 | */ | ||
11 | #define PCIBIOS_MIN_IO 0x100 | ||
12 | #define PCIBIOS_MIN_MEM 0x00010000 | ||
13 | |||
14 | #define pcibios_scan_all_fns(a, b) 0 | ||
15 | |||
16 | /* | ||
17 | * Return whether the given PCI device DMA address mask can | ||
18 | * be supported properly. For example, if your device can | ||
19 | * only drive the low 24-bits during PCI bus mastering, then | ||
20 | * you would pass 0x00ffffff as the mask to this function. | ||
21 | */ | ||
22 | static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) | ||
23 | { | ||
24 | return 1; | ||
25 | } | ||
26 | |||
27 | #endif /* CONFIG_COMEMPCI */ | ||
28 | |||
29 | #endif /* M68KNOMMU_PCI_H */ | ||
diff --git a/arch/m68k/include/asm/pgalloc.h b/arch/m68k/include/asm/pgalloc.h index 059cb73e78fc..c294aad8a900 100644 --- a/arch/m68k/include/asm/pgalloc.h +++ b/arch/m68k/include/asm/pgalloc.h | |||
@@ -1,5 +1,19 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef M68K_PGALLOC_H |
2 | #include "pgalloc_no.h" | 2 | #define M68K_PGALLOC_H |
3 | |||
4 | #include <linux/mm.h> | ||
5 | #include <linux/highmem.h> | ||
6 | #include <asm/setup.h> | ||
7 | |||
8 | #ifdef CONFIG_MMU | ||
9 | #include <asm/virtconvert.h> | ||
10 | #ifdef CONFIG_SUN3 | ||
11 | #include <asm/sun3_pgalloc.h> | ||
3 | #else | 12 | #else |
4 | #include "pgalloc_mm.h" | 13 | #include <asm/motorola_pgalloc.h> |
5 | #endif | 14 | #endif |
15 | |||
16 | extern void m68k_setup_node(int node); | ||
17 | #endif | ||
18 | |||
19 | #endif /* M68K_PGALLOC_H */ | ||
diff --git a/arch/m68k/include/asm/pgalloc_mm.h b/arch/m68k/include/asm/pgalloc_mm.h deleted file mode 100644 index 4cb1a57ab763..000000000000 --- a/arch/m68k/include/asm/pgalloc_mm.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | |||
2 | #ifndef M68K_PGALLOC_H | ||
3 | #define M68K_PGALLOC_H | ||
4 | |||
5 | #include <linux/mm.h> | ||
6 | #include <linux/highmem.h> | ||
7 | #include <asm/setup.h> | ||
8 | #include <asm/virtconvert.h> | ||
9 | |||
10 | |||
11 | #ifdef CONFIG_SUN3 | ||
12 | #include <asm/sun3_pgalloc.h> | ||
13 | #else | ||
14 | #include <asm/motorola_pgalloc.h> | ||
15 | #endif | ||
16 | |||
17 | extern void m68k_setup_node(int node); | ||
18 | |||
19 | #endif /* M68K_PGALLOC_H */ | ||
diff --git a/arch/m68k/include/asm/pgalloc_no.h b/arch/m68k/include/asm/pgalloc_no.h deleted file mode 100644 index d6352f671ec0..000000000000 --- a/arch/m68k/include/asm/pgalloc_no.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _M68KNOMMU_PGALLOC_H | ||
2 | #define _M68KNOMMU_PGALLOC_H | ||
3 | |||
4 | #include <asm/setup.h> | ||
5 | |||
6 | #define check_pgt_cache() do { } while (0) | ||
7 | |||
8 | #endif /* _M68KNOMMU_PGALLOC_H */ | ||
diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h index 46251016e821..bf86b29fe64a 100644 --- a/arch/m68k/include/asm/pgtable_no.h +++ b/arch/m68k/include/asm/pgtable_no.h | |||
@@ -67,4 +67,6 @@ extern unsigned int kobjsize(const void *objp); | |||
67 | 67 | ||
68 | #include <asm-generic/pgtable.h> | 68 | #include <asm-generic/pgtable.h> |
69 | 69 | ||
70 | #define check_pgt_cache() do { } while (0) | ||
71 | |||
70 | #endif /* _M68KNOMMU_PGTABLE_H */ | 72 | #endif /* _M68KNOMMU_PGTABLE_H */ |
diff --git a/arch/m68k/include/asm/scatterlist.h b/arch/m68k/include/asm/scatterlist.h index b7e528636252..e27ad902b1cf 100644 --- a/arch/m68k/include/asm/scatterlist.h +++ b/arch/m68k/include/asm/scatterlist.h | |||
@@ -1,5 +1,23 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_SCATTERLIST_H |
2 | #include "scatterlist_no.h" | 2 | #define _M68K_SCATTERLIST_H |
3 | #else | 3 | |
4 | #include "scatterlist_mm.h" | 4 | #include <linux/types.h> |
5 | |||
6 | struct scatterlist { | ||
7 | #ifdef CONFIG_DEBUG_SG | ||
8 | unsigned long sg_magic; | ||
5 | #endif | 9 | #endif |
10 | unsigned long page_link; | ||
11 | unsigned int offset; | ||
12 | unsigned int length; | ||
13 | |||
14 | dma_addr_t dma_address; /* A place to hang host-specific addresses at. */ | ||
15 | }; | ||
16 | |||
17 | /* This is bogus and should go away. */ | ||
18 | #define ISA_DMA_THRESHOLD (0x00ffffff) | ||
19 | |||
20 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
21 | #define sg_dma_len(sg) ((sg)->length) | ||
22 | |||
23 | #endif /* !(_M68K_SCATTERLIST_H) */ | ||
diff --git a/arch/m68k/include/asm/scatterlist_mm.h b/arch/m68k/include/asm/scatterlist_mm.h deleted file mode 100644 index d3a7a0edfeca..000000000000 --- a/arch/m68k/include/asm/scatterlist_mm.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef _M68K_SCATTERLIST_H | ||
2 | #define _M68K_SCATTERLIST_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct scatterlist { | ||
7 | #ifdef CONFIG_DEBUG_SG | ||
8 | unsigned long sg_magic; | ||
9 | #endif | ||
10 | unsigned long page_link; | ||
11 | unsigned int offset; | ||
12 | unsigned int length; | ||
13 | |||
14 | __u32 dma_address; /* A place to hang host-specific addresses at. */ | ||
15 | }; | ||
16 | |||
17 | /* This is bogus and should go away. */ | ||
18 | #define ISA_DMA_THRESHOLD (0x00ffffff) | ||
19 | |||
20 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
21 | #define sg_dma_len(sg) ((sg)->length) | ||
22 | |||
23 | #endif /* !(_M68K_SCATTERLIST_H) */ | ||
diff --git a/arch/m68k/include/asm/scatterlist_no.h b/arch/m68k/include/asm/scatterlist_no.h deleted file mode 100644 index afc4788b0d2c..000000000000 --- a/arch/m68k/include/asm/scatterlist_no.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | #ifndef _M68KNOMMU_SCATTERLIST_H | ||
2 | #define _M68KNOMMU_SCATTERLIST_H | ||
3 | |||
4 | #include <linux/mm.h> | ||
5 | #include <asm/types.h> | ||
6 | |||
7 | struct scatterlist { | ||
8 | #ifdef CONFIG_DEBUG_SG | ||
9 | unsigned long sg_magic; | ||
10 | #endif | ||
11 | unsigned long page_link; | ||
12 | unsigned int offset; | ||
13 | dma_addr_t dma_address; | ||
14 | unsigned int length; | ||
15 | }; | ||
16 | |||
17 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
18 | #define sg_dma_len(sg) ((sg)->length) | ||
19 | |||
20 | #define ISA_DMA_THRESHOLD (0xffffffff) | ||
21 | |||
22 | #endif /* !(_M68KNOMMU_SCATTERLIST_H) */ | ||
diff --git a/arch/m68k/include/asm/segment.h b/arch/m68k/include/asm/segment.h index 82583bc004bd..ee959219fdfe 100644 --- a/arch/m68k/include/asm/segment.h +++ b/arch/m68k/include/asm/segment.h | |||
@@ -1,5 +1,63 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_SEGMENT_H |
2 | #include "segment_no.h" | 2 | #define _M68K_SEGMENT_H |
3 | |||
4 | /* define constants */ | ||
5 | /* Address spaces (FC0-FC2) */ | ||
6 | #define USER_DATA (1) | ||
7 | #ifndef __USER_DS | ||
8 | #define __USER_DS (USER_DATA) | ||
9 | #endif | ||
10 | #define USER_PROGRAM (2) | ||
11 | #define SUPER_DATA (5) | ||
12 | #ifndef __KERNEL_DS | ||
13 | #define __KERNEL_DS (SUPER_DATA) | ||
14 | #endif | ||
15 | #define SUPER_PROGRAM (6) | ||
16 | #define CPU_SPACE (7) | ||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | |||
20 | typedef struct { | ||
21 | unsigned long seg; | ||
22 | } mm_segment_t; | ||
23 | |||
24 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | ||
25 | #define USER_DS MAKE_MM_SEG(__USER_DS) | ||
26 | #define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS) | ||
27 | |||
28 | /* | ||
29 | * Get/set the SFC/DFC registers for MOVES instructions | ||
30 | */ | ||
31 | |||
32 | static inline mm_segment_t get_fs(void) | ||
33 | { | ||
34 | #ifdef CONFIG_MMU | ||
35 | mm_segment_t _v; | ||
36 | __asm__ ("movec %/dfc,%0":"=r" (_v.seg):); | ||
37 | |||
38 | return _v; | ||
3 | #else | 39 | #else |
4 | #include "segment_mm.h" | 40 | return USER_DS; |
41 | #endif | ||
42 | } | ||
43 | |||
44 | static inline mm_segment_t get_ds(void) | ||
45 | { | ||
46 | /* return the supervisor data space code */ | ||
47 | return KERNEL_DS; | ||
48 | } | ||
49 | |||
50 | static inline void set_fs(mm_segment_t val) | ||
51 | { | ||
52 | #ifdef CONFIG_MMU | ||
53 | __asm__ __volatile__ ("movec %0,%/sfc\n\t" | ||
54 | "movec %0,%/dfc\n\t" | ||
55 | : /* no outputs */ : "r" (val.seg) : "memory"); | ||
5 | #endif | 56 | #endif |
57 | } | ||
58 | |||
59 | #define segment_eq(a,b) ((a).seg == (b).seg) | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | ||
62 | |||
63 | #endif /* _M68K_SEGMENT_H */ | ||
diff --git a/arch/m68k/include/asm/segment_mm.h b/arch/m68k/include/asm/segment_mm.h deleted file mode 100644 index 7b0b2d3127f9..000000000000 --- a/arch/m68k/include/asm/segment_mm.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | #ifndef _M68K_SEGMENT_H | ||
2 | #define _M68K_SEGMENT_H | ||
3 | |||
4 | /* define constants */ | ||
5 | /* Address spaces (FC0-FC2) */ | ||
6 | #define USER_DATA (1) | ||
7 | #ifndef __USER_DS | ||
8 | #define __USER_DS (USER_DATA) | ||
9 | #endif | ||
10 | #define USER_PROGRAM (2) | ||
11 | #define SUPER_DATA (5) | ||
12 | #ifndef __KERNEL_DS | ||
13 | #define __KERNEL_DS (SUPER_DATA) | ||
14 | #endif | ||
15 | #define SUPER_PROGRAM (6) | ||
16 | #define CPU_SPACE (7) | ||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | |||
20 | typedef struct { | ||
21 | unsigned long seg; | ||
22 | } mm_segment_t; | ||
23 | |||
24 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | ||
25 | #define USER_DS MAKE_MM_SEG(__USER_DS) | ||
26 | #define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS) | ||
27 | |||
28 | /* | ||
29 | * Get/set the SFC/DFC registers for MOVES instructions | ||
30 | */ | ||
31 | |||
32 | static inline mm_segment_t get_fs(void) | ||
33 | { | ||
34 | mm_segment_t _v; | ||
35 | __asm__ ("movec %/dfc,%0":"=r" (_v.seg):); | ||
36 | |||
37 | return _v; | ||
38 | } | ||
39 | |||
40 | static inline mm_segment_t get_ds(void) | ||
41 | { | ||
42 | /* return the supervisor data space code */ | ||
43 | return KERNEL_DS; | ||
44 | } | ||
45 | |||
46 | static inline void set_fs(mm_segment_t val) | ||
47 | { | ||
48 | __asm__ __volatile__ ("movec %0,%/sfc\n\t" | ||
49 | "movec %0,%/dfc\n\t" | ||
50 | : /* no outputs */ : "r" (val.seg) : "memory"); | ||
51 | } | ||
52 | |||
53 | #define segment_eq(a,b) ((a).seg == (b).seg) | ||
54 | |||
55 | #endif /* __ASSEMBLY__ */ | ||
56 | |||
57 | #endif /* _M68K_SEGMENT_H */ | ||
diff --git a/arch/m68k/include/asm/segment_no.h b/arch/m68k/include/asm/segment_no.h deleted file mode 100644 index 42318ebec7ec..000000000000 --- a/arch/m68k/include/asm/segment_no.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | #ifndef _M68K_SEGMENT_H | ||
2 | #define _M68K_SEGMENT_H | ||
3 | |||
4 | /* define constants */ | ||
5 | /* Address spaces (FC0-FC2) */ | ||
6 | #define USER_DATA (1) | ||
7 | #ifndef __USER_DS | ||
8 | #define __USER_DS (USER_DATA) | ||
9 | #endif | ||
10 | #define USER_PROGRAM (2) | ||
11 | #define SUPER_DATA (5) | ||
12 | #ifndef __KERNEL_DS | ||
13 | #define __KERNEL_DS (SUPER_DATA) | ||
14 | #endif | ||
15 | #define SUPER_PROGRAM (6) | ||
16 | #define CPU_SPACE (7) | ||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | |||
20 | typedef struct { | ||
21 | unsigned long seg; | ||
22 | } mm_segment_t; | ||
23 | |||
24 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | ||
25 | #define USER_DS MAKE_MM_SEG(__USER_DS) | ||
26 | #define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS) | ||
27 | |||
28 | /* | ||
29 | * Get/set the SFC/DFC registers for MOVES instructions | ||
30 | */ | ||
31 | |||
32 | static inline mm_segment_t get_fs(void) | ||
33 | { | ||
34 | return USER_DS; | ||
35 | } | ||
36 | |||
37 | static inline mm_segment_t get_ds(void) | ||
38 | { | ||
39 | /* return the supervisor data space code */ | ||
40 | return KERNEL_DS; | ||
41 | } | ||
42 | |||
43 | static inline void set_fs(mm_segment_t val) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | #define segment_eq(a,b) ((a).seg == (b).seg) | ||
48 | |||
49 | #endif /* __ASSEMBLY__ */ | ||
50 | |||
51 | #endif /* _M68K_SEGMENT_H */ | ||
diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h index 719762980578..b87f2f278f67 100644 --- a/arch/m68k/include/asm/timex.h +++ b/arch/m68k/include/asm/timex.h | |||
@@ -1,5 +1,18 @@ | |||
1 | #ifdef __uClinux__ | 1 | /* |
2 | #include "timex_no.h" | 2 | * linux/include/asm-m68k/timex.h |
3 | #else | 3 | * |
4 | #include "timex_mm.h" | 4 | * m68k architecture timex specifications |
5 | */ | ||
6 | #ifndef _ASMm68k_TIMEX_H | ||
7 | #define _ASMm68k_TIMEX_H | ||
8 | |||
9 | #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | ||
10 | |||
11 | typedef unsigned long cycles_t; | ||
12 | |||
13 | static inline cycles_t get_cycles(void) | ||
14 | { | ||
15 | return 0; | ||
16 | } | ||
17 | |||
5 | #endif | 18 | #endif |
diff --git a/arch/m68k/include/asm/timex_mm.h b/arch/m68k/include/asm/timex_mm.h deleted file mode 100644 index b87f2f278f67..000000000000 --- a/arch/m68k/include/asm/timex_mm.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-m68k/timex.h | ||
3 | * | ||
4 | * m68k architecture timex specifications | ||
5 | */ | ||
6 | #ifndef _ASMm68k_TIMEX_H | ||
7 | #define _ASMm68k_TIMEX_H | ||
8 | |||
9 | #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | ||
10 | |||
11 | typedef unsigned long cycles_t; | ||
12 | |||
13 | static inline cycles_t get_cycles(void) | ||
14 | { | ||
15 | return 0; | ||
16 | } | ||
17 | |||
18 | #endif | ||
diff --git a/arch/m68k/include/asm/timex_no.h b/arch/m68k/include/asm/timex_no.h deleted file mode 100644 index 109050f3fe91..000000000000 --- a/arch/m68k/include/asm/timex_no.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-m68knommu/timex.h | ||
3 | * | ||
4 | * m68knommu architecture timex specifications | ||
5 | */ | ||
6 | #ifndef _ASM_M68KNOMMU_TIMEX_H | ||
7 | #define _ASM_M68KNOMMU_TIMEX_H | ||
8 | |||
9 | #ifdef CONFIG_COLDFIRE | ||
10 | #include <asm/coldfire.h> | ||
11 | #define CLOCK_TICK_RATE MCF_CLK | ||
12 | #else | ||
13 | #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | ||
14 | #endif | ||
15 | |||
16 | typedef unsigned long cycles_t; | ||
17 | |||
18 | static inline cycles_t get_cycles(void) | ||
19 | { | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | #endif | ||
diff --git a/arch/m68k/include/asm/tlbflush.h b/arch/m68k/include/asm/tlbflush.h index b6f93b30951e..a6b4ed4fc90f 100644 --- a/arch/m68k/include/asm/tlbflush.h +++ b/arch/m68k/include/asm/tlbflush.h | |||
@@ -1,5 +1,267 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_TLBFLUSH_H |
2 | #include "tlbflush_no.h" | 2 | #define _M68K_TLBFLUSH_H |
3 | |||
4 | #ifdef CONFIG_MMU | ||
5 | #ifndef CONFIG_SUN3 | ||
6 | |||
7 | #include <asm/current.h> | ||
8 | |||
9 | static inline void flush_tlb_kernel_page(void *addr) | ||
10 | { | ||
11 | if (CPU_IS_040_OR_060) { | ||
12 | mm_segment_t old_fs = get_fs(); | ||
13 | set_fs(KERNEL_DS); | ||
14 | __asm__ __volatile__(".chip 68040\n\t" | ||
15 | "pflush (%0)\n\t" | ||
16 | ".chip 68k" | ||
17 | : : "a" (addr)); | ||
18 | set_fs(old_fs); | ||
19 | } else if (CPU_IS_020_OR_030) | ||
20 | __asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr)); | ||
21 | } | ||
22 | |||
23 | /* | ||
24 | * flush all user-space atc entries. | ||
25 | */ | ||
26 | static inline void __flush_tlb(void) | ||
27 | { | ||
28 | if (CPU_IS_040_OR_060) | ||
29 | __asm__ __volatile__(".chip 68040\n\t" | ||
30 | "pflushan\n\t" | ||
31 | ".chip 68k"); | ||
32 | else if (CPU_IS_020_OR_030) | ||
33 | __asm__ __volatile__("pflush #0,#4"); | ||
34 | } | ||
35 | |||
36 | static inline void __flush_tlb040_one(unsigned long addr) | ||
37 | { | ||
38 | __asm__ __volatile__(".chip 68040\n\t" | ||
39 | "pflush (%0)\n\t" | ||
40 | ".chip 68k" | ||
41 | : : "a" (addr)); | ||
42 | } | ||
43 | |||
44 | static inline void __flush_tlb_one(unsigned long addr) | ||
45 | { | ||
46 | if (CPU_IS_040_OR_060) | ||
47 | __flush_tlb040_one(addr); | ||
48 | else if (CPU_IS_020_OR_030) | ||
49 | __asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr)); | ||
50 | } | ||
51 | |||
52 | #define flush_tlb() __flush_tlb() | ||
53 | |||
54 | /* | ||
55 | * flush all atc entries (both kernel and user-space entries). | ||
56 | */ | ||
57 | static inline void flush_tlb_all(void) | ||
58 | { | ||
59 | if (CPU_IS_040_OR_060) | ||
60 | __asm__ __volatile__(".chip 68040\n\t" | ||
61 | "pflusha\n\t" | ||
62 | ".chip 68k"); | ||
63 | else if (CPU_IS_020_OR_030) | ||
64 | __asm__ __volatile__("pflusha"); | ||
65 | } | ||
66 | |||
67 | static inline void flush_tlb_mm(struct mm_struct *mm) | ||
68 | { | ||
69 | if (mm == current->active_mm) | ||
70 | __flush_tlb(); | ||
71 | } | ||
72 | |||
73 | static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | ||
74 | { | ||
75 | if (vma->vm_mm == current->active_mm) { | ||
76 | mm_segment_t old_fs = get_fs(); | ||
77 | set_fs(USER_DS); | ||
78 | __flush_tlb_one(addr); | ||
79 | set_fs(old_fs); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | static inline void flush_tlb_range(struct vm_area_struct *vma, | ||
84 | unsigned long start, unsigned long end) | ||
85 | { | ||
86 | if (vma->vm_mm == current->active_mm) | ||
87 | __flush_tlb(); | ||
88 | } | ||
89 | |||
90 | static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) | ||
91 | { | ||
92 | flush_tlb_all(); | ||
93 | } | ||
94 | |||
3 | #else | 95 | #else |
4 | #include "tlbflush_mm.h" | 96 | |
97 | |||
98 | /* Reserved PMEGs. */ | ||
99 | extern char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; | ||
100 | extern unsigned long pmeg_vaddr[SUN3_PMEGS_NUM]; | ||
101 | extern unsigned char pmeg_alloc[SUN3_PMEGS_NUM]; | ||
102 | extern unsigned char pmeg_ctx[SUN3_PMEGS_NUM]; | ||
103 | |||
104 | /* Flush all userspace mappings one by one... (why no flush command, | ||
105 | sun?) */ | ||
106 | static inline void flush_tlb_all(void) | ||
107 | { | ||
108 | unsigned long addr; | ||
109 | unsigned char ctx, oldctx; | ||
110 | |||
111 | oldctx = sun3_get_context(); | ||
112 | for(addr = 0x00000000; addr < TASK_SIZE; addr += SUN3_PMEG_SIZE) { | ||
113 | for(ctx = 0; ctx < 8; ctx++) { | ||
114 | sun3_put_context(ctx); | ||
115 | sun3_put_segmap(addr, SUN3_INVALID_PMEG); | ||
116 | } | ||
117 | } | ||
118 | |||
119 | sun3_put_context(oldctx); | ||
120 | /* erase all of the userspace pmeg maps, we've clobbered them | ||
121 | all anyway */ | ||
122 | for(addr = 0; addr < SUN3_INVALID_PMEG; addr++) { | ||
123 | if(pmeg_alloc[addr] == 1) { | ||
124 | pmeg_alloc[addr] = 0; | ||
125 | pmeg_ctx[addr] = 0; | ||
126 | pmeg_vaddr[addr] = 0; | ||
127 | } | ||
128 | } | ||
129 | |||
130 | } | ||
131 | |||
132 | /* Clear user TLB entries within the context named in mm */ | ||
133 | static inline void flush_tlb_mm (struct mm_struct *mm) | ||
134 | { | ||
135 | unsigned char oldctx; | ||
136 | unsigned char seg; | ||
137 | unsigned long i; | ||
138 | |||
139 | oldctx = sun3_get_context(); | ||
140 | sun3_put_context(mm->context); | ||
141 | |||
142 | for(i = 0; i < TASK_SIZE; i += SUN3_PMEG_SIZE) { | ||
143 | seg = sun3_get_segmap(i); | ||
144 | if(seg == SUN3_INVALID_PMEG) | ||
145 | continue; | ||
146 | |||
147 | sun3_put_segmap(i, SUN3_INVALID_PMEG); | ||
148 | pmeg_alloc[seg] = 0; | ||
149 | pmeg_ctx[seg] = 0; | ||
150 | pmeg_vaddr[seg] = 0; | ||
151 | } | ||
152 | |||
153 | sun3_put_context(oldctx); | ||
154 | |||
155 | } | ||
156 | |||
157 | /* Flush a single TLB page. In this case, we're limited to flushing a | ||
158 | single PMEG */ | ||
159 | static inline void flush_tlb_page (struct vm_area_struct *vma, | ||
160 | unsigned long addr) | ||
161 | { | ||
162 | unsigned char oldctx; | ||
163 | unsigned char i; | ||
164 | |||
165 | oldctx = sun3_get_context(); | ||
166 | sun3_put_context(vma->vm_mm->context); | ||
167 | addr &= ~SUN3_PMEG_MASK; | ||
168 | if((i = sun3_get_segmap(addr)) != SUN3_INVALID_PMEG) | ||
169 | { | ||
170 | pmeg_alloc[i] = 0; | ||
171 | pmeg_ctx[i] = 0; | ||
172 | pmeg_vaddr[i] = 0; | ||
173 | sun3_put_segmap (addr, SUN3_INVALID_PMEG); | ||
174 | } | ||
175 | sun3_put_context(oldctx); | ||
176 | |||
177 | } | ||
178 | /* Flush a range of pages from TLB. */ | ||
179 | |||
180 | static inline void flush_tlb_range (struct vm_area_struct *vma, | ||
181 | unsigned long start, unsigned long end) | ||
182 | { | ||
183 | struct mm_struct *mm = vma->vm_mm; | ||
184 | unsigned char seg, oldctx; | ||
185 | |||
186 | start &= ~SUN3_PMEG_MASK; | ||
187 | |||
188 | oldctx = sun3_get_context(); | ||
189 | sun3_put_context(mm->context); | ||
190 | |||
191 | while(start < end) | ||
192 | { | ||
193 | if((seg = sun3_get_segmap(start)) == SUN3_INVALID_PMEG) | ||
194 | goto next; | ||
195 | if(pmeg_ctx[seg] == mm->context) { | ||
196 | pmeg_alloc[seg] = 0; | ||
197 | pmeg_ctx[seg] = 0; | ||
198 | pmeg_vaddr[seg] = 0; | ||
199 | } | ||
200 | sun3_put_segmap(start, SUN3_INVALID_PMEG); | ||
201 | next: | ||
202 | start += SUN3_PMEG_SIZE; | ||
203 | } | ||
204 | } | ||
205 | |||
206 | static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) | ||
207 | { | ||
208 | flush_tlb_all(); | ||
209 | } | ||
210 | |||
211 | /* Flush kernel page from TLB. */ | ||
212 | static inline void flush_tlb_kernel_page (unsigned long addr) | ||
213 | { | ||
214 | sun3_put_segmap (addr & ~(SUN3_PMEG_SIZE - 1), SUN3_INVALID_PMEG); | ||
215 | } | ||
216 | |||
5 | #endif | 217 | #endif |
218 | |||
219 | #else /* !CONFIG_MMU */ | ||
220 | |||
221 | /* | ||
222 | * flush all user-space atc entries. | ||
223 | */ | ||
224 | static inline void __flush_tlb(void) | ||
225 | { | ||
226 | BUG(); | ||
227 | } | ||
228 | |||
229 | static inline void __flush_tlb_one(unsigned long addr) | ||
230 | { | ||
231 | BUG(); | ||
232 | } | ||
233 | |||
234 | #define flush_tlb() __flush_tlb() | ||
235 | |||
236 | /* | ||
237 | * flush all atc entries (both kernel and user-space entries). | ||
238 | */ | ||
239 | static inline void flush_tlb_all(void) | ||
240 | { | ||
241 | BUG(); | ||
242 | } | ||
243 | |||
244 | static inline void flush_tlb_mm(struct mm_struct *mm) | ||
245 | { | ||
246 | BUG(); | ||
247 | } | ||
248 | |||
249 | static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | ||
250 | { | ||
251 | BUG(); | ||
252 | } | ||
253 | |||
254 | static inline void flush_tlb_range(struct mm_struct *mm, | ||
255 | unsigned long start, unsigned long end) | ||
256 | { | ||
257 | BUG(); | ||
258 | } | ||
259 | |||
260 | static inline void flush_tlb_kernel_page(unsigned long addr) | ||
261 | { | ||
262 | BUG(); | ||
263 | } | ||
264 | |||
265 | #endif /* CONFIG_MMU */ | ||
266 | |||
267 | #endif /* _M68K_TLBFLUSH_H */ | ||
diff --git a/arch/m68k/include/asm/tlbflush_mm.h b/arch/m68k/include/asm/tlbflush_mm.h deleted file mode 100644 index acb6bf21a321..000000000000 --- a/arch/m68k/include/asm/tlbflush_mm.h +++ /dev/null | |||
@@ -1,219 +0,0 @@ | |||
1 | #ifndef _M68K_TLBFLUSH_H | ||
2 | #define _M68K_TLBFLUSH_H | ||
3 | |||
4 | |||
5 | #ifndef CONFIG_SUN3 | ||
6 | |||
7 | #include <asm/current.h> | ||
8 | |||
9 | static inline void flush_tlb_kernel_page(void *addr) | ||
10 | { | ||
11 | if (CPU_IS_040_OR_060) { | ||
12 | mm_segment_t old_fs = get_fs(); | ||
13 | set_fs(KERNEL_DS); | ||
14 | __asm__ __volatile__(".chip 68040\n\t" | ||
15 | "pflush (%0)\n\t" | ||
16 | ".chip 68k" | ||
17 | : : "a" (addr)); | ||
18 | set_fs(old_fs); | ||
19 | } else if (CPU_IS_020_OR_030) | ||
20 | __asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr)); | ||
21 | } | ||
22 | |||
23 | /* | ||
24 | * flush all user-space atc entries. | ||
25 | */ | ||
26 | static inline void __flush_tlb(void) | ||
27 | { | ||
28 | if (CPU_IS_040_OR_060) | ||
29 | __asm__ __volatile__(".chip 68040\n\t" | ||
30 | "pflushan\n\t" | ||
31 | ".chip 68k"); | ||
32 | else if (CPU_IS_020_OR_030) | ||
33 | __asm__ __volatile__("pflush #0,#4"); | ||
34 | } | ||
35 | |||
36 | static inline void __flush_tlb040_one(unsigned long addr) | ||
37 | { | ||
38 | __asm__ __volatile__(".chip 68040\n\t" | ||
39 | "pflush (%0)\n\t" | ||
40 | ".chip 68k" | ||
41 | : : "a" (addr)); | ||
42 | } | ||
43 | |||
44 | static inline void __flush_tlb_one(unsigned long addr) | ||
45 | { | ||
46 | if (CPU_IS_040_OR_060) | ||
47 | __flush_tlb040_one(addr); | ||
48 | else if (CPU_IS_020_OR_030) | ||
49 | __asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr)); | ||
50 | } | ||
51 | |||
52 | #define flush_tlb() __flush_tlb() | ||
53 | |||
54 | /* | ||
55 | * flush all atc entries (both kernel and user-space entries). | ||
56 | */ | ||
57 | static inline void flush_tlb_all(void) | ||
58 | { | ||
59 | if (CPU_IS_040_OR_060) | ||
60 | __asm__ __volatile__(".chip 68040\n\t" | ||
61 | "pflusha\n\t" | ||
62 | ".chip 68k"); | ||
63 | else if (CPU_IS_020_OR_030) | ||
64 | __asm__ __volatile__("pflusha"); | ||
65 | } | ||
66 | |||
67 | static inline void flush_tlb_mm(struct mm_struct *mm) | ||
68 | { | ||
69 | if (mm == current->active_mm) | ||
70 | __flush_tlb(); | ||
71 | } | ||
72 | |||
73 | static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | ||
74 | { | ||
75 | if (vma->vm_mm == current->active_mm) { | ||
76 | mm_segment_t old_fs = get_fs(); | ||
77 | set_fs(USER_DS); | ||
78 | __flush_tlb_one(addr); | ||
79 | set_fs(old_fs); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | static inline void flush_tlb_range(struct vm_area_struct *vma, | ||
84 | unsigned long start, unsigned long end) | ||
85 | { | ||
86 | if (vma->vm_mm == current->active_mm) | ||
87 | __flush_tlb(); | ||
88 | } | ||
89 | |||
90 | static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) | ||
91 | { | ||
92 | flush_tlb_all(); | ||
93 | } | ||
94 | |||
95 | #else | ||
96 | |||
97 | |||
98 | /* Reserved PMEGs. */ | ||
99 | extern char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; | ||
100 | extern unsigned long pmeg_vaddr[SUN3_PMEGS_NUM]; | ||
101 | extern unsigned char pmeg_alloc[SUN3_PMEGS_NUM]; | ||
102 | extern unsigned char pmeg_ctx[SUN3_PMEGS_NUM]; | ||
103 | |||
104 | /* Flush all userspace mappings one by one... (why no flush command, | ||
105 | sun?) */ | ||
106 | static inline void flush_tlb_all(void) | ||
107 | { | ||
108 | unsigned long addr; | ||
109 | unsigned char ctx, oldctx; | ||
110 | |||
111 | oldctx = sun3_get_context(); | ||
112 | for(addr = 0x00000000; addr < TASK_SIZE; addr += SUN3_PMEG_SIZE) { | ||
113 | for(ctx = 0; ctx < 8; ctx++) { | ||
114 | sun3_put_context(ctx); | ||
115 | sun3_put_segmap(addr, SUN3_INVALID_PMEG); | ||
116 | } | ||
117 | } | ||
118 | |||
119 | sun3_put_context(oldctx); | ||
120 | /* erase all of the userspace pmeg maps, we've clobbered them | ||
121 | all anyway */ | ||
122 | for(addr = 0; addr < SUN3_INVALID_PMEG; addr++) { | ||
123 | if(pmeg_alloc[addr] == 1) { | ||
124 | pmeg_alloc[addr] = 0; | ||
125 | pmeg_ctx[addr] = 0; | ||
126 | pmeg_vaddr[addr] = 0; | ||
127 | } | ||
128 | } | ||
129 | |||
130 | } | ||
131 | |||
132 | /* Clear user TLB entries within the context named in mm */ | ||
133 | static inline void flush_tlb_mm (struct mm_struct *mm) | ||
134 | { | ||
135 | unsigned char oldctx; | ||
136 | unsigned char seg; | ||
137 | unsigned long i; | ||
138 | |||
139 | oldctx = sun3_get_context(); | ||
140 | sun3_put_context(mm->context); | ||
141 | |||
142 | for(i = 0; i < TASK_SIZE; i += SUN3_PMEG_SIZE) { | ||
143 | seg = sun3_get_segmap(i); | ||
144 | if(seg == SUN3_INVALID_PMEG) | ||
145 | continue; | ||
146 | |||
147 | sun3_put_segmap(i, SUN3_INVALID_PMEG); | ||
148 | pmeg_alloc[seg] = 0; | ||
149 | pmeg_ctx[seg] = 0; | ||
150 | pmeg_vaddr[seg] = 0; | ||
151 | } | ||
152 | |||
153 | sun3_put_context(oldctx); | ||
154 | |||
155 | } | ||
156 | |||
157 | /* Flush a single TLB page. In this case, we're limited to flushing a | ||
158 | single PMEG */ | ||
159 | static inline void flush_tlb_page (struct vm_area_struct *vma, | ||
160 | unsigned long addr) | ||
161 | { | ||
162 | unsigned char oldctx; | ||
163 | unsigned char i; | ||
164 | |||
165 | oldctx = sun3_get_context(); | ||
166 | sun3_put_context(vma->vm_mm->context); | ||
167 | addr &= ~SUN3_PMEG_MASK; | ||
168 | if((i = sun3_get_segmap(addr)) != SUN3_INVALID_PMEG) | ||
169 | { | ||
170 | pmeg_alloc[i] = 0; | ||
171 | pmeg_ctx[i] = 0; | ||
172 | pmeg_vaddr[i] = 0; | ||
173 | sun3_put_segmap (addr, SUN3_INVALID_PMEG); | ||
174 | } | ||
175 | sun3_put_context(oldctx); | ||
176 | |||
177 | } | ||
178 | /* Flush a range of pages from TLB. */ | ||
179 | |||
180 | static inline void flush_tlb_range (struct vm_area_struct *vma, | ||
181 | unsigned long start, unsigned long end) | ||
182 | { | ||
183 | struct mm_struct *mm = vma->vm_mm; | ||
184 | unsigned char seg, oldctx; | ||
185 | |||
186 | start &= ~SUN3_PMEG_MASK; | ||
187 | |||
188 | oldctx = sun3_get_context(); | ||
189 | sun3_put_context(mm->context); | ||
190 | |||
191 | while(start < end) | ||
192 | { | ||
193 | if((seg = sun3_get_segmap(start)) == SUN3_INVALID_PMEG) | ||
194 | goto next; | ||
195 | if(pmeg_ctx[seg] == mm->context) { | ||
196 | pmeg_alloc[seg] = 0; | ||
197 | pmeg_ctx[seg] = 0; | ||
198 | pmeg_vaddr[seg] = 0; | ||
199 | } | ||
200 | sun3_put_segmap(start, SUN3_INVALID_PMEG); | ||
201 | next: | ||
202 | start += SUN3_PMEG_SIZE; | ||
203 | } | ||
204 | } | ||
205 | |||
206 | static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) | ||
207 | { | ||
208 | flush_tlb_all(); | ||
209 | } | ||
210 | |||
211 | /* Flush kernel page from TLB. */ | ||
212 | static inline void flush_tlb_kernel_page (unsigned long addr) | ||
213 | { | ||
214 | sun3_put_segmap (addr & ~(SUN3_PMEG_SIZE - 1), SUN3_INVALID_PMEG); | ||
215 | } | ||
216 | |||
217 | #endif | ||
218 | |||
219 | #endif /* _M68K_TLBFLUSH_H */ | ||
diff --git a/arch/m68k/include/asm/tlbflush_no.h b/arch/m68k/include/asm/tlbflush_no.h deleted file mode 100644 index a470cfb803eb..000000000000 --- a/arch/m68k/include/asm/tlbflush_no.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | #ifndef _M68KNOMMU_TLBFLUSH_H | ||
2 | #define _M68KNOMMU_TLBFLUSH_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org> | ||
6 | * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | #include <asm/setup.h> | ||
10 | |||
11 | /* | ||
12 | * flush all user-space atc entries. | ||
13 | */ | ||
14 | static inline void __flush_tlb(void) | ||
15 | { | ||
16 | BUG(); | ||
17 | } | ||
18 | |||
19 | static inline void __flush_tlb_one(unsigned long addr) | ||
20 | { | ||
21 | BUG(); | ||
22 | } | ||
23 | |||
24 | #define flush_tlb() __flush_tlb() | ||
25 | |||
26 | /* | ||
27 | * flush all atc entries (both kernel and user-space entries). | ||
28 | */ | ||
29 | static inline void flush_tlb_all(void) | ||
30 | { | ||
31 | BUG(); | ||
32 | } | ||
33 | |||
34 | static inline void flush_tlb_mm(struct mm_struct *mm) | ||
35 | { | ||
36 | BUG(); | ||
37 | } | ||
38 | |||
39 | static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | ||
40 | { | ||
41 | BUG(); | ||
42 | } | ||
43 | |||
44 | static inline void flush_tlb_range(struct mm_struct *mm, | ||
45 | unsigned long start, unsigned long end) | ||
46 | { | ||
47 | BUG(); | ||
48 | } | ||
49 | |||
50 | static inline void flush_tlb_kernel_page(unsigned long addr) | ||
51 | { | ||
52 | BUG(); | ||
53 | } | ||
54 | |||
55 | #endif /* _M68KNOMMU_TLBFLUSH_H */ | ||
diff --git a/arch/m68k/include/asm/ucontext.h b/arch/m68k/include/asm/ucontext.h index b53cd160c0b3..e4e22669edc0 100644 --- a/arch/m68k/include/asm/ucontext.h +++ b/arch/m68k/include/asm/ucontext.h | |||
@@ -1,5 +1,30 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _M68K_UCONTEXT_H |
2 | #include "ucontext_no.h" | 2 | #define _M68K_UCONTEXT_H |
3 | #else | 3 | |
4 | #include "ucontext_mm.h" | 4 | typedef int greg_t; |
5 | #define NGREG 18 | ||
6 | typedef greg_t gregset_t[NGREG]; | ||
7 | |||
8 | typedef struct fpregset { | ||
9 | int f_fpcntl[3]; | ||
10 | int f_fpregs[8*3]; | ||
11 | } fpregset_t; | ||
12 | |||
13 | struct mcontext { | ||
14 | int version; | ||
15 | gregset_t gregs; | ||
16 | fpregset_t fpregs; | ||
17 | }; | ||
18 | |||
19 | #define MCONTEXT_VERSION 2 | ||
20 | |||
21 | struct ucontext { | ||
22 | unsigned long uc_flags; | ||
23 | struct ucontext *uc_link; | ||
24 | stack_t uc_stack; | ||
25 | struct mcontext uc_mcontext; | ||
26 | unsigned long uc_filler[80]; | ||
27 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
28 | }; | ||
29 | |||
5 | #endif | 30 | #endif |
diff --git a/arch/m68k/include/asm/ucontext_mm.h b/arch/m68k/include/asm/ucontext_mm.h deleted file mode 100644 index e4e22669edc0..000000000000 --- a/arch/m68k/include/asm/ucontext_mm.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | #ifndef _M68K_UCONTEXT_H | ||
2 | #define _M68K_UCONTEXT_H | ||
3 | |||
4 | typedef int greg_t; | ||
5 | #define NGREG 18 | ||
6 | typedef greg_t gregset_t[NGREG]; | ||
7 | |||
8 | typedef struct fpregset { | ||
9 | int f_fpcntl[3]; | ||
10 | int f_fpregs[8*3]; | ||
11 | } fpregset_t; | ||
12 | |||
13 | struct mcontext { | ||
14 | int version; | ||
15 | gregset_t gregs; | ||
16 | fpregset_t fpregs; | ||
17 | }; | ||
18 | |||
19 | #define MCONTEXT_VERSION 2 | ||
20 | |||
21 | struct ucontext { | ||
22 | unsigned long uc_flags; | ||
23 | struct ucontext *uc_link; | ||
24 | stack_t uc_stack; | ||
25 | struct mcontext uc_mcontext; | ||
26 | unsigned long uc_filler[80]; | ||
27 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
28 | }; | ||
29 | |||
30 | #endif | ||
diff --git a/arch/m68k/include/asm/ucontext_no.h b/arch/m68k/include/asm/ucontext_no.h deleted file mode 100644 index 713a27f901cd..000000000000 --- a/arch/m68k/include/asm/ucontext_no.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #ifndef _M68KNOMMU_UCONTEXT_H | ||
2 | #define _M68KNOMMU_UCONTEXT_H | ||
3 | |||
4 | typedef int greg_t; | ||
5 | #define NGREG 18 | ||
6 | typedef greg_t gregset_t[NGREG]; | ||
7 | |||
8 | typedef struct fpregset { | ||
9 | int f_pcr; | ||
10 | int f_psr; | ||
11 | int f_fpiaddr; | ||
12 | int f_fpregs[8][3]; | ||
13 | } fpregset_t; | ||
14 | |||
15 | struct mcontext { | ||
16 | int version; | ||
17 | gregset_t gregs; | ||
18 | fpregset_t fpregs; | ||
19 | }; | ||
20 | |||
21 | #define MCONTEXT_VERSION 2 | ||
22 | |||
23 | struct ucontext { | ||
24 | unsigned long uc_flags; | ||
25 | struct ucontext *uc_link; | ||
26 | stack_t uc_stack; | ||
27 | struct mcontext uc_mcontext; | ||
28 | unsigned long uc_filler[80]; | ||
29 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
30 | }; | ||
31 | |||
32 | #endif | ||
diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h index c640bba3bdf4..019caa740c21 100644 --- a/arch/m68k/include/asm/unaligned.h +++ b/arch/m68k/include/asm/unaligned.h | |||
@@ -1,5 +1,25 @@ | |||
1 | #ifdef __uClinux__ | 1 | #ifndef _ASM_M68K_UNALIGNED_H |
2 | #include "unaligned_no.h" | 2 | #define _ASM_M68K_UNALIGNED_H |
3 | |||
4 | |||
5 | #ifdef CONFIG_COLDFIRE | ||
6 | #include <linux/unaligned/be_struct.h> | ||
7 | #include <linux/unaligned/le_byteshift.h> | ||
8 | #include <linux/unaligned/generic.h> | ||
9 | |||
10 | #define get_unaligned __get_unaligned_be | ||
11 | #define put_unaligned __put_unaligned_be | ||
12 | |||
3 | #else | 13 | #else |
4 | #include "unaligned_mm.h" | 14 | /* |
15 | * The m68k can do unaligned accesses itself. | ||
16 | */ | ||
17 | #include <linux/unaligned/access_ok.h> | ||
18 | #include <linux/unaligned/generic.h> | ||
19 | |||
20 | #define get_unaligned __get_unaligned_be | ||
21 | #define put_unaligned __put_unaligned_be | ||
22 | |||
5 | #endif | 23 | #endif |
24 | |||
25 | #endif /* _ASM_M68K_UNALIGNED_H */ | ||
diff --git a/arch/m68k/include/asm/unaligned_mm.h b/arch/m68k/include/asm/unaligned_mm.h deleted file mode 100644 index 77698f2dc33c..000000000000 --- a/arch/m68k/include/asm/unaligned_mm.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _ASM_M68K_UNALIGNED_H | ||
2 | #define _ASM_M68K_UNALIGNED_H | ||
3 | |||
4 | /* | ||
5 | * The m68k can do unaligned accesses itself. | ||
6 | */ | ||
7 | #include <linux/unaligned/access_ok.h> | ||
8 | #include <linux/unaligned/generic.h> | ||
9 | |||
10 | #define get_unaligned __get_unaligned_be | ||
11 | #define put_unaligned __put_unaligned_be | ||
12 | |||
13 | #endif /* _ASM_M68K_UNALIGNED_H */ | ||
diff --git a/arch/m68k/include/asm/unaligned_no.h b/arch/m68k/include/asm/unaligned_no.h deleted file mode 100644 index eb1ea4cb9a59..000000000000 --- a/arch/m68k/include/asm/unaligned_no.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASM_M68KNOMMU_UNALIGNED_H | ||
2 | #define _ASM_M68KNOMMU_UNALIGNED_H | ||
3 | |||
4 | |||
5 | #ifdef CONFIG_COLDFIRE | ||
6 | #include <linux/unaligned/be_struct.h> | ||
7 | #include <linux/unaligned/le_byteshift.h> | ||
8 | #include <linux/unaligned/generic.h> | ||
9 | |||
10 | #define get_unaligned __get_unaligned_be | ||
11 | #define put_unaligned __put_unaligned_be | ||
12 | |||
13 | #else | ||
14 | /* | ||
15 | * The m68k can do unaligned accesses itself. | ||
16 | */ | ||
17 | #include <linux/unaligned/access_ok.h> | ||
18 | #include <linux/unaligned/generic.h> | ||
19 | |||
20 | #define get_unaligned __get_unaligned_be | ||
21 | #define put_unaligned __put_unaligned_be | ||
22 | |||
23 | #endif | ||
24 | |||
25 | #endif /* _ASM_M68KNOMMU_UNALIGNED_H */ | ||
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index fd0fb303d885..ce404bc9ccbd 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile | |||
@@ -88,18 +88,18 @@ export PLATFORM BOARD MODEL CPUCLASS | |||
88 | # | 88 | # |
89 | # Some CFLAG additions based on specific CPU type. | 89 | # Some CFLAG additions based on specific CPU type. |
90 | # | 90 | # |
91 | cflags-$(CONFIG_M5206) := -m5200 | 91 | cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) |
92 | cflags-$(CONFIG_M5206e) := -m5200 | 92 | cflags-$(CONFIG_M5206e) := $(call cc-option,-m5206e,-m5200) |
93 | cflags-$(CONFIG_M520x) := -m5307 | 93 | cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) |
94 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) | 94 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) |
95 | cflags-$(CONFIG_M5249) := -m5200 | 95 | cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) |
96 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) | 96 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) |
97 | cflags-$(CONFIG_M5272) := -m5307 | 97 | cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5271,-m5200) |
98 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) | 98 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) |
99 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) | 99 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) |
100 | cflags-$(CONFIG_M5307) := -m5307 | 100 | cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200) |
101 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) | 101 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) |
102 | cflags-$(CONFIG_M5407) := -m5200 | 102 | cflags-$(CONFIG_M5407) := $(call cc-option,-m5407,-m5200) |
103 | cflags-$(CONFIG_M68328) := -m68000 | 103 | cflags-$(CONFIG_M68328) := -m68000 |
104 | cflags-$(CONFIG_M68EZ328) := -m68000 | 104 | cflags-$(CONFIG_M68EZ328) := -m68000 |
105 | cflags-$(CONFIG_M68VZ328) := -m68000 | 105 | cflags-$(CONFIG_M68VZ328) := -m68000 |
diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c index e10eafc52789..936125806638 100644 --- a/arch/m68knommu/kernel/dma.c +++ b/arch/m68knommu/kernel/dma.c | |||
@@ -9,10 +9,11 @@ | |||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/dma-mapping.h> | ||
12 | #include <asm/io.h> | 13 | #include <asm/io.h> |
13 | 14 | ||
14 | void *dma_alloc_coherent(struct device *dev, size_t size, | 15 | void *dma_alloc_coherent(struct device *dev, size_t size, |
15 | dma_addr_t *dma_handle, int gfp) | 16 | dma_addr_t *dma_handle, gfp_t gfp) |
16 | { | 17 | { |
17 | void *ret; | 18 | void *ret; |
18 | /* ignore region specifiers */ | 19 | /* ignore region specifiers */ |
@@ -34,3 +35,8 @@ void dma_free_coherent(struct device *dev, size_t size, | |||
34 | { | 35 | { |
35 | free_pages((unsigned long)vaddr, get_order(size)); | 36 | free_pages((unsigned long)vaddr, get_order(size)); |
36 | } | 37 | } |
38 | |||
39 | void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir) | ||
40 | { | ||
41 | } | ||
42 | |||
diff --git a/arch/m68knommu/kernel/irq.c b/arch/m68knommu/kernel/irq.c index bba1bb48a21f..56e0f4c55a67 100644 --- a/arch/m68knommu/kernel/irq.c +++ b/arch/m68knommu/kernel/irq.c | |||
@@ -23,7 +23,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | |||
23 | struct pt_regs *oldregs = set_irq_regs(regs); | 23 | struct pt_regs *oldregs = set_irq_regs(regs); |
24 | 24 | ||
25 | irq_enter(); | 25 | irq_enter(); |
26 | __do_IRQ(irq); | 26 | generic_handle_irq(irq); |
27 | irq_exit(); | 27 | irq_exit(); |
28 | 28 | ||
29 | set_irq_regs(oldregs); | 29 | set_irq_regs(oldregs); |
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c index 3bf249c53e41..7befc0c357e0 100644 --- a/arch/m68knommu/mm/init.c +++ b/arch/m68knommu/mm/init.c | |||
@@ -111,11 +111,7 @@ void __init paging_init(void) | |||
111 | { | 111 | { |
112 | unsigned long zones_size[MAX_NR_ZONES] = {0, }; | 112 | unsigned long zones_size[MAX_NR_ZONES] = {0, }; |
113 | 113 | ||
114 | zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT; | 114 | zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT; |
115 | zones_size[ZONE_NORMAL] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT; | ||
116 | #ifdef CONFIG_HIGHMEM | ||
117 | zones_size[ZONE_HIGHMEM] = 0; | ||
118 | #endif | ||
119 | free_area_init(zones_size); | 115 | free_area_init(zones_size); |
120 | } | 116 | } |
121 | } | 117 | } |
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c index d299f7b8768a..9eab19d01eb1 100644 --- a/arch/m68knommu/platform/5249/config.c +++ b/arch/m68knommu/platform/5249/config.c | |||
@@ -32,7 +32,8 @@ static struct mcf_platform_uart m5249_uart_platform[] = { | |||
32 | { | 32 | { |
33 | .mapbase = MCF_MBAR + MCFUART_BASE2, | 33 | .mapbase = MCF_MBAR + MCFUART_BASE2, |
34 | .irq = 74, | 34 | .irq = 74, |
35 | } | 35 | }, |
36 | { }, | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | static struct platform_device m5249_uart = { | 39 | static struct platform_device m5249_uart = { |
@@ -50,12 +51,12 @@ static struct platform_device *m5249_devices[] __initdata = { | |||
50 | static void __init m5249_uart_init_line(int line, int irq) | 51 | static void __init m5249_uart_init_line(int line, int irq) |
51 | { | 52 | { |
52 | if (line == 0) { | 53 | if (line == 0) { |
53 | writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); | 54 | writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); |
54 | writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); | 55 | writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); |
55 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); | 56 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); |
56 | } else if (line == 1) { | 57 | } else if (line == 1) { |
57 | writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); | 58 | writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); |
58 | writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); | 59 | writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); |
59 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); | 60 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); |
60 | } | 61 | } |
61 | } | 62 | } |
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c index 724faf05852a..44803bf70a6e 100644 --- a/arch/m68knommu/platform/5307/config.c +++ b/arch/m68knommu/platform/5307/config.c | |||
@@ -65,12 +65,12 @@ static struct platform_device *m5307_devices[] __initdata = { | |||
65 | static void __init m5307_uart_init_line(int line, int irq) | 65 | static void __init m5307_uart_init_line(int line, int irq) |
66 | { | 66 | { |
67 | if (line == 0) { | 67 | if (line == 0) { |
68 | writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); | 68 | writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); |
69 | writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); | 69 | writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); |
70 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); | 70 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); |
71 | } else if (line == 1) { | 71 | } else if (line == 1) { |
72 | writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); | 72 | writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); |
73 | writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); | 73 | writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); |
74 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); | 74 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); |
75 | } | 75 | } |
76 | } | 76 | } |
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c index 648b8b778211..0ee8c1a200c8 100644 --- a/arch/m68knommu/platform/5407/config.c +++ b/arch/m68knommu/platform/5407/config.c | |||
@@ -56,12 +56,12 @@ static struct platform_device *m5407_devices[] __initdata = { | |||
56 | static void __init m5407_uart_init_line(int line, int irq) | 56 | static void __init m5407_uart_init_line(int line, int irq) |
57 | { | 57 | { |
58 | if (line == 0) { | 58 | if (line == 0) { |
59 | writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); | 59 | writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); |
60 | writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); | 60 | writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); |
61 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); | 61 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); |
62 | } else if (line == 1) { | 62 | } else if (line == 1) { |
63 | writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); | 63 | writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); |
64 | writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); | 64 | writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); |
65 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); | 65 | mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); |
66 | } | 66 | } |
67 | } | 67 | } |
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile index 4f416a91a829..1bcb9372353f 100644 --- a/arch/m68knommu/platform/coldfire/Makefile +++ b/arch/m68knommu/platform/coldfire/Makefile | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 | 15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 |
16 | 16 | ||
17 | obj-$(CONFIG_COLDFIRE) += dma.o entry.o vectors.o | 17 | obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o |
18 | obj-$(CONFIG_M5206) += timers.o | 18 | obj-$(CONFIG_M5206) += timers.o |
19 | obj-$(CONFIG_M5206e) += timers.o | 19 | obj-$(CONFIG_M5206e) += timers.o |
20 | obj-$(CONFIG_M520x) += pit.o | 20 | obj-$(CONFIG_M520x) += pit.o |
diff --git a/arch/m68knommu/platform/coldfire/clk.c b/arch/m68knommu/platform/coldfire/clk.c new file mode 100644 index 000000000000..7cdbf445b28f --- /dev/null +++ b/arch/m68knommu/platform/coldfire/clk.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /***************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * clk.c -- general ColdFire CPU kernel clk handling | ||
5 | * | ||
6 | * Copyright (C) 2009, Greg Ungerer (gerg@snapgear.com) | ||
7 | */ | ||
8 | |||
9 | /***************************************************************************/ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/clk.h> | ||
13 | #include <asm/coldfire.h> | ||
14 | |||
15 | /***************************************************************************/ | ||
16 | |||
17 | struct clk *clk_get(struct device *dev, const char *id) | ||
18 | { | ||
19 | return NULL; | ||
20 | } | ||
21 | |||
22 | int clk_enable(struct clk *clk) | ||
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | void clk_disable(struct clk *clk) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | void clk_put(struct clk *clk) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | unsigned long clk_get_rate(struct clk *clk) | ||
36 | { | ||
37 | return MCF_CLK; | ||
38 | } | ||
39 | |||
40 | /***************************************************************************/ | ||
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c index 56841fe5f483..0eefb07bebaf 100644 --- a/drivers/serial/mcf.c +++ b/drivers/serial/mcf.c | |||
@@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options) | |||
513 | int parity = 'n'; | 513 | int parity = 'n'; |
514 | int flow = 'n'; | 514 | int flow = 'n'; |
515 | 515 | ||
516 | if ((co->index >= 0) && (co->index <= MCF_MAXPORTS)) | 516 | if ((co->index < 0) || (co->index >= MCF_MAXPORTS)) |
517 | co->index = 0; | 517 | co->index = 0; |
518 | port = &mcf_ports[co->index].port; | 518 | port = &mcf_ports[co->index].port; |
519 | if (port->membase == 0) | 519 | if (port->membase == 0) |