diff options
Diffstat (limited to 'arch/x86/kernel/cpu/amd_64.c')
-rw-r--r-- | arch/x86/kernel/cpu/amd_64.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/amd_64.c b/arch/x86/kernel/cpu/amd_64.c index 958526d6a74a..bd182b7616ee 100644 --- a/arch/x86/kernel/cpu/amd_64.c +++ b/arch/x86/kernel/cpu/amd_64.c | |||
@@ -199,10 +199,14 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
199 | * Don't do it for gbpages because there seems very little | 199 | * Don't do it for gbpages because there seems very little |
200 | * benefit in doing so. | 200 | * benefit in doing so. |
201 | */ | 201 | */ |
202 | if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg) && | 202 | if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg)) { |
203 | (tseg >> PMD_SHIFT) < | 203 | if ((tseg>>PMD_SHIFT) < |
204 | (max_pfn_mapped >> (PMD_SHIFT-PAGE_SHIFT))) | 204 | (max_low_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) || |
205 | ((tseg>>PMD_SHIFT) < | ||
206 | (max_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) && | ||
207 | (tseg>>PMD_SHIFT) >= (1ULL<<(32 - PMD_SHIFT)))) | ||
205 | set_memory_4k((unsigned long)__va(tseg), 1); | 208 | set_memory_4k((unsigned long)__va(tseg), 1); |
209 | } | ||
206 | } | 210 | } |
207 | } | 211 | } |
208 | 212 | ||