ia64/xen-unstable

changeset 12003:fd1d742487f8

[IA64] NUMA support

Based on patch from Tristan Gingold

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Wed Oct 25 14:48:55 2006 -0600 (2006-10-25)
parents 3e26719ab827
children cf05aabe6e65
files linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c xen/arch/ia64/linux-xen/Makefile xen/arch/ia64/linux-xen/README.origin xen/arch/ia64/linux-xen/mm_contig.c xen/arch/ia64/linux-xen/mm_numa.c xen/arch/ia64/linux-xen/numa.c xen/arch/ia64/xen/acpi.c xen/arch/ia64/xen/dom0_ops.c xen/include/asm-ia64/config.h xen/include/asm-ia64/linux-null/asm/mmzone.h xen/include/asm-ia64/linux-xen/asm/README.origin xen/include/asm-ia64/linux-xen/asm/acpi.h xen/include/asm-ia64/linux-xen/asm/numa.h xen/include/asm-ia64/linux/asm/README.origin xen/include/asm-ia64/linux/asm/acpi.h xen/include/asm-ia64/linux/asm/nodedata.h xen/include/asm-ia64/linux/asm/numa.h xen/include/asm-ia64/xenpage.h xen/include/public/arch-ia64.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c	Wed Oct 25 12:12:01 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c	Wed Oct 25 14:48:55 2006 -0600
     1.3 @@ -78,6 +78,12 @@ xencomm_privcmd_dom0_op(privcmd_hypercal
     1.4  	return ret;
     1.5  }
     1.6  
     1.7 +/*
     1.8 + * Temporarily disable the NUMA PHYSINFO code until the rest of the
     1.9 + * changes are upstream.
    1.10 + */
    1.11 +#undef IA64_NUMA_PHYSINFO
    1.12 +
    1.13  static int
    1.14  xencomm_privcmd_sysctl(privcmd_hypercall_t *hypercall)
    1.15  {
    1.16 @@ -108,7 +114,9 @@ xencomm_privcmd_sysctl(privcmd_hypercall
    1.17  		                     (void *)desc);
    1.18  		break;
    1.19  	case XEN_SYSCTL_tbuf_op:
    1.20 +#ifndef IA64_NUMA_PHYSINFO
    1.21  	case XEN_SYSCTL_physinfo:
    1.22 +#endif
    1.23  	case XEN_SYSCTL_sched_id:
    1.24  		break;
    1.25  	case XEN_SYSCTL_perfc_op:
    1.26 @@ -140,6 +148,27 @@ xencomm_privcmd_sysctl(privcmd_hypercall
    1.27  		set_xen_guest_handle(kern_op.u.getdomaininfolist.buffer,
    1.28  				     (void *)desc);
    1.29  		break;
    1.30 +#ifdef IA64_NUMA_PHYSINFO
    1.31 +	case XEN_SYSCTL_physinfo:
    1.32 +		ret = xencomm_create(
    1.33 +			xen_guest_handle(kern_op.u.physinfo.memory_chunks),
    1.34 +			PUBLIC_MAXCHUNKS * sizeof(node_data_t),
    1.35 +			&desc, GFP_KERNEL);
    1.36 +		if (ret)
    1.37 +			return ret;
    1.38 +		set_xen_guest_handle(kern_op.u.physinfo.memory_chunks,
    1.39 +		                     (void *)desc);
    1.40 +
    1.41 +		ret = xencomm_create(
    1.42 +			xen_guest_handle(kern_op.u.physinfo.cpu_to_node),
    1.43 +			PUBLIC_MAX_NUMNODES * sizeof(u64),
    1.44 +			&desc1, GFP_KERNEL);
    1.45 +		if (ret)
    1.46 +			xencomm_free(desc);
    1.47 +		set_xen_guest_handle(kern_op.u.physinfo.cpu_to_node,
    1.48 +		                     (void *)desc1);
    1.49 +		break;
    1.50 +#endif
    1.51  	default:
    1.52  		printk("%s: unknown sysctl cmd %d\n", __func__, kern_op.cmd);
    1.53  		return -ENOSYS;
    1.54 @@ -152,7 +181,7 @@ xencomm_privcmd_sysctl(privcmd_hypercall
    1.55  
    1.56  	ret = xencomm_arch_hypercall_sysctl(op_desc);
    1.57  
    1.58 -	/* FIXME: should we restore the handle?  */
    1.59 +	/* FIXME: should we restore the handles?  */
    1.60  	if (copy_to_user(user_op, &kern_op, sizeof(xen_sysctl_t)))
    1.61  		ret = -EFAULT;
    1.62  
     2.1 --- a/xen/arch/ia64/linux-xen/Makefile	Wed Oct 25 12:12:01 2006 -0600
     2.2 +++ b/xen/arch/ia64/linux-xen/Makefile	Wed Oct 25 14:48:55 2006 -0600
     2.3 @@ -16,3 +16,5 @@ obj-y += tlb.o
     2.4  obj-y += unaligned.o
     2.5  obj-y += unwind.o
     2.6  obj-y += iosapic.o
     2.7 +obj-y += numa.o
     2.8 +obj-y += mm_numa.o
     3.1 --- a/xen/arch/ia64/linux-xen/README.origin	Wed Oct 25 12:12:01 2006 -0600
     3.2 +++ b/xen/arch/ia64/linux-xen/README.origin	Wed Oct 25 14:48:55 2006 -0600
     3.3 @@ -15,6 +15,8 @@ mca.c			-> linux/arch/ia64/kernel/mca.c
     3.4  mca_asm.S		-> linux/arch/ia64/kernel/mca_asm.S
     3.5  minstate.h		-> linux/arch/ia64/kernel/minstate.h
     3.6  mm_contig.c		-> linux/arch/ia64/mm/contig.c
     3.7 +mm_numa.c		-> linux/arch/ia64/mm/numa.c
     3.8 +numa.c			-> linux/arch/ia64/kernel/numa.c
     3.9  pal.S			-> linux/arch/ia64/kernel/pal.S
    3.10  process-linux-xen.c	-> linux/arch/ia64/kernel/process.c
    3.11  sal.c			-> linux/arch/ia64/kernel/sal.c
     4.1 --- a/xen/arch/ia64/linux-xen/mm_contig.c	Wed Oct 25 12:12:01 2006 -0600
     4.2 +++ b/xen/arch/ia64/linux-xen/mm_contig.c	Wed Oct 25 14:48:55 2006 -0600
     4.3 @@ -308,4 +308,4 @@ paging_init (void)
     4.4  #endif /* !CONFIG_VIRTUAL_MEM_MAP */
     4.5  	zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page));
     4.6  }
     4.7 -#endif
     4.8 +#endif /* XEN */
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/xen/arch/ia64/linux-xen/mm_numa.c	Wed Oct 25 14:48:55 2006 -0600
     5.3 @@ -0,0 +1,75 @@
     5.4 +/*
     5.5 + * This file is subject to the terms and conditions of the GNU General Public
     5.6 + * License.  See the file "COPYING" in the main directory of this archive
     5.7 + * for more details.
     5.8 + *
     5.9 + * This file contains NUMA specific variables and functions which can
    5.10 + * be split away from DISCONTIGMEM and are used on NUMA machines with
    5.11 + * contiguous memory.
    5.12 + * 
    5.13 + *                         2002/08/07 Erich Focht <efocht@ess.nec.de>
    5.14 + */
    5.15 +
    5.16 +#include <linux/config.h>
    5.17 +#include <linux/cpu.h>
    5.18 +#include <linux/kernel.h>
    5.19 +#include <linux/mm.h>
    5.20 +#ifndef XEN
    5.21 +#include <linux/node.h>
    5.22 +#endif
    5.23 +#include <linux/init.h>
    5.24 +#include <linux/bootmem.h>
    5.25 +#include <asm/mmzone.h>
    5.26 +#include <asm/numa.h>
    5.27 +
    5.28 +
    5.29 +/*
    5.30 + * The following structures are usually initialized by ACPI or
    5.31 + * similar mechanisms and describe the NUMA characteristics of the machine.
    5.32 + */
    5.33 +int num_node_memblks;
    5.34 +struct node_memblk_s node_memblk[NR_NODE_MEMBLKS];
    5.35 +struct node_cpuid_s node_cpuid[NR_CPUS];
    5.36 +/*
    5.37 + * This is a matrix with "distances" between nodes, they should be
    5.38 + * proportional to the memory access latency ratios.
    5.39 + */
    5.40 +u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
    5.41 +
    5.42 +/* Identify which cnode a physical address resides on */
    5.43 +int
    5.44 +paddr_to_nid(unsigned long paddr)
    5.45 +{
    5.46 +	int	i;
    5.47 +
    5.48 +	for (i = 0; i < num_node_memblks; i++)
    5.49 +		if (paddr >= node_memblk[i].start_paddr &&
    5.50 +		    paddr < node_memblk[i].start_paddr + node_memblk[i].size)
    5.51 +			break;
    5.52 +
    5.53 +	return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks ? -1 : 0);
    5.54 +}
    5.55 +
    5.56 +#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_NUMA)
    5.57 +/*
    5.58 + * Because of holes evaluate on section limits.
    5.59 + * If the section of memory exists, then return the node where the section
    5.60 + * resides.  Otherwise return node 0 as the default.  This is used by
    5.61 + * SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where
    5.62 + * the section resides.
    5.63 + */
    5.64 +int early_pfn_to_nid(unsigned long pfn)
    5.65 +{
    5.66 +	int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec;
    5.67 +
    5.68 +	for (i = 0; i < num_node_memblks; i++) {
    5.69 +		ssec = node_memblk[i].start_paddr >> PA_SECTION_SHIFT;
    5.70 +		esec = (node_memblk[i].start_paddr + node_memblk[i].size +
    5.71 +			((1L << PA_SECTION_SHIFT) - 1)) >> PA_SECTION_SHIFT;
    5.72 +		if (section >= ssec && section < esec)
    5.73 +			return node_memblk[i].nid;
    5.74 +	}
    5.75 +
    5.76 +	return 0;
    5.77 +}
    5.78 +#endif
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/xen/arch/ia64/linux-xen/numa.c	Wed Oct 25 14:48:55 2006 -0600
     6.3 @@ -0,0 +1,67 @@
     6.4 +/*
     6.5 + * This program is free software; you can redistribute it and/or modify
     6.6 + * it under the terms of the GNU General Public License as published by
     6.7 + * the Free Software Foundation; either version 2 of the License, or
     6.8 + * (at your option) any later version.
     6.9 + *
    6.10 + * This program is distributed in the hope that it will be useful,
    6.11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    6.13 + * GNU General Public License for more details.
    6.14 + *
    6.15 + * You should have received a copy of the GNU General Public License
    6.16 + * along with this program; if not, write to the Free Software
    6.17 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    6.18 + *
    6.19 + * ia64 kernel NUMA specific stuff
    6.20 + *
    6.21 + * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de>
    6.22 + * Copyright (C) 2004 Silicon Graphics, Inc.
    6.23 + *   Jesse Barnes <jbarnes@sgi.com>
    6.24 + */
    6.25 +#ifdef XEN
    6.26 +#include <xen/types.h>
    6.27 +#endif
    6.28 +#include <linux/config.h>
    6.29 +#include <linux/topology.h>
    6.30 +#include <linux/module.h>
    6.31 +#include <asm/processor.h>
    6.32 +#include <asm/smp.h>
    6.33 +#ifdef XEN
    6.34 +#include <xen/nodemask.h>
    6.35 +#endif
    6.36 +
    6.37 +#ifdef XEN
    6.38 +nodemask_t node_online_map = { { [0] = 1UL } };
    6.39 +#endif
    6.40 +
    6.41 +u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
    6.42 +EXPORT_SYMBOL(cpu_to_node_map);
    6.43 +
    6.44 +cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
    6.45 +
    6.46 +/**
    6.47 + * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays
    6.48 + *
    6.49 + * Build cpu to node mapping and initialize the per node cpu masks using
    6.50 + * info from the node_cpuid array handed to us by ACPI.
    6.51 + */
    6.52 +void __init build_cpu_to_node_map(void)
    6.53 +{
    6.54 +	int cpu, i, node;
    6.55 +
    6.56 +	for(node=0; node < MAX_NUMNODES; node++)
    6.57 +		cpus_clear(node_to_cpu_mask[node]);
    6.58 +
    6.59 +	for(cpu = 0; cpu < NR_CPUS; ++cpu) {
    6.60 +		node = -1;
    6.61 +		for (i = 0; i < NR_CPUS; ++i)
    6.62 +			if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) {
    6.63 +				node = node_cpuid[i].nid;
    6.64 +				break;
    6.65 +			}
    6.66 +		cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
    6.67 +		if (node >= 0)
    6.68 +			cpu_set(cpu, node_to_cpu_mask[node]);
    6.69 +	}
    6.70 +}
     7.1 --- a/xen/arch/ia64/xen/acpi.c	Wed Oct 25 12:12:01 2006 -0600
     7.2 +++ b/xen/arch/ia64/xen/acpi.c	Wed Oct 25 14:48:55 2006 -0600
     7.3 @@ -53,6 +53,7 @@
     7.4  #include <asm/hw_irq.h>
     7.5  #ifdef XEN
     7.6  #include <xen/errno.h>
     7.7 +#include <xen/nodemask.h>
     7.8  #endif
     7.9  
    7.10  #define BAD_MADT_ENTRY(entry, end) (                                        \
    7.11 @@ -457,6 +458,7 @@ acpi_numa_memory_affinity_init (struct a
    7.12  	num_node_memblks++;
    7.13  }
    7.14  
    7.15 +static unsigned int numnodes;
    7.16  void __init
    7.17  acpi_numa_arch_fixup (void)
    7.18  {
     8.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Wed Oct 25 12:12:01 2006 -0600
     8.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Wed Oct 25 14:48:55 2006 -0600
     8.3 @@ -22,8 +22,10 @@
     8.4  #include <asm/dom_fw.h>
     8.5  #include <xen/iocap.h>
     8.6  #include <xen/errno.h>
     8.7 +#include <xen/nodemask.h>
     8.8  
     8.9  void build_physmap_table(struct domain *d);
    8.10 +#define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
    8.11  
    8.12  extern unsigned long total_pages;
    8.13  
    8.14 @@ -179,17 +181,26 @@ long arch_do_domctl(xen_domctl_t *op, XE
    8.15      return ret;
    8.16  }
    8.17  
    8.18 +/*
    8.19 + * Temporarily disable the NUMA PHYSINFO code until the rest of the
    8.20 + * changes are upstream.
    8.21 + */
    8.22 +#undef IA64_NUMA_PHYSINFO
    8.23 +
    8.24  long arch_do_sysctl(xen_sysctl_t *op, XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
    8.25  {
    8.26      long ret = 0;
    8.27  
    8.28 -    if ( !IS_PRIV(current->domain) )
    8.29 -        return -EPERM;
    8.30 -
    8.31      switch ( op->cmd )
    8.32      {
    8.33      case XEN_SYSCTL_physinfo:
    8.34      {
    8.35 +#ifdef IA64_NUMA_PHYSINFO
    8.36 +        int i;
    8.37 +        node_data_t *chunks;
    8.38 +        u64 *map, cpu_to_node_map[MAX_NUMNODES];
    8.39 +#endif
    8.40 +
    8.41          xen_sysctl_physinfo_t *pi = &op->u.physinfo;
    8.42  
    8.43          pi->threads_per_core =
    8.44 @@ -198,13 +209,70 @@ long arch_do_sysctl(xen_sysctl_t *op, XE
    8.45              cpus_weight(cpu_core_map[0]) / pi->threads_per_core;
    8.46          pi->sockets_per_node = 
    8.47              num_online_cpus() / cpus_weight(cpu_core_map[0]);
    8.48 -        pi->nr_nodes         = 1;
    8.49 +#ifndef IA64_NUMA_PHYSINFO
    8.50 +        pi->nr_nodes         = 1; 
    8.51 +#endif
    8.52          pi->total_pages      = total_pages; 
    8.53          pi->free_pages       = avail_domheap_pages();
    8.54          pi->cpu_khz          = local_cpu_data->proc_freq / 1000;
    8.55          memset(pi->hw_cap, 0, sizeof(pi->hw_cap));
    8.56          //memcpy(pi->hw_cap, boot_cpu_data.x86_capability, NCAPINTS*4);
    8.57          ret = 0;
    8.58 +
    8.59 +#ifdef IA64_NUMA_PHYSINFO
    8.60 +        /* fetch memory_chunk pointer from guest */
    8.61 +        get_xen_guest_handle(chunks, pi->memory_chunks);
    8.62 +
    8.63 +        printk("chunks=%p, num_node_memblks=%u\n", chunks, num_node_memblks);
    8.64 +        /* if it is set, fill out memory chunk array */
    8.65 +        if (chunks != NULL) {
    8.66 +            if (num_node_memblks == 0) {
    8.67 +                /* Non-NUMA machine.  Put pseudo-values.  */
    8.68 +                node_data_t data;
    8.69 +                data.node_start_pfn = 0;
    8.70 +                data.node_spanned_pages = total_pages;
    8.71 +                data.node_id = 0;
    8.72 +                /* copy memory chunk structs to guest */
    8.73 +                if (copy_to_guest_offset(pi->memory_chunks, 0, &data, 1)) {
    8.74 +                    ret = -EFAULT;
    8.75 +                    break;
    8.76 +                }
    8.77 +            } else {
    8.78 +                for (i = 0; i < num_node_memblks && i < PUBLIC_MAXCHUNKS; i++) {
    8.79 +                    node_data_t data;
    8.80 +                    data.node_start_pfn = node_memblk[i].start_paddr >>
    8.81 +                                          PAGE_SHIFT;
    8.82 +                    data.node_spanned_pages = node_memblk[i].size >> PAGE_SHIFT;
    8.83 +                    data.node_id = node_memblk[i].nid;
    8.84 +                    /* copy memory chunk structs to guest */
    8.85 +                    if (copy_to_guest_offset(pi->memory_chunks, i, &data, 1)) {
    8.86 +                        ret = -EFAULT;
    8.87 +                        break;
    8.88 +                    }
    8.89 +                }
    8.90 +            }
    8.91 +        }
    8.92 +        /* set number of notes */
    8.93 +        pi->nr_nodes = num_online_nodes();
    8.94 +
    8.95 +        /* fetch cpu_to_node pointer from guest */
    8.96 +        get_xen_guest_handle(map, pi->cpu_to_node);
    8.97 +
    8.98 +        /* if set, fill out cpu_to_node array */
    8.99 +        if (map != NULL) {
   8.100 +            /* copy cpu to node mapping to domU */
   8.101 +            memset(cpu_to_node_map, 0, sizeof(cpu_to_node_map));
   8.102 +            for (i = 0; i < num_online_cpus(); i++) {
   8.103 +                cpu_to_node_map[i] = cpu_to_node(i);
   8.104 +                if (copy_to_guest_offset(pi->cpu_to_node, i,
   8.105 +                                         &(cpu_to_node_map[i]), 1)) {
   8.106 +                    ret = -EFAULT;
   8.107 +                    break;
   8.108 +                }
   8.109 +            }
   8.110 +        }
   8.111 +#endif
   8.112 +
   8.113          if ( copy_to_guest(u_sysctl, op, 1) )
   8.114              ret = -EFAULT;
   8.115      }
     9.1 --- a/xen/include/asm-ia64/config.h	Wed Oct 25 12:12:01 2006 -0600
     9.2 +++ b/xen/include/asm-ia64/config.h	Wed Oct 25 14:48:55 2006 -0600
     9.3 @@ -26,6 +26,12 @@
     9.4  #ifdef CONFIG_XEN_SMP
     9.5  #define CONFIG_SMP 1
     9.6  #define NR_CPUS 64
     9.7 +#define CONFIG_NUMA
     9.8 +#define CONFIG_ACPI_NUMA
     9.9 +#define NODES_SHIFT 3
    9.10 +#define MAX_NUMNODES (1 << NODES_SHIFT)
    9.11 +#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
    9.12 +#define MAX_PXM_DOMAINS 256
    9.13  #else
    9.14  #undef CONFIG_SMP
    9.15  #define NR_CPUS 1
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/xen/include/asm-ia64/linux-null/asm/mmzone.h	Wed Oct 25 14:48:55 2006 -0600
    10.3 @@ -0,0 +1,1 @@
    10.4 +/* Empty file.  */
    11.1 --- a/xen/include/asm-ia64/linux-xen/asm/README.origin	Wed Oct 25 12:12:01 2006 -0600
    11.2 +++ b/xen/include/asm-ia64/linux-xen/asm/README.origin	Wed Oct 25 14:48:55 2006 -0600
    11.3 @@ -5,6 +5,7 @@
    11.4  # (e.g. with #ifdef XEN or XEN in a comment) so that they can be
    11.5  # easily updated to future versions of the corresponding Linux files.
    11.6  
    11.7 +acpi.h			-> linux/include/asm-ia64/acpi.h
    11.8  asmmacro.h		-> linux/include/asm-ia64/asmmacro.h
    11.9  cache.h			-> linux/include/asm-ia64/cache.h
   11.10  gcc_intrin.h		-> linux/include/asm-ia64/gcc_intrin.h
   11.11 @@ -13,6 +14,7 @@ io.h			-> linux/include/asm-ia64/io.h
   11.12  kregs.h			-> linux/include/asm-ia64/kregs.h
   11.13  mca_asm.h		-> linux/include/asm-ia64/mca_asm.h
   11.14  meminit.h		-> linux/include/asm-ia64/meminit.h
   11.15 +numa.h			-> linux/include/asm-ia64/numa.h
   11.16  page.h			-> linux/include/asm-ia64/page.h
   11.17  pal.h			-> linux/include/asm-ia64/pal.h
   11.18  pgalloc.h		-> linux/include/asm-ia64/pgalloc.h
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/xen/include/asm-ia64/linux-xen/asm/acpi.h	Wed Oct 25 14:48:55 2006 -0600
    12.3 @@ -0,0 +1,123 @@
    12.4 +/*
    12.5 + *  asm-ia64/acpi.h
    12.6 + *
    12.7 + *  Copyright (C) 1999 VA Linux Systems
    12.8 + *  Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
    12.9 + *  Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@intel.com>
   12.10 + *  Copyright (C) 2001,2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
   12.11 + *
   12.12 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   12.13 + *
   12.14 + *  This program is free software; you can redistribute it and/or modify
   12.15 + *  it under the terms of the GNU General Public License as published by
   12.16 + *  the Free Software Foundation; either version 2 of the License, or
   12.17 + *  (at your option) any later version.
   12.18 + *
   12.19 + *  This program is distributed in the hope that it will be useful,
   12.20 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   12.21 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12.22 + *  GNU General Public License for more details.
   12.23 + *
   12.24 + *  You should have received a copy of the GNU General Public License
   12.25 + *  along with this program; if not, write to the Free Software
   12.26 + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   12.27 + *
   12.28 + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   12.29 + */
   12.30 +
   12.31 +#ifndef _ASM_ACPI_H
   12.32 +#define _ASM_ACPI_H
   12.33 +
   12.34 +#ifdef __KERNEL__
   12.35 +
   12.36 +#include <linux/init.h>
   12.37 +#include <linux/numa.h>
   12.38 +#include <asm/system.h>
   12.39 +
   12.40 +#define COMPILER_DEPENDENT_INT64	long
   12.41 +#define COMPILER_DEPENDENT_UINT64	unsigned long
   12.42 +
   12.43 +/*
   12.44 + * Calling conventions:
   12.45 + *
   12.46 + * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
   12.47 + * ACPI_EXTERNAL_XFACE      - External ACPI interfaces
   12.48 + * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
   12.49 + * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
   12.50 + */
   12.51 +#define ACPI_SYSTEM_XFACE
   12.52 +#define ACPI_EXTERNAL_XFACE
   12.53 +#define ACPI_INTERNAL_XFACE
   12.54 +#define ACPI_INTERNAL_VAR_XFACE
   12.55 +
   12.56 +/* Asm macros */
   12.57 +
   12.58 +#define ACPI_ASM_MACROS
   12.59 +#define BREAKPOINT3
   12.60 +#define ACPI_DISABLE_IRQS() local_irq_disable()
   12.61 +#define ACPI_ENABLE_IRQS()  local_irq_enable()
   12.62 +#define ACPI_FLUSH_CPU_CACHE()
   12.63 +
   12.64 +static inline int
   12.65 +ia64_acpi_acquire_global_lock (unsigned int *lock)
   12.66 +{
   12.67 +	unsigned int old, new, val;
   12.68 +	do {
   12.69 +		old = *lock;
   12.70 +		new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
   12.71 +		val = ia64_cmpxchg4_acq(lock, new, old);
   12.72 +	} while (unlikely (val != old));
   12.73 +	return (new < 3) ? -1 : 0;
   12.74 +}
   12.75 +
   12.76 +static inline int
   12.77 +ia64_acpi_release_global_lock (unsigned int *lock)
   12.78 +{
   12.79 +	unsigned int old, new, val;
   12.80 +	do {
   12.81 +		old = *lock;
   12.82 +		new = old & ~0x3;
   12.83 +		val = ia64_cmpxchg4_acq(lock, new, old);
   12.84 +	} while (unlikely (val != old));
   12.85 +	return old & 0x1;
   12.86 +}
   12.87 +
   12.88 +#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq)				\
   12.89 +	((Acq) = ia64_acpi_acquire_global_lock((unsigned int *) GLptr))
   12.90 +
   12.91 +#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq)				\
   12.92 +	((Acq) = ia64_acpi_release_global_lock((unsigned int *) GLptr))
   12.93 +
   12.94 +#define acpi_disabled 0	/* ACPI always enabled on IA64 */
   12.95 +#define acpi_noirq 0	/* ACPI always enabled on IA64 */
   12.96 +#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
   12.97 +#define acpi_strict 1	/* no ACPI spec workarounds on IA64 */
   12.98 +static inline void disable_acpi(void) { }
   12.99 +
  12.100 +const char *acpi_get_sysname (void);
  12.101 +int acpi_request_vector (u32 int_type);
  12.102 +int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
  12.103 +
  12.104 +/*
  12.105 + * Record the cpei override flag and current logical cpu. This is
  12.106 + * useful for CPU removal.
  12.107 + */
  12.108 +extern unsigned int can_cpei_retarget(void);
  12.109 +extern unsigned int is_cpu_cpei_target(unsigned int cpu);
  12.110 +extern void set_cpei_target_cpu(unsigned int cpu);
  12.111 +extern unsigned int get_cpei_target_cpu(void);
  12.112 +
  12.113 +#ifdef CONFIG_ACPI_NUMA
  12.114 +#ifndef XEN
  12.115 +/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
  12.116 +#define MAX_PXM_DOMAINS (256)
  12.117 +#endif
  12.118 +extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
  12.119 +extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
  12.120 +#endif
  12.121 +
  12.122 +extern u16 ia64_acpiid_to_sapicid[];
  12.123 +
  12.124 +#endif /*__KERNEL__*/
  12.125 +
  12.126 +#endif /*_ASM_ACPI_H*/
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/xen/include/asm-ia64/linux-xen/asm/numa.h	Wed Oct 25 14:48:55 2006 -0600
    13.3 @@ -0,0 +1,80 @@
    13.4 +/*
    13.5 + * This file is subject to the terms and conditions of the GNU General Public
    13.6 + * License.  See the file "COPYING" in the main directory of this archive
    13.7 + * for more details.
    13.8 + *
    13.9 + * This file contains NUMA specific prototypes and definitions.
   13.10 + *
   13.11 + * 2002/08/05 Erich Focht <efocht@ess.nec.de>
   13.12 + *
   13.13 + */
   13.14 +#ifndef _ASM_IA64_NUMA_H
   13.15 +#define _ASM_IA64_NUMA_H
   13.16 +
   13.17 +#include <linux/config.h>
   13.18 +
   13.19 +#ifdef CONFIG_NUMA
   13.20 +
   13.21 +#include <linux/cache.h>
   13.22 +#include <linux/cpumask.h>
   13.23 +#include <linux/numa.h>
   13.24 +#ifndef XEN /* dependency loop when this is included */
   13.25 +#include <linux/smp.h>
   13.26 +#endif
   13.27 +#include <linux/threads.h>
   13.28 +
   13.29 +#include <asm/mmzone.h>
   13.30 +
   13.31 +extern u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
   13.32 +extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
   13.33 +
   13.34 +/* Stuff below this line could be architecture independent */
   13.35 +
   13.36 +extern int num_node_memblks;		/* total number of memory chunks */
   13.37 +
   13.38 +/*
   13.39 + * List of node memory chunks. Filled when parsing SRAT table to
   13.40 + * obtain information about memory nodes.
   13.41 +*/
   13.42 +
   13.43 +struct node_memblk_s {
   13.44 +	unsigned long start_paddr;
   13.45 +	unsigned long size;
   13.46 +	int nid;		/* which logical node contains this chunk? */
   13.47 +	int bank;		/* which mem bank on this node */
   13.48 +};
   13.49 +
   13.50 +struct node_cpuid_s {
   13.51 +	u16	phys_id;	/* id << 8 | eid */
   13.52 +	int	nid;		/* logical node containing this CPU */
   13.53 +};
   13.54 +
   13.55 +extern struct node_memblk_s node_memblk[NR_NODE_MEMBLKS];
   13.56 +extern struct node_cpuid_s node_cpuid[NR_CPUS];
   13.57 +
   13.58 +/*
   13.59 + * ACPI 2.0 SLIT (System Locality Information Table)
   13.60 + * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf
   13.61 + *
   13.62 + * This is a matrix with "distances" between nodes, they should be
   13.63 + * proportional to the memory access latency ratios.
   13.64 + */
   13.65 +
   13.66 +extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
   13.67 +#define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
   13.68 +
   13.69 +extern int paddr_to_nid(unsigned long paddr);
   13.70 +
   13.71 +#define local_nodeid (cpu_to_node_map[smp_processor_id()])
   13.72 +
   13.73 +#else /* !CONFIG_NUMA */
   13.74 +
   13.75 +#define paddr_to_nid(addr)	0
   13.76 +
   13.77 +#endif /* CONFIG_NUMA */
   13.78 +
   13.79 +#ifdef XEN
   13.80 +#define phys_to_nid(paddr) paddr_to_nid(paddr)
   13.81 +#endif
   13.82 +
   13.83 +#endif /* _ASM_IA64_NUMA_H */
    14.1 --- a/xen/include/asm-ia64/linux/asm/README.origin	Wed Oct 25 12:12:01 2006 -0600
    14.2 +++ b/xen/include/asm-ia64/linux/asm/README.origin	Wed Oct 25 14:48:55 2006 -0600
    14.3 @@ -4,7 +4,6 @@
    14.4  # needs to be changed, move it to ../linux-xen and follow
    14.5  # the instructions in the README there.
    14.6  
    14.7 -acpi.h			-> linux/include/asm-ia64/acpi.h
    14.8  atomic.h		-> linux/include/asm-ia64/atomic.h
    14.9  bitops.h		-> linux/include/asm-ia64/bitops.h
   14.10  break.h			-> linux/include/asm-ia64/break.h
   14.11 @@ -26,7 +25,7 @@ linkage.h		-> linux/include/asm-ia64/lin
   14.12  machvec.h		-> linux/include/asm-ia64/machvec.h
   14.13  machvec_hpsim.h		-> linux/include/asm-ia64/machvec_hpsim.h
   14.14  mca.h			-> linux/include/asm-ia64/mca.h
   14.15 -numa.h			-> linux/include/asm-ia64/numa.h
   14.16 +nodedata.h		-> linux/include/asm-ia64/nodedate.h
   14.17  numnodes.h		-> linux/include/asm-ia64/numnodes.h
   14.18  param.h			-> linux/include/asm-ia64/param.h
   14.19  patch.h			-> linux/include/asm-ia64/patch.h
    15.1 --- a/xen/include/asm-ia64/linux/asm/acpi.h	Wed Oct 25 12:12:01 2006 -0600
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,121 +0,0 @@
    15.4 -/*
    15.5 - *  asm-ia64/acpi.h
    15.6 - *
    15.7 - *  Copyright (C) 1999 VA Linux Systems
    15.8 - *  Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
    15.9 - *  Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@intel.com>
   15.10 - *  Copyright (C) 2001,2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
   15.11 - *
   15.12 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   15.13 - *
   15.14 - *  This program is free software; you can redistribute it and/or modify
   15.15 - *  it under the terms of the GNU General Public License as published by
   15.16 - *  the Free Software Foundation; either version 2 of the License, or
   15.17 - *  (at your option) any later version.
   15.18 - *
   15.19 - *  This program is distributed in the hope that it will be useful,
   15.20 - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   15.21 - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15.22 - *  GNU General Public License for more details.
   15.23 - *
   15.24 - *  You should have received a copy of the GNU General Public License
   15.25 - *  along with this program; if not, write to the Free Software
   15.26 - *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   15.27 - *
   15.28 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   15.29 - */
   15.30 -
   15.31 -#ifndef _ASM_ACPI_H
   15.32 -#define _ASM_ACPI_H
   15.33 -
   15.34 -#ifdef __KERNEL__
   15.35 -
   15.36 -#include <linux/init.h>
   15.37 -#include <linux/numa.h>
   15.38 -#include <asm/system.h>
   15.39 -
   15.40 -#define COMPILER_DEPENDENT_INT64	long
   15.41 -#define COMPILER_DEPENDENT_UINT64	unsigned long
   15.42 -
   15.43 -/*
   15.44 - * Calling conventions:
   15.45 - *
   15.46 - * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
   15.47 - * ACPI_EXTERNAL_XFACE      - External ACPI interfaces
   15.48 - * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
   15.49 - * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
   15.50 - */
   15.51 -#define ACPI_SYSTEM_XFACE
   15.52 -#define ACPI_EXTERNAL_XFACE
   15.53 -#define ACPI_INTERNAL_XFACE
   15.54 -#define ACPI_INTERNAL_VAR_XFACE
   15.55 -
   15.56 -/* Asm macros */
   15.57 -
   15.58 -#define ACPI_ASM_MACROS
   15.59 -#define BREAKPOINT3
   15.60 -#define ACPI_DISABLE_IRQS() local_irq_disable()
   15.61 -#define ACPI_ENABLE_IRQS()  local_irq_enable()
   15.62 -#define ACPI_FLUSH_CPU_CACHE()
   15.63 -
   15.64 -static inline int
   15.65 -ia64_acpi_acquire_global_lock (unsigned int *lock)
   15.66 -{
   15.67 -	unsigned int old, new, val;
   15.68 -	do {
   15.69 -		old = *lock;
   15.70 -		new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
   15.71 -		val = ia64_cmpxchg4_acq(lock, new, old);
   15.72 -	} while (unlikely (val != old));
   15.73 -	return (new < 3) ? -1 : 0;
   15.74 -}
   15.75 -
   15.76 -static inline int
   15.77 -ia64_acpi_release_global_lock (unsigned int *lock)
   15.78 -{
   15.79 -	unsigned int old, new, val;
   15.80 -	do {
   15.81 -		old = *lock;
   15.82 -		new = old & ~0x3;
   15.83 -		val = ia64_cmpxchg4_acq(lock, new, old);
   15.84 -	} while (unlikely (val != old));
   15.85 -	return old & 0x1;
   15.86 -}
   15.87 -
   15.88 -#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq)				\
   15.89 -	((Acq) = ia64_acpi_acquire_global_lock((unsigned int *) GLptr))
   15.90 -
   15.91 -#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq)				\
   15.92 -	((Acq) = ia64_acpi_release_global_lock((unsigned int *) GLptr))
   15.93 -
   15.94 -#define acpi_disabled 0	/* ACPI always enabled on IA64 */
   15.95 -#define acpi_noirq 0	/* ACPI always enabled on IA64 */
   15.96 -#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
   15.97 -#define acpi_strict 1	/* no ACPI spec workarounds on IA64 */
   15.98 -static inline void disable_acpi(void) { }
   15.99 -
  15.100 -const char *acpi_get_sysname (void);
  15.101 -int acpi_request_vector (u32 int_type);
  15.102 -int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
  15.103 -
  15.104 -/*
  15.105 - * Record the cpei override flag and current logical cpu. This is
  15.106 - * useful for CPU removal.
  15.107 - */
  15.108 -extern unsigned int can_cpei_retarget(void);
  15.109 -extern unsigned int is_cpu_cpei_target(unsigned int cpu);
  15.110 -extern void set_cpei_target_cpu(unsigned int cpu);
  15.111 -extern unsigned int get_cpei_target_cpu(void);
  15.112 -
  15.113 -#ifdef CONFIG_ACPI_NUMA
  15.114 -/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
  15.115 -#define MAX_PXM_DOMAINS (256)
  15.116 -extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
  15.117 -extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
  15.118 -#endif
  15.119 -
  15.120 -extern u16 ia64_acpiid_to_sapicid[];
  15.121 -
  15.122 -#endif /*__KERNEL__*/
  15.123 -
  15.124 -#endif /*_ASM_ACPI_H*/
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/xen/include/asm-ia64/linux/asm/nodedata.h	Wed Oct 25 14:48:55 2006 -0600
    16.3 @@ -0,0 +1,52 @@
    16.4 +/*
    16.5 + * This file is subject to the terms and conditions of the GNU General Public
    16.6 + * License.  See the file "COPYING" in the main directory of this archive
    16.7 + * for more details.
    16.8 + *
    16.9 + * Copyright (c) 2000 Silicon Graphics, Inc.  All rights reserved.
   16.10 + * Copyright (c) 2002 NEC Corp.
   16.11 + * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de>
   16.12 + * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
   16.13 + */
   16.14 +#ifndef _ASM_IA64_NODEDATA_H
   16.15 +#define _ASM_IA64_NODEDATA_H
   16.16 +
   16.17 +#include <linux/config.h>
   16.18 +#include <linux/numa.h>
   16.19 +
   16.20 +#include <asm/percpu.h>
   16.21 +#include <asm/mmzone.h>
   16.22 +
   16.23 +#ifdef CONFIG_NUMA
   16.24 +
   16.25 +/*
   16.26 + * Node Data. One of these structures is located on each node of a NUMA system.
   16.27 + */
   16.28 +
   16.29 +struct pglist_data;
   16.30 +struct ia64_node_data {
   16.31 +	short			active_cpu_count;
   16.32 +	short			node;
   16.33 +	struct pglist_data	*pg_data_ptrs[MAX_NUMNODES];
   16.34 +};
   16.35 +
   16.36 +
   16.37 +/*
   16.38 + * Return a pointer to the node_data structure for the executing cpu.
   16.39 + */
   16.40 +#define local_node_data		(local_cpu_data->node_data)
   16.41 +
   16.42 +/*
   16.43 + * Given a node id, return a pointer to the pg_data_t for the node.
   16.44 + *
   16.45 + * NODE_DATA 	- should be used in all code not related to system
   16.46 + *		  initialization. It uses pernode data structures to minimize
   16.47 + *		  offnode memory references. However, these structure are not 
   16.48 + *		  present during boot. This macro can be used once cpu_init
   16.49 + *		  completes.
   16.50 + */
   16.51 +#define NODE_DATA(nid)		(local_node_data->pg_data_ptrs[nid])
   16.52 +
   16.53 +#endif /* CONFIG_NUMA */
   16.54 +
   16.55 +#endif /* _ASM_IA64_NODEDATA_H */
    17.1 --- a/xen/include/asm-ia64/linux/asm/numa.h	Wed Oct 25 12:12:01 2006 -0600
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,74 +0,0 @@
    17.4 -/*
    17.5 - * This file is subject to the terms and conditions of the GNU General Public
    17.6 - * License.  See the file "COPYING" in the main directory of this archive
    17.7 - * for more details.
    17.8 - *
    17.9 - * This file contains NUMA specific prototypes and definitions.
   17.10 - *
   17.11 - * 2002/08/05 Erich Focht <efocht@ess.nec.de>
   17.12 - *
   17.13 - */
   17.14 -#ifndef _ASM_IA64_NUMA_H
   17.15 -#define _ASM_IA64_NUMA_H
   17.16 -
   17.17 -#include <linux/config.h>
   17.18 -
   17.19 -#ifdef CONFIG_NUMA
   17.20 -
   17.21 -#include <linux/cache.h>
   17.22 -#include <linux/cpumask.h>
   17.23 -#include <linux/numa.h>
   17.24 -#include <linux/smp.h>
   17.25 -#include <linux/threads.h>
   17.26 -
   17.27 -#include <asm/mmzone.h>
   17.28 -
   17.29 -extern u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
   17.30 -extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
   17.31 -
   17.32 -/* Stuff below this line could be architecture independent */
   17.33 -
   17.34 -extern int num_node_memblks;		/* total number of memory chunks */
   17.35 -
   17.36 -/*
   17.37 - * List of node memory chunks. Filled when parsing SRAT table to
   17.38 - * obtain information about memory nodes.
   17.39 -*/
   17.40 -
   17.41 -struct node_memblk_s {
   17.42 -	unsigned long start_paddr;
   17.43 -	unsigned long size;
   17.44 -	int nid;		/* which logical node contains this chunk? */
   17.45 -	int bank;		/* which mem bank on this node */
   17.46 -};
   17.47 -
   17.48 -struct node_cpuid_s {
   17.49 -	u16	phys_id;	/* id << 8 | eid */
   17.50 -	int	nid;		/* logical node containing this CPU */
   17.51 -};
   17.52 -
   17.53 -extern struct node_memblk_s node_memblk[NR_NODE_MEMBLKS];
   17.54 -extern struct node_cpuid_s node_cpuid[NR_CPUS];
   17.55 -
   17.56 -/*
   17.57 - * ACPI 2.0 SLIT (System Locality Information Table)
   17.58 - * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf
   17.59 - *
   17.60 - * This is a matrix with "distances" between nodes, they should be
   17.61 - * proportional to the memory access latency ratios.
   17.62 - */
   17.63 -
   17.64 -extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
   17.65 -#define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
   17.66 -
   17.67 -extern int paddr_to_nid(unsigned long paddr);
   17.68 -
   17.69 -#define local_nodeid (cpu_to_node_map[smp_processor_id()])
   17.70 -
   17.71 -#else /* !CONFIG_NUMA */
   17.72 -
   17.73 -#define paddr_to_nid(addr)	0
   17.74 -
   17.75 -#endif /* CONFIG_NUMA */
   17.76 -
   17.77 -#endif /* _ASM_IA64_NUMA_H */
    18.1 --- a/xen/include/asm-ia64/xenpage.h	Wed Oct 25 12:12:01 2006 -0600
    18.2 +++ b/xen/include/asm-ia64/xenpage.h	Wed Oct 25 14:48:55 2006 -0600
    18.3 @@ -1,10 +1,6 @@
    18.4  #ifndef _ASM_IA64_XENPAGE_H
    18.5  #define _ASM_IA64_XENPAGE_H
    18.6  
    18.7 -#ifdef CONFIG_DISCONTIGMEM
    18.8 -#error "xenpage.h: page macros need to be defined for CONFIG_DISCONTIGMEM"
    18.9 -#endif
   18.10 -
   18.11  #undef mfn_valid
   18.12  #undef page_to_mfn
   18.13  #undef mfn_to_page
    19.1 --- a/xen/include/public/arch-ia64.h	Wed Oct 25 12:12:01 2006 -0600
    19.2 +++ b/xen/include/public/arch-ia64.h	Wed Oct 25 14:48:55 2006 -0600
    19.3 @@ -28,6 +28,7 @@
    19.4  __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
    19.5  __DEFINE_XEN_GUEST_HANDLE(uint,  unsigned int);
    19.6  __DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
    19.7 +__DEFINE_XEN_GUEST_HANDLE(u64,   unsigned long);
    19.8  DEFINE_XEN_GUEST_HANDLE(char);
    19.9  DEFINE_XEN_GUEST_HANDLE(int);
   19.10  DEFINE_XEN_GUEST_HANDLE(long);