mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-04 18:27:36 +00:00
s390/cpufeature: Convert MACHINE_HAS_GS to cpu_has_gs()
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>
This commit is contained in:
committed by
Vasily Gorbik
parent
15a36036e7
commit
42805261fc
@@ -8,6 +8,7 @@
|
||||
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
||||
|
||||
#include <linux/stop_machine.h>
|
||||
#include <linux/cpufeature.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/random.h>
|
||||
@@ -244,7 +245,7 @@ static int __init setup_hwcaps(void)
|
||||
elf_hwcap |= HWCAP_NNPA;
|
||||
|
||||
/* guarded storage */
|
||||
if (MACHINE_HAS_GS)
|
||||
if (cpu_has_gs())
|
||||
elf_hwcap |= HWCAP_GS;
|
||||
|
||||
if (MACHINE_HAS_PCI_MIO)
|
||||
|
||||
Reference in New Issue
Block a user