Skip to content

Commit

Permalink
x86, mtrr: make mtrr_aps_delayed_init static bool
Browse files Browse the repository at this point in the history
mtr_aps_delayed_init was declared u32 and made global, but it only
ever takes boolean values and is only ever used in
arch/x86/kernel/cpu/mtrr/main.c.  Declare it "static bool" and remove
external references.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
  • Loading branch information
H. Peter Anvin committed Aug 22, 2009
1 parent d0af9ee commit 5400743
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion arch/x86/include/asm/mtrr.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ extern void mtrr_aps_init(void);
extern void mtrr_bp_restore(void);
extern int mtrr_trim_uncached_memory(unsigned long end_pfn);
extern int amd_special_default_mtrr(void);
extern u32 mtrr_aps_delayed_init;
# else
static inline u8 mtrr_type_lookup(u64 addr, u64 end)
{
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];
static DEFINE_MUTEX(mtrr_mutex);

u64 size_or_mask, size_and_mask;
u32 mtrr_aps_delayed_init;
static bool mtrr_aps_delayed_init;

static struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM];

Expand Down Expand Up @@ -758,7 +758,7 @@ void set_mtrr_aps_delayed_init(void)
if (!use_intel())
return;

mtrr_aps_delayed_init = 1;
mtrr_aps_delayed_init = true;
}

/*
Expand All @@ -770,7 +770,7 @@ void mtrr_aps_init(void)
return;

set_mtrr(~0U, 0, 0, 0);
mtrr_aps_delayed_init = 0;
mtrr_aps_delayed_init = false;
}

void mtrr_bp_restore(void)
Expand Down

0 comments on commit 5400743

Please sign in to comment.