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

[Xen-devel] Re: [RFC PATCH 15/35] subarch support for controlling interr

To: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 15/35] subarch support for controlling interrupt delivery
From: "Martin J. Bligh" <mbligh@xxxxxxxxxx>
Date: Tue, 09 May 2006 09:02:11 -0700
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Wed, 10 May 2006 04:54:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060509155153.GJ7834@xxxxxxxxxxxx>
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>
References: <20060509084945.373541000@xxxxxxxxxxxx> <20060509085154.095325000@xxxxxxxxxxxx> <4460AC06.4000303@xxxxxxxxxx> <20060509155153.GJ7834@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
Christian Limpach wrote:
On Tue, May 09, 2006 at 07:49:42AM -0700, Martin J. Bligh wrote:

+#define __cli()                                                         \
+do {                                                                   \
+       struct vcpu_info *_vcpu;                                        \
+       preempt_disable();                                              \
+       _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id];           \
+       _vcpu->evtchn_upcall_mask = 1;                                       \
+       preempt_enable_no_resched();                                    \
+       barrier();                                                      \
+} while (0)

Should be a real function


Yes, except it's not trivially done because if __cli was an inline
function, you need to have everything that is used in the declaration
defined when the function is declared as opposed to when the #define
gets used.  I'll give it another try, but it very quickly becomes
#include hell.

Anybody want to comment on the performance impact of making
local_irq_* non-inline functions?

I wasn't concerned with inline vs non-inline - that's your choice.
Just the inherent foulness of multi-line macros ;-)

M.



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

<Prev in Thread] Current Thread [Next in Thread>