powerpc/code-patching: Add data patch alignment check
authorBenjamin Gray <bgray@linux.ibm.com>
Wed, 15 May 2024 02:44:42 +0000 (12:44 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 21 Aug 2024 10:15:12 +0000 (20:15 +1000)
commitdbf828aab466c6534711d1f1454c409ea68d18d0
tree71be154aa3e1c4464431f9b8b06687900d49b109
parente6b8940e7e80cdfe98ba8493214922998920dd9c
powerpc/code-patching: Add data patch alignment check

The new data patching still needs to be aligned within a
cacheline too for the flushes to work correctly. To simplify
this requirement, we just say data patches must be aligned.

Detect when data patching is not aligned, returning an invalid
argument error.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Naveen N Rao <naveen@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240515024445.236364-3-bgray@linux.ibm.com
arch/powerpc/include/asm/code-patching.h
arch/powerpc/lib/code-patching.c