From 3f9df54d6386bb632ffc00665489bb3bb3bf6ff2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 10 Nov 2005 22:28:56 +1100 Subject: drm: remove drm_init.c it is no longer needed Move drm_cpu_valid into drm_fops.c Signed-off-by: Dave Airlie --- drivers/char/drm/drm_fops.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'drivers/char/drm/drm_fops.c') diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index f57f7d1a281e..28f01305377f 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c @@ -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. * -- cgit v1.2.3