diff options
author | Jordan Niethe <jniethe5@gmail.com> | 2020-05-06 05:40:24 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-05-18 16:10:36 +0200 |
commit | 5a7fdcab54ef17c395fc47e73c828a1432e51683 (patch) | |
tree | 4c23847625fe5e2a2944c156dde4897f2add52ea /arch/powerpc/kernel/setup_32.c | |
parent | powerpc/xmon: Move breakpoints to text section (diff) | |
download | linux-5a7fdcab54ef17c395fc47e73c828a1432e51683.tar.xz linux-5a7fdcab54ef17c395fc47e73c828a1432e51683.zip |
powerpc/xmon: Use bitwise calculations in_breakpoint_table()
A modulo operation is used for calculating the current offset from a
breakpoint within the breakpoint table. As instruction lengths are
always a power of 2, this can be replaced with a bitwise 'and'. The
current check for word alignment can be replaced with checking that the
lower 2 bits are not set.
Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Link: https://lore.kernel.org/r/20200506034050.24806-5-jniethe5@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
0 files changed, 0 insertions, 0 deletions