From 2e2ff71febfe30963deff1897b7d1d1ceb8628dd Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 7 Feb 2025 15:48:53 +0100 Subject: s390/cpufeature: Convert MACHINE_HAS_EDAT1 to cpu_has_edat1() Convert MACHINE_HAS_... to cpu_has_...() which uses test_facility() instead of testing the machine_flags lowcore member if the feature is present. test_facility() generates better code since it results in a static branch without accessing memory. The branch is patched via alternatives by the decompressor depending on the availability of the required facility. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- arch/s390/kernel/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/s390/kernel/processor.c') diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index c8ce8474d769..4c751b6539f8 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c @@ -210,7 +210,7 @@ static int __init setup_hwcaps(void) elf_hwcap |= HWCAP_DFP; /* huge page support */ - if (MACHINE_HAS_EDAT1) + if (cpu_has_edat1()) elf_hwcap |= HWCAP_HPAGE; /* 64-bit register support for 31-bit processes */ -- cgit v1.2.3