diff options
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 4156aac8c27..855cdf9d85b 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
29 | #include <asm/elf.h> | ||
29 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
30 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -78,12 +79,25 @@ EXPORT_SYMBOL(memory_start); | |||
78 | unsigned long memory_end = 0; | 79 | unsigned long memory_end = 0; |
79 | EXPORT_SYMBOL(memory_end); | 80 | EXPORT_SYMBOL(memory_end); |
80 | 81 | ||
82 | int l1i_cache_shape, l1d_cache_shape, l2_cache_shape; | ||
83 | |||
81 | static int __init early_parse_mem(char *p) | 84 | static int __init early_parse_mem(char *p) |
82 | { | 85 | { |
83 | unsigned long size; | 86 | unsigned long size; |
84 | 87 | ||
85 | memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; | 88 | memory_start = (unsigned long)__va(__MEMORY_START); |
86 | size = memparse(p, &p); | 89 | size = memparse(p, &p); |
90 | |||
91 | if (size > __MEMORY_SIZE) { | ||
92 | static char msg[] __initdata = KERN_ERR | ||
93 | "Using mem= to increase the size of kernel memory " | ||
94 | "is not allowed.\n" | ||
95 | " Recompile the kernel with the correct value for " | ||
96 | "CONFIG_MEMORY_SIZE.\n"; | ||
97 | printk(msg); | ||
98 | return 0; | ||
99 | } | ||
100 | |||
87 | memory_end = memory_start + size; | 101 | memory_end = memory_start + size; |
88 | 102 | ||
89 | return 0; | 103 | return 0; |
@@ -243,7 +257,7 @@ void __init setup_arch(char **cmdline_p) | |||
243 | data_resource.start = virt_to_phys(_etext); | 257 | data_resource.start = virt_to_phys(_etext); |
244 | data_resource.end = virt_to_phys(_edata)-1; | 258 | data_resource.end = virt_to_phys(_edata)-1; |
245 | 259 | ||
246 | memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; | 260 | memory_start = (unsigned long)__va(__MEMORY_START); |
247 | if (!memory_end) | 261 | if (!memory_end) |
248 | memory_end = memory_start + __MEMORY_SIZE; | 262 | memory_end = memory_start + __MEMORY_SIZE; |
249 | 263 | ||
@@ -294,20 +308,23 @@ void __init setup_arch(char **cmdline_p) | |||
294 | } | 308 | } |
295 | 309 | ||
296 | static const char *cpu_name[] = { | 310 | static const char *cpu_name[] = { |
311 | [CPU_SH7203] = "SH7203", [CPU_SH7263] = "SH7263", | ||
297 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", | 312 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", |
298 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", | 313 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", |
299 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", | 314 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", |
300 | [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", | 315 | [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", |
301 | [CPU_SH7712] = "SH7712", [CPU_SH7720] = "SH7720", | 316 | [CPU_SH7712] = "SH7712", [CPU_SH7720] = "SH7720", |
302 | [CPU_SH7729] = "SH7729", [CPU_SH7750] = "SH7750", | 317 | [CPU_SH7721] = "SH7721", [CPU_SH7729] = "SH7729", |
303 | [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R", | 318 | [CPU_SH7750] = "SH7750", [CPU_SH7750S] = "SH7750S", |
304 | [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R", | 319 | [CPU_SH7750R] = "SH7750R", [CPU_SH7751] = "SH7751", |
305 | [CPU_SH7760] = "SH7760", | 320 | [CPU_SH7751R] = "SH7751R", [CPU_SH7760] = "SH7760", |
306 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", | 321 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", |
307 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", | 322 | [CPU_SH7763] = "SH7763", [CPU_SH7770] = "SH7770", |
308 | [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", | 323 | [CPU_SH7780] = "SH7780", [CPU_SH7781] = "SH7781", |
309 | [CPU_SH7785] = "SH7785", [CPU_SH7722] = "SH7722", | 324 | [CPU_SH7343] = "SH7343", [CPU_SH7785] = "SH7785", |
310 | [CPU_SHX3] = "SH-X3", [CPU_SH_NONE] = "Unknown" | 325 | [CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3", |
326 | [CPU_SH5_101] = "SH5-101", [CPU_SH5_103] = "SH5-103", | ||
327 | [CPU_SH_NONE] = "Unknown" | ||
311 | }; | 328 | }; |
312 | 329 | ||
313 | const char *get_cpu_subtype(struct sh_cpuinfo *c) | 330 | const char *get_cpu_subtype(struct sh_cpuinfo *c) |
@@ -410,7 +427,7 @@ static void *c_next(struct seq_file *m, void *v, loff_t *pos) | |||
410 | static void c_stop(struct seq_file *m, void *v) | 427 | static void c_stop(struct seq_file *m, void *v) |
411 | { | 428 | { |
412 | } | 429 | } |
413 | struct seq_operations cpuinfo_op = { | 430 | const struct seq_operations cpuinfo_op = { |
414 | .start = c_start, | 431 | .start = c_start, |
415 | .next = c_next, | 432 | .next = c_next, |
416 | .stop = c_stop, | 433 | .stop = c_stop, |