]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Ensure 16-byte stack pointer alignment
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 27 Jun 2022 14:02:27 +0000 (00:02 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 25 Jul 2022 02:05:15 +0000 (12:05 +1000)
commit041fcadb563ce1fd0fef774e46185597f3c715b8
treef774997258a395fc1b22f93afcb9de482b7dcd49
parentccc483121c46b4be48073d264ae0fa9bed11d5bf
selftests/powerpc: Ensure 16-byte stack pointer alignment

The PUSH/POP_BASIC_STACK helpers in basic_asm.h do not ensure that the
stack pointer is always 16-byte aligned, which is required per the ABI.

Fix the macros to do the alignment if the caller fails to.

Currently only one caller passes a non-aligned size, tm_signal_self(),
which hasn't been caught in testing, presumably because it's a leaf
function.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220627140239.2464900-1-mpe@ellerman.id.au
tools/testing/selftests/powerpc/include/basic_asm.h