[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [IA64] Fix CONFIG_XEN=no for gate page



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1197388853 25200
# Node ID e3e6f40354eb597255a371d5da055f60ab3fed62
# Parent  b865b15fb54b35e08940b8143c0e3392effc07e9
[IA64] 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>
---
 arch/ia64/kernel/Makefile      |    9 ++++++---
 arch/ia64/kernel/vmlinux.lds.S |    2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff -r b865b15fb54b -r e3e6f40354eb arch/ia64/kernel/Makefile
--- a/arch/ia64/kernel/Makefile Mon Dec 10 15:04:49 2007 +0000
+++ b/arch/ia64/kernel/Makefile Tue Dec 11 09:00:53 2007 -0700
@@ -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 b865b15fb54b -r e3e6f40354eb arch/ia64/kernel/vmlinux.lds.S
--- a/arch/ia64/kernel/vmlinux.lds.S    Mon Dec 10 15:04:49 2007 +0000
+++ b/arch/ia64/kernel/vmlinux.lds.S    Tue Dec 11 09:00:53 2007 -0700
@@ -183,10 +183,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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.