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-ia64-devel

[Xen-ia64-devel] [PATCH] Fix CONFIG_XEN=no for gate page

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] [PATCH] Fix CONFIG_XEN=no for gate page
From: Aron Griffis <aron@xxxxxx>
Date: Mon, 10 Dec 2007 22:30:42 -0500
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 10 Dec 2007 19:30:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
2 files changed, 8 insertions(+), 4 deletions(-)
arch/ia64/kernel/Makefile      |    9 ++++++---
arch/ia64/kernel/vmlinux.lds.S |    3 ++-


# HG changeset patch
# User Aron Griffis <aron@xxxxxx>
# Date 1197341336 18000
# Node ID 330b3955bb937bcf0e5c4dfa813c823f5ec14b30
# Parent  9bb76e0b347ef7f437e752c08f16f32f29386f7e
Fix CONFIG_XEN=no for gate page

The important part of this is to refrain from building .tmp_gate.o unless
CONFIG_XEN.  However it also seems correct to make xen_gate_section in
vmlinux.lds.S depend on CONFIG_XEN as well.  Tested that both builds work now.

Signed-off-by: Aron Griffis <aron@xxxxxx>

diff -r 9bb76e0b347e -r 330b3955bb93 arch/ia64/kernel/Makefile
--- a/arch/ia64/kernel/Makefile Thu Nov 29 12:20:05 2007 -0700
+++ b/arch/ia64/kernel/Makefile Mon Dec 10 21:48:56 2007 -0500
@@ -64,14 +64,15 @@ GATECFLAGS_gate-syms.o = -r
 # Note: kbuild does not track this dependency due to usage of .incbin
 $(obj)/gate-data.o: $(obj)/gate.so
 
-
 #
 # gate page paravirtualization for xen
 #
 obj-$(CONFIG_XEN) += xengate-data.o
 
+ifeq ($(CONFIG_XEN), y)
 # The gate DSO image is built using a special linker script.
 targets += xengate.so xengate-syms.o
+endif
 
 extra-$(CONFIG_XEN) += xengate.so xengate.lds xengate.o
 
@@ -99,22 +100,24 @@ GATECFLAGS_xengate-syms.o = -r
        $(call if_changed,gate)
 $(obj)/xengate-data.o: $(obj)/xengate.so
 
-
 #
 # .tmp_gate.o to calculate padding size for __kernel_syscall_via_epc
 #
-extra-y += gate-skip.s .tmp_gate.o
+extra-$(CONFIG_XEN) += gate-skip.s .tmp_gate.o
 
 ifeq ($(CONFIG_XEN), y)
 AFLAGS_gate.o += -D__KERNEL_SYSCALL_VIA_EPC_PADDING
 $(obj)/gate.o: $(obj)/gate-skip.s FORCE
 endif
+
 $(obj)/.tmp_gate.o: $(src)/gate.S FORCE
        $(call if_changed_dep,as_o_S)
+
 quiet_cmd_gate_size = GATE_SIZE        $@
       cmd_gate_size = $(NM) --extern-only --print-size $(obj)/xengate.o | \
        $(AWK) '/__kernel_syscall_via_epc/{printf "\t.skip 0x"$$2" - "}' > $@; \
        $(NM) --extern-only --print-size $(obj)/.tmp_gate.o | \
        $(AWK) '/__kernel_syscall_via_epc/{printf "0x"$$2"\n"}' >> $@
+
 $(obj)/gate-skip.s: $(obj)/xengate.o $(obj)/.tmp_gate.o FORCE
        $(call if_changed,gate_size)
diff -r 9bb76e0b347e -r 330b3955bb93 arch/ia64/kernel/vmlinux.lds.S
--- a/arch/ia64/kernel/vmlinux.lds.S    Thu Nov 29 12:20:05 2007 -0700
+++ b/arch/ia64/kernel/vmlinux.lds.S    Mon Dec 10 21:48:56 2007 -0500
@@ -1,4 +1,3 @@
-
 #include <asm/cache.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
@@ -183,10 +182,12 @@ SECTIONS
          __start_gate_section = .;
          *(.data.gate)
          __stop_gate_section = .;
+#if defined(CONFIG_XEN)
          . = ALIGN(PAGE_SIZE);
          __start_xen_gate_section = .;
          *(.data.gate.xen)
          __stop_xen_gate_section = .;
+#endif
        }
   . = ALIGN(PAGE_SIZE);                /* make sure the gate page doesn't 
expose kernel data */
 

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

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