* [PATCH] Make non-x86 arch partially support make sync.
@ 2008-02-01 9:34 Zhang, Xiantao
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCD3233C-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Zhang, Xiantao @ 2008-02-01 9:34 UTC (permalink / raw)
To: Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ia64-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]
From: Xiantao Zhang <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Fri, 1 Feb 2008 17:18:03 +0800
Subject: [PATCH] Make non-x86 arch partially support make sync.
Make non-x86 arch partially support make sync, and other archs
can get right header files for userspace.
Signed-off-by: Xiantao Zhang <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
kernel/Makefile | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/kernel/Makefile b/kernel/Makefile
index 7a435b5..2f0d7d5 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -13,6 +13,17 @@ LINUX = ../linux-2.6
version = $(shell cd $(LINUX); git describe)
+ARCH := $(shell uname -m | sed -e s/i.86/i386/)
+SRCARCH := $(ARCH)
+
+# Additional ARCH settings for x86
+ifeq ($(ARCH),i386)
+ SRCARCH := x86
+endif
+ifeq ($(ARCH),x86_64)
+ SRCARCH := x86
+endif
+
_hack = mv $1 $1.orig && \
gawk -v version=$(version) -f hack-module.awk $1.orig \
| sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
@@ -30,14 +41,15 @@ all::
sync:
rm -rf tmp
rsync --exclude='*.mod.c' -R \
- "$(LINUX)"/arch/x86/kvm/./*.[ch] \
+ "$(LINUX)"/arch/$(SRCARCH)/kvm/./*.[cSh] \
"$(LINUX)"/virt/kvm/./*.[ch] \
"$(LINUX)"/./include/linux/kvm*.h \
- "$(LINUX)"/./include/asm-x86/kvm*.h \
+ "$(LINUX)"/./include/asm-$(SRCARCH)/kvm*.h \
tmp/
rm -rf include/asm
- ln -s asm-x86 include/asm
+ ln -s asm-$(SRCARCH) include/asm
+ifeq ($(SRCARCH),x86)
$(call unifdef, include/linux/kvm.h)
$(call unifdef, include/linux/kvm_para.h)
$(call unifdef, include/asm-x86/kvm.h)
@@ -48,6 +60,7 @@ sync:
$(call hack, svm.c)
$(call hack, x86.c)
$(call hack, irq.h)
+endif
for i in $$(find tmp -type f -printf '%P '); \
do cmp -s $$i tmp/$$i || cp tmp/$$i $$i; done
rm -rf tmp
--
1.5.2
[-- Attachment #2: 0001-Make-non-x86-arch-partially-support-make-sync.patch --]
[-- Type: application/octet-stream, Size: 1885 bytes --]
From a0ffa11e3ff3e12e61f1eb9f6e426df57efc417c Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Fri, 1 Feb 2008 17:18:03 +0800
Subject: [PATCH] Make non-x86 arch partially support make sync.
Make non-x86 arch partially support make sync, and other arch
can get right header files.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
kernel/Makefile | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/kernel/Makefile b/kernel/Makefile
index 7a435b5..2f0d7d5 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -13,6 +13,17 @@ LINUX = ../linux-2.6
version = $(shell cd $(LINUX); git describe)
+ARCH := $(shell uname -m | sed -e s/i.86/i386/)
+SRCARCH := $(ARCH)
+
+# Additional ARCH settings for x86
+ifeq ($(ARCH),i386)
+ SRCARCH := x86
+endif
+ifeq ($(ARCH),x86_64)
+ SRCARCH := x86
+endif
+
_hack = mv $1 $1.orig && \
gawk -v version=$(version) -f hack-module.awk $1.orig \
| sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
@@ -30,14 +41,15 @@ all::
sync:
rm -rf tmp
rsync --exclude='*.mod.c' -R \
- "$(LINUX)"/arch/x86/kvm/./*.[ch] \
+ "$(LINUX)"/arch/$(SRCARCH)/kvm/./*.[cSh] \
"$(LINUX)"/virt/kvm/./*.[ch] \
"$(LINUX)"/./include/linux/kvm*.h \
- "$(LINUX)"/./include/asm-x86/kvm*.h \
+ "$(LINUX)"/./include/asm-$(SRCARCH)/kvm*.h \
tmp/
rm -rf include/asm
- ln -s asm-x86 include/asm
+ ln -s asm-$(SRCARCH) include/asm
+ifeq ($(SRCARCH),x86)
$(call unifdef, include/linux/kvm.h)
$(call unifdef, include/linux/kvm_para.h)
$(call unifdef, include/asm-x86/kvm.h)
@@ -48,6 +60,7 @@ sync:
$(call hack, svm.c)
$(call hack, x86.c)
$(call hack, irq.h)
+endif
for i in $$(find tmp -type f -printf '%P '); \
do cmp -s $$i tmp/$$i || cp tmp/$$i $$i; done
rm -rf tmp
--
1.5.2
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Make non-x86 arch partially support make sync.
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCD3233C-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2008-02-04 22:17 ` Hollis Blanchard
2008-02-12 14:06 ` [PATCH] Make non-x86 arch partially support makesync Zhang, Xiantao
0 siblings, 1 reply; 4+ messages in thread
From: Hollis Blanchard @ 2008-02-04 22:17 UTC (permalink / raw)
To: Zhang, Xiantao
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ia64-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
On Fri, 2008-02-01 at 17:34 +0800, Zhang, Xiantao wrote:
> From: Xiantao Zhang <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Date: Fri, 1 Feb 2008 17:18:03 +0800
> Subject: [PATCH] Make non-x86 arch partially support make sync.
>
> Make non-x86 arch partially support make sync, and other archs
> can get right header files for userspace.
> Signed-off-by: Xiantao Zhang <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> kernel/Makefile | 19 ++++++++++++++++---
> 1 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/Makefile b/kernel/Makefile
> index 7a435b5..2f0d7d5 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -13,6 +13,17 @@ LINUX = ../linux-2.6
>
> version = $(shell cd $(LINUX); git describe)
>
> +ARCH := $(shell uname -m | sed -e s/i.86/i386/)
> +SRCARCH := $(ARCH)
> +
> +# Additional ARCH settings for x86
> +ifeq ($(ARCH),i386)
> + SRCARCH := x86
> +endif
> +ifeq ($(ARCH),x86_64)
> + SRCARCH := x86
> +endif
> +
> _hack = mv $1 $1.orig && \
> gawk -v version=$(version) -f hack-module.awk $1.orig \
> | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
ARCH is already set in ../config.mak.
"case" would be a better shell construct than "ifeq" for this
translation.
> @@ -30,14 +41,15 @@ all::
> sync:
> rm -rf tmp
> rsync --exclude='*.mod.c' -R \
> - "$(LINUX)"/arch/x86/kvm/./*.[ch] \
> + "$(LINUX)"/arch/$(SRCARCH)/kvm/./*.[cSh] \
> "$(LINUX)"/virt/kvm/./*.[ch] \
> "$(LINUX)"/./include/linux/kvm*.h \
> - "$(LINUX)"/./include/asm-x86/kvm*.h \
> + "$(LINUX)"/./include/asm-$(SRCARCH)/kvm*.h \
> tmp/
> rm -rf include/asm
> - ln -s asm-x86 include/asm
> + ln -s asm-$(SRCARCH) include/asm
>
> +ifeq ($(SRCARCH),x86)
Rather than adding an ifdef for every architecture here, can we define a
HEADERS variable and do something like
for hdr in $HEADERS ; do
$(call hack, $hdr)
done
HEADERS could be defined in the case statements you're going to add. ;)
> $(call unifdef, include/linux/kvm.h)
> $(call unifdef, include/linux/kvm_para.h)
Why are these headers not common?
> $(call unifdef, include/asm-x86/kvm.h)
> @@ -48,6 +60,7 @@ sync:
> $(call hack, svm.c)
> $(call hack, x86.c)
> $(call hack, irq.h)
> +endif
> for i in $$(find tmp -type f -printf '%P '); \
> do cmp -s $$i tmp/$$i || cp tmp/$$i $$i; done
> rm -rf tmp
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Make non-x86 arch partially support makesync.
2008-02-04 22:17 ` Hollis Blanchard
@ 2008-02-12 14:06 ` Zhang, Xiantao
2008-02-12 16:24 ` Hollis Blanchard
0 siblings, 1 reply; 4+ messages in thread
From: Zhang, Xiantao @ 2008-02-12 14:06 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: kvm-devel, kvm-ia64-devel, Avi Kivity
Hollis Blanchard wrote:
> On Fri, 2008-02-01 at 17:34 +0800, Zhang, Xiantao wrote:
>> From: Xiantao Zhang <xiantao.zhang@intel.com>
>> Date: Fri, 1 Feb 2008 17:18:03 +0800
>> Subject: [PATCH] Make non-x86 arch partially support make sync.
>>
>> Make non-x86 arch partially support make sync, and other archs
>> can get right header files for userspace.
>> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> ---
>> kernel/Makefile | 19 ++++++++++++++++---
>> 1 files changed, 16 insertions(+), 3 deletions(-)
Hi, Hollis
This is a intial version to support more arch. Yes, as you
pointed, we also need more work to support it fully. Could you make a
patch for that ?
Thanks
Xiantao
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Make non-x86 arch partially support makesync.
2008-02-12 14:06 ` [PATCH] Make non-x86 arch partially support makesync Zhang, Xiantao
@ 2008-02-12 16:24 ` Hollis Blanchard
0 siblings, 0 replies; 4+ messages in thread
From: Hollis Blanchard @ 2008-02-12 16:24 UTC (permalink / raw)
To: Zhang, Xiantao; +Cc: kvm-devel, Avi Kivity, kvm-ia64-devel
On Tue, 2008-02-12 at 22:06 +0800, Zhang, Xiantao wrote:
> Hollis Blanchard wrote:
> > On Fri, 2008-02-01 at 17:34 +0800, Zhang, Xiantao wrote:
> >> From: Xiantao Zhang <xiantao.zhang@intel.com>
> >> Date: Fri, 1 Feb 2008 17:18:03 +0800
> >> Subject: [PATCH] Make non-x86 arch partially support make sync.
> >>
> >> Make non-x86 arch partially support make sync, and other archs
> >> can get right header files for userspace.
> >> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> ---
> >> kernel/Makefile | 19 ++++++++++++++++---
> >> 1 files changed, 16 insertions(+), 3 deletions(-)
>
> Hi, Hollis
> This is a intial version to support more arch. Yes, as you
> pointed, we also need more work to support it fully. Could you make a
> patch for that ?
It's not just that the original doesn't support all architectures; I
think the comments and suggestions I made need to be addressed before it
can be committed even for just ia64.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-12 16:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 9:34 [PATCH] Make non-x86 arch partially support make sync Zhang, Xiantao
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCD3233C-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-02-04 22:17 ` Hollis Blanchard
2008-02-12 14:06 ` [PATCH] Make non-x86 arch partially support makesync Zhang, Xiantao
2008-02-12 16:24 ` Hollis Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox