diff options
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r-- | linux-core/drm_fops.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index 54cebbcb..ca4f9c89 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -191,6 +191,23 @@ int drm_stub_open(struct inode *inode, struct file *filp) } /** + * 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. * * \param inode device inode. |