diff options
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/speedstep-lib.c | 17 | ||||
-rw-r--r-- | include/asm-x86_64/msr.h | 1 |
2 files changed, 8 insertions, 10 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c index a709f6d67e25..d59277c00911 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -123,23 +123,22 @@ static unsigned int pentiumM_get_frequency(void) | |||
123 | return (msr_tmp * 100 * 1000); | 123 | return (msr_tmp * 100 * 1000); |
124 | } | 124 | } |
125 | 125 | ||
126 | #ifdef CONFIG_X86_32 | ||
127 | static unsigned int pentium_core_get_frequency(void) | 126 | static unsigned int pentium_core_get_frequency(void) |
128 | { | 127 | { |
129 | u32 fsb = 0; | 128 | u32 fsb = 0; |
130 | u32 msr_lo, msr_tmp; | 129 | u32 msr_lo, msr_tmp; |
131 | 130 | ||
132 | rdmsr(MSR_FSB_FREQ, msr_lo, msr_tmp); | 131 | rdmsr(MSR_FSB_FREQ, msr_lo, msr_tmp); |
133 | /* see table B-2 of 24547212.pdf */ | 132 | /* see table B-2 of 25366920.pdf */ |
134 | switch (msr_lo & 0x07) { | 133 | switch (msr_lo & 0x07) { |
135 | case 5: | 134 | case 5: |
136 | fsb = 400; | 135 | fsb = 100000; |
137 | break; | 136 | break; |
138 | case 1: | 137 | case 1: |
139 | fsb = 533; | 138 | fsb = 133333; |
140 | break; | 139 | break; |
141 | case 3: | 140 | case 3: |
142 | fsb = 667; | 141 | fsb = 166667; |
143 | break; | 142 | break; |
144 | default: | 143 | default: |
145 | printk(KERN_ERR "PCORE - MSR_FSB_FREQ undefined value"); | 144 | printk(KERN_ERR "PCORE - MSR_FSB_FREQ undefined value"); |
@@ -149,11 +148,11 @@ static unsigned int pentium_core_get_frequency(void) | |||
149 | dprintk("PCORE - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); | 148 | dprintk("PCORE - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); |
150 | 149 | ||
151 | msr_tmp = (msr_lo >> 22) & 0x1f; | 150 | msr_tmp = (msr_lo >> 22) & 0x1f; |
152 | dprintk("bits 22-26 are 0x%x, speed is %u\n", msr_tmp, (msr_tmp * fsb * 1000)); | 151 | dprintk("bits 22-26 are 0x%x, speed is %u\n", msr_tmp, (msr_tmp * fsb)); |
153 | 152 | ||
154 | return (msr_tmp * fsb * 1000); | 153 | return (msr_tmp * fsb); |
155 | } | 154 | } |
156 | #endif | 155 | |
157 | 156 | ||
158 | static unsigned int pentium4_get_frequency(void) | 157 | static unsigned int pentium4_get_frequency(void) |
159 | { | 158 | { |
@@ -205,10 +204,8 @@ static unsigned int pentium4_get_frequency(void) | |||
205 | unsigned int speedstep_get_processor_frequency(unsigned int processor) | 204 | unsigned int speedstep_get_processor_frequency(unsigned int processor) |
206 | { | 205 | { |
207 | switch (processor) { | 206 | switch (processor) { |
208 | #ifdef CONFIG_X86_32 | ||
209 | case SPEEDSTEP_PROCESSOR_PCORE: | 207 | case SPEEDSTEP_PROCESSOR_PCORE: |
210 | return pentium_core_get_frequency(); | 208 | return pentium_core_get_frequency(); |
211 | #endif | ||
212 | case SPEEDSTEP_PROCESSOR_PM: | 209 | case SPEEDSTEP_PROCESSOR_PM: |
213 | return pentiumM_get_frequency(); | 210 | return pentiumM_get_frequency(); |
214 | case SPEEDSTEP_PROCESSOR_P4D: | 211 | case SPEEDSTEP_PROCESSOR_P4D: |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index e61582288737..207fed998a0b 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
@@ -189,6 +189,7 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
189 | 189 | ||
190 | #define MSR_IA32_PERFCTR0 0xc1 | 190 | #define MSR_IA32_PERFCTR0 0xc1 |
191 | #define MSR_IA32_PERFCTR1 0xc2 | 191 | #define MSR_IA32_PERFCTR1 0xc2 |
192 | #define MSR_FSB_FREQ 0xcd | ||
192 | 193 | ||
193 | #define MSR_MTRRcap 0x0fe | 194 | #define MSR_MTRRcap 0x0fe |
194 | #define MSR_IA32_BBL_CR_CTL 0x119 | 195 | #define MSR_IA32_BBL_CR_CTL 0x119 |