diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2025-02-07 17:49:07 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2025-03-04 19:18:07 +0300 |
commit | 52109a067aaa96474a5b0f12aee60d73cf5f92e1 (patch) | |
tree | 69786a1518c0339f110934f05f7b034b05ba8b4c /drivers/tty | |
parent | 91d6e44221e871c6a2b6c4a67f52b62b36c441a3 (diff) | |
download | linux-52109a067aaa96474a5b0f12aee60d73cf5f92e1.tar.xz |
s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]()
Move machine type detection to the decompressor and use static branches
to implement and use machine_is_[lpar|vm|kvm]() instead of a runtime check
via MACHINE_IS_[LPAR|VM|KVM].
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 'drivers/tty')
-rw-r--r-- | drivers/tty/hvc/hvc_iucv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c index ed4bf40278a7..4ca7472c38e0 100644 --- a/drivers/tty/hvc/hvc_iucv.c +++ b/drivers/tty/hvc/hvc_iucv.c @@ -24,6 +24,7 @@ #include <linux/tty.h> #include <linux/wait.h> #include <net/iucv/iucv.h> +#include <asm/machine.h> #include "hvc_console.h" @@ -1240,7 +1241,7 @@ static int param_set_vmidfilter(const char *val, const struct kernel_param *kp) { int rc; - if (!MACHINE_IS_VM || !hvc_iucv_devices) + if (!machine_is_vm() || !hvc_iucv_devices) return -ENODEV; if (!val) @@ -1269,7 +1270,7 @@ static int param_get_vmidfilter(char *buffer, const struct kernel_param *kp) size_t index, len; void *start, *end; - if (!MACHINE_IS_VM || !hvc_iucv_devices) + if (!machine_is_vm() || !hvc_iucv_devices) return -ENODEV; rc = 0; @@ -1306,7 +1307,7 @@ static int __init hvc_iucv_init(void) if (!hvc_iucv_devices) return -ENODEV; - if (!MACHINE_IS_VM) { + if (!machine_is_vm()) { pr_notice("The z/VM IUCV HVC device driver cannot " "be used without z/VM\n"); rc = -ENODEV; |