]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Use a common definition of MSR_IA32_PERF_CTL
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:56:35 +0000 (08:56 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:46 +0000 (13:57 +0800)
Remove the duplicate definition as it is not needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/broadwell/cpu.c
arch/x86/cpu/broadwell/cpu_full.c
arch/x86/cpu/intel_common/cpu.c
arch/x86/include/asm/cpu_common.h

index 297f1e0b682dc30080a2acc6df62d335cacae5d5..61003a6d68f1e5376d65cb745076958f2739b174 100644 (file)
@@ -57,7 +57,7 @@ void set_max_freq(void)
        }
 
        perf_ctl.hi = 0;
-       msr_write(IA32_PERF_CTL, perf_ctl);
+       msr_write(MSR_IA32_PERF_CTL, perf_ctl);
 
        debug("CPU: frequency set to %d MHz\n",
              ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
index 9686cf5e0e7185252d15bfd07d3a286446a806b5..0e3d878139235fa7e1add5eeb27b42a64b2a86d5 100644 (file)
@@ -357,7 +357,7 @@ static void set_max_ratio(void)
                msr = msr_read(MSR_PLATFORM_INFO);
                perf_ctl.lo = msr.lo & 0xff00;
        }
-       msr_write(IA32_PERF_CTL, perf_ctl);
+       msr_write(MSR_IA32_PERF_CTL, perf_ctl);
 
        debug("cpu: frequency set to %d\n",
              ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
index 9357626b5a6ca4b7237b62e9d9b01632ae2ac41c..3a0d505a321a4b702fabe3345b5c1c5c6f8f7290 100644 (file)
@@ -116,7 +116,7 @@ int cpu_intel_get_info(struct cpu_info *info, int bclk)
 {
        msr_t msr;
 
-       msr = msr_read(IA32_PERF_CTL);
+       msr = msr_read(MSR_IA32_PERF_CTL);
        info->cpu_freq = ((msr.lo >> 8) & 0xff) * bclk * 1000000;
        info->features = 1 << CPU_FEAT_L1_CACHE | 1 << CPU_FEAT_MMU |
                1 << CPU_FEAT_UCODE | 1 << CPU_FEAT_DEVICE_ID;
index 5e398bec94cd04180a1fb8ecb86be7b9a6e5cb83..7ae3bd1c535388572836269f666f4f1c1923140c 100644 (file)
@@ -6,8 +6,6 @@
 #ifndef __ASM_CPU_COMMON_H
 #define __ASM_CPU_COMMON_H
 
-#define IA32_PERF_CTL                  0x199
-
 struct cpu_info;
 
 /**