On Thursday 24 January 2008 05:49:00 pm H. Peter Anvin wrote:please try this [PATCH] x86: trim RAM need to check if mtrr is there Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index a1551d0..a0b6f55 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -646,9 +646,6 @@ static __init int amd_special_default_mtrr(unsigned long end_pfn) { u32 l, h; - /* Doesn't apply to memory < 4GB */ - if (end_pfn <= (0xffffffff >> PAGE_SHIFT)) - return 0; if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) return 0; if (boot_cpu_data.x86 < 0xf || boot_cpu_data.x86 > 0x11) @@ -682,6 +679,12 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) mtrr_type type; u64 trim_start, trim_size; + /* Doesn't apply to memory < 4GB */ + if (end_pfn <= (0xffffffffUL >> PAGE_SHIFT)) + return 0; + + if (!cpu_has_mtrr) + return 0; /* * Make sure we only trim uncachable memory on machines that * support the Intel MTRR architecture: --
| Al Viro | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [2.6.22.2 review 05/84] Fix deadlocks in sparc serial console. |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Greg Kroah-Hartman | [PATCH 006/196] Chinese: add translation of oops-tracing.txt |
git: | |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Linus Torvalds | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Manuel Bouyer | Re: Interactive performance in -current |
| YAMAMOTO Takashi | Re: statvfs(2) replacement for statfs(2) patch |
| Nathan Langford | microkernels |
| Garrett D'Amore | Re: wsmux inject |
