
From: Matthew Dobson <colpatch@us.ibm.com>

This patch is in regard to bugme.osdl.org bug 619, link here:

http://bugme.osdl.org/show_bug.cgi?id=619

This is the first of two patches to fix this bug.  This patch changes the
nine files that #include <asm/topology.h> to #include <linux/topology.h>.  It
also creates include/linux/topology.h, but solely as a shell.  The next patch
fills it in.



 drivers/base/cpu.c        |    3 +--
 drivers/base/memblk.c     |    3 +--
 drivers/base/node.c       |    3 +--
 include/asm-i386/cpu.h    |    2 +-
 include/asm-i386/memblk.h |    2 +-
 include/asm-i386/node.h   |    3 +--
 include/linux/mmzone.h    |    2 +-
 include/linux/topology.h  |   32 ++++++++++++++++++++++++++++++++
 mm/page_alloc.c           |    2 +-
 mm/vmscan.c               |    2 +-
 10 files changed, 41 insertions(+), 13 deletions(-)

diff -puN drivers/base/cpu.c~sched_best_cpu-fix drivers/base/cpu.c
--- 25/drivers/base/cpu.c~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/drivers/base/cpu.c	2003-05-05 19:11:47.000000000 -0700
@@ -6,8 +6,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/cpu.h>
-
-#include <asm/topology.h>
+#include <linux/topology.h>
 
 
 struct class cpu_class = {
diff -puN drivers/base/memblk.c~sched_best_cpu-fix drivers/base/memblk.c
--- 25/drivers/base/memblk.c~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/drivers/base/memblk.c	2003-05-05 19:11:47.000000000 -0700
@@ -7,8 +7,7 @@
 #include <linux/init.h>
 #include <linux/memblk.h>
 #include <linux/node.h>
-
-#include <asm/topology.h>
+#include <linux/topology.h>
 
 
 static struct class memblk_class = {
diff -puN drivers/base/node.c~sched_best_cpu-fix drivers/base/node.c
--- 25/drivers/base/node.c~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/drivers/base/node.c	2003-05-05 19:11:47.000000000 -0700
@@ -7,8 +7,7 @@
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/node.h>
-
-#include <asm/topology.h>
+#include <linux/topology.h>
 
 
 static struct class node_class = {
diff -puN include/asm-i386/cpu.h~sched_best_cpu-fix include/asm-i386/cpu.h
--- 25/include/asm-i386/cpu.h~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/include/asm-i386/cpu.h	2003-05-05 19:11:47.000000000 -0700
@@ -3,8 +3,8 @@
 
 #include <linux/device.h>
 #include <linux/cpu.h>
+#include <linux/topology.h>
 
-#include <asm/topology.h>
 #include <asm/node.h>
 
 struct i386_cpu {
diff -puN include/asm-i386/memblk.h~sched_best_cpu-fix include/asm-i386/memblk.h
--- 25/include/asm-i386/memblk.h~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/include/asm-i386/memblk.h	2003-05-05 19:11:47.000000000 -0700
@@ -4,8 +4,8 @@
 #include <linux/device.h>
 #include <linux/mmzone.h>
 #include <linux/memblk.h>
+#include <linux/topology.h>
 
-#include <asm/topology.h>
 #include <asm/node.h>
 
 struct i386_memblk {
diff -puN include/asm-i386/node.h~sched_best_cpu-fix include/asm-i386/node.h
--- 25/include/asm-i386/node.h~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/include/asm-i386/node.h	2003-05-05 19:11:47.000000000 -0700
@@ -4,8 +4,7 @@
 #include <linux/device.h>
 #include <linux/mmzone.h>
 #include <linux/node.h>
-
-#include <asm/topology.h>
+#include <linux/topology.h>
 
 struct i386_node {
 	struct node node;
diff -puN include/linux/mmzone.h~sched_best_cpu-fix include/linux/mmzone.h
--- 25/include/linux/mmzone.h~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/include/linux/mmzone.h	2003-05-05 19:11:47.000000000 -0700
@@ -255,7 +255,7 @@ static inline struct zone *next_zone(str
 #define MAX_NR_MEMBLKS	1
 #endif /* CONFIG_NUMA */
 
-#include <asm/topology.h>
+#include <linux/topology.h>
 /* Returns the number of the current Node. */
 #define numa_node_id()		(cpu_to_node(smp_processor_id()))
 
diff -puN /dev/null include/linux/topology.h
--- /dev/null	2002-08-30 16:31:37.000000000 -0700
+++ 25-akpm/include/linux/topology.h	2003-05-05 19:11:47.000000000 -0700
@@ -0,0 +1,32 @@
+/*
+ * include/linux/topology.h
+ *
+ * Written by: Matthew Dobson, IBM Corporation
+ *
+ * Copyright (C) 2002, IBM Corp.
+ *
+ * All rights reserved.          
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Send feedback to <colpatch@us.ibm.com>
+ */
+#ifndef _LINUX_TOPOLOGY_H
+#define _LINUX_TOPOLOGY_H
+
+#include <asm/topology.h>
+
+#endif /* _LINUX_TOPOLOGY_H */
diff -puN mm/page_alloc.c~sched_best_cpu-fix mm/page_alloc.c
--- 25/mm/page_alloc.c~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/mm/page_alloc.c	2003-05-05 19:12:10.000000000 -0700
@@ -28,8 +28,8 @@
 #include <linux/blkdev.h>
 #include <linux/slab.h>
 #include <linux/notifier.h>
+#include <linux/topology.h>
 
-#include <asm/topology.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 
diff -puN mm/vmscan.c~sched_best_cpu-fix mm/vmscan.c
--- 25/mm/vmscan.c~sched_best_cpu-fix	2003-05-05 19:11:47.000000000 -0700
+++ 25-akpm/mm/vmscan.c	2003-05-05 19:11:47.000000000 -0700
@@ -28,10 +28,10 @@
 #include <linux/pagevec.h>
 #include <linux/backing-dev.h>
 #include <linux/rmap-locking.h>
+#include <linux/topology.h>
 
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
-#include <asm/topology.h>
 #include <asm/div64.h>
 
 #include <linux/swapops.h>

_
