]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/watchpoint: Use builtin ALIGN*() macros
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>
Thu, 14 May 2020 11:17:37 +0000 (16:47 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 May 2020 14:11:05 +0000 (00:11 +1000)
commit85ac2a9c8648b3e6cb8a2b10c5742d8aa6be7d6b
tree19a1a3a86436cb72a841ad52e7e43ebdcb196495
parent98f385cc053323acef2e9a18deaa2c587765cf7e
powerpc/watchpoint: Use builtin ALIGN*() macros

Currently we calculate hw aligned start and end addresses manually.
Replace them with builtin ALIGN_DOWN() and ALIGN() macros.

So far end_addr was inclusive but this patch makes it exclusive (by
avoiding -1) for better readability.

Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Michael Neuling <mikey@neuling.org>
Link: https://lore.kernel.org/r/20200514111741.97993-13-ravi.bangoria@linux.ibm.com
arch/powerpc/include/asm/hw_breakpoint.h
arch/powerpc/kernel/hw_breakpoint.c
arch/powerpc/kernel/process.c
arch/powerpc/kernel/ptrace/ptrace-noadv.c