]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
[IA64] Fix CONFIG_XEN=no for gate page
authorAlex Williamson <alex.williamson@hp.com>
Tue, 11 Dec 2007 16:00:53 +0000 (09:00 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Tue, 11 Dec 2007 16:00:53 +0000 (09:00 -0700)
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@hp.com>
1  2 
arch/ia64/kernel/Makefile
arch/ia64/kernel/vmlinux.lds.S

index ff82f4ea738a1703b997e40f98994af2fe25728a,ff82f4ea738a1703b997e40f98994af2fe25728a..c1e221e52e32cbd002e318c5bec2fe8d7cb8c963
@@@ -64,14 -64,14 +64,15 @@@ $(obj)/gate-syms.o: $(obj)/gate.lds $(o
  # 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 -99,22 +100,24 @@@ $(obj)/xengate-syms.o: $(obj)/xengate.l
        $(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)
index 5da019923fd804bc8222feed36e65499d4deba87,5da019923fd804bc8222feed36e65499d4deba87..437fe5480f2321476efd2e7b30a1d8d4f7e01d06
@@@ -183,10 -183,10 +183,12 @@@ SECTION
          __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 */