[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 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 #include #include -#ifndef XEN #include #include -#else +#ifdef XEN #include 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 #include #include -#ifndef XEN #include -#else +#ifdef XEN #include #endif #include 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 - */ - -#include -#include -#include -#include -#ifndef XEN -#include -#endif -#include -#include -#include -#include - - -/* - * 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 #include #include -#ifndef XEN #include #include -#endif #include #include 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 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * 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 -#ifndef XEN #include -#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 -#endif /* pci_unmap_{single,page} is not a nop, thus... */ #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \