Re: radeon warning on 64-bit platforms
From: Linus Torvalds
Date: Tue Feb 17 2004 - 18:55:43 EST
On Tue, 17 Feb 2004, David Mosberger wrote:
>
> Here is a proposed patch for fixing the compile-warning that shows up
> when compiling radeon_state.c on a 64-bit platform (Itanium, in my
> case).
How about this alternate edited one that gets indentation right
and is more explicit about what's going on? Does this work for you?
Linus
---
===== drivers/char/drm/radeon_state.c 1.23 vs edited =====
--- 1.23/drivers/char/drm/radeon_state.c Tue Feb 3 21:29:26 2004
+++ edited/drivers/char/drm/radeon_state.c Tue Feb 17 15:51:53 2004
@@ -2185,10 +2185,21 @@
case RADEON_PARAM_STATUS_HANDLE:
value = dev_priv->ring_rptr_offset;
break;
+#if BITS_PER_LONG == 32
+ /*
+ * This ioctl() doesn't work on 64-bit platforms because hw_lock is a
+ * pointer which can't fit into an int-sized variable. According to
+ * Michel Dänzer, the ioctl() is only used on embedded platforms, so not
+ * supporting it shouldn't be a problem. If the same functionality is
+ * needed on 64-bit platforms, a new ioctl() would have to be added, so
+ * backwards-compatibility for the embedded platforms can be maintained.
+ * --davidm 4-Feb-2004.
+ */
case RADEON_PARAM_SAREA_HANDLE:
/* The lock is the first dword in the sarea. */
value = (int)dev->lock.hw_lock;
break;
+#endif
case RADEON_PARAM_GART_TEX_HANDLE:
value = dev_priv->gart_textures_offset;
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/