[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH] make ctrl_if.c can be used in para-driver for unmodified guest



ctrl_if.c is removed now, so this patch is obsoleted now.

Xiaofeng Ling <> wrote:
> make ctrl_if.c can be used in para-driver for unmodified guest
> changes are: 
> 1. use bind_evtchn_to_irqhandler instead of setup_irq 2. set
> safe_to_schedule_task = 1 in ctrl_if_init 3. remove warnings when
> build. #ifndef CONFIG_XEN means build with unmodified kernel not
> xen-linux.  
> xen_start_info.domain_controller_evtchn is set in event channel pci
> driver. 
> This file is needed for the front end drivers that is not ported to
> xenbus. 
> 
> Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
> Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>
> 
> diff -r 287d36b46fa3 linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c
> --- a/linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c  Tue Aug 30
> 20:36:49 2005
> +++ b/linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c  Fri Sep  2
> 22:47:27 2005
> @@ -67,10 +67,11 @@
>   int initdom_ctrlif_domcontroller_port = -1;
> 
>   static int        ctrl_if_evtchn;
> +#ifdef CONFIG_XEN
>   static int        ctrl_if_irq;
> +static struct irqaction ctrl_if_irq_action; #endif
>   static spinlock_t ctrl_if_lock;
> -
> -static struct irqaction ctrl_if_irq_action;
> 
>   static ctrl_front_ring_t ctrl_if_tx_ring;
>   static ctrl_back_ring_t  ctrl_if_rx_ring; @@ -475,8 +476,12 @@
> 
>   void ctrl_if_suspend(void)
>   {
> +#ifdef CONFIG_XEN
>       teardown_irq(ctrl_if_irq, &ctrl_if_irq_action);
>       unbind_evtchn_from_irq(ctrl_if_evtchn);
> +#else
> +    unbind_evtchn_from_irqhandler(ctrl_if_evtchn, NULL); #endif
>   }
> 
>   void ctrl_if_resume(void)
> @@ -510,12 +515,22 @@
>       BACK_RING_ATTACH(&ctrl_if_rx_ring, &ctrl_if->rx_ring,
> CONTROL_RING_MEM);
> 
>       ctrl_if_evtchn = xen_start_info.domain_controller_evtchn;
> +#ifdef CONFIG_XEN
>       ctrl_if_irq    = bind_evtchn_to_irq(ctrl_if_evtchn);
> 
>       memset(&ctrl_if_irq_action, 0, sizeof(ctrl_if_irq_action));
>       ctrl_if_irq_action.handler = ctrl_if_interrupt;
>       ctrl_if_irq_action.name    = "ctrl-if";
>       (void)setup_irq(ctrl_if_irq, &ctrl_if_irq_action);
> +#else
> +    if(bind_evtchn_to_irqhandler(
> +        ctrl_if_evtchn, ctrl_if_interrupt, SA_SAMPLE_RANDOM,
> "ctrl-if", 
> NULL))
> +    {
> +        printk("bind_evtchn_to_irqhandler failed\n" );
> +        return;
> +    }
> +
> +#endif
>   }
> 
>   void __init ctrl_if_init(void)
> @@ -532,6 +547,9 @@
>       spin_lock_init(&ctrl_if_lock);
> 
>       ctrl_if_resume();
> +#ifndef CONFIG_XEN
> +    safe_to_schedule_task = 1;
> +#endif
>   }
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.