s390/alternatives: Convert runtime sanity check into compile time check
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 13 May 2024 10:16:20 +0000 (12:16 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 14 May 2024 18:21:23 +0000 (20:21 +0200)
commit207ddb918995369f716e2b1d987ca6880c2bc21d
tree140ee6459aadef5a0e40211130e6207138d4107a
parenteffb83572685eaa70d05a8dd6307ca574a11fcf3
s390/alternatives: Convert runtime sanity check into compile time check

__apply_alternatives() contains a runtime check which verifies that the
size of the to be patched code area is even. Convert this to a compile time
check using a similar ".org" trick, which is already used to verify that
old and new code areas have the same size.

Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/alternative-asm.h
arch/s390/include/asm/alternative.h
arch/s390/kernel/alternative.c