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

Re: [Xen-ia64-devel] Where to compile additional IVT.S

arch/ia64/kernel/ivt.o is overwritten.
Building again under arch/ia64/kernel would cause trouble.
What do you think the following?

ia64/pv_ops: complie paravirtualized assembly files into each pv dirs.

compile ivt.S and switch_leave.S into each pv instanc dir.
With this patch, arch/ia64/kernel/Makefile can be simpler than before.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/kernel/Makefile |   22 +++++-----------------
 arch/ia64/xen/Makefile    |   13 ++++++++++++-
 arch/ia64/xen/xenivt.S    |    1 -
 3 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index b912d3d..1c9fc34 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -79,20 +79,8 @@ $(obj)/gate-data.o: $(obj)/gate.so
 #
 # native ivt.S and switch_leave.S
 #
-AFLAGS_ivt.o += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE
-AFLAGS_switch_leave.o += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE
-
-# xen multi compile
-$(obj)/xen_%.o: $(src)/%.S FORCE
-       $(call if_changed_dep,as_o_S)
-
-#
-# xenivt.o, xen_switch_leave.o
-#
-obj-$(CONFIG_XEN) += xen_ivt.o xen_switch_leave.o
-ifeq ($(CONFIG_XEN), y)
-targets += xen_ivt.o xen_switch_leave.o
-$(obj)/build-in.o: xen_ivt.o xen_switch_leave.o
-endif
-AFLAGS_xen_ivt.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN
-AFLAGS_xen_switch_leave.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN
+ASM_PARAVIRT_OBJS = ivt.o switch_leave.o
+define paravirtualized_native
+AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE
+endef
+$(foreach obj,$(ASM_PARAVIRT_OBJS),$(eval $(call 
paravirtualized_native,$(obj))))
diff --git a/arch/ia64/xen/Makefile b/arch/ia64/xen/Makefile
index 87e29d2..75ffb4b 100644
--- a/arch/ia64/xen/Makefile
+++ b/arch/ia64/xen/Makefile
@@ -3,6 +3,17 @@
 #
 
 obj-y := hypercall.o time.o xenivt.o xensetup.o xen_pv_ops.o irq_xen.o \
-        hypervisor.o util.o xencomm.o xcom_hcall.o xcom_asm.o paravirt_xen.o
+        hypervisor.o util.o xencomm.o xcom_hcall.o xcom_asm.o paravirt_xen.o \
+        xen-ivt.o xen-switch_leave.o
 
 obj-$(CONFIG_IA64_GENERIC) += machvec.o
+
+# xen multi compile
+ASM_PARAVIRT_OBJS = xenivt.o xen-ivt.o xen-switch_leave.o
+define paravirtualized_xen
+AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_XEN
+endef
+$(foreach obj,$(ASM_PARAVIRT_OBJS),$(eval $(call paravirtualized_xen,$(obj))))
+
+$(obj)/xen-%.o: $(src)/../kernel/%.S FORCE
+       $(call if_changed_dep,as_o_S)
diff --git a/arch/ia64/xen/xenivt.S b/arch/ia64/xen/xenivt.S
index c688aaa..2d509f2 100644
--- a/arch/ia64/xen/xenivt.S
+++ b/arch/ia64/xen/xenivt.S
@@ -13,7 +13,6 @@
 #include <asm/kregs.h>
 #include <asm/pgtable.h>
 
-#define __IA64_ASM_PARAVIRTUALIZED_XEN
 #include <asm/xen/inst.h>
 #include <asm/xen/minstate.h>
 #include "../kernel/minstate.h"
-- 
1.5.3



On Thu, Mar 20, 2008 at 05:02:43PM +0800, Dong, Eddie wrote:
> Dong, Eddie wrote:
> > Alex/Isaku:
> >     Current the make file is to compile additional ivt.S at
> > kernel/., another approach is to compile in xen/..
> >     The later one has following benfit:
> >     1: Easy to read for Makefile and easy to extend for more
> > hypervisors.
> >     2: Xen specific ministate.h can be in arch/ia64/xen/, like the
> > one under arch/ia64/kernel.
> > 
> > 
> >     I am not a makefile expert, just use this example to explain
> > idea, suggestion?
> > thanks, eddie
> > 
> > 
> Here is the formal patch for this.
> 
> Thanks, eddie
> 
> 
> 
>     Move 2nd compile of ivt.S to per hypervisor sub dir.
>     
>     Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@xxxxxxxxx>
> 
> diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
> index 3e9a162..78ec040 100644
> --- a/arch/ia64/kernel/Makefile
> +++ b/arch/ia64/kernel/Makefile
> @@ -80,16 +80,3 @@ $(obj)/gate-data.o: $(obj)/gate.so
>  #
>  AFLAGS_ivt.o += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE
>  
> -# xen multi compile
> -$(obj)/xen_%.o: $(src)/%.S FORCE
> -     $(call if_changed_dep,as_o_S)
> -
> -#
> -# xenivt.o
> -#
> -obj-$(CONFIG_XEN) += xen_ivt.o
> -ifeq ($(CONFIG_XEN), y)
> -targets += xen_ivt.o
> -$(obj)/build-in.o: xen_ivt.o
> -endif
> -AFLAGS_xen_ivt.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN
> diff --git a/arch/ia64/xen/Makefile b/arch/ia64/xen/Makefile
> index 87e29d2..605b757 100644
> --- a/arch/ia64/xen/Makefile
> +++ b/arch/ia64/xen/Makefile
> @@ -2,7 +2,11 @@
>  # Makefile for Xen components
>  #
>  
> +KBUILD_AFLAGS += -D__IA64_ASM_PARAVIRTUALIZED_XEN
> + 
>  obj-y := hypercall.o time.o xenivt.o xensetup.o xen_pv_ops.o irq_xen.o
> \
>        hypervisor.o util.o xencomm.o xcom_hcall.o xcom_asm.o
> paravirt_xen.o
>  
> +obj-y += ../kernel/ivt.o
> +
>  obj-$(CONFIG_IA64_GENERIC) += machvec.o
> diff --git a/arch/ia64/xen/xenivt.S b/arch/ia64/xen/xenivt.S
> index c688aaa..2d509f2 100644
> --- a/arch/ia64/xen/xenivt.S
> +++ b/arch/ia64/xen/xenivt.S
> @@ -13,7 +13,6 @@
>  #include <asm/kregs.h>
>  #include <asm/pgtable.h>
>  
> -#define __IA64_ASM_PARAVIRTUALIZED_XEN
>  #include <asm/xen/inst.h>
>  #include <asm/xen/minstate.h>
>  #include "../kernel/minstate.h"


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

-- 
yamahata

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

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