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-changelog

[Xen-changelog] [xen-unstable] [IA64] define VHPT_ENABLED in Rules.mk in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] define VHPT_ENABLED in Rules.mk instead of the header file, vhpt.h.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 May 2008 08:30:28 -0700
Delivery-date: Tue, 20 May 2008 08:31:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1210148132 -32400
# Node ID f23e7e07bf1d41577ed5fb14cd4135537290785e
# Parent  6df8dcf48d9d2400a6cb6f23a2c0c2a47b33b02a
[IA64] define VHPT_ENABLED in Rules.mk instead of the header file, vhpt.h.

VHPT_ENABLED is defined in vhpt.h, but it is intended for compile time
option. Defining in the header file caused that VHPT_ENABLED
is undefined in some files resulting in unintentional compilation.
Define the macro in Rules.mk resolves it. And minor modifications to
remove compilation error/warning.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/Rules.mk      |    9 +++++++++
 xen/arch/ia64/asm-offsets.c |    2 ++
 xen/arch/ia64/xen/domain.c  |    3 +--
 xen/include/asm-ia64/vhpt.h |    2 --
 4 files changed, 12 insertions(+), 4 deletions(-)

diff -r 6df8dcf48d9d -r f23e7e07bf1d xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk    Mon May 12 11:24:47 2008 +0900
+++ b/xen/arch/ia64/Rules.mk    Wed May 07 17:15:32 2008 +0900
@@ -8,6 +8,7 @@ no_warns ?= n
 no_warns ?= n
 vti_debug ?= n
 vmx_panic ?= n
+vhpt_disable ?= n
 xen_ia64_expose_p2m    ?= y
 xen_ia64_pervcpu_vhpt  ?= y
 xen_ia64_tlb_track     ?= y
@@ -45,6 +46,9 @@ endif
 endif
 ifeq ($(xen_ia64_pervcpu_vhpt),y)
 CFLAGS += -DCONFIG_XEN_IA64_PERVCPU_VHPT
+ifeq ($(vhpt_disable),y)
+$(error "both xen_ia64_pervcpu_vhpt=y and vhpt_disable=y are enabled. they 
can't be enabled simultaneously. disable one of them.")
+endif
 endif
 ifeq ($(xen_ia64_tlb_track),y)
 CFLAGS += -DCONFIG_XEN_IA64_TLB_TRACK
@@ -57,6 +61,11 @@ endif
 endif
 ifeq ($(no_warns),y)
 CFLAGS += -Wa,--fatal-warnings -Werror -Wno-uninitialized
+endif
+ifneq ($(vhpt_disable),y)
+CFLAGS += -DVHPT_ENABLED=1
+else
+CFLAGS += -DVHPT_ENABLED=0
 endif
 
 LDFLAGS := -g
diff -r 6df8dcf48d9d -r f23e7e07bf1d xen/arch/ia64/asm-offsets.c
--- a/xen/arch/ia64/asm-offsets.c       Mon May 12 11:24:47 2008 +0900
+++ b/xen/arch/ia64/asm-offsets.c       Wed May 07 17:15:32 2008 +0900
@@ -254,10 +254,12 @@ void foo(void)
        DEFINE(IA64_MCA_CPU_RBSTORE_OFFSET,
               offsetof(struct ia64_mca_cpu, rbstore));
 
+#if VHPT_ENABLED
        DEFINE(IA64_VCPU_VHPT_PAGE_OFFSET,
               offsetof(struct vcpu, arch.vhpt_page));
        DEFINE(IA64_VCPU_VHPT_MADDR_OFFSET,
               offsetof(struct vcpu, arch.vhpt_maddr));
+#endif
 
        BLANK();
        DEFINE(IA64_MCA_TLB_INFO_SIZE, sizeof(struct ia64_mca_tlb_info));
diff -r 6df8dcf48d9d -r f23e7e07bf1d xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Mon May 12 11:24:47 2008 +0900
+++ b/xen/arch/ia64/xen/domain.c        Wed May 07 17:15:32 2008 +0900
@@ -499,10 +499,9 @@ static void vcpu_share_privregs_with_gue
 
 int vcpu_late_initialise(struct vcpu *v)
 {
-       struct domain *d = v->domain;
        int rc, order;
 
-       if (HAS_PERVCPU_VHPT(d)) {
+       if (HAS_PERVCPU_VHPT(v->domain)) {
                rc = pervcpu_vhpt_alloc(v);
                if (rc != 0)
                        return rc;
diff -r 6df8dcf48d9d -r f23e7e07bf1d xen/include/asm-ia64/vhpt.h
--- a/xen/include/asm-ia64/vhpt.h       Mon May 12 11:24:47 2008 +0900
+++ b/xen/include/asm-ia64/vhpt.h       Wed May 07 17:15:32 2008 +0900
@@ -1,7 +1,5 @@
 #ifndef ASM_VHPT_H
 #define ASM_VHPT_H
-
-#define VHPT_ENABLED 1
 
 /* Size of the VHPT.  */
 // XXX work around to avoid trigerring xenLinux software lock up detection.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] define VHPT_ENABLED in Rules.mk instead of the header file, vhpt.h., Xen patchbot-unstable <=