diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-01-26 01:17:15 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-07 05:15:04 +0300 |
commit | 1f692a14cbfbeb11f9a9c16f25c8ecb8ab50d3d5 (patch) | |
tree | 4f9ab3542cb556e526f99644d82061ac503f6943 /drivers/gpu/drm/i810/i810_drv.c | |
parent | 7f50684717511d30bba180902105c4cd4efca732 (diff) | |
download | linux-1f692a14cbfbeb11f9a9c16f25c8ecb8ab50d3d5.tar.xz |
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.c | 6 |
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); } |