direct-io.hg

changeset 7530:813e504dc716

Necessary change to make ia64 dom0 rework:
- All even channels on xen/ia64 shares one common interrupt vector
- xen_start_info is initialized only after xen_init, so adjust
sequence to avoid access before initialization

Signed-off-by Kevin Tian <kevin.tian@intel.com>
author djm@kirby.fc.hp.com
date Mon Oct 24 09:15:53 2005 -0600 (2005-10-24)
parents fdea4a967bc7
children 998e85f9963d
files linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c	Mon Oct 24 09:08:13 2005 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c	Mon Oct 24 09:15:53 2005 -0600
     1.3 @@ -29,7 +29,7 @@ unsigned int bind_virq_to_evtchn(int vir
     1.4      return op.u.bind_virq.port;
     1.5  }
     1.6  
     1.7 -int bind_virq_to_irq(int virq)
     1.8 +int bind_virq_to_irq(int virq, int cpu)
     1.9  {
    1.10  	printk("bind_virq_to_irq called... FIXME??\n");
    1.11  	while(1);
    1.12 @@ -66,7 +66,11 @@ int bind_evtchn_to_irqhandler(unsigned i
    1.13      evtchns[evtchn].handler = handler;
    1.14      evtchns[evtchn].dev_id = dev_id;
    1.15      unmask_evtchn(evtchn);
    1.16 -    return 0;
    1.17 +    //return 0;
    1.18 +    /* On ia64, there's only one irq vector allocated for all event channels,
    1.19 +     * so let's just return evtchn as handle for later communication
    1.20 +     */
    1.21 +    return evtchn;
    1.22  }
    1.23  
    1.24  void unbind_evtchn_from_irqhandler(unsigned int evtchn, void *dev_id)
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Mon Oct 24 09:08:13 2005 -0600
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Mon Oct 24 09:15:53 2005 -0600
     2.3 @@ -25,8 +25,8 @@
     2.4  #include <asm/pgtable.h>
     2.5  #include <asm/uaccess.h>
     2.6  #include <asm/tlb.h>
     2.7 +#include <asm/hypervisor.h>
     2.8  #include <asm-xen/linux-public/privcmd.h>
     2.9 -#include <asm/hypervisor.h>
    2.10  #include <asm-xen/xen-public/xen.h>
    2.11  #include <asm-xen/xen-public/dom0_ops.h>
    2.12  #include <asm-xen/xen_proc.h>
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Mon Oct 24 09:08:13 2005 -0600
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Mon Oct 24 09:15:53 2005 -0600
     3.3 @@ -714,11 +714,7 @@ static int xsd_port_read(char *page, cha
     3.4  
     3.5  static int __init xenbus_probe_init(void)
     3.6  {
     3.7 -	int err = 0;
     3.8 -	/* 
     3.9 -	** Domain0 doesn't have a store_evtchn or store_mfn yet. 
    3.10 -	*/
    3.11 -	int dom0 = (xen_start_info->store_evtchn == 0);
    3.12 +	int err = 0, dom0;
    3.13  
    3.14  	printk("xenbus_probe_init\n");
    3.15  
    3.16 @@ -733,6 +729,11 @@ static int __init xenbus_probe_init(void
    3.17  	device_register(&xenbus_frontend.dev);
    3.18  	device_register(&xenbus_backend.dev);
    3.19  
    3.20 +	/*
    3.21 +	** Domain0 doesn't have a store_evtchn or store_mfn yet.
    3.22 +	*/
    3.23 +	dom0 = (xen_start_info->store_evtchn == 0);
    3.24 +
    3.25  	if (dom0) {
    3.26  
    3.27  		unsigned long page;