From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Sun, 10 Feb 2019 01:27:54 +0000 Subject: [PATCH] ipmi: do not configure ipmi for HPE m400 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1670017 Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=20147017 Commit 913a89f009d9 ("ipmi: Don't initialize anything in the core until something uses it") added new locking which broke context. Message-id: <20180713142210.15700-1-tcamuso@redhat.com> Patchwork-id: 224899 O-Subject: [RHEL8 BZ 1583537 1/1] ipmi: do not configure ipmi for HPE m400 Bugzilla: 1583537 RH-Acked-by: Dean Nelson RH-Acked-by: Al Stone RH-Acked-by: Mark Salter bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=1583537 brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17150528 RHEL-only The ARM-based HPE m400 reports host-side ipmi as residing in intel port-io space, which does not exist in ARM processors. Therefore, when running on an m400, host-side ipmi configuration code must simply return zero without trying to configure the host-side ipmi. This patch prevents panic on boot by averting attempts to configure host-side ipmi on this platform. Though HPE m400 is not certified with RHEL, and HPE has relegated it to EOL status, the platform is still used extensively in ARM development and test for RHEL. Testing: Boot without blacklisting ipmi and check to see that no ipmi modules are loaded. Signed-off-by: Tony Camuso cc: Prarit Bhargava cc: Brendan Conoboy cc: Jeff Bastian cc: Scott Herold Signed-off-by: Herton R. Krzesinski Upstream Status: RHEL only Signed-off-by: Laura Abbott Acked-by: Tony Camuso Acked-by: Dean Nelson Acked-by: Jarod Wilson Acked-by: Mark Salter --- drivers/char/ipmi/ipmi_dmi.c | 15 +++++++++++++++ drivers/char/ipmi/ipmi_msghandler.c | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/char/ipmi/ipmi_dmi.c b/drivers/char/ipmi/ipmi_dmi.c index bbf7029e224b..cf7faa970dd6 100644 --- a/drivers/char/ipmi/ipmi_dmi.c +++ b/drivers/char/ipmi/ipmi_dmi.c @@ -215,6 +215,21 @@ static int __init scan_for_dmi_ipmi(void) { const struct dmi_device *dev = NULL; +#ifdef CONFIG_ARM64 + /* RHEL-only + * If this is ARM-based HPE m400, return now, because that platform + * reports the host-side ipmi address as intel port-io space, which + * does not exist in the ARM architecture. + */ + const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME); + + if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) { + pr_debug("%s does not support host ipmi\n", dmistr); + return 0; + } + /* END RHEL-only */ +#endif + while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) dmi_decode_ipmi((const struct dmi_header *) dev->device_data); diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index e1b22fe0916c..894eda427214 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -34,6 +34,7 @@ #include #include #include +#include #define IPMI_DRIVER_VERSION "39.2" @@ -5155,8 +5156,21 @@ static int __init ipmi_init_msghandler_mod(void) { int rv; - pr_info("version " IPMI_DRIVER_VERSION "\n"); +#ifdef CONFIG_ARM64 + /* RHEL-only + * If this is ARM-based HPE m400, return now, because that platform + * reports the host-side ipmi address as intel port-io space, which + * does not exist in the ARM architecture. + */ + const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME); + if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) { + pr_debug("%s does not support host ipmi\n", dmistr); + return -ENOSYS; + } + /* END RHEL-only */ +#endif + pr_info("version " IPMI_DRIVER_VERSION "\n"); mutex_lock(&ipmi_interfaces_mutex); rv = ipmi_register_driver(); mutex_unlock(&ipmi_interfaces_mutex); -- 2.26.2