[PATCH kvm-unit-tests v1 1/4] s390x: user ctl_set/clear_bit for low address protection

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

 



User the provided helper functions now.

Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
---
 lib/s390x/asm/interrupt.h | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/lib/s390x/asm/interrupt.h b/lib/s390x/asm/interrupt.h
index b3abd63..013709f 100644
--- a/lib/s390x/asm/interrupt.h
+++ b/lib/s390x/asm/interrupt.h
@@ -23,21 +23,13 @@ void check_pgm_int_code(uint16_t code);
 /* Activate low-address protection */
 static inline void low_prot_enable(void)
 {
-	uint64_t cr0;
-
-	asm volatile (" stctg %%c0,%%c0,%0 " : : "Q"(cr0) : "memory");
-	cr0 |= 1ULL << (63-35);
-	asm volatile (" lctlg %%c0,%%c0,%0 " : : "Q"(cr0));
+	ctl_set_bit(0, 63 - 35);
 }
 
 /* Disable low-address protection */
 static inline void low_prot_disable(void)
 {
-	uint64_t cr0;
-
-	asm volatile (" stctg %%c0,%%c0,%0 " : : "Q"(cr0) : "memory");
-	cr0 &= ~(1ULL << (63-35));
-	asm volatile (" lctlg %%c0,%%c0,%0 " : : "Q"(cr0));
+	ctl_clear_bit(0, 63 - 35);
 }
 
 #endif
-- 
2.17.1




[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