mirror of https://gitee.com/openkylin/linux.git
x86: Clean up mtrr/mtrr.h
Fix: ERROR: do not use C99 // comments ERROR: "foo * bar" should be "foo *bar" X 2 Suggested-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <20090703164225.GA21447@elte.hu> [ More tidyups ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
26dc67eda1
commit
3ec8dbcb09
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* local mtrr defines.
|
* local MTRR defines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
@ -14,13 +14,12 @@ extern unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];
|
||||||
struct mtrr_ops {
|
struct mtrr_ops {
|
||||||
u32 vendor;
|
u32 vendor;
|
||||||
u32 use_intel_if;
|
u32 use_intel_if;
|
||||||
// void (*init)(void);
|
|
||||||
void (*set)(unsigned int reg, unsigned long base,
|
void (*set)(unsigned int reg, unsigned long base,
|
||||||
unsigned long size, mtrr_type type);
|
unsigned long size, mtrr_type type);
|
||||||
void (*set_all)(void);
|
void (*set_all)(void);
|
||||||
|
|
||||||
void (*get)(unsigned int reg, unsigned long *base,
|
void (*get)(unsigned int reg, unsigned long *base,
|
||||||
unsigned long *size, mtrr_type * type);
|
unsigned long *size, mtrr_type *type);
|
||||||
int (*get_free_region)(unsigned long base, unsigned long size,
|
int (*get_free_region)(unsigned long base, unsigned long size,
|
||||||
int replace_reg);
|
int replace_reg);
|
||||||
int (*validate_add_page)(unsigned long base, unsigned long size,
|
int (*validate_add_page)(unsigned long base, unsigned long size,
|
||||||
|
@ -39,11 +38,11 @@ extern int positive_have_wrcomb(void);
|
||||||
|
|
||||||
/* library functions for processor-specific routines */
|
/* library functions for processor-specific routines */
|
||||||
struct set_mtrr_context {
|
struct set_mtrr_context {
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned long cr4val;
|
unsigned long cr4val;
|
||||||
u32 deftype_lo;
|
u32 deftype_lo;
|
||||||
u32 deftype_hi;
|
u32 deftype_hi;
|
||||||
u32 ccr3;
|
u32 ccr3;
|
||||||
};
|
};
|
||||||
|
|
||||||
void set_mtrr_done(struct set_mtrr_context *ctxt);
|
void set_mtrr_done(struct set_mtrr_context *ctxt);
|
||||||
|
@ -54,10 +53,10 @@ void fill_mtrr_var_range(unsigned int index,
|
||||||
u32 base_lo, u32 base_hi, u32 mask_lo, u32 mask_hi);
|
u32 base_lo, u32 base_hi, u32 mask_lo, u32 mask_hi);
|
||||||
void get_mtrr_state(void);
|
void get_mtrr_state(void);
|
||||||
|
|
||||||
extern void set_mtrr_ops(struct mtrr_ops * ops);
|
extern void set_mtrr_ops(struct mtrr_ops *ops);
|
||||||
|
|
||||||
extern u64 size_or_mask, size_and_mask;
|
extern u64 size_or_mask, size_and_mask;
|
||||||
extern struct mtrr_ops * mtrr_if;
|
extern struct mtrr_ops *mtrr_if;
|
||||||
|
|
||||||
#define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
|
#define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
|
||||||
#define use_intel() (mtrr_if && mtrr_if->use_intel_if == 1)
|
#define use_intel() (mtrr_if && mtrr_if->use_intel_if == 1)
|
||||||
|
|
Loading…
Reference in New Issue