ia64/xen-unstable

changeset 14294:210858e4f6d5

[IA64] Xen/ia64 XENMEM_exchange bug work around

xen-unstable.hg c/s 13366:ed73ff8440d8 revealed that
XENMEM_exchange has been broken on Xen/ia64.
This is work around for it until the right fix.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild2.aw
date Wed Mar 07 12:42:32 2007 -0700 (2007-03-07)
parents 50d5bf02e59e
children 9f8e996a678d
files linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c	Wed Mar 07 12:38:28 2007 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c	Wed Mar 07 12:42:32 2007 -0700
     1.3 @@ -205,6 +205,18 @@ static void contiguous_bitmap_clear(
     1.4  #define MAX_CONTIG_ORDER 7
     1.5  static unsigned long discontig_frames[1<<MAX_CONTIG_ORDER];
     1.6  
     1.7 +/* Width of DMA addresses. 30 bits is a b44 limitation. */
     1.8 +#define DEFAULT_DMA_BITS 30
     1.9 +static unsigned int xen_ia64_dma_bits = DEFAULT_DMA_BITS;
    1.10 +
    1.11 +static int __init
    1.12 +setup_dma_bits(char *str)
    1.13 +{
    1.14 +	xen_ia64_dma_bits = simple_strtoul(str, NULL, 0);
    1.15 +	return 0;
    1.16 +}
    1.17 +__setup("xen_ia64_dma_bits=", setup_dma_bits);
    1.18 +
    1.19  /* Ensure multi-page extents are contiguous in machine memory. */
    1.20  int
    1.21  __xen_create_contiguous_region(unsigned long vstart,
    1.22 @@ -234,6 +246,15 @@ int
    1.23  		.nr_exchanged = 0
    1.24  	};
    1.25  
    1.26 +	/*
    1.27 +	 * XXX xen/ia64 vmm bug work around
    1.28 +	 * the c/s 13366:ed73ff8440d8 of xen-unstable.hg revealed that
    1.29 +	 * XENMEM_exchange has been broken on Xen/ia64.
    1.30 +	 * This is work around for it until the right fix.
    1.31 +	 */
    1.32 +	if (address_bits < xen_ia64_dma_bits)
    1.33 +		return -ENOSYS;
    1.34 +
    1.35  	if (unlikely(order > MAX_CONTIG_ORDER))
    1.36  		return -ENOMEM;
    1.37