[patch 17/26] Add text_poke and sync_core to powerpc

Mathieu Desnoyers
2008-01-24T20:40:44Z

[-- Attachment #1: add-text-poke-to-powerpc.patch --]
[-- Type: text/plain, Size: 1355 bytes --]

- Needed on architectures where we must surround live instruction modification
with "WP flag disable".
- Turns into a memcpy on powerpc since there is no WP flag activated for
instruction pages (yet..).
- Add empty sync_core to powerpc so it can be used in architecture independent
code.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Christoph Hellwig <hch@infradead.org>
CC: Paul Mackerras <paulus@samba.org>
---
include/asm-powerpc/cacheflush.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6-lttng/include/asm-powerpc/cacheflush.h
===================================================================
--- linux-2.6-lttng.orig/include/asm-powerpc/cacheflush.h 2007-11-19 12:05:50.000000000 -0500
+++ linux-2.6-lttng/include/asm-powerpc/cacheflush.h 2007-11-19 13:27:36.000000000 -0500
@@ -63,7 +63,9 @@ extern void flush_dcache_phys_range(unsi
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
memcpy(dst, src, len)

-
+#define text_poke memcpy
+#define text_poke_early text_poke
+#define sync_core()

#ifdef CONFIG_DEBUG_PAGEALLOC
/* internal debugging function */