mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
53 lines
1.3 KiB
Diff
53 lines
1.3 KiB
Diff
|
diff --git a/arch/x86/include/asm/espfix.h b/arch/x86/include/asm/espfix.h
|
||
|
new file mode 100644
|
||
|
index 0000000..729051c
|
||
|
--- /dev/null
|
||
|
+++ b/arch/x86/include/asm/espfix.h
|
||
|
@@ -0,0 +1,16 @@
|
||
|
+#ifdef _ASM_X86_ESPFIX_H
|
||
|
+#define _ASM_X86_ESPFIX_H
|
||
|
+
|
||
|
+#ifdef CONFIG_X86_64
|
||
|
+
|
||
|
+#include <asm/percpu.h>
|
||
|
+
|
||
|
+DECLARE_PER_CPU_READ_MOSTLY(unsigned long, espfix_stack);
|
||
|
+DECLARE_PER_CPU_READ_MOSTLY(unsigned long, espfix_waddr);
|
||
|
+
|
||
|
+extern void init_espfix_bsp(void);
|
||
|
+extern void init_espfix_ap(void);
|
||
|
+
|
||
|
+#endif /* CONFIG_X86_64 */
|
||
|
+
|
||
|
+#endif /* _ASM_X86_ESPFIX_H */
|
||
|
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
|
||
|
index 93797d1..2e327f1 100644
|
||
|
--- a/arch/x86/include/asm/setup.h
|
||
|
+++ b/arch/x86/include/asm/setup.h
|
||
|
@@ -60,11 +60,10 @@
|
||
|
static inline void x86_ce4100_early_setup(void) { }
|
||
|
#endif
|
||
|
|
||
|
-extern void init_espfix_bsp(void);
|
||
|
-extern void init_espfix_ap(void);
|
||
|
-
|
||
|
#ifndef _SETUP
|
||
|
|
||
|
+#include <asm/espfix.h>
|
||
|
+
|
||
|
/*
|
||
|
* This is set up by the setup-routine at boot-time
|
||
|
*/
|
||
|
diff --git a/arch/x86/kernel/espfix_64.c b/arch/x86/kernel/espfix_64.c
|
||
|
index 8a64da3..6afbb16 100644
|
||
|
--- a/arch/x86/kernel/espfix_64.c
|
||
|
+++ b/arch/x86/kernel/espfix_64.c
|
||
|
@@ -40,6 +40,7 @@
|
||
|
#include <asm/pgtable.h>
|
||
|
#include <asm/pgalloc.h>
|
||
|
#include <asm/setup.h>
|
||
|
+#include <asm/espfix.h>
|
||
|
|
||
|
/*
|
||
|
* Note: we only need 6*8 = 48 bytes for the espfix stack, but round
|