aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/kernel/setup.c')
-rw-r--r--arch/cris/kernel/setup.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index c34fb235b09f..04d48dd91ddf 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -18,7 +18,7 @@
18#include <linux/screen_info.h> 18#include <linux/screen_info.h>
19#include <linux/utsname.h> 19#include <linux/utsname.h>
20#include <linux/pfn.h> 20#include <linux/pfn.h>
21 21#include <linux/cpu.h>
22#include <asm/setup.h> 22#include <asm/setup.h>
23 23
24/* 24/*
@@ -36,6 +36,8 @@ extern unsigned long dram_start, dram_end;
36 36
37extern unsigned long romfs_start, romfs_length, romfs_in_flash; /* from head.S */ 37extern unsigned long romfs_start, romfs_length, romfs_in_flash; /* from head.S */
38 38
39static struct cpu cpu_devices[NR_CPUS];
40
39extern void show_etrax_copyright(void); /* arch-vX/kernel/setup.c */ 41extern void show_etrax_copyright(void); /* arch-vX/kernel/setup.c */
40 42
41/* This mainly sets up the memory area, and can be really confusing. 43/* This mainly sets up the memory area, and can be really confusing.
@@ -45,24 +47,23 @@ extern void show_etrax_copyright(void); /* arch-vX/kernel/setup.c */
45 * given by the macro __pa(). 47 * given by the macro __pa().
46 * 48 *
47 * In this DRAM, the kernel code and data is loaded, in the beginning. 49 * In this DRAM, the kernel code and data is loaded, in the beginning.
48 * It really starts at c0004000 to make room for some special pages - 50 * It really starts at c0004000 to make room for some special pages -
49 * the start address is text_start. The kernel data ends at _end. After 51 * the start address is text_start. The kernel data ends at _end. After
50 * this the ROM filesystem is appended (if there is any). 52 * this the ROM filesystem is appended (if there is any).
51 * 53 *
52 * Between this address and dram_end, we have RAM pages usable to the 54 * Between this address and dram_end, we have RAM pages usable to the
53 * boot code and the system. 55 * boot code and the system.
54 * 56 *
55 */ 57 */
56 58
57void __init 59void __init setup_arch(char **cmdline_p)
58setup_arch(char **cmdline_p)
59{ 60{
60 extern void init_etrax_debug(void); 61 extern void init_etrax_debug(void);
61 unsigned long bootmap_size; 62 unsigned long bootmap_size;
62 unsigned long start_pfn, max_pfn; 63 unsigned long start_pfn, max_pfn;
63 unsigned long memory_start; 64 unsigned long memory_start;
64 65
65 /* register an initial console printing routine for printk's */ 66 /* register an initial console printing routine for printk's */
66 67
67 init_etrax_debug(); 68 init_etrax_debug();
68 69
@@ -121,7 +122,7 @@ setup_arch(char **cmdline_p)
121 min_low_pfn = PAGE_OFFSET >> PAGE_SHIFT; 122 min_low_pfn = PAGE_OFFSET >> PAGE_SHIFT;
122 123
123 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn, 124 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
124 min_low_pfn, 125 min_low_pfn,
125 max_low_pfn); 126 max_low_pfn);
126 127
127 /* And free all memory not belonging to the kernel (addr, size) */ 128 /* And free all memory not belonging to the kernel (addr, size) */
@@ -187,4 +188,16 @@ const struct seq_operations cpuinfo_op = {
187 .show = show_cpuinfo, 188 .show = show_cpuinfo,
188}; 189};
189 190
191static int __init topology_init(void)
192{
193 int i;
194
195 for_each_possible_cpu(i) {
196 return register_cpu(&cpu_devices[i], i);
197 }
198
199 return 0;
200}
201
202subsys_initcall(topology_init);
190 203