ChangeSet 1.2254, 2005/03/31 08:34:45-08:00, [EMAIL PROTECTED]
[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 <[EMAIL PROTECTED]>
Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
kernel/setup.c | 31 +++++++++++++++++++++++--------
mm/discontig.c | 1 +
2 files changed, 24 insertions(+), 8 deletions(-)
diff -Nru a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
--- a/arch/m32r/kernel/setup.c 2005-03-31 10:16:08 -08:00
+++ b/arch/m32r/kernel/setup.c 2005-03-31 10:16:08 -08:00
@@ -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 @@
#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 @@
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 @@
#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 @@
stop: c_stop,
show: show_cpuinfo,
};
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_PROC_FS */
unsigned long cpu_initialized __initdata = 0;
@@ -399,7 +415,6 @@
#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 -Nru a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c
--- a/arch/m32r/mm/discontig.c 2005-03-31 10:16:08 -08:00
+++ b/arch/m32r/mm/discontig.c 2005-03-31 10:16:08 -08:00
@@ -11,6 +11,7 @@
#include <linux/bootmem.h>
#include <linux/mmzone.h>
#include <linux/initrd.h>
+#include <linux/nodemask.h>
#include <asm/setup.h>
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html