#ifndef _ASM_X86_MTRR_H
#define _ASM_X86_MTRR_H
#include <linux/bits.h>
#include <uapi/asm/mtrr.h>
#define MTRR_CAP_VCNT …
#define MTRR_CAP_FIX …
#define MTRR_CAP_WC …
#define MTRR_DEF_TYPE_TYPE …
#define MTRR_DEF_TYPE_FE …
#define MTRR_DEF_TYPE_E …
#define MTRR_DEF_TYPE_ENABLE …
#define MTRR_DEF_TYPE_DISABLE …
#define MTRR_PHYSBASE_TYPE …
#define MTRR_PHYSBASE_RSVD …
#define MTRR_PHYSMASK_RSVD …
#define MTRR_PHYSMASK_V …
struct mtrr_state_type { … };
# ifdef CONFIG_MTRR
void mtrr_bp_init(void);
void mtrr_overwrite_state(struct mtrr_var_range *var, unsigned int num_var,
mtrr_type def_type);
extern u8 mtrr_type_lookup(u64 addr, u64 end, u8 *uniform);
extern void mtrr_save_fixed_ranges(void *);
extern void mtrr_save_state(void);
extern int mtrr_add(unsigned long base, unsigned long size,
unsigned int type, bool increment);
extern int mtrr_add_page(unsigned long base, unsigned long size,
unsigned int type, bool increment);
extern int mtrr_del(int reg, unsigned long base, unsigned long size);
extern int mtrr_del_page(int reg, unsigned long base, unsigned long size);
extern void mtrr_bp_restore(void);
extern int mtrr_trim_uncached_memory(unsigned long end_pfn);
extern int amd_special_default_mtrr(void);
void mtrr_disable(void);
void mtrr_enable(void);
void mtrr_generic_set_state(void);
# else
static inline void mtrr_overwrite_state(struct mtrr_var_range *var,
unsigned int num_var,
mtrr_type def_type)
{
}
static inline u8 mtrr_type_lookup(u64 addr, u64 end, u8 *uniform)
{
*uniform = 1;
return MTRR_TYPE_UNCACHABLE;
}
#define mtrr_save_fixed_ranges …
#define mtrr_save_state …
static inline int mtrr_add(unsigned long base, unsigned long size,
unsigned int type, bool increment)
{
return -ENODEV;
}
static inline int mtrr_add_page(unsigned long base, unsigned long size,
unsigned int type, bool increment)
{
return -ENODEV;
}
static inline int mtrr_del(int reg, unsigned long base, unsigned long size)
{
return -ENODEV;
}
static inline int mtrr_del_page(int reg, unsigned long base, unsigned long size)
{
return -ENODEV;
}
static inline int mtrr_trim_uncached_memory(unsigned long end_pfn)
{
return 0;
}
#define mtrr_bp_init …
#define mtrr_bp_restore …
#define mtrr_disable …
#define mtrr_enable …
#define mtrr_generic_set_state …
# endif
#ifdef CONFIG_COMPAT
#include <linux/compat.h>
struct mtrr_sentry32 { … };
struct mtrr_gentry32 { … };
#define MTRR_IOCTL_BASE …
#define MTRRIOC32_ADD_ENTRY …
#define MTRRIOC32_SET_ENTRY …
#define MTRRIOC32_DEL_ENTRY …
#define MTRRIOC32_GET_ENTRY …
#define MTRRIOC32_KILL_ENTRY …
#define MTRRIOC32_ADD_PAGE_ENTRY …
#define MTRRIOC32_SET_PAGE_ENTRY …
#define MTRRIOC32_DEL_PAGE_ENTRY …
#define MTRRIOC32_GET_PAGE_ENTRY …
#define MTRRIOC32_KILL_PAGE_ENTRY …
#endif
#define MTRR_STATE_SHIFT …
#define MTRR_STATE_MTRR_FIXED_ENABLED …
#define MTRR_STATE_MTRR_ENABLED …
#endif