s390/bear: Convert cpu_has_bear() to cpu feature function

Get rid of the cpu_has_bear jump label and convert cpu_has_bear() to a cpu
feature function using test_facility() and with that use a static branch.

Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Heiko Carstens
2025-02-07 15:49:09 +01:00
committed by Vasily Gorbik
parent db14f78ecb
commit 841f35a08d
7 changed files with 11 additions and 13 deletions

View File

@@ -12,6 +12,7 @@
* platform.
*/
#include <linux/cpufeature.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/mm.h>
@@ -127,7 +128,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
regs->psw = get_lowcore()->svc_old_psw;
regs->int_code = get_lowcore()->svc_int_code;
update_timer_sys();
if (static_branch_likely(&cpu_has_bear))
if (cpu_has_bear())
current->thread.last_break = regs->last_break;
local_irq_enable();