]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc, ftrace: use unsigned int for instruction manipulation
authorSteven Rostedt <srostedt@redhat.com>
Fri, 13 Feb 2009 14:31:39 +0000 (06:31 -0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 22 Feb 2009 23:48:55 +0000 (10:48 +1100)
commit991cdb3e55e42d2c6ec6a0ff034824bbd05ad6e8
tree6f0d272d80f7859b308e13b102a31e74ebeebde6
parentf1e95975ffd4b88d0c90ed9ce2b9255cad9723cd
powerpc, ftrace: use unsigned int for instruction manipulation

The original port of ftrace to PowerPC kept a lot of the code used
by x86. Some of this code was to handle x86's 5 byte instruction.
This was handled by using character arrays to manipulate the
code.

PowerPC has a consistent 4 byte instruction. Using unsigned ints
makes the code more efficient as well as more readable.
By converting to use unsigned ints to represent instructions,
I was able to remove the side effects that were needed for
manipulating character strings.

  i.e. memcpy and memcmp

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/ftrace.c