PPC64 move emulate_step to arch/ppc64/lib
PATCH 1/1 PPC64 move emulate_step to arch/ppc64/lib
This patch moves the emulate_step function, which is used in xmon's single-stepping code, out of xmon.c and into arch/ppc64/lib/sstep.c, so that kprobes can use it too.
Andrew: if you prefer to defer this until after 2.6.10, that's OK, but I think it would be safe to go in now, since the only thing it can break is xmon.
Signed-off-by Paul Mackerras <[email protected]>
arch/ppc64/lib/Makefile +1 -0
@@ -15,3 +15,4 @@ obj-$(CONFIG_PCI) += e2a.o endif +lib-$(CONFIG_XMON) += sstep.o
arch/ppc64/lib/sstep.c new file +141 -0
141 lines not on this page · raw message
arch/ppc64/xmon/xmon.c +8 -108
159 lines not on this page · raw message
include/asm-ppc64/sstep.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* Copyright (C) 2004 Paul Mackerras <[email protected]>, IBM +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +struct pt_regs ; + +/* Emulate instructions that cause a transfer of control. */ +extern int emulate_step (struct pt_regs *regs,unsigned int instr);