summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/slb.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-04-04 23:56:18 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-20 17:01:18 +1000
commitb68a70c49686db0bff4637995d91b4db8abe5281 (patch)
tree1eaca2fe2137ca1581c2bc5fd33ed84fa9a8d63c /arch/powerpc/mm/slb.c
parentf5be2dc0bd8d27a39d84a89e4ff90ba38cd2b285 (diff)
downloadblackbird-op-linux-b68a70c49686db0bff4637995d91b4db8abe5281.tar.gz
blackbird-op-linux-b68a70c49686db0bff4637995d91b4db8abe5281.zip
powerpc: Replace open coded instruction patching with patch_instruction/patch_branch
There are a few places we patch instructions without using patch_instruction and patch_branch, probably because they predated it. Fix it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/slb.c')
-rw-r--r--arch/powerpc/mm/slb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 1d98ecc8eecd..5500712781d4 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -24,6 +24,7 @@
#include <asm/firmware.h>
#include <linux/compiler.h>
#include <asm/udbg.h>
+#include <asm/code-patching.h>
extern void slb_allocate_realmode(unsigned long ea);
@@ -249,9 +250,8 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm)
static inline void patch_slb_encoding(unsigned int *insn_addr,
unsigned int immed)
{
- *insn_addr = (*insn_addr & 0xffff0000) | immed;
- flush_icache_range((unsigned long)insn_addr, 4+
- (unsigned long)insn_addr);
+ int insn = (*insn_addr & 0xffff0000) | immed;
+ patch_instruction(insn_addr, insn);
}
void slb_set_size(u16 size)
OpenPOWER on IntegriCloud