The 32-bit MSR interface rdmsr() is planned to be removed. Use the
related 64-bit variant instead.

Signed-off-by: Juergen Gross <[email protected]>
---
 arch/x86/hyperv/hv_apic.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c
index a8de503def37..95f1782d1e17 100644
--- a/arch/x86/hyperv/hv_apic.c
+++ b/arch/x86/hyperv/hv_apic.c
@@ -60,17 +60,15 @@ void hv_enable_coco_interrupt(unsigned int cpu, unsigned 
int vector, bool set)
 
 static u32 hv_apic_read(u32 reg)
 {
-       u32 reg_val, hi;
+       struct msr reg_val;
 
        switch (reg) {
        case APIC_EOI:
-               rdmsr(HV_X64_MSR_EOI, reg_val, hi);
-               (void)hi;
-               return reg_val;
+               rdmsrq(HV_X64_MSR_EOI, reg_val.q);
+               return reg_val.l;
        case APIC_TASKPRI:
-               rdmsr(HV_X64_MSR_TPR, reg_val, hi);
-               (void)hi;
-               return reg_val;
+               rdmsrq(HV_X64_MSR_TPR, reg_val.q);
+               return reg_val.l;
 
        default:
                return native_apic_mem_read(reg);
-- 
2.54.0


Reply via email to