aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-06-20 06:23:36 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-20 17:27:26 -0400
commit018d2ad0cccfa9bb8bee1d160c353e568484a137 (patch)
treeb50362cead47a3b472a6b645a9e7dd0262a757f9 /arch/x86_64/mm
parent55181000cd60334fe920c65ffbcdfe0e3f1de406 (diff)
x86: change_page_attr bandaids
- Disable CLFLUSH again; it is still broken. Always do WBINVD. - Always flush in the i386 case, not only when there are deferred pages. These are both brute-force inefficient fixes, to be improved next release cycle. The changes to i386 are a little more extensive than strictly needed (some dead code added), but it is more similar to the x86-64 version now and the dead code will be used soon. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r--arch/x86_64/mm/pageattr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
index d653d0bf3df6..9148f4a4cec6 100644
--- a/arch/x86_64/mm/pageattr.c
+++ b/arch/x86_64/mm/pageattr.c
@@ -74,10 +74,11 @@ static void flush_kernel_map(void *arg)
74 struct page *pg; 74 struct page *pg;
75 75
76 /* When clflush is available always use it because it is 76 /* When clflush is available always use it because it is
77 much cheaper than WBINVD */ 77 much cheaper than WBINVD. Disable clflush for now because
78 if (!cpu_has_clflush) 78 the high level code is not ready yet */
79 if (1 || !cpu_has_clflush)
79 asm volatile("wbinvd" ::: "memory"); 80 asm volatile("wbinvd" ::: "memory");
80 list_for_each_entry(pg, l, lru) { 81 else list_for_each_entry(pg, l, lru) {
81 void *adr = page_address(pg); 82 void *adr = page_address(pg);
82 if (cpu_has_clflush) 83 if (cpu_has_clflush)
83 cache_flush_page(adr); 84 cache_flush_page(adr);