summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i810/i810_drv.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-01-25 23:17:15 +0100
committerDave Airlie <airlied@redhat.com>2011-02-07 12:15:04 +1000
commit1f692a14cbfbeb11f9a9c16f25c8ecb8ab50d3d5 (patch)
tree4f9ab3542cb556e526f99644d82061ac503f6943 /drivers/gpu/drm/i810/i810_drv.c
parent7f50684717511d30bba180902105c4cd4efca732 (diff)
drm/i810: remove the BKL
SMP i810 systems were practically nonexistent and the configuration was not officially supported by Intel at the time when Pentium-III was common. With this change, it is still possible to build a distribution kernel that has support for SMP and includes the i810 driver without the BKL. As a precaution, check for the theoretical SMP case at run time and refuse to load the driver. We also need to disable CONFIG_PREEMPT builds for this driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i810/i810_drv.c')
-rw-r--r--drivers/gpu/drm/i810/i810_drv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
index 88bcd331e7c5..0152fa27e616 100644
--- a/drivers/gpu/drm/i810/i810_drv.c
+++ b/drivers/gpu/drm/i810/i810_drv.c
@@ -57,7 +57,7 @@ static struct drm_driver driver = {
.owner = THIS_MODULE,
.open = drm_open,
.release = drm_release,
- .unlocked_ioctl = i810_ioctl,
+ .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap,
.poll = drm_poll,
.fasync = drm_fasync,
@@ -79,6 +79,10 @@ static struct drm_driver driver = {
static int __init i810_init(void)
{
+ if (num_possible_cpus() > 1) {
+ pr_err("drm/i810 does not support SMP\n");
+ return -EINVAL;
+ }
driver.num_ioctls = i810_max_ioctl;
return drm_init(&driver);
}