direct-io.hg

changeset 7941:112a769787d2

Linux swiotlb now uses correct method for determining if any RAM
is mapped above 2GB.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Nov 21 16:10:19 2005 +0100 (2005-11-21)
parents eaaee5f43c67
children bdab22f56efe
files Config.mk linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c
line diff
     1.1 --- a/Config.mk	Mon Nov 21 15:06:49 2005 +0100
     1.2 +++ b/Config.mk	Mon Nov 21 16:10:19 2005 +0100
     1.3 @@ -3,7 +3,7 @@
     1.4  # Currently supported architectures: x86_32, x86_64
     1.5  XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/)
     1.6  XEN_TARGET_ARCH     ?= $(XEN_COMPILE_ARCH)
     1.7 -XEN_TARGET_X86_PAE  ?= n
     1.8 +XEN_TARGET_X86_PAE  ?= y
     1.9  
    1.10  # Tools to run on system hosting the build
    1.11  HOSTCC     = gcc
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Mon Nov 21 15:06:49 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Mon Nov 21 16:10:19 2005 +0100
     2.3 @@ -24,6 +24,7 @@
     2.4  #include <asm/io.h>
     2.5  #include <asm/pci.h>
     2.6  #include <asm/dma.h>
     2.7 +#include <asm-xen/xen-public/memory.h>
     2.8  
     2.9  #define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1)))
    2.10  
    2.11 @@ -186,10 +187,10 @@ swiotlb_init(void)
    2.12           * which we take to mean more than 2GB.
    2.13           */
    2.14  	if (xen_start_info->flags & SIF_INITDOMAIN) {
    2.15 -		dom0_op_t op;
    2.16 -		op.cmd = DOM0_PHYSINFO;
    2.17 -		if ((HYPERVISOR_dom0_op(&op) == 0) &&
    2.18 -		    (op.u.physinfo.total_pages > 0x7ffff))
    2.19 +		unsigned long ram_end;
    2.20 +		if (HYPERVISOR_memory_op(XENMEM_maximum_ram_page, &ram_end))
    2.21 +			BUG();
    2.22 +		if (ram_end > 0x7ffff)
    2.23  			swiotlb = 1;
    2.24  	}
    2.25