]> xenbits.xensource.com Git - xen.git/commitdiff
x86: replace redundant MTRR MSR definitions
authorJan Beulich <jbeulich@suse.com>
Mon, 10 Oct 2016 10:16:06 +0000 (12:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 10 Oct 2016 10:16:06 +0000 (12:16 +0200)
We really should have only one set of #define-s for them.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/e820.c

index ef077a5617d4038c59855e97cf072a5f1c8ad4ba..f4c07e02b4a141f6dd05ea0b2c7dc38400cafa15 100644 (file)
@@ -419,8 +419,6 @@ static void __init clip_to_limit(uint64_t limit, char *warnmsg)
 }
 
 /* Conservative estimate of top-of-RAM by looking for MTRR WB regions. */
-#define MSR_MTRRphysBase(reg) (0x200 + 2 * (reg))
-#define MSR_MTRRphysMask(reg) (0x200 + 2 * (reg) + 1)
 static uint64_t __init mtrr_top_of_ram(void)
 {
     uint32_t eax, ebx, ecx, edx;
@@ -477,8 +475,8 @@ static uint64_t __init mtrr_top_of_ram(void)
     top = 0;
     for ( i = 0; i < (uint8_t)mtrr_cap; i++ )
     {
-        rdmsrl(MSR_MTRRphysBase(i), base);
-        rdmsrl(MSR_MTRRphysMask(i), mask);
+        rdmsrl(MSR_IA32_MTRR_PHYSBASE(i), base);
+        rdmsrl(MSR_IA32_MTRR_PHYSMASK(i), mask);
 
         if ( e820_verbose )
             printk(" MTRR[%d]: base %"PRIx64" mask %"PRIx64"\n",