From: Jan Beulich Date: Mon, 10 Oct 2016 10:16:06 +0000 (+0200) Subject: x86: replace redundant MTRR MSR definitions X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~195 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=62c12fa3b15caf54cb8436458a86a1acf42170fd;p=xen.git x86: replace redundant MTRR MSR definitions We really should have only one set of #define-s for them. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c index ef077a5617..f4c07e02b4 100644 --- a/xen/arch/x86/e820.c +++ b/xen/arch/x86/e820.c @@ -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",