s390/cpacf: Make use of invalid opcode produce a link error
authorHarald Freudenberger <freude@linux.ibm.com>
Tue, 14 May 2024 08:09:32 +0000 (10:09 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 16 May 2024 08:17:11 +0000 (10:17 +0200)
commit32e8bd6423fc127d2b37bdcf804fd76af3bbec79
tree9cfdcdc596144261aedfcae826a89faae58ca6f9
parent830999bd7e72f4128b9dfa37090d9fa8120ce323
s390/cpacf: Make use of invalid opcode produce a link error

Instead of calling BUG() at runtime introduce and use a prototype for a
non-existing function to produce a link error during compile when a not
supported opcode is used with the __cpacf_query() or __cpacf_check_opcode()
inline functions.

Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/cpacf.h