diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-17 18:04:37 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@inhelltoy.tec.linutronix.de> | 2007-10-17 20:16:12 +0200 |
commit | 6619a8fb594486363783cc4a8372e4d4ee4b913e (patch) | |
tree | 83130702b16dae3ccae5be54acd18993474ff757 /arch/x86/mm/pageattr_32.c | |
parent | 9689ba8ad0dc27c0a2ce40eb4c0f8fb66551119c (diff) | |
download | linux-3.10-6619a8fb594486363783cc4a8372e4d4ee4b913e.tar.gz linux-3.10-6619a8fb594486363783cc4a8372e4d4ee4b913e.tar.bz2 linux-3.10-6619a8fb594486363783cc4a8372e4d4ee4b913e.zip |
x86: Create clflush() inline, remove hardcoded wbinvd
Create an inline function for clflush(), with the proper arguments,
and use it instead of hard-coding the instruction.
This also removes one instance of hard-coded wbinvd, based on a patch
by Bauder de Oliveira Costa.
[ tglx: arch/x86 adaptation ]
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/pageattr_32.c')
-rw-r--r-- | arch/x86/mm/pageattr_32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/pageattr_32.c b/arch/x86/mm/pageattr_32.c index 4241a74d16c..260073c0760 100644 --- a/arch/x86/mm/pageattr_32.c +++ b/arch/x86/mm/pageattr_32.c @@ -70,10 +70,10 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot, static void cache_flush_page(struct page *p) { - unsigned long adr = (unsigned long)page_address(p); + void *adr = page_address(p); int i; for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size) - asm volatile("clflush (%0)" :: "r" (adr + i)); + clflush(adr+i); } static void flush_kernel_map(void *arg) |