Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-12-25 21:44:33 +0100
committerTakashi Iwai <tiwai@suse.de>2017-12-25 21:44:33 +0100
commit3e359342913a1397c6788274fdba9a7677589248 (patch)
tree600c1e87d8b128aad5008446dcbd23a57e792ec6
parentba5ff88b2f1097c62b5645ad9b70169ebb6f9119 (diff)
parent13dae54cb229d078635f159dd8afe16ae683980b (diff)
Merge branch 'users/jkosina/SLE12-SP3/pti' into SLE12-SP3-PTIrpm-4.4.103-6.38
-rw-r--r--arch/x86/include/asm/kaiser.h2
-rw-r--r--arch/x86/kernel/setup.c7
-rw-r--r--arch/x86/mm/kaiser.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kaiser.h b/arch/x86/include/asm/kaiser.h
index 906150d6094e..b5e46aa683f4 100644
--- a/arch/x86/include/asm/kaiser.h
+++ b/arch/x86/include/asm/kaiser.h
@@ -96,8 +96,10 @@ DECLARE_PER_CPU(unsigned long, x86_cr3_pcid_user);
extern char __per_cpu_user_mapped_start[], __per_cpu_user_mapped_end[];
extern int kaiser_enabled;
+extern void __init kaiser_check_boottime_disable(void);
#else
#define kaiser_enabled 0
+static inline void __init kaiser_check_boottime_disable(void) {}
#endif /* CONFIG_KAISER */
/*
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 48fbe854dd06..ec79c834b0bd 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -116,6 +116,7 @@
#include <asm/mmu_context.h>
#include <asm/suspend.h>
+#include <asm/kaiser.h>
/*
* max_low_pfn_mapped: highest direct mapped pfn under 4GB
@@ -1037,6 +1038,12 @@ void __init setup_arch(char **cmdline_p)
*/
init_hypervisor_platform();
+ /*
+ * This needs to happen right after XENPV is set on xen and
+ * kaiser_enabled is checked below in cleanup_highmap().
+ */
+ kaiser_check_boottime_disable();
+
x86_init.resources.probe_roms();
/* after parse_early_param, so could debug it */
diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c
index 46577aceb7a3..acfbf8c69eef 100644
--- a/arch/x86/mm/kaiser.c
+++ b/arch/x86/mm/kaiser.c
@@ -305,8 +305,6 @@ void __init kaiser_init(void)
{
int cpu;
- kaiser_check_boottime_disable();
-
if (!kaiser_enabled)
return;