aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/code-patching.c
diff options
context:
space:
mode:
authorJordan Niethe <[email protected]>2020-05-06 13:40:24 +1000
committerMichael Ellerman <[email protected]>2020-05-19 00:10:36 +1000
commit5a7fdcab54ef17c395fc47e73c828a1432e51683 (patch)
tree4c23847625fe5e2a2944c156dde4897f2add52ea /arch/powerpc/lib/code-patching.c
parent4eff2b4f32a309e2171bfe53db3e93b5614f77cb (diff)
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 <[email protected]> Signed-off-by: Jordan Niethe <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Reviewed-by: Alistair Popple <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions