aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-07-10 23:38:26 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-11 04:24:04 -0400
commitf361a450bf1ad14e2b003217dbf3958638631265 (patch)
tree10c1e4dcc0047f6c37387cada6a0bceba088d2d2 /arch/x86/kernel/cpu/amd_64.c
parentf302a5bbe5eb95f3d4227d5bd0e9b92b1b125f4f (diff)
x86: introduce max_low_pfn_mapped for 64-bit
when more than 4g memory is installed, don't map the big hole below 4g. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/amd_64.c')
-rw-r--r--arch/x86/kernel/cpu/amd_64.c10
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 958526d6a74..bd182b7616e 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