summaryrefslogtreecommitdiff
path: root/arch/x86/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-01-16 14:04:17 (GMT)
committerBin Meng <bmeng.cn@gmail.com>2017-02-07 05:07:26 (GMT)
commita0c75f9080f0dac35f7190c673b64b243c9c6469 (patch)
tree993a862f1a8f4497a9a8dd7e1759a5c326f31936 /arch/x86/cpu
parent1bff83637fdeda3b597ba5b4beb282445d5aeead (diff)
downloadu-boot-a0c75f9080f0dac35f7190c673b64b243c9c6469.tar.xz
x86: Move turbo_state to global_data
To avoid using BSS in SPL before SDRAM is set up, move this field to global_data. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r--arch/x86/cpu/turbo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/cpu/turbo.c b/arch/x86/cpu/turbo.c
index 254d0de..bbd255e 100644
--- a/arch/x86/cpu/turbo.c
+++ b/arch/x86/cpu/turbo.c
@@ -12,6 +12,8 @@
#include <asm/processor.h>
#include <asm/turbo.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#if CONFIG_CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED
static inline int get_global_turbo_state(void)
{
@@ -22,16 +24,14 @@ static inline void set_global_turbo_state(int state)
{
}
#else
-static int g_turbo_state = TURBO_UNKNOWN;
-
static inline int get_global_turbo_state(void)
{
- return g_turbo_state;
+ return gd->arch.turbo_state;
}
static inline void set_global_turbo_state(int state)
{
- g_turbo_state = state;
+ gd->arch.turbo_state = state;
}
#endif