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>
This commit is contained in:

committed by
Thomas Gleixner

parent
9689ba8ad0
commit
6619a8fb59
@@ -40,9 +40,9 @@ static inline void flush_tce(void* tceaddr)
|
||||
{
|
||||
/* a single tce can't cross a cache line */
|
||||
if (cpu_has_clflush)
|
||||
asm volatile("clflush (%0)" :: "r" (tceaddr));
|
||||
clflush(tceaddr);
|
||||
else
|
||||
asm volatile("wbinvd":::"memory");
|
||||
wbinvd();
|
||||
}
|
||||
|
||||
void tce_build(struct iommu_table *tbl, unsigned long index,
|
||||
|
Reference in New Issue
Block a user