* [kvm-ppc-devel] [PATCH] [RESEND] Update kernel/Makefile and remove
@ 2008-04-30 21:11 ` Jerone Young
0 siblings, 0 replies; 4+ messages in thread
From: Jerone Young @ 2008-04-30 21:11 UTC (permalink / raw)
To: kvm-devel; +Cc: kvm-ppc-devel
1 file changed, 23 insertions(+), 13 deletions(-)
kernel/Makefile | 36 +++++++++++++++++++++++-------------
This patch removes static x86 entries and makes things work for multiple archs.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
diff --git a/kernel/Makefile b/kernel/Makefile
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -1,4 +1,7 @@ include ../config.mak
include ../config.mak
+
+ARCH_DIR=$(if $(filter $(ARCH),x86_64 i386),x86,$(ARCH))
+ARCH_CONFIG=$(shell echo $(ARCH_DIR)|tr '[:lower:]' '[:upper:]')
KVERREL = $(patsubst /lib/modules/%/build,%,$(KERNELDIR))
@@ -18,10 +21,19 @@ _hack = mv $1 $1.orig && \
| sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
unifdef = mv $1 $1.orig && \
- unifdef -DCONFIG_X86 $1.orig > $1; \
+ unifdef -DCONFIG_$(ARCH_CONFIG) $1.orig > $1; \
[ $$? -le 1 ] && rm $1.orig
hack = $(call _hack,$T/$(strip $1))
+
+hack-files-x86 = kvm_main.c \
+ mmu.c \
+ vmx.c \
+ svm.c \
+ x86.c \
+ irq.h
+
+hack-files = $(hack-files-$(ARCH_DIR))
all::
# include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat
@@ -49,21 +61,19 @@ header-sync:
rm -rf $T
rm -f include/asm
- ln -sf asm-x86 include/asm
- ln -sf asm-x86 include-compat/asm
+ ln -sf asm-$(ARCH_DIR) include/asm
+ ln -sf asm-$(ARCH_DIR) include-compat/asm
source-sync:
rm -rf $T
rsync --exclude='*.mod.c' -R \
- "$(LINUX)"/arch/x86/kvm/./*.[ch] \
- "$(LINUX)"/virt/kvm/./*.[ch] \
- $T/
- $(call hack, kvm_main.c)
- $(call hack, mmu.c)
- $(call hack, vmx.c)
- $(call hack, svm.c)
- $(call hack, x86.c)
- $(call hack, irq.h)
+ "$(LINUX)"/arch/$(ARCH_DIR)/kvm/./*.[ch] \
+ "$(LINUX)"/virt/kvm/./*.[ch] \
+ $T/
+
+ for i in $(hack-files); \
+ do $(call hack, $$i); done
+
for i in $$(find $T -type f -printf '%P '); \
do cmp -s $$i $T/$$i || cp $T/$$i $$i; done
rm -rf $T
@@ -72,7 +82,7 @@ install:
mkdir -p $(DESTDIR)/$(INSTALLDIR)
cp *.ko $(DESTDIR)/$(INSTALLDIR)
for i in $(ORIGMODDIR)/drivers/kvm/*.ko \
- $(ORIGMODDIR)/arch/x86/kvm/*.ko; do \
+ $(ORIGMODDIR)/arch/$(ARCH_DIR)/kvm/*.ko; do \
if [ -f "$$i" ]; then mv "$$i" "$$i.orig"; fi; \
done
/sbin/depmod -a
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] [RESEND] Update kernel/Makefile and remove x86 only entries
@ 2008-04-30 21:11 ` Jerone Young
0 siblings, 0 replies; 4+ messages in thread
From: Jerone Young @ 2008-04-30 21:11 UTC (permalink / raw)
To: kvm-devel; +Cc: kvm-ppc-devel
1 file changed, 23 insertions(+), 13 deletions(-)
kernel/Makefile | 36 +++++++++++++++++++++++-------------
This patch removes static x86 entries and makes things work for multiple archs.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
diff --git a/kernel/Makefile b/kernel/Makefile
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -1,4 +1,7 @@ include ../config.mak
include ../config.mak
+
+ARCH_DIR=$(if $(filter $(ARCH),x86_64 i386),x86,$(ARCH))
+ARCH_CONFIG=$(shell echo $(ARCH_DIR)|tr '[:lower:]' '[:upper:]')
KVERREL = $(patsubst /lib/modules/%/build,%,$(KERNELDIR))
@@ -18,10 +21,19 @@ _hack = mv $1 $1.orig && \
| sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
unifdef = mv $1 $1.orig && \
- unifdef -DCONFIG_X86 $1.orig > $1; \
+ unifdef -DCONFIG_$(ARCH_CONFIG) $1.orig > $1; \
[ $$? -le 1 ] && rm $1.orig
hack = $(call _hack,$T/$(strip $1))
+
+hack-files-x86 = kvm_main.c \
+ mmu.c \
+ vmx.c \
+ svm.c \
+ x86.c \
+ irq.h
+
+hack-files = $(hack-files-$(ARCH_DIR))
all::
# include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat
@@ -49,21 +61,19 @@ header-sync:
rm -rf $T
rm -f include/asm
- ln -sf asm-x86 include/asm
- ln -sf asm-x86 include-compat/asm
+ ln -sf asm-$(ARCH_DIR) include/asm
+ ln -sf asm-$(ARCH_DIR) include-compat/asm
source-sync:
rm -rf $T
rsync --exclude='*.mod.c' -R \
- "$(LINUX)"/arch/x86/kvm/./*.[ch] \
- "$(LINUX)"/virt/kvm/./*.[ch] \
- $T/
- $(call hack, kvm_main.c)
- $(call hack, mmu.c)
- $(call hack, vmx.c)
- $(call hack, svm.c)
- $(call hack, x86.c)
- $(call hack, irq.h)
+ "$(LINUX)"/arch/$(ARCH_DIR)/kvm/./*.[ch] \
+ "$(LINUX)"/virt/kvm/./*.[ch] \
+ $T/
+
+ for i in $(hack-files); \
+ do $(call hack, $$i); done
+
for i in $$(find $T -type f -printf '%P '); \
do cmp -s $$i $T/$$i || cp $T/$$i $$i; done
rm -rf $T
@@ -72,7 +82,7 @@ install:
mkdir -p $(DESTDIR)/$(INSTALLDIR)
cp *.ko $(DESTDIR)/$(INSTALLDIR)
for i in $(ORIGMODDIR)/drivers/kvm/*.ko \
- $(ORIGMODDIR)/arch/x86/kvm/*.ko; do \
+ $(ORIGMODDIR)/arch/$(ARCH_DIR)/kvm/*.ko; do \
if [ -f "$$i" ]; then mv "$$i" "$$i.orig"; fi; \
done
/sbin/depmod -a
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH] [RESEND] Update
2008-04-30 21:11 ` [PATCH] [RESEND] Update kernel/Makefile and remove x86 only entries Jerone Young
@ 2008-05-02 9:38 ` Avi Kivity
-1 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2008-05-02 9:38 UTC (permalink / raw)
To: Jerone Young; +Cc: kvm-devel, kvm-ppc-devel
Jerone Young wrote:
> This patch removes static x86 entries and makes things work for multiple archs.
>
>
Applied, thanks,
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [RESEND] Update kernel/Makefile and remove x86 only entries
@ 2008-05-02 9:38 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2008-05-02 9:38 UTC (permalink / raw)
To: Jerone Young; +Cc: kvm-devel, kvm-ppc-devel
Jerone Young wrote:
> This patch removes static x86 entries and makes things work for multiple archs.
>
>
Applied, thanks,
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-02 9:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 21:11 [kvm-ppc-devel] [PATCH] [RESEND] Update kernel/Makefile and remove Jerone Young
2008-04-30 21:11 ` [PATCH] [RESEND] Update kernel/Makefile and remove x86 only entries Jerone Young
2008-05-02 9:38 ` [kvm-ppc-devel] [kvm-devel] [PATCH] [RESEND] Update Avi Kivity
2008-05-02 9:38 ` [PATCH] [RESEND] Update kernel/Makefile and remove x86 only entries Avi Kivity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.