WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Ling, Xiaofeng" <xiaofeng.ling@xxxxxxxxx>, "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] make ctrl_if.c can be used in para-driver for unmodified guest
From: "Ling, Xiaofeng" <xiaofeng.ling@xxxxxxxxx>
Date: Thu, 8 Sep 2005 10:10:33 +0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 08 Sep 2005 02:08:35 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWx+97HhrrhhOPiSyyMDbbeM7iKvACHn2YA
Thread-topic: [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

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [Xen-devel] [PATCH] make ctrl_if.c can be used in para-driver for unmodified guest, Ling, Xiaofeng <=