Skip to content

Commit

Permalink
KVM: PPC: Use KVM_BOOK3S_HANDLER
Browse files Browse the repository at this point in the history
So far we had a lot of conditional code on CONFIG_KVM_BOOK3S_64_HANDLER.
As we're moving towards common code between 32 and 64 bits, most of
these ifdefs can be moved to a more generic term define, called
CONFIG_KVM_BOOK3S_HANDLER.

This patch adds the new generic config option and moves ifdefs over.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Alexander Graf authored and Avi Kivity committed May 17, 2010
1 parent c7f38f4 commit c14dea0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/include/asm/kvm_book3s_asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#ifdef __ASSEMBLY__

#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
#ifdef CONFIG_KVM_BOOK3S_HANDLER

#include <asm/kvm_asm.h>

Expand Down Expand Up @@ -55,7 +55,7 @@ kvmppc_resume_\intno:
.macro DO_KVM intno
.endm

#endif /* CONFIG_KVM_BOOK3S_64_HANDLER */
#endif /* CONFIG_KVM_BOOK3S_HANDLER */

#else /*__ASSEMBLY__ */

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/paca.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct paca_struct {
u64 startpurr; /* PURR/TB value snapshot */
u64 startspurr; /* SPURR value snapshot */

#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
#ifdef CONFIG_KVM_BOOK3S_HANDLER
struct {
u64 esid;
u64 vsid;
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kvm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ config KVM
select ANON_INODES
select KVM_MMIO

config KVM_BOOK3S_HANDLER
bool

config KVM_BOOK3S_64_HANDLER
bool
select KVM_BOOK3S_HANDLER

config KVM_BOOK3S_64
tristate "KVM support for PowerPC book3s_64 processors"
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CFLAGS_emulate.o := -I.

common-objs-y += powerpc.o emulate.o
obj-$(CONFIG_KVM_EXIT_TIMING) += timing.o
obj-$(CONFIG_KVM_BOOK3S_64_HANDLER) += book3s_exports.o
obj-$(CONFIG_KVM_BOOK3S_HANDLER) += book3s_exports.o

AFLAGS_booke_interrupts.o := -I$(obj)

Expand Down

0 comments on commit c14dea0

Please sign in to comment.