[kvm-unit-tests PATCH v8 06/12] io: Separate overrides of virt_to_phys() and phys_to_virt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Generic implementations of virt_to_phys() and phys_to_virt()
are currently covered by a single "virt_to_phys" macro.
Introduce additional macro "phys_to_virt" to allow separate
overrides.

Cc: Andrew Jones <drjones@xxxxxxxxxx>
Cc: Thomas Huth <thuth@xxxxxxxxxx>
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx>
Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>
Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
---
 lib/asm-generic/io.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h
index 931415a465b7..3585ac09fb11 100644
--- a/lib/asm-generic/io.h
+++ b/lib/asm-generic/io.h
@@ -165,7 +165,9 @@ static inline unsigned long virt_to_phys(volatile void *address)
 {
 	return __pa((unsigned long)address);
 }
+#endif
 
+#ifndef phys_to_virt
 static inline void *phys_to_virt(unsigned long address)
 {
 	return __va(address);
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux