Commit 2ea4512f authored by H. Peter Anvin's avatar H. Peter Anvin Committed by Willy Tarreau

x86, espfix: Move espfix definitions into a separate header file

commit e1fe9ed8 upstream.

Sparse warns that the percpu variables aren't declared before they are
defined.  Rather than hacking around it, move espfix definitions into
a proper header file.
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
(cherry picked from 3.2 commit 62358ee6)
[wt: using DECLARE_PER_CPU instead of DECLARE_PER_CPU_READ_MOSTLY]
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 36102caa
#ifdef _ASM_X86_ESPFIX_H
#define _ASM_X86_ESPFIX_H
#ifdef CONFIG_X86_64
#include <asm/percpu.h>
DECLARE_PER_CPU(unsigned long, espfix_stack);
DECLARE_PER_CPU(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 */
......@@ -57,6 +57,8 @@ static inline void x86_mrst_early_setup(void) { }
#ifndef _SETUP
#include <asm/espfix.h>
/*
* This is set up by the setup-routine at boot-time
*/
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment