WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] remove some #ifndef XEN using empty headerfiles

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] remove some #ifndef XEN using empty headerfiles.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 12 Jun 2008 19:22:03 +0900
Delivery-date: Thu, 12 Jun 2008 03:22:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
[IA64] remove some #ifndef XEN using empty headerfiles.

move mm_numa.c from linux-xen to linux because now mm_numa.c is
identical to linux files.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 59f30d78b596 xen/arch/ia64/linux-xen/Makefile
--- a/xen/arch/ia64/linux-xen/Makefile  Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/arch/ia64/linux-xen/Makefile  Thu Jun 12 19:18:19 2008 +0900
@@ -20,7 +20,6 @@
 obj-y += unwind.o
 obj-y += iosapic.o
 obj-y += numa.o
-obj-y += mm_numa.o
 obj-y += perfmon.o
 obj-y += perfmon_default_smpl.o
 obj-y += acpi.o
diff -r 59f30d78b596 xen/arch/ia64/linux-xen/README.origin
--- a/xen/arch/ia64/linux-xen/README.origin     Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/arch/ia64/linux-xen/README.origin     Thu Jun 12 19:18:19 2008 +0900
@@ -15,7 +15,6 @@
 mca_asm.S              -> linux/arch/ia64/kernel/mca_asm.S
 minstate.h             -> linux/arch/ia64/kernel/minstate.h
 mm_contig.c            -> linux/arch/ia64/mm/contig.c
-mm_numa.c              -> linux/arch/ia64/mm/numa.c
 numa.c                 -> linux/arch/ia64/kernel/numa.c
 process-linux-xen.c    -> linux/arch/ia64/kernel/process.c
 sal.c                  -> linux/arch/ia64/kernel/sal.c
diff -r 59f30d78b596 xen/arch/ia64/linux-xen/acpi.c
--- a/xen/arch/ia64/linux-xen/acpi.c    Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/arch/ia64/linux-xen/acpi.c    Thu Jun 12 19:18:19 2008 +0900
@@ -51,10 +51,9 @@
 #include <asm/system.h>
 #include <asm/numa.h>
 #include <asm/sal.h>
-#ifndef XEN
 #include <asm/cyclone.h>
 #include <asm/xen/hypervisor.h>
-#else
+#ifdef XEN
 #include <asm/hw_irq.h>
 extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
 #endif
diff -r 59f30d78b596 xen/arch/ia64/linux-xen/iosapic.c
--- a/xen/arch/ia64/linux-xen/iosapic.c Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/arch/ia64/linux-xen/iosapic.c Thu Jun 12 19:18:19 2008 +0900
@@ -75,9 +75,8 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
-#ifndef XEN
 #include <linux/pci.h>
-#else
+#ifdef XEN
 #include <xen/errno.h>
 #endif
 #include <linux/smp.h>
diff -r 59f30d78b596 xen/arch/ia64/linux-xen/mm_numa.c
--- a/xen/arch/ia64/linux-xen/mm_numa.c Thu Jun 12 18:31:49 2008 +0900
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * This file contains NUMA specific variables and functions which can
- * be split away from DISCONTIGMEM and are used on NUMA machines with
- * contiguous memory.
- * 
- *                         2002/08/07 Erich Focht <efocht@xxxxxxxxxx>
- */
-
-#include <linux/config.h>
-#include <linux/cpu.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#ifndef XEN
-#include <linux/node.h>
-#endif
-#include <linux/init.h>
-#include <linux/bootmem.h>
-#include <asm/mmzone.h>
-#include <asm/numa.h>
-
-
-/*
- * The following structures are usually initialized by ACPI or
- * similar mechanisms and describe the NUMA characteristics of the machine.
- */
-int num_node_memblks;
-struct node_memblk_s node_memblk[NR_NODE_MEMBLKS];
-struct node_cpuid_s node_cpuid[NR_CPUS];
-/*
- * This is a matrix with "distances" between nodes, they should be
- * proportional to the memory access latency ratios.
- */
-u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
-
-/* Identify which cnode a physical address resides on */
-int
-paddr_to_nid(unsigned long paddr)
-{
-       int     i;
-
-       for (i = 0; i < num_node_memblks; i++)
-               if (paddr >= node_memblk[i].start_paddr &&
-                   paddr < node_memblk[i].start_paddr + node_memblk[i].size)
-                       break;
-
-       return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks 
? -1 : 0);
-}
-
-#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_NUMA)
-/*
- * Because of holes evaluate on section limits.
- * If the section of memory exists, then return the node where the section
- * resides.  Otherwise return node 0 as the default.  This is used by
- * SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where
- * the section resides.
- */
-int early_pfn_to_nid(unsigned long pfn)
-{
-       int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec;
-
-       for (i = 0; i < num_node_memblks; i++) {
-               ssec = node_memblk[i].start_paddr >> PA_SECTION_SHIFT;
-               esec = (node_memblk[i].start_paddr + node_memblk[i].size +
-                       ((1L << PA_SECTION_SHIFT) - 1)) >> PA_SECTION_SHIFT;
-               if (section >= ssec && section < esec)
-                       return node_memblk[i].nid;
-       }
-
-       return 0;
-}
-#endif
diff -r 59f30d78b596 xen/arch/ia64/linux-xen/setup.c
--- a/xen/arch/ia64/linux-xen/setup.c   Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/arch/ia64/linux-xen/setup.c   Thu Jun 12 19:18:19 2008 +0900
@@ -41,10 +41,8 @@
 #include <linux/serial_core.h>
 #include <linux/efi.h>
 #include <linux/initrd.h>
-#ifndef XEN
 #include <linux/platform.h>
 #include <linux/pm.h>
-#endif
 
 #include <asm/ia32.h>
 #include <asm/machvec.h>
diff -r 59f30d78b596 xen/arch/ia64/linux/Makefile
--- a/xen/arch/ia64/linux/Makefile      Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/arch/ia64/linux/Makefile      Thu Jun 12 19:18:19 2008 +0900
@@ -14,6 +14,7 @@
 obj-y += machvec.o
 obj-y += memcpy_mck.o
 obj-y += memset.o
+obj-y += numa.o
 obj-y += strlen.o
 
 obj-y += __divsi3.o
diff -r 59f30d78b596 xen/arch/ia64/linux/README.origin
--- a/xen/arch/ia64/linux/README.origin Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/arch/ia64/linux/README.origin Thu Jun 12 19:18:19 2008 +0900
@@ -10,6 +10,7 @@
 irq_lsapic.c           -> linux/arch/ia64/kernel/irq_lsapic.c
 linuxextable.c         -> linux/kernel/extable.c
 machvec.c              -> linux/arch/ia64/kernel/machvec.c
+numa.c                 -> linux/arch/ia64/mm/numa.c
 patch.c                        -> linux/arch/ia64/kernel/patch.c
 pcdp.h                 -> linux/drivers/firmware/pcdp.h
 
diff -r 59f30d78b596 xen/arch/ia64/linux/numa.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/arch/ia64/linux/numa.c        Thu Jun 12 19:18:19 2008 +0900
@@ -0,0 +1,49 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * This file contains NUMA specific variables and functions which can
+ * be split away from DISCONTIGMEM and are used on NUMA machines with
+ * contiguous memory.
+ * 
+ *                         2002/08/07 Erich Focht <efocht@xxxxxxxxxx>
+ */
+
+#include <linux/config.h>
+#include <linux/cpu.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/node.h>
+#include <linux/init.h>
+#include <linux/bootmem.h>
+#include <asm/mmzone.h>
+#include <asm/numa.h>
+
+
+/*
+ * The following structures are usually initialized by ACPI or
+ * similar mechanisms and describe the NUMA characteristics of the machine.
+ */
+int num_node_memblks;
+struct node_memblk_s node_memblk[NR_NODE_MEMBLKS];
+struct node_cpuid_s node_cpuid[NR_CPUS];
+/*
+ * This is a matrix with "distances" between nodes, they should be
+ * proportional to the memory access latency ratios.
+ */
+u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
+
+/* Identify which cnode a physical address resides on */
+int
+paddr_to_nid(unsigned long paddr)
+{
+       int     i;
+
+       for (i = 0; i < num_node_memblks; i++)
+               if (paddr >= node_memblk[i].start_paddr &&
+                   paddr < node_memblk[i].start_paddr + node_memblk[i].size)
+                       break;
+
+       return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks 
? -1 : 0);
+}
diff -r 59f30d78b596 
xen/include/asm-ia64/linux-null/asm-generic/pci-dma-compat.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-null/asm-generic/pci-dma-compat.h      Thu Jun 
12 19:18:19 2008 +0900
@@ -0,0 +1,1 @@
+/* This file is intentionally left empty. */
diff -r 59f30d78b596 xen/include/asm-ia64/linux-null/asm/cyclone.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-null/asm/cyclone.h     Thu Jun 12 19:18:19 
2008 +0900
@@ -0,0 +1,1 @@
+/* This file is intentionally left empty. */
diff -r 59f30d78b596 xen/include/asm-ia64/linux-null/asm/scatterlist.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-null/asm/scatterlist.h Thu Jun 12 19:18:19 
2008 +0900
@@ -0,0 +1,1 @@
+/* This file is intentionally left empty. */
diff -r 59f30d78b596 xen/include/asm-ia64/linux-null/asm/xen/hypervisor.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-null/asm/xen/hypervisor.h      Thu Jun 12 
19:18:19 2008 +0900
@@ -0,0 +1,1 @@
+/* This file is intentionally left empty. */
diff -r 59f30d78b596 xen/include/asm-ia64/linux-null/linux/node.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-null/linux/node.h      Thu Jun 12 19:18:19 
2008 +0900
@@ -0,0 +1,1 @@
+/* This file is intentionally left empty. */
diff -r 59f30d78b596 xen/include/asm-ia64/linux-null/linux/platform.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-null/linux/platform.h  Thu Jun 12 19:18:19 
2008 +0900
@@ -0,0 +1,1 @@
+/* This file is intentionally left empty. */
diff -r 59f30d78b596 xen/include/asm-ia64/linux-null/linux/pm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-null/linux/pm.h        Thu Jun 12 19:18:19 
2008 +0900
@@ -0,0 +1,1 @@
+/* This file is intentionally left empty. */
diff -r 59f30d78b596 xen/include/asm-ia64/linux-xen/asm/pci.h
--- a/xen/include/asm-ia64/linux-xen/asm/pci.h  Thu Jun 12 18:31:49 2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/asm/pci.h  Thu Jun 12 19:18:19 2008 +0900
@@ -11,9 +11,7 @@
 #endif
 
 #include <asm/io.h>
-#ifndef XEN
 #include <asm/scatterlist.h>
-#endif
 
 /*
  * Can be used to override the logic in pci_scan_bus for skipping 
already-configured bus
@@ -60,9 +58,7 @@
 #define HAVE_ARCH_PCI_MWI 1
 extern int pcibios_prep_mwi (struct pci_dev *);
 
-#ifndef XEN
 #include <asm-generic/pci-dma-compat.h>
-#endif
 
 /* pci_unmap_{single,page} is not a nop, thus... */
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)      \

-- 
yamahata

Attachment: 11-null-headerfile.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] remove some #ifndef XEN using empty headerfiles., Isaku Yamahata <=