Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1fe9ed8 authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

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



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>
parent 246f2d2e
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
#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 */
+2 −3
Original line number Diff line number Diff line
@@ -57,11 +57,10 @@ extern void x86_ce4100_early_setup(void);
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
 */
+1 −0
Original line number Diff line number Diff line
@@ -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