diff options
author | Hirokazu Takata <takata@linux-m32r.org> | 2005-03-30 16:34:45 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-30 16:34:45 -0800 |
commit | 2106630ca40d6889f1609987db685e3bcf290d99 (patch) | |
tree | a6ed85d3a74d13f6382622b9881728866f761f60 | |
parent | c718706f56cc2e202893de82fb2157d4fedbd5d9 (diff) | |
download | history-2106630ca40d6889f1609987db685e3bcf290d99.tar.gz |
[PATCH] m32r: build fix for CONFIG_DISCONTIGMEM
This patch fixes build error for CONFIG_DISCONTIGMEM.
* arch/m32r/mm/discontig.c: Fix build error for CONFIG_DISCONTIGMEM.
* arch/m32r/kernel/setup.c: ditto.
* arch/m32r/mm/discontig.c:
- Add topology_init.
- Cosmetics: change indentation of comments.
Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/m32r/kernel/setup.c | 31 | ||||
-rw-r--r-- | arch/m32r/mm/discontig.c | 1 |
2 files changed, 24 insertions, 8 deletions
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index fb03be1a0c94c2..4826cd6e40e8ee 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c @@ -7,8 +7,6 @@ * Hitoshi Yamamoto */ -/* $Id$ */ - #include <linux/config.h> #include <linux/init.h> #include <linux/stddef.h> @@ -24,6 +22,9 @@ #include <linux/seq_file.h> #include <linux/timex.h> #include <linux/tty.h> +#include <linux/cpu.h> +#include <linux/nodemask.h> + #include <asm/processor.h> #include <asm/pgtable.h> #include <asm/io.h> @@ -52,7 +53,7 @@ struct cpuinfo_m32r boot_cpu_data; #ifdef CONFIG_BLK_DEV_RAM extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */ extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */ -extern int rd_image_start; /* starting block # of image */ +extern int rd_image_start; /* starting block # of image */ #endif #if defined(CONFIG_VGA_CONSOLE) @@ -273,6 +274,21 @@ void __init setup_arch(char **cmdline_p) paging_init(); } +static struct cpu cpu[NR_CPUS]; + +static int __init topology_init(void) +{ + int cpu_id; + + for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++) + if (cpu_possible(cpu_id)) + register_cpu(&cpu[cpu_id], cpu_id, NULL); + + return 0; +} + +subsys_initcall(topology_init); + #ifdef CONFIG_PROC_FS /* * Get CPU information for use by the procfs. @@ -285,7 +301,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) #ifdef CONFIG_SMP if (!cpu_online(cpu)) return 0; -#endif /* CONFIG_SMP */ +#endif /* CONFIG_SMP */ seq_printf(m, "processor\t: %ld\n", cpu); @@ -359,7 +375,7 @@ struct seq_operations cpuinfo_op = { stop: c_stop, show: show_cpuinfo, }; -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_PROC_FS */ unsigned long cpu_initialized __initdata = 0; @@ -399,7 +415,6 @@ void __init cpu_init (void) #endif /* Set up ICUIMASK */ - outl(0x00070000, M32R_ICU_IMASK_PORTL); /* imask=111 */ + outl(0x00070000, M32R_ICU_IMASK_PORTL); /* imask=111 */ } -#endif /* defined(CONFIG_CHIP_VDEC2) ... */ - +#endif /* defined(CONFIG_CHIP_VDEC2) ... */ diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c index bf3104a1590878..1d1a01e54b3fa2 100644 --- a/arch/m32r/mm/discontig.c +++ b/arch/m32r/mm/discontig.c @@ -11,6 +11,7 @@ #include <linux/bootmem.h> #include <linux/mmzone.h> #include <linux/initrd.h> +#include <linux/nodemask.h> #include <asm/setup.h> |