[PATCH 9/10] powerpc: Use flush_icache_range() in create_instruction()
Michael Ellerman
michael at ellerman.id.au
Fri Jan 13 17:47:02 EST 2006
Now that ppc64_caches is setup with default values, we can call
flush_icache_range() from create_instruction() rather than using our own
asm version.
Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---
include/asm-powerpc/util.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: linux/include/asm-powerpc/util.h
===================================================================
--- linux.orig/include/asm-powerpc/util.h
+++ linux/include/asm-powerpc/util.h
@@ -5,12 +5,14 @@
#ifndef _ASM_POWERPC_UTIL_H
#define _ASM_POWERPC_UTIL_H
+#include <asm/cacheflush.h>
+
static inline void create_instruction(unsigned long addr, unsigned int instr)
{
unsigned int *p;
p = (unsigned int *)addr;
*p = instr;
- asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (p));
+ flush_icache_range(addr, addr + 4);
}
/* Flags for create_branch:
More information about the Linuxppc64-dev
mailing list