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] fix build when CONFIG_COMPAT disabled

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] fix build when CONFIG_COMPAT disabled
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Thu, 11 Jan 2007 17:57:45 +0000
Cc: John Levon <levon@xxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 11 Jan 2007 09:57:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45A67470.76E4.0078.0@xxxxxxxxxx>
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: Acc1qf8pPdJmXaGdEduvagAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] fix build when CONFIG_COMPAT disabled
User-agent: Microsoft-Entourage/11.2.5.060620
On 11/1/07 16:31, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

>> Should we bother to #ifdef where we don't need to? It's ugly and the
>> compiler should be able to remove dead code where a condition evaluates to
>> zero at compile time: we already have IS_COMPAT(d) hardcoded to zero if
>> !CONFIG_COMPAT, which is enough to give the compiler a fair chance.
> 
> Generally no, but in the one case in the patch we have to, as the structure
> member (mm_arg_xlat_l3) doesn't exist without CONFIG_COMPAT.

CONFIG_COMPAT isn't a real config option though. It's a function of the
architecture we're building for. So we don't need ifdef CONFIG_COMPAT in any
x86/64-specific code.

I'm very keen to get rid of CONFIG_* where possible. In x86 code we can
variously remove ifdefs or turn them into CONFIG_X86_64. We probably need to
keep CONFIG_COMPAT in some common code I guess.

This really follows my view that much of this new code should simply be
viewed as an always-on x86/64 extension, and that code should be propagated
down into arch/x86 and arch/x86/x86_64 as much as possible to reflect that.

 -- Keir


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