drm: remove drm_init.c it is no longer needed
[pandora-kernel.git] / drivers / char / drm / drm_fops.c
index f57f7d1..28f0130 100644 (file)
@@ -321,6 +321,23 @@ int drm_release(struct inode *inode, struct file *filp)
 
 EXPORT_SYMBOL(drm_release);
 
+/**
+ * Check whether DRI will run on this CPU.
+ *
+ * \return non-zero if the DRI will run on this CPU, or zero otherwise.
+ */
+static int drm_cpu_valid(void)
+{
+#if defined(__i386__)
+       if (boot_cpu_data.x86 == 3)
+               return 0;       /* No cmpxchg on a 386 */
+#endif
+#if defined(__sparc__) && !defined(__sparc_v9__)
+       return 0;               /* No cmpxchg before v9 sparc. */
+#endif
+       return 1;
+}
+
 /**
  * Called whenever a process opens /dev/drm.
  *