Skip to content

Commit

Permalink
x86: consolidate the definition of the force_mwait variable
Browse files Browse the repository at this point in the history
The force_mwait variable iss defined either in
arch/x86/kernel/cpu/amd.c or in arch/x86/kernel/setup_64.c, but it is
only initialized and used in arch/x86/kernel/process.c. This patch
moves the declaration to arch/x86/kernel/process.c.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: michael@free-electrons.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Petazzoni authored and Ingo Molnar committed Jul 18, 2008
1 parent 5b664cb commit 9781f39
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
extern void vide(void);
__asm__(".align 4\nvide: ret");

int force_mwait __cpuinitdata;

static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
{
if (cpuid_eax(0x80000000) >= 0x80000007) {
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ unsigned long idle_nomwait;
EXPORT_SYMBOL(idle_nomwait);

struct kmem_cache *task_xstate_cachep;
static int force_mwait __cpuinitdata;

int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
{
Expand Down
2 changes: 0 additions & 2 deletions include/asm-x86/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,6 @@ static inline void __sti_mwait(unsigned long eax, unsigned long ecx)

extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx);

extern int force_mwait;

extern void select_idle_routine(const struct cpuinfo_x86 *c);

extern unsigned long boot_option_idle_override;
Expand Down

0 comments on commit 9781f39

Please sign in to comment.