diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2025-02-07 15:48:53 +0100 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2025-03-04 17:18:05 +0100 |
| commit | 2e2ff71febfe30963deff1897b7d1d1ceb8628dd (patch) | |
| tree | 9cf44c3acd407d5a873577036dbe9be376645e25 /arch/s390/include/asm/hugetlb.h | |
| parent | s390/cpufeature: Convert MACHINE_HAS_TOPOLOGY to cpu_has_topology() (diff) | |
| download | linux-2e2ff71febfe30963deff1897b7d1d1ceb8628dd.tar.gz linux-2e2ff71febfe30963deff1897b7d1d1ceb8628dd.zip | |
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>
Diffstat (limited to 'arch/s390/include/asm/hugetlb.h')
| -rw-r--r-- | arch/s390/include/asm/hugetlb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h index 7c52acaf9f82..e42655a8e404 100644 --- a/arch/s390/include/asm/hugetlb.h +++ b/arch/s390/include/asm/hugetlb.h @@ -9,12 +9,13 @@ #ifndef _ASM_S390_HUGETLB_H #define _ASM_S390_HUGETLB_H +#include <linux/cpufeature.h> #include <linux/pgtable.h> #include <linux/swap.h> #include <linux/swapops.h> #include <asm/page.h> -#define hugepages_supported() (MACHINE_HAS_EDAT1) +#define hugepages_supported() cpu_has_edat1() #define __HAVE_ARCH_HUGE_SET_HUGE_PTE_AT void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, |
