public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use wbinvd() macro instead of raw inline assembly in .c files
@ 2007-07-19 22:55 Glauber de Oliveira Costa
  2007-07-20 11:43 ` Andi Kleen
  2007-07-20 21:19 ` [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd H. Peter Anvin
  0 siblings, 2 replies; 21+ messages in thread
From: Glauber de Oliveira Costa @ 2007-07-19 22:55 UTC (permalink / raw)
  To: ak, akpm, linux-kernel

This patch uses the already-existant wbinvd() macro to replace
raw assembly to perform this very same task in some .c files
    
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>

diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c
index f61fb8e..afbb951 100644
--- a/arch/x86_64/kernel/tce.c
+++ b/arch/x86_64/kernel/tce.c
@@ -42,7 +42,7 @@ static inline void flush_tce(void* tceaddr)
 	if (cpu_has_clflush)
 		asm volatile("clflush (%0)" :: "r" (tceaddr));
 	else
-		asm volatile("wbinvd":::"memory");
+		wbinvd();
 }
 
 void tce_build(struct iommu_table *tbl, unsigned long index,
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
index 9148f4a..0a75790 100644
--- a/arch/x86_64/mm/pageattr.c
+++ b/arch/x86_64/mm/pageattr.c
@@ -77,7 +77,7 @@ static void flush_kernel_map(void *arg)
 	   much cheaper than WBINVD. Disable clflush for now because
 	   the high level code is not ready yet */
 	if (1 || !cpu_has_clflush)
-		asm volatile("wbinvd" ::: "memory");
+		wbinvd();
 	else list_for_each_entry(pg, l, lru) {
 		void *adr = page_address(pg);
 		if (cpu_has_clflush)



^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2007-07-22 20:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19 22:55 [PATCH] Use wbinvd() macro instead of raw inline assembly in .c files Glauber de Oliveira Costa
2007-07-20 11:43 ` Andi Kleen
2007-07-20 17:22   ` H. Peter Anvin
2007-07-21  7:32     ` Muli Ben-Yehuda
2007-07-20 21:19 ` [PATCH] x86: Create clflush() inline, remove hardcoded wbinvd H. Peter Anvin
2007-07-20 21:27   ` Andi Kleen
2007-07-20 21:33     ` H. Peter Anvin
2007-07-22  9:18       ` Andi Kleen
2007-07-22 18:05         ` H. Peter Anvin
2007-07-22 19:55           ` Andi Kleen
2007-07-22 20:02             ` H. Peter Anvin
2007-07-20 23:37   ` Glauber de Oliveira Costa
2007-07-20 23:43     ` H. Peter Anvin
2007-07-21 18:11   ` Muli Ben-Yehuda
2007-07-21 19:52     ` H. Peter Anvin
2007-07-21 20:16       ` Muli Ben-Yehuda
2007-07-21 20:18         ` H. Peter Anvin
2007-07-21 20:44           ` Muli Ben-Yehuda
2007-07-21 22:09             ` H. Peter Anvin
2007-07-21 22:24               ` H. Peter Anvin
2007-07-22  4:20               ` Muli Ben-Yehuda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox