ia64/xen-unstable

changeset 181:4043fe9511f8

bitkeeper revision 1.47 (3e4e6df96Pca-sBuWBs3QlLpN1RcAQ)

ide-xeno.c:
Fix IDE probe to properly map domain memory.
author kaf24@labyrinth.cl.cam.ac.uk
date Sat Feb 15 16:42:33 2003 +0000 (2003-02-15)
parents 14f0a9bd861d
children efb500abaa15
files xen-2.4.16/drivers/ide/ide-xeno.c
line diff
     1.1 --- a/xen-2.4.16/drivers/ide/ide-xeno.c	Sat Feb 15 16:31:15 2003 +0000
     1.2 +++ b/xen-2.4.16/drivers/ide/ide-xeno.c	Sat Feb 15 16:42:33 2003 +0000
     1.3 @@ -3,12 +3,14 @@
     1.4  #include <xeno/lib.h>
     1.5  #include <xeno/ide.h>
     1.6  #include <hypervisor-ifs/block.h>
     1.7 -
     1.8 +#include <asm/domain_page.h>
     1.9 +#include <asm/io.h>
    1.10  
    1.11  void ide_probe_devices (xen_disk_info_t* xdi)
    1.12  {
    1.13      int loop;
    1.14      unsigned int unit;
    1.15 +    xen_disk_info_t *xen_xdi = map_domain_mem(virt_to_phys(xdi));
    1.16      
    1.17      for (loop = 0; loop < MAX_HWIFS; ++loop) {
    1.18  
    1.19 @@ -21,19 +23,19 @@ void ide_probe_devices (xen_disk_info_t*
    1.20  
    1.21  		if (drive->present) {
    1.22  		    capacity = current_capacity (drive);
    1.23 -		    xdi->disks[xdi->count].type = XEN_DISK_IDE;
    1.24 -		    xdi->disks[xdi->count].capacity = capacity;
    1.25 -		    xdi->count++;
    1.26 +		    xen_xdi->disks[xen_xdi->count].type = XEN_DISK_IDE;
    1.27 +		    xen_xdi->disks[xen_xdi->count].capacity = capacity;
    1.28 +		    xen_xdi->count++;
    1.29  
    1.30 -		    printk (KERN_ALERT "IDE-XENO %d\n", xdi->count);
    1.31 -		    printk (KERN_ALERT "  capacity  0x%lx\n", capacity);
    1.32 -		    printk (KERN_ALERT "  head      0x%x\n",  drive->bios_head);
    1.33 -		    printk (KERN_ALERT "  sector    0x%x\n",  drive->bios_sect);
    1.34 -		    printk (KERN_ALERT "  cylinder  0x%x\n",  drive->bios_cyl);
    1.35 +		    printk (KERN_ALERT "IDE-XENO %d\n", xen_xdi->count);
    1.36 +		    printk (KERN_ALERT "  capacity 0x%lx\n", capacity);
    1.37 +		    printk (KERN_ALERT "  head     0x%x\n",  drive->bios_head);
    1.38 +		    printk (KERN_ALERT "  sector   0x%x\n",  drive->bios_sect);
    1.39 +		    printk (KERN_ALERT "  cylinder 0x%x\n",  drive->bios_cyl);
    1.40  		}
    1.41  	    }
    1.42  	}
    1.43      }
    1.44  
    1.45 -  return;
    1.46 +    unmap_domain_mem(xen_xdi);
    1.47  }