diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
commit | f1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch) | |
tree | 562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /drivers/sgi | |
parent | 00f11569ac8ca73cbcdef8822de1583e79aee571 (diff) |
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'drivers/sgi')
-rw-r--r-- | drivers/sgi/char/graphics.c | 3 | ||||
-rw-r--r-- | drivers/sgi/char/shmiq.c | 6 | ||||
-rw-r--r-- | drivers/sgi/char/streamable.c | 19 | ||||
-rw-r--r-- | drivers/sgi/char/usema.c | 7 |
4 files changed, 11 insertions, 24 deletions
diff --git a/drivers/sgi/char/graphics.c b/drivers/sgi/char/graphics.c index a060e9895..62ca3c5e6 100644 --- a/drivers/sgi/char/graphics.c +++ b/drivers/sgi/char/graphics.c @@ -33,6 +33,7 @@ #include <linux/mman.h> #include <linux/malloc.h> #include <linux/module.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include "gconsole.h" #include "graphics.h" @@ -194,6 +195,7 @@ sgi_graphics_close (struct inode *inode, struct file *file) int board = GRAPHICS_CARD (inode->i_rdev); /* Tell the rendering manager that one client is going away */ + lock_kernel(); rrm_close (inode, file); /* Was this file handle from the board owner?, clear it */ @@ -203,6 +205,7 @@ sgi_graphics_close (struct inode *inode, struct file *file) (*cards [board].g_reset_console)(); enable_gconsole (); } + unlock_kernel(); return 0; } diff --git a/drivers/sgi/char/shmiq.c b/drivers/sgi/char/shmiq.c index 03eab91e2..1438030b3 100644 --- a/drivers/sgi/char/shmiq.c +++ b/drivers/sgi/char/shmiq.c @@ -329,9 +329,12 @@ shmiq_qcntl_mmap (struct file *file, struct vm_area_struct *vma) size = vma->vm_end - vma->vm_start; start = vma->vm_start; + lock_kernel(); mem = (unsigned long) shmiqs [minor].shmiq_vaddr = vmalloc_uncached (size); - if (!mem) + if (!mem) { + unlock_kernel(); return -EINVAL; + } /* Prevent the swapper from considering these pages for swap and touching them */ vma->vm_flags |= (VM_SHM | VM_LOCKED | VM_IO); @@ -345,6 +348,7 @@ shmiq_qcntl_mmap (struct file *file, struct vm_area_struct *vma) shmiqs [minor].tail = 0; /* Init the shared memory input queue */ memset (shmiqs [minor].shmiq_vaddr, 0, size); + unlock_kernel(); return error; } diff --git a/drivers/sgi/char/streamable.c b/drivers/sgi/char/streamable.c index 1f354d80f..1d2a65c2a 100644 --- a/drivers/sgi/char/streamable.c +++ b/drivers/sgi/char/streamable.c @@ -13,6 +13,7 @@ #include <linux/sched.h> #include <linux/kbd_kern.h> #include <linux/vt_kern.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/shmiq.h> #include <asm/keyboard.h> @@ -50,20 +51,6 @@ get_sioc (struct strioctl *sioc, unsigned long arg) /* /dev/gfx device */ static int -sgi_gfx_open (struct inode *inode, struct file *file) -{ - printk ("GFX: Opened by %d\n", current->pid); - return 0; -} - -static int -sgi_gfx_close (struct inode *inode, struct file *file) -{ - printk ("GFX: Closed by %d\n", current->pid); - return 0; -} - -static int sgi_gfx_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { printk ("GFX: ioctl 0x%x %ld called\n", cmd, arg); @@ -73,8 +60,6 @@ sgi_gfx_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigne struct file_operations sgi_gfx_fops = { ioctl: sgi_gfx_ioctl, - open: sgi_gfx_open, - release: sgi_gfx_close, }; static struct miscdevice dev_gfx = { @@ -236,7 +221,9 @@ sgi_mouse_open (struct inode *inode, struct file *file) static int sgi_mouse_close (struct inode *inode, struct file *filp) { + lock_kernel(); mouse_opened = 0; + unlock_kernel(); return 0; } diff --git a/drivers/sgi/char/usema.c b/drivers/sgi/char/usema.c index c9fbe87d4..4ae9d2e2b 100644 --- a/drivers/sgi/char/usema.c +++ b/drivers/sgi/char/usema.c @@ -163,17 +163,10 @@ sgi_usemaclone_open(struct inode *inode, struct file *filp) return 0; } -static int -sgi_usemaclone_release(struct inode *inode, struct file *filp) -{ - return 0; -} - struct file_operations sgi_usemaclone_fops = { poll: sgi_usemaclone_poll, ioctl: sgi_usemaclone_ioctl, open: sgi_usemaclone_open, - release: sgi_usemaclone_release, }; static struct miscdevice dev_usemaclone = { |