aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/mtrr.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-03-23 04:02:52 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:25 -0400
commit9969b4405469e12070c560ff27dbe587470fc945 (patch)
treeed4035eac05cbfdd5a2e479f2f3536988a5cb63a /include/asm-x86/mtrr.h
parentabb0ade013507c93a9a0b263bbb7b0327d7c38db (diff)
include/asm-x86/mtrr.h: checkpatch cleanups - formatting only
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/mtrr.h')
-rw-r--r--include/asm-x86/mtrr.h64
1 files changed, 30 insertions, 34 deletions
diff --git a/include/asm-x86/mtrr.h b/include/asm-x86/mtrr.h
index d3d26625aeaf..a69a01a51729 100644
--- a/include/asm-x86/mtrr.h
+++ b/include/asm-x86/mtrr.h
@@ -28,8 +28,7 @@
28 28
29#define MTRR_IOCTL_BASE 'M' 29#define MTRR_IOCTL_BASE 'M'
30 30
31struct mtrr_sentry 31struct mtrr_sentry {
32{
33 unsigned long base; /* Base address */ 32 unsigned long base; /* Base address */
34 unsigned int size; /* Size of region */ 33 unsigned int size; /* Size of region */
35 unsigned int type; /* Type of region */ 34 unsigned int type; /* Type of region */
@@ -41,8 +40,7 @@ struct mtrr_sentry
41 will break. */ 40 will break. */
42 41
43#ifdef __i386__ 42#ifdef __i386__
44struct mtrr_gentry 43struct mtrr_gentry {
45{
46 unsigned int regnum; /* Register number */ 44 unsigned int regnum; /* Register number */
47 unsigned long base; /* Base address */ 45 unsigned long base; /* Base address */
48 unsigned int size; /* Size of region */ 46 unsigned int size; /* Size of region */
@@ -51,8 +49,7 @@ struct mtrr_gentry
51 49
52#else /* __i386__ */ 50#else /* __i386__ */
53 51
54struct mtrr_gentry 52struct mtrr_gentry {
55{
56 unsigned long base; /* Base address */ 53 unsigned long base; /* Base address */
57 unsigned int size; /* Size of region */ 54 unsigned int size; /* Size of region */
58 unsigned int regnum; /* Register number */ 55 unsigned int regnum; /* Register number */
@@ -89,12 +86,12 @@ struct mtrr_gentry
89extern u8 mtrr_type_lookup(u64 addr, u64 end); 86extern u8 mtrr_type_lookup(u64 addr, u64 end);
90extern void mtrr_save_fixed_ranges(void *); 87extern void mtrr_save_fixed_ranges(void *);
91extern void mtrr_save_state(void); 88extern void mtrr_save_state(void);
92extern int mtrr_add (unsigned long base, unsigned long size, 89extern int mtrr_add(unsigned long base, unsigned long size,
93 unsigned int type, bool increment); 90 unsigned int type, bool increment);
94extern int mtrr_add_page (unsigned long base, unsigned long size, 91extern int mtrr_add_page(unsigned long base, unsigned long size,
95 unsigned int type, bool increment); 92 unsigned int type, bool increment);
96extern int mtrr_del (int reg, unsigned long base, unsigned long size); 93extern int mtrr_del(int reg, unsigned long base, unsigned long size);
97extern int mtrr_del_page (int reg, unsigned long base, unsigned long size); 94extern int mtrr_del_page(int reg, unsigned long base, unsigned long size);
98extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi); 95extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi);
99extern void mtrr_ap_init(void); 96extern void mtrr_ap_init(void);
100extern void mtrr_bp_init(void); 97extern void mtrr_bp_init(void);
@@ -110,23 +107,21 @@ static inline u8 mtrr_type_lookup(u64 addr, u64 end)
110} 107}
111#define mtrr_save_fixed_ranges(arg) do {} while (0) 108#define mtrr_save_fixed_ranges(arg) do {} while (0)
112#define mtrr_save_state() do {} while (0) 109#define mtrr_save_state() do {} while (0)
113static __inline__ int mtrr_add (unsigned long base, unsigned long size, 110static inline int mtrr_add(unsigned long base, unsigned long size,
114 unsigned int type, bool increment) 111 unsigned int type, bool increment)
115{ 112{
116 return -ENODEV; 113 return -ENODEV;
117} 114}
118static __inline__ int mtrr_add_page (unsigned long base, unsigned long size, 115static inline int mtrr_add_page(unsigned long base, unsigned long size,
119 unsigned int type, bool increment) 116 unsigned int type, bool increment)
120{ 117{
121 return -ENODEV; 118 return -ENODEV;
122} 119}
123static __inline__ int mtrr_del (int reg, unsigned long base, 120static inline int mtrr_del(int reg, unsigned long base, unsigned long size)
124 unsigned long size)
125{ 121{
126 return -ENODEV; 122 return -ENODEV;
127} 123}
128static __inline__ int mtrr_del_page (int reg, unsigned long base, 124static inline int mtrr_del_page(int reg, unsigned long base, unsigned long size)
129 unsigned long size)
130{ 125{
131 return -ENODEV; 126 return -ENODEV;
132} 127}
@@ -134,7 +129,9 @@ static inline int mtrr_trim_uncached_memory(unsigned long end_pfn)
134{ 129{
135 return 0; 130 return 0;
136} 131}
137static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;} 132static inline void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi)
133{
134}
138 135
139#define mtrr_ap_init() do {} while (0) 136#define mtrr_ap_init() do {} while (0)
140#define mtrr_bp_init() do {} while (0) 137#define mtrr_bp_init() do {} while (0)
@@ -143,15 +140,13 @@ static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;}
143#ifdef CONFIG_COMPAT 140#ifdef CONFIG_COMPAT
144#include <linux/compat.h> 141#include <linux/compat.h>
145 142
146struct mtrr_sentry32 143struct mtrr_sentry32 {
147{
148 compat_ulong_t base; /* Base address */ 144 compat_ulong_t base; /* Base address */
149 compat_uint_t size; /* Size of region */ 145 compat_uint_t size; /* Size of region */
150 compat_uint_t type; /* Type of region */ 146 compat_uint_t type; /* Type of region */
151}; 147};
152 148
153struct mtrr_gentry32 149struct mtrr_gentry32 {
154{
155 compat_ulong_t regnum; /* Register number */ 150 compat_ulong_t regnum; /* Register number */
156 compat_uint_t base; /* Base address */ 151 compat_uint_t base; /* Base address */
157 compat_uint_t size; /* Size of region */ 152 compat_uint_t size; /* Size of region */
@@ -160,16 +155,17 @@ struct mtrr_gentry32
160 155
161#define MTRR_IOCTL_BASE 'M' 156#define MTRR_IOCTL_BASE 'M'
162 157
163#define MTRRIOC32_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry32) 158#define MTRRIOC32_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry32)
164#define MTRRIOC32_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry32) 159#define MTRRIOC32_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry32)
165#define MTRRIOC32_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry32) 160#define MTRRIOC32_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry32)
166#define MTRRIOC32_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry32) 161#define MTRRIOC32_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry32)
167#define MTRRIOC32_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry32) 162#define MTRRIOC32_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry32)
168#define MTRRIOC32_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry32) 163#define MTRRIOC32_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry32)
169#define MTRRIOC32_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry32) 164#define MTRRIOC32_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry32)
170#define MTRRIOC32_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry32) 165#define MTRRIOC32_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry32)
171#define MTRRIOC32_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry32) 166#define MTRRIOC32_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry32)
172#define MTRRIOC32_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry32) 167#define MTRRIOC32_KILL_PAGE_ENTRY \
168 _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry32)
173#endif /* CONFIG_COMPAT */ 169#endif /* CONFIG_COMPAT */
174 170
175#endif /* __KERNEL__ */ 171#endif /* __KERNEL__ */