···770770 /* Misc. support (drm_init.h) */771771extern int drm_flags;772772extern void drm_parse_options(char *s);773773-extern int drm_cpu_valid(void);774773775774 /* Driver support (drm_drv.h) */776775extern int drm_init(struct drm_driver *driver);
+17
drivers/char/drm/drm_fops.c
···322322EXPORT_SYMBOL(drm_release);323323324324/**325325+ * Check whether DRI will run on this CPU.326326+ *327327+ * \return non-zero if the DRI will run on this CPU, or zero otherwise.328328+ */329329+static int drm_cpu_valid(void)330330+{331331+#if defined(__i386__)332332+ if (boot_cpu_data.x86 == 3)333333+ return 0; /* No cmpxchg on a 386 */334334+#endif335335+#if defined(__sparc__) && !defined(__sparc_v9__)336336+ return 0; /* No cmpxchg before v9 sparc. */337337+#endif338338+ return 1;339339+}340340+341341+/**325342 * Called whenever a process opens /dev/drm.326343 *327344 * \param inode device inode.
-53
drivers/char/drm/drm_init.c
···11-/**22- * \file drm_init.c33- * Setup/Cleanup for DRM44- *55- * \author Rickard E. (Rik) Faith <faith@valinux.com>66- * \author Gareth Hughes <gareth@valinux.com>77- */88-99-/*1010- * Created: Mon Jan 4 08:58:31 1999 by faith@valinux.com1111- *1212- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.1313- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.1414- * All Rights Reserved.1515- *1616- * Permission is hereby granted, free of charge, to any person obtaining a1717- * copy of this software and associated documentation files (the "Software"),1818- * to deal in the Software without restriction, including without limitation1919- * the rights to use, copy, modify, merge, publish, distribute, sublicense,2020- * and/or sell copies of the Software, and to permit persons to whom the2121- * Software is furnished to do so, subject to the following conditions:2222- *2323- * The above copyright notice and this permission notice (including the next2424- * paragraph) shall be included in all copies or substantial portions of the2525- * Software.2626- *2727- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR2828- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,2929- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL3030- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR3131- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,3232- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR3333- * OTHER DEALINGS IN THE SOFTWARE.3434- */3535-3636-#include "drmP.h"3737-3838-/**3939- * Check whether DRI will run on this CPU.4040- *4141- * \return non-zero if the DRI will run on this CPU, or zero otherwise.4242- */4343-int drm_cpu_valid(void)4444-{4545-#if defined(__i386__)4646- if (boot_cpu_data.x86 == 3)4747- return 0; /* No cmpxchg on a 386 */4848-#endif4949-#if defined(__sparc__) && !defined(__sparc_v9__)5050- return 0; /* No cmpxchg before v9 sparc. */5151-#endif5252- return 1;5353-}