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] [PATCH] Fix __XEN_INTERFACE_VERSION__ old config breakage

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix __XEN_INTERFACE_VERSION__ old config breakage
From: Magnus Damm <magnus@xxxxxxxxxxxxx>
Date: Wed, 5 Apr 2006 07:45:34 +0900 (JST)
Cc: christian.limpach@xxxxxxxxx, Magnus Damm <magnus@xxxxxxxxxxxxx>
Delivery-date: Thu, 06 Apr 2006 06:56:51 -0700
Envelope-to: www-data@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/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
Fix __XEN_INTERFACE_VERSION__ old config breakage

For old kernel configurations that lack CONFIG_XEN_INTERFACE_VERSION,
__XEN_INTERFACE_VERSION__ will currently be defined but set to nothing. 

If a xen-enabled kernel is built separately from the xen-unstable dist,
the following error occurs with xen-unstable-9415:

#
# using defaults found in .config
#
  SPLIT   include/linux/autoconf.h -> include/config/*
  CC      arch/i386/kernel/asm-offsets.s
In file included from include/xen/interface/xen.h:439,
                 from include/asm/mach-xen/asm/page.h:20,
                 from include/asm/thread_info.h:14,
                 from include/linux/thread_info.h:21,
                 from include/linux/preempt.h:10,
                 from include/linux/spinlock.h:50,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from arch/i386/kernel/asm-offsets.c:7:
include/xen/interface/xen-compat.h:22:31: #if with no expression
include/xen/interface/xen-compat.h:26:31: #if with no expression
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
$

The patch below fixes the problem and makes the logic in xen-compat.h work
correctly - __XEN_INTERFACE_VERSION__ now becomes unset if the config option
is missing.

Signed-Off-By: Magnus Damm <magnus@xxxxxxxxxxxxx>

--- linux-2.6-xen-sparse/arch/i386/Makefile
+++ linux-2.6-xen-sparse/arch/i386/Makefile     2006-03-31 16:36:09.000000000 
+0900
@@ -45,8 +45,10 @@ CFLAGS                               += $(shell if [ $(call 
cc-vers
 
 CFLAGS += $(cflags-y)
 
+ifneq   "$(CONFIG_XEN_INTERFACE_VERSION)" ""
 cppflags-$(CONFIG_XEN) += \
        -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)
+endif
 
 CPPFLAGS += $(cppflags-y)
 

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