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] x86: force out-of-line instances of inline funct

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: force out-of-line instances of inline functions into .init.text in init-only code
From: Keir Fraser <keir@xxxxxxx>
Date: Fri, 11 Mar 2011 16:41:54 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 11 Mar 2011 08:43:11 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=mnK9f49eioZ9PpZPTTyHhMu+JFOiiKkUBEb+ANxM3LA=; b=MC0DWyqGLoxfidP5kxtEF3CEKIQCgLUa9TBpWfclgV3OmSkSWTMM7X156KenNZiANC hUkNxgvB1ZxZEHyus8ab1hh0iQFTZ2BnSJcq84jFbxmeZjd6aLHvC7c++UYsE6jAVHPp FG9iwYvh9fdhu/sZOcAcbwF7BzXVQnGiWHhB4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=C5opVQGlIUDs1c21R6HszWlYv7BdkbH7CJd/ulomBEmDDpanMxGpE/f8lOtmDm5mVT cJPzTgahNhC7OgvfMivRJMcbGzNkQzSkoM4eVtXyqStaEP6ZW5seFNNupCWvnJpZzEFW xgEpAmBF31fT/j+A72kH4Iu33n5AyapZi6m98=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D7A5BFC0200007800035F0E@xxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvgCzpx/Y+fMzex8UKEiXtYRJFkEw==
Thread-topic: [Xen-devel] [PATCH] x86: force out-of-line instances of inline functions into .init.text in init-only code
User-agent: Microsoft-Entourage/12.28.0.101117
On 11/03/2011 16:29, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>> Isn't this a possible problem for any file compiled under the rules of
>> obj-bin-y? If so, below should be defined for all such source files, perhaps
>> -D a macro def on $CC command line in that case (e.g., some obvious textual
>> macro name) and then pick up on that in <xen/compiler.h> to suitably
>> re-define inline and always_inline (and explain why in a code comment).
> 
> It's not tied to obj-bin-y, but rather to the .init.o rule, but yes, the
> problem would possibly affect any such object. My problem is that
> so far I wasn't able to think of a (clean and maintenance free) way
> to force in a -D for those very files, since the compilation step is
> the same as for "normal" .o-s. Hence, rather than waiting for
> people to start asking what the resulting error message means, I
> thought we should at least fix it in the place where the problem
> was observed in reality (which happened to me when I put the
> new bits on a system that I don't update that regularly).

If we apply the hack it will never go away. If we can't come up with a clean
maintenance-free way to get all files through the new check, the new check
should be removed. Perhaps you could list the object files in a new
obj-init-y list, which you then fold into obj-bin-y whilst also adding your
.init suffix, and then also have an extra rule like:
$(obj-init-y): CFLAGS += -DINIT_SECTIONS_ONLY
Maybe that would work?

 -- Keir



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