[PATCH 4/5] powerpc: Use flush_icache_range() in create_instruction()
Michael Ellerman
michael at ellerman.id.au
Thu Mar 30 17:13:01 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: to-merge/include/asm-powerpc/util.h
===================================================================
--- to-merge.orig/include/asm-powerpc/util.h
+++ to-merge/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 Linuxppc-dev
mailing list