]> git.ipfire.org Git - thirdparty/linux.git/commit
s390/cpufeature: Convert MACHINE_HAS_EDAT1 to cpu_has_edat1()
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 7 Feb 2025 14:48:53 +0000 (15:48 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 4 Mar 2025 16:18:05 +0000 (17:18 +0100)
commit2e2ff71febfe30963deff1897b7d1d1ceb8628dd
tree9cf44c3acd407d5a873577036dbe9be376645e25
parent5643195f2626bc7391720b77d9f7c9b068f4fbe0
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 <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
13 files changed:
arch/s390/boot/boot.h
arch/s390/boot/startup.c
arch/s390/boot/vmem.c
arch/s390/include/asm/cpufeature.h
arch/s390/include/asm/hugetlb.h
arch/s390/include/asm/pgtable.h
arch/s390/include/asm/setup.h
arch/s390/kernel/early.c
arch/s390/kernel/processor.c
arch/s390/mm/hugetlbpage.c
arch/s390/mm/pageattr.c
arch/s390/mm/vmem.c
drivers/s390/char/sclp_cmd.c