aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2009-02-18 04:35:21 -0500
committerDave Airlie <airlied@redhat.com>2009-03-13 00:24:04 -0400
commit09e40d65d0aa6680428143cda1a7bdc8846ee991 (patch)
tree76c6d457d9cb63873f43ec33abf1d1ec500c0260 /drivers
parent958a6f8ccb1964adc3eec84cf401c5baeb4fbca0 (diff)
drm: Only use DRM_IOCTL_UPDATE_DRAW compat wrapper for compat X86.
Only X86 32-bit uses a different alignment for "unsigned long long" than it's 64-bit counterpart. Therefore this compat translation is only correct, and only needed, when either CONFIG_X86 or CONFIG_IA64. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_ioc32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 920b72fbc958..282d9fdf9f4e 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -954,6 +954,7 @@ static int compat_drm_sg_free(struct file *file, unsigned int cmd,
954 DRM_IOCTL_SG_FREE, (unsigned long)request); 954 DRM_IOCTL_SG_FREE, (unsigned long)request);
955} 955}
956 956
957#if defined(CONFIG_X86) || defined(CONFIG_IA64)
957typedef struct drm_update_draw32 { 958typedef struct drm_update_draw32 {
958 drm_drawable_t handle; 959 drm_drawable_t handle;
959 unsigned int type; 960 unsigned int type;
@@ -984,6 +985,7 @@ static int compat_drm_update_draw(struct file *file, unsigned int cmd,
984 DRM_IOCTL_UPDATE_DRAW, (unsigned long)request); 985 DRM_IOCTL_UPDATE_DRAW, (unsigned long)request);
985 return err; 986 return err;
986} 987}
988#endif
987 989
988struct drm_wait_vblank_request32 { 990struct drm_wait_vblank_request32 {
989 enum drm_vblank_seq_type type; 991 enum drm_vblank_seq_type type;
@@ -1066,7 +1068,9 @@ drm_ioctl_compat_t *drm_compat_ioctls[] = {
1066#endif 1068#endif
1067 [DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC32)] = compat_drm_sg_alloc, 1069 [DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC32)] = compat_drm_sg_alloc,
1068 [DRM_IOCTL_NR(DRM_IOCTL_SG_FREE32)] = compat_drm_sg_free, 1070 [DRM_IOCTL_NR(DRM_IOCTL_SG_FREE32)] = compat_drm_sg_free,
1071#if defined(CONFIG_X86) || defined(CONFIG_IA64)
1069 [DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW32)] = compat_drm_update_draw, 1072 [DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW32)] = compat_drm_update_draw,
1073#endif
1070 [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK32)] = compat_drm_wait_vblank, 1074 [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK32)] = compat_drm_wait_vblank,
1071}; 1075};
1072 1076