aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/mtrr.h
diff options
context:
space:
mode:
authorBrian Gerst <bgerst@didntduck.org>2005-10-30 17:59:44 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:13 -0500
commitc53117815771e1e84e6ba80a42fa1f8e330adb4d (patch)
treee9227965e332a19575c066096c532cd2cba4c856 /include/asm-x86_64/mtrr.h
parentdaedb82d6b54e58a66ad1dce3509e699a5bd1b18 (diff)
[PATCH] Clean up mtrr compat ioctl code
Handle 32-bit mtrr ioctls in the mtrr driver instead of the ia32 compatability layer. Signed-off-by: Brian Gerst <bgerst@didntduck.org> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/mtrr.h')
-rw-r--r--include/asm-x86_64/mtrr.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/asm-x86_64/mtrr.h b/include/asm-x86_64/mtrr.h
index c5959d6418bb..66ac1c0f27e1 100644
--- a/include/asm-x86_64/mtrr.h
+++ b/include/asm-x86_64/mtrr.h
@@ -25,6 +25,7 @@
25 25
26#include <linux/config.h> 26#include <linux/config.h>
27#include <linux/ioctl.h> 27#include <linux/ioctl.h>
28#include <linux/compat.h>
28 29
29#define MTRR_IOCTL_BASE 'M' 30#define MTRR_IOCTL_BASE 'M'
30 31
@@ -105,4 +106,36 @@ static __inline__ int mtrr_del_page (int reg, unsigned long base,
105 106
106#endif 107#endif
107 108
109#ifdef CONFIG_COMPAT
110
111struct mtrr_sentry32
112{
113 compat_ulong_t base; /* Base address */
114 compat_uint_t size; /* Size of region */
115 compat_uint_t type; /* Type of region */
116};
117
118struct mtrr_gentry32
119{
120 compat_ulong_t regnum; /* Register number */
121 compat_uint_t base; /* Base address */
122 compat_uint_t size; /* Size of region */
123 compat_uint_t type; /* Type of region */
124};
125
126#define MTRR_IOCTL_BASE 'M'
127
128#define MTRRIOC32_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry32)
129#define MTRRIOC32_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry32)
130#define MTRRIOC32_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry32)
131#define MTRRIOC32_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry32)
132#define MTRRIOC32_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry32)
133#define MTRRIOC32_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry32)
134#define MTRRIOC32_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry32)
135#define MTRRIOC32_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry32)
136#define MTRRIOC32_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry32)
137#define MTRRIOC32_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry32)
138
139#endif /* CONFIG_COMPAT */
140
108#endif /* _LINUX_MTRR_H */ 141#endif /* _LINUX_MTRR_H */