diff options
author | Bharat Bhushan <r65777@freescale.com> | 2013-10-08 00:02:19 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-01-09 04:14:56 -0500 |
commit | 1820a8d2163554dcd0272cc095338499db4a4dc3 (patch) | |
tree | 1b1f9fba1c83b61743093e0c8ef4efdf22d1dca9 /arch/powerpc/kernel | |
parent | 458ff3c099a1266991208f2c009afc2405e5b6bc (diff) |
kvm/powerpc: rename kvm_hypercall() to epapr_hypercall()
kvm_hypercall() have nothing KVM specific, so renamed to epapr_hypercall().
Also this in moved to arch/powerpc/include/asm/epapr_hcalls.h
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/kvm.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c index db28032e320e..6a0175297b0d 100644 --- a/arch/powerpc/kernel/kvm.c +++ b/arch/powerpc/kernel/kvm.c | |||
@@ -413,13 +413,13 @@ static void kvm_map_magic_page(void *data) | |||
413 | { | 413 | { |
414 | u32 *features = data; | 414 | u32 *features = data; |
415 | 415 | ||
416 | ulong in[8]; | 416 | ulong in[8] = {0}; |
417 | ulong out[8]; | 417 | ulong out[8]; |
418 | 418 | ||
419 | in[0] = KVM_MAGIC_PAGE; | 419 | in[0] = KVM_MAGIC_PAGE; |
420 | in[1] = KVM_MAGIC_PAGE; | 420 | in[1] = KVM_MAGIC_PAGE; |
421 | 421 | ||
422 | kvm_hypercall(in, out, KVM_HCALL_TOKEN(KVM_HC_PPC_MAP_MAGIC_PAGE)); | 422 | epapr_hypercall(in, out, KVM_HCALL_TOKEN(KVM_HC_PPC_MAP_MAGIC_PAGE)); |
423 | 423 | ||
424 | *features = out[0]; | 424 | *features = out[0]; |
425 | } | 425 | } |
@@ -711,43 +711,6 @@ static void kvm_use_magic_page(void) | |||
711 | kvm_patching_worked ? "worked" : "failed"); | 711 | kvm_patching_worked ? "worked" : "failed"); |
712 | } | 712 | } |
713 | 713 | ||
714 | unsigned long kvm_hypercall(unsigned long *in, | ||
715 | unsigned long *out, | ||
716 | unsigned long nr) | ||
717 | { | ||
718 | unsigned long register r0 asm("r0"); | ||
719 | unsigned long register r3 asm("r3") = in[0]; | ||
720 | unsigned long register r4 asm("r4") = in[1]; | ||
721 | unsigned long register r5 asm("r5") = in[2]; | ||
722 | unsigned long register r6 asm("r6") = in[3]; | ||
723 | unsigned long register r7 asm("r7") = in[4]; | ||
724 | unsigned long register r8 asm("r8") = in[5]; | ||
725 | unsigned long register r9 asm("r9") = in[6]; | ||
726 | unsigned long register r10 asm("r10") = in[7]; | ||
727 | unsigned long register r11 asm("r11") = nr; | ||
728 | unsigned long register r12 asm("r12"); | ||
729 | |||
730 | asm volatile("bl epapr_hypercall_start" | ||
731 | : "=r"(r0), "=r"(r3), "=r"(r4), "=r"(r5), "=r"(r6), | ||
732 | "=r"(r7), "=r"(r8), "=r"(r9), "=r"(r10), "=r"(r11), | ||
733 | "=r"(r12) | ||
734 | : "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7), "r"(r8), | ||
735 | "r"(r9), "r"(r10), "r"(r11) | ||
736 | : "memory", "cc", "xer", "ctr", "lr"); | ||
737 | |||
738 | out[0] = r4; | ||
739 | out[1] = r5; | ||
740 | out[2] = r6; | ||
741 | out[3] = r7; | ||
742 | out[4] = r8; | ||
743 | out[5] = r9; | ||
744 | out[6] = r10; | ||
745 | out[7] = r11; | ||
746 | |||
747 | return r3; | ||
748 | } | ||
749 | EXPORT_SYMBOL_GPL(kvm_hypercall); | ||
750 | |||
751 | static __init void kvm_free_tmp(void) | 714 | static __init void kvm_free_tmp(void) |
752 | { | 715 | { |
753 | free_reserved_area(&kvm_tmp[kvm_tmp_index], | 716 | free_reserved_area(&kvm_tmp[kvm_tmp_index], |