2020-05-20 19:23:26 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Don Zickus <dzickus@redhat.com>
Date: Thu, 14 May 2020 10:30:51 -0400
Subject: [PATCH] x86: Fix compile issues with rh_check_supported()
Upstream status: RHEL only
The function rh_check_supported is a RHEL function to limit the
platforms RHEL does not want to support.
To avoid imposing this requirement on Fedora, the function was
wrapped with CONFIG_RHEL_DIFFERENCES so Fedora can disable this.
However, this has a few compile warnings that need to be cleaned up
when disabled.
Move CONFIG_RHEL_DIFFERENCES to include the functions themselves
instead of the call. As the unused functions created warnings.
V2: modified stub definition
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
arch/x86/kernel/setup.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
2020-06-02 18:57:57 +00:00
index e677bb144835..6d31895c8e92 100644
2020-05-20 19:23:26 +00:00
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
2020-06-02 18:57:57 +00:00
@@ -756,6 +756,7 @@ static void __init trim_low_memory_range(void)
2020-05-20 19:23:26 +00:00
memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE));
}
2020-06-30 14:24:22 +00:00
2020-05-20 19:23:26 +00:00
+#ifdef CONFIG_RHEL_DIFFERENCES
static bool valid_amd_processor(__u8 family, const char *model_id)
{
bool valid;
2020-06-02 18:57:57 +00:00
@@ -880,6 +881,9 @@ static void rh_check_supported(void)
2020-05-20 19:23:26 +00:00
if (acpi_disabled && !guest)
pr_crit("ACPI has been disabled or is not available on this hardware. This may result in a single cpu boot, incorrect PCI IRQ routing, or boot failure.\n");
}
+#else
+#define rh_check_supported()
+#endif
2020-06-30 14:24:22 +00:00
2020-05-20 19:23:26 +00:00
/*
* Dump out kernel offset information on panic.
2020-06-02 18:57:57 +00:00
@@ -1372,9 +1376,7 @@ void __init setup_arch(char **cmdline_p)
2020-05-20 19:23:26 +00:00
efi_apply_memmap_quirks();
#endif
2020-06-30 14:24:22 +00:00
2020-05-20 19:23:26 +00:00
-#ifdef CONFIG_RHEL_DIFFERENCES
rh_check_supported();
-#endif
2020-06-30 14:24:22 +00:00
2020-05-20 19:23:26 +00:00
unwind_init();
}
--
2020-06-30 14:24:22 +00:00
2.26.2
2020-05-20 19:23:26 +00:00