浏览代码

arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h

In order to be able to move code outside of kvm/hyp, we need to make
the global hyp.h file accessible from a standard location.

include/asm/kvm_hyp.h seems good enough.

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Marc Zyngier 9 年之前
父节点
当前提交
13720a56ed

+ 0 - 0
arch/arm64/kvm/hyp/hyp.h → arch/arm64/include/asm/kvm_hyp.h


+ 1 - 3
arch/arm64/kvm/hyp/debug-sr.c

@@ -19,9 +19,7 @@
 #include <linux/kvm_host.h>
 #include <linux/kvm_host.h>
 
 
 #include <asm/kvm_asm.h>
 #include <asm/kvm_asm.h>
-#include <asm/kvm_mmu.h>
-
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 #define read_debug(r,n)		read_sysreg(r##n##_el1)
 #define read_debug(r,n)		read_sysreg(r##n##_el1)
 #define write_debug(v,r,n)	write_sysreg(v, r##n##_el1)
 #define write_debug(v,r,n)	write_sysreg(v, r##n##_el1)

+ 1 - 2
arch/arm64/kvm/hyp/s2-setup.c

@@ -18,8 +18,7 @@
 #include <linux/types.h>
 #include <linux/types.h>
 #include <asm/kvm_arm.h>
 #include <asm/kvm_arm.h>
 #include <asm/kvm_asm.h>
 #include <asm/kvm_asm.h>
-
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 void __hyp_text __init_stage2_translation(void)
 void __hyp_text __init_stage2_translation(void)
 {
 {

+ 1 - 2
arch/arm64/kvm/hyp/switch.c

@@ -17,8 +17,7 @@
 
 
 #include <linux/types.h>
 #include <linux/types.h>
 #include <asm/kvm_asm.h>
 #include <asm/kvm_asm.h>
-
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 static bool __hyp_text __fpsimd_enabled_nvhe(void)
 static bool __hyp_text __fpsimd_enabled_nvhe(void)
 {
 {

+ 1 - 3
arch/arm64/kvm/hyp/sysreg-sr.c

@@ -19,9 +19,7 @@
 #include <linux/kvm_host.h>
 #include <linux/kvm_host.h>
 
 
 #include <asm/kvm_asm.h>
 #include <asm/kvm_asm.h>
-#include <asm/kvm_mmu.h>
-
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 /* Yes, this does nothing, on purpose */
 /* Yes, this does nothing, on purpose */
 static void __hyp_text __sysreg_do_nothing(struct kvm_cpu_context *ctxt) { }
 static void __hyp_text __sysreg_do_nothing(struct kvm_cpu_context *ctxt) { }

+ 1 - 3
arch/arm64/kvm/hyp/timer-sr.c

@@ -19,9 +19,7 @@
 #include <linux/compiler.h>
 #include <linux/compiler.h>
 #include <linux/kvm_host.h>
 #include <linux/kvm_host.h>
 
 
-#include <asm/kvm_mmu.h>
-
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 /* vcpu is already in the HYP VA space */
 /* vcpu is already in the HYP VA space */
 void __hyp_text __timer_save_state(struct kvm_vcpu *vcpu)
 void __hyp_text __timer_save_state(struct kvm_vcpu *vcpu)

+ 1 - 1
arch/arm64/kvm/hyp/tlb.c

@@ -15,7 +15,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
  */
 
 
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 static void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
 static void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
 {
 {

+ 1 - 3
arch/arm64/kvm/hyp/vgic-v2-sr.c

@@ -19,9 +19,7 @@
 #include <linux/irqchip/arm-gic.h>
 #include <linux/irqchip/arm-gic.h>
 #include <linux/kvm_host.h>
 #include <linux/kvm_host.h>
 
 
-#include <asm/kvm_mmu.h>
-
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 /* vcpu is already in the HYP VA space */
 /* vcpu is already in the HYP VA space */
 void __hyp_text __vgic_v2_save_state(struct kvm_vcpu *vcpu)
 void __hyp_text __vgic_v2_save_state(struct kvm_vcpu *vcpu)

+ 1 - 3
arch/arm64/kvm/hyp/vgic-v3-sr.c

@@ -19,9 +19,7 @@
 #include <linux/irqchip/arm-gic-v3.h>
 #include <linux/irqchip/arm-gic-v3.h>
 #include <linux/kvm_host.h>
 #include <linux/kvm_host.h>
 
 
-#include <asm/kvm_mmu.h>
-
-#include "hyp.h"
+#include <asm/kvm_hyp.h>
 
 
 #define vtr_to_max_lr_idx(v)		((v) & 0xf)
 #define vtr_to_max_lr_idx(v)		((v) & 0xf)
 #define vtr_to_nr_pri_bits(v)		(((u32)(v) >> 29) + 1)
 #define vtr_to_nr_pri_bits(v)		(((u32)(v) >> 29) + 1)