From 52109a067aaa96474a5b0f12aee60d73cf5f92e1 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 7 Feb 2025 15:49:07 +0100 Subject: 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 Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- drivers/tty/hvc/hvc_iucv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/tty/hvc') 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 #include #include +#include #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; -- cgit v1.2.3