Commit 12770fac authored by Patrick Mochel's avatar Patrick Mochel

Hand Merge

parents a7668df2 f5268fce
...@@ -28,8 +28,9 @@ d_iput: no no no yes ...@@ -28,8 +28,9 @@ d_iput: no no no yes
--------------------------- inode_operations --------------------------- --------------------------- inode_operations ---------------------------
prototypes: prototypes:
int (*create) (struct inode *,struct dentry *,int); int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
struct dentry * (*lookup) (struct inode *,struct dentry *); struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid
ata *);
int (*link) (struct dentry *,struct inode *,struct dentry *); int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *); int (*symlink) (struct inode *,struct dentry *,const char *);
...@@ -38,13 +39,13 @@ prototypes: ...@@ -38,13 +39,13 @@ prototypes:
int (*mknod) (struct inode *,struct dentry *,int,dev_t); int (*mknod) (struct inode *,struct dentry *,int,dev_t);
int (*rename) (struct inode *, struct dentry *, int (*rename) (struct inode *, struct dentry *,
struct inode *, struct dentry *); struct inode *, struct dentry *);
int (*readlink) (struct dentry *, char *,int); int (*readlink) (struct dentry *, char __user *,int);
int (*follow_link) (struct dentry *, struct nameidata *); int (*follow_link) (struct dentry *, struct nameidata *);
void (*truncate) (struct inode *); void (*truncate) (struct inode *);
int (*permission) (struct inode *, int); int (*permission) (struct inode *, int, struct nameidata *);
int (*setattr) (struct dentry *, struct iattr *); int (*setattr) (struct dentry *, struct iattr *);
int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *); int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
int (*setxattr) (struct dentry *, const char *, void *, size_t, int); int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
ssize_t (*listxattr) (struct dentry *, char *, size_t); ssize_t (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, const char *); int (*removexattr) (struct dentry *, const char *);
...@@ -85,42 +86,55 @@ of the locking scheme for directory operations. ...@@ -85,42 +86,55 @@ of the locking scheme for directory operations.
--------------------------- super_operations --------------------------- --------------------------- super_operations ---------------------------
prototypes: prototypes:
struct inode *(*alloc_inode)(struct super_block *sb);
void (*destroy_inode)(struct inode *);
void (*read_inode) (struct inode *); void (*read_inode) (struct inode *);
void (*dirty_inode) (struct inode *);
void (*write_inode) (struct inode *, int); void (*write_inode) (struct inode *, int);
void (*put_inode) (struct inode *); void (*put_inode) (struct inode *);
void (*drop_inode) (struct inode *); void (*drop_inode) (struct inode *);
void (*delete_inode) (struct inode *); void (*delete_inode) (struct inode *);
void (*put_super) (struct super_block *); void (*put_super) (struct super_block *);
void (*write_super) (struct super_block *); void (*write_super) (struct super_block *);
int (*sync_fs) (struct super_block *sb, int wait); int (*sync_fs)(struct super_block *sb, int wait);
int (*statfs) (struct super_block *, struct statfs *); void (*write_super_lockfs) (struct super_block *);
void (*unlockfs) (struct super_block *);
int (*statfs) (struct super_block *, struct kstatfs *);
int (*remount_fs) (struct super_block *, int *, char *); int (*remount_fs) (struct super_block *, int *, char *);
void (*clear_inode) (struct inode *); void (*clear_inode) (struct inode *);
void (*umount_begin) (struct super_block *); void (*umount_begin) (struct super_block *);
int (*show_options)(struct seq_file *, struct vfsmount *);
locking rules: locking rules:
All may block. All may block.
BKL s_lock mount_sem BKL s_lock s_umount
read_inode: yes (see below) alloc_inode: no no no
write_inode: no destroy_inode: no
put_inode: no read_inode: no (see below)
drop_inode: no !!!inode_lock!!! dirty_inode: no (must not sleep)
delete_inode: no write_inode: no
clear_inode: no put_inode: no
put_super: yes yes maybe (see below) drop_inode: no !!!inode_lock!!!
write_super: no yes maybe (see below) delete_inode: no
sync_fs: no no maybe (see below) put_super: yes yes no
statfs: no no no write_super: no yes read
remount_fs: yes yes maybe (see below) sync_fs: no no read
umount_begin: yes no maybe (see below) write_super_lockfs: ?
unlockfs: ?
statfs: no no no
remount_fs: no yes maybe (see below)
clear_inode: no
umount_begin: yes no no
show_options: no (vfsmount->sem)
->read_inode() is not a method - it's a callback used in iget(). ->read_inode() is not a method - it's a callback used in iget().
rules for mount_sem are not too nice - it is going to die and be replaced ->remount_fs() will have the s_umount lock if it's already mounted.
by better scheme anyway. When called from get_sb_single, it does NOT have the s_umount lock.
--------------------------- file_system_type --------------------------- --------------------------- file_system_type ---------------------------
prototypes: prototypes:
struct super_block *(*get_sb) (struct file_system_type *, int, const char *, void *); struct super_block *(*get_sb) (struct file_system_type *, int,
const char *, void *);
void (*kill_sb) (struct super_block *); void (*kill_sb) (struct super_block *);
locking rules: locking rules:
may block BKL may block BKL
...@@ -128,7 +142,7 @@ get_sb yes yes ...@@ -128,7 +142,7 @@ get_sb yes yes
kill_sb yes yes kill_sb yes yes
->get_sb() returns error or a locked superblock (exclusive on ->s_umount). ->get_sb() returns error or a locked superblock (exclusive on ->s_umount).
->kill_sb() takes a locked superblock, does all shutdown work on it, ->kill_sb() takes a write-locked superblock, does all shutdown work on it,
unlocks and drops the reference. unlocks and drops the reference.
--------------------------- address_space_operations -------------------------- --------------------------- address_space_operations --------------------------
...@@ -138,12 +152,15 @@ prototypes: ...@@ -138,12 +152,15 @@ prototypes:
int (*sync_page)(struct page *); int (*sync_page)(struct page *);
int (*writepages)(struct address_space *, struct writeback_control *); int (*writepages)(struct address_space *, struct writeback_control *);
int (*set_page_dirty)(struct page *page); int (*set_page_dirty)(struct page *page);
int (*readpages)(struct file *filp, struct address_space *mapping,
struct list_head *pages, unsigned nr_pages);
int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
int (*commit_write)(struct file *, struct page *, unsigned, unsigned); int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
int (*bmap)(struct address_space *, long); sector_t (*bmap)(struct address_space *, sector_t);
int (*invalidatepage) (struct page *, unsigned long); int (*invalidatepage) (struct page *, unsigned long);
int (*releasepage) (struct page *, int); int (*releasepage) (struct page *, int);
int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int); int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
loff_t offset, unsigned long nr_segs);
locking rules: locking rules:
All except set_page_dirty may block All except set_page_dirty may block
...@@ -151,15 +168,16 @@ locking rules: ...@@ -151,15 +168,16 @@ locking rules:
BKL PageLocked(page) BKL PageLocked(page)
writepage: no yes, unlocks (see below) writepage: no yes, unlocks (see below)
readpage: no yes, unlocks readpage: no yes, unlocks
readpages: no
sync_page: no maybe sync_page: no maybe
writepages: no writepages: no
set_page_dirty no no set_page_dirty no no
readpages: no
prepare_write: no yes prepare_write: no yes
commit_write: no yes commit_write: no yes
bmap: yes bmap: yes
invalidatepage: no yes invalidatepage: no yes
releasepage: no yes releasepage: no yes
direct_IO: no
->prepare_write(), ->commit_write(), ->sync_page() and ->readpage() ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
may be called from the request handler (/dev/loop). may be called from the request handler (/dev/loop).
...@@ -253,8 +271,8 @@ prototypes: ...@@ -253,8 +271,8 @@ prototypes:
locking rules: locking rules:
BKL may block BKL may block
fl_notify: yes no fl_notify: yes no
fl_insert: yes maybe fl_insert: yes no
fl_remove: yes maybe fl_remove: yes no
Currently only NLM provides instances of this class. None of the Currently only NLM provides instances of this class. None of the
them block. If you have out-of-tree instances - please, show up. Locking them block. If you have out-of-tree instances - please, show up. Locking
in that area will change. in that area will change.
...@@ -274,57 +292,75 @@ prototypes: ...@@ -274,57 +292,75 @@ prototypes:
int (*open) (struct inode *, struct file *); int (*open) (struct inode *, struct file *);
int (*release) (struct inode *, struct file *); int (*release) (struct inode *, struct file *);
int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
int (*check_media_change) (kdev_t); int (*media_changed) (struct gendisk *);
int (*revalidate) (kdev_t); int (*revalidate_disk) (struct gendisk *);
locking rules: locking rules:
BKL bd_sem BKL bd_sem
open: yes yes open: yes yes
release: yes yes release: yes yes
ioctl: yes no ioctl: yes no
check_media_change: yes no media_changed: no no
revalidate: yes no revalidate_disk: no no
The last two are called only from check_disk_change(). Prototypes are very The last two are called only from check_disk_change().
bad - as soon as we'll get disk_struct they will change (and methods will
become per-disk instead of per-partition).
--------------------------- file_operations ------------------------------- --------------------------- file_operations -------------------------------
prototypes: prototypes:
loff_t (*llseek) (struct file *, loff_t, int); loff_t (*llseek) (struct file *, loff_t, int);
ssize_t (*read) (struct file *, char *, size_t, loff_t *); ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char *, size_t, loff_t *); ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t);
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t,
loff_t);
int (*readdir) (struct file *, void *, filldir_t); int (*readdir) (struct file *, void *, filldir_t);
unsigned int (*poll) (struct file *, struct poll_table_struct *); unsigned int (*poll) (struct file *, struct poll_table_struct *);
int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); int (*ioctl) (struct inode *, struct file *, unsigned int,
unsigned long);
int (*mmap) (struct file *, struct vm_area_struct *); int (*mmap) (struct file *, struct vm_area_struct *);
int (*open) (struct inode *, struct file *); int (*open) (struct inode *, struct file *);
int (*flush) (struct file *); int (*flush) (struct file *);
int (*release) (struct inode *, struct file *); int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, struct dentry *, int datasync); int (*fsync) (struct file *, struct dentry *, int datasync);
int (*aio_fsync) (struct kiocb *, int datasync);
int (*fasync) (int, struct file *, int); int (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *); int (*lock) (struct file *, int, struct file_lock *);
ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *); ssize_t (*readv) (struct file *, const struct iovec *, unsigned long,
ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *); loff_t *);
ssize_t (*writev) (struct file *, const struct iovec *, unsigned long,
loff_t *);
ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t,
void __user *);
ssize_t (*sendpage) (struct file *, struct page *, int, size_t,
loff_t *, int);
unsigned long (*get_unmapped_area)(struct file *, unsigned long,
unsigned long, unsigned long, unsigned long);
}; };
locking rules: locking rules:
All except ->poll() may block. All except ->poll() may block.
BKL BKL
llseek: yes (see below) llseek: no (see below)
read: no read: no
write: no aio_read: no
readdir: no write: no
poll: no aio_write: no
ioctl: yes (see below) readdir: no
mmap: no poll: no
open: maybe (see below) ioctl: yes (see below)
flush: no mmap: no
release: no open: maybe (see below)
fsync: yes (see below) flush: no
fasync: yes (see below) release: no
lock: yes fsync: no (see below)
readv: no aio_fsync: no
writev: no fasync: yes (see below)
lock: yes
readv: no
writev: no
sendfile: no
sendpage: no
get_unmapped_area: no
->llseek() locking has moved from llseek to the individual llseek ->llseek() locking has moved from llseek to the individual llseek
implementations. If your fs is not using generic_file_llseek, you implementations. If your fs is not using generic_file_llseek, you
......
...@@ -12,7 +12,7 @@ This can be used to debug hard kernel lockups. By executing periodic ...@@ -12,7 +12,7 @@ This can be used to debug hard kernel lockups. By executing periodic
NMI interrupts, the kernel can monitor whether any CPU has locked up, NMI interrupts, the kernel can monitor whether any CPU has locked up,
and print out debugging messages if so. and print out debugging messages if so.
In order to use the NMI watchdoc, you need to have APIC support in your In order to use the NMI watchdog, you need to have APIC support in your
kernel. For SMP kernels, APIC support gets compiled in automatically. For kernel. For SMP kernels, APIC support gets compiled in automatically. For
UP, enable either CONFIG_X86_UP_APIC (Processor type and features -> Local UP, enable either CONFIG_X86_UP_APIC (Processor type and features -> Local
APIC support on uniprocessors) or CONFIG_X86_UP_IOAPIC (Processor type and APIC support on uniprocessors) or CONFIG_X86_UP_IOAPIC (Processor type and
......
This diff is collapsed.
...@@ -2253,6 +2253,13 @@ M: fuganti@netbank.com.br ...@@ -2253,6 +2253,13 @@ M: fuganti@netbank.com.br
W: http://cvs.conectiva.com.br/drivers/ZFL-watchdog/ W: http://cvs.conectiva.com.br/drivers/ZFL-watchdog/
S: Maintained S: Maintained
ZR36067 VIDEO FOR LINUX DRIVER
P: Ronald Bultje
M: R.S.Bultje@pharm.uu.nl
L: mjpeg-users@lists.sourceforge.net
W: http://mjpeg.sourceforge.net/driver-zoran/
S: Maintained
ZR36120 VIDEO FOR LINUX DRIVER ZR36120 VIDEO FOR LINUX DRIVER
P: Pauline Middelink P: Pauline Middelink
M: middelin@polyware.nl M: middelin@polyware.nl
......
...@@ -1204,10 +1204,6 @@ source "drivers/pnp/Kconfig" ...@@ -1204,10 +1204,6 @@ source "drivers/pnp/Kconfig"
source "drivers/block/Kconfig" source "drivers/block/Kconfig"
config MOUNT_ROOT_FAILED_MSG
bool
default y
source "drivers/ide/Kconfig" source "drivers/ide/Kconfig"
source "drivers/scsi/Kconfig" source "drivers/scsi/Kconfig"
......
...@@ -228,7 +228,6 @@ CONFIG_BLK_DEV_FD=y ...@@ -228,7 +228,6 @@ CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_INITRD is not set # CONFIG_BLK_DEV_INITRD is not set
CONFIG_LBD=y CONFIG_LBD=y
CONFIG_MOUNT_ROOT_FAILED_MSG=y
# #
# ATA/ATAPI/MFM/RLL support # ATA/ATAPI/MFM/RLL support
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#if defined (CONFIG_X86_LOCAL_APIC) #if defined (CONFIG_X86_LOCAL_APIC)
#include <mach_apic.h> #include <mach_apic.h>
#include <mach_mpparse.h> #include <mach_mpparse.h>
#include <asm/io_apic.h>
#endif #endif
#define PREFIX "ACPI: " #define PREFIX "ACPI: "
......
...@@ -162,6 +162,23 @@ enum ...@@ -162,6 +162,23 @@ enum
static char *dmi_ident[DMI_STRING_MAX]; static char *dmi_ident[DMI_STRING_MAX];
#ifdef CONFIG_ACPI_BOOT
/* print some information suitable for a blacklist entry. */
static void dmi_dump_system(void)
{
printk("DMI: BIOS: %.40s, %.40s, %.40s\n",
dmi_ident[DMI_BIOS_VENDOR], dmi_ident[DMI_BIOS_VERSION],
dmi_ident[DMI_BIOS_DATE]);
printk("DMI: System: %.40s, %.40s, %.40s\n",
dmi_ident[DMI_SYS_VENDOR], dmi_ident[DMI_PRODUCT_NAME],
dmi_ident[DMI_PRODUCT_VERSION]);
printk("DMI: Board: %.40s, %.40s, %.40s\n",
dmi_ident[DMI_BOARD_VENDOR], dmi_ident[DMI_BOARD_NAME],
dmi_ident[DMI_BOARD_VERSION]);
}
#endif
/* /*
* Save a DMI string * Save a DMI string
*/ */
...@@ -1104,25 +1121,6 @@ void __init dmi_scan_machine(void) ...@@ -1104,25 +1121,6 @@ void __init dmi_scan_machine(void)
EXPORT_SYMBOL(is_unsafe_smbus); EXPORT_SYMBOL(is_unsafe_smbus);
#ifdef CONFIG_MOUNT_ROOT_FAILED_MSG #ifdef CONFIG_MOUNT_ROOT_FAILED_MSG
#ifdef CONFIG_ACPI_BOOT
/* print some information suitable for a blacklist entry. */
static void dmi_dump_system(void)
{
printk("DMI: BIOS: %.40s, %.40s, %.40s\n",
dmi_ident[DMI_BIOS_VENDOR], dmi_ident[DMI_BIOS_VERSION],
dmi_ident[DMI_BIOS_DATE]);
printk("DMI: System: %.40s, %.40s, %.40s\n",
dmi_ident[DMI_SYS_VENDOR], dmi_ident[DMI_PRODUCT_NAME],
dmi_ident[DMI_PRODUCT_VERSION]);
printk("DMI: Board: %.40s, %.40s, %.40s\n",
dmi_ident[DMI_BOARD_VENDOR], dmi_ident[DMI_BOARD_NAME],
dmi_ident[DMI_BOARD_VERSION]);
}
/* /*
* mount_root_failed_msg() * mount_root_failed_msg()
* *
...@@ -1135,20 +1133,13 @@ static void dmi_dump_system(void) ...@@ -1135,20 +1133,13 @@ static void dmi_dump_system(void)
void void
mount_root_failed_msg(void) mount_root_failed_msg(void)
{ {
#ifdef CONFIG_ACPI_BOOT
printk ("Try booting with pci=noacpi, acpi=ht, " printk ("Try booting with pci=noacpi, acpi=ht, "
"or acpi=off on the command line.\n"); "or acpi=off on the command line.\n");
printk ("If one helps, please report the following lines:\n"); printk ("If one helps, please report the following lines:\n");
dmi_dump_system(); dmi_dump_system();
}
#else
void mount_root_failed_msg(void)
{
}
#endif #endif
}
#endif /* CONFIG_MOUNT_ROOT_FAILED_MSG */ #endif /* CONFIG_MOUNT_ROOT_FAILED_MSG */
...@@ -50,8 +50,7 @@ struct tss_struct doublefault_tss __cacheline_aligned = { ...@@ -50,8 +50,7 @@ struct tss_struct doublefault_tss __cacheline_aligned = {
.esp0 = STACK_START, .esp0 = STACK_START,
.ss0 = __KERNEL_DS, .ss0 = __KERNEL_DS,
.ldt = 0, .ldt = 0,
.bitmap = INVALID_IO_BITMAP_OFFSET, .io_bitmap_base = INVALID_IO_BITMAP_OFFSET,
.io_bitmap = { [0 ... IO_BITMAP_SIZE ] = ~0 },
.eip = (unsigned long) doublefault_fn, .eip = (unsigned long) doublefault_fn,
.eflags = 0x00000082, .eflags = 0x00000082,
......
...@@ -17,17 +17,17 @@ ...@@ -17,17 +17,17 @@
#include <linux/thread_info.h> #include <linux/thread_info.h>
/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */ /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
static void set_bitmap(unsigned long *bitmap, unsigned long base, unsigned long extent, int new_value) static void set_bitmap(unsigned long *bitmap, unsigned int base, unsigned int extent, int new_value)
{ {
unsigned long mask; unsigned long mask;
unsigned long *bitmap_base = bitmap + (base / BITS_PER_LONG); unsigned long *bitmap_base = bitmap + (base / BITS_PER_LONG);
unsigned long low_index = base & (BITS_PER_LONG-1); unsigned int low_index = base & (BITS_PER_LONG-1);
int length = low_index + extent; int length = low_index + extent;
if (low_index != 0) { if (low_index != 0) {
mask = (~0UL << low_index); mask = (~0UL << low_index);
if (length < BITS_PER_LONG) if (length < BITS_PER_LONG)
mask &= ~(~0UL << length); mask &= ~(~0UL << length);
if (new_value) if (new_value)
*bitmap_base++ |= mask; *bitmap_base++ |= mask;
else else
...@@ -50,6 +50,7 @@ static void set_bitmap(unsigned long *bitmap, unsigned long base, unsigned long ...@@ -50,6 +50,7 @@ static void set_bitmap(unsigned long *bitmap, unsigned long base, unsigned long
} }
} }
/* /*
* this changes the io permissions bitmap in the current task. * this changes the io permissions bitmap in the current task.
*/ */
...@@ -57,10 +58,9 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) ...@@ -57,10 +58,9 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
{ {
struct thread_struct * t = &current->thread; struct thread_struct * t = &current->thread;
struct tss_struct * tss; struct tss_struct * tss;
unsigned long *bitmap = NULL; unsigned long *bitmap;
int ret = 0;
if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32)) if ((from + num <= from) || (from + num > IO_BITMAP_BITS))
return -EINVAL; return -EINVAL;
if (turn_on && !capable(CAP_SYS_RAWIO)) if (turn_on && !capable(CAP_SYS_RAWIO))
return -EPERM; return -EPERM;
...@@ -70,34 +70,28 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) ...@@ -70,34 +70,28 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
* IO bitmap up. ioperm() is much less timing critical than clone(), * IO bitmap up. ioperm() is much less timing critical than clone(),
* this is why we delay this operation until now: * this is why we delay this operation until now:
*/ */
if (!t->ts_io_bitmap) { if (!t->io_bitmap_ptr) {
bitmap = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); bitmap = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
if (!bitmap) { if (!bitmap)
ret = -ENOMEM; return -ENOMEM;
goto out;
}
/*
* just in case ...
*/
memset(bitmap, 0xff, IO_BITMAP_BYTES); memset(bitmap, 0xff, IO_BITMAP_BYTES);
t->ts_io_bitmap = bitmap; t->io_bitmap_ptr = bitmap;
} }
/* /*
* do it in the per-thread copy and in the TSS ... * do it in the per-thread copy and in the TSS ...
*/ */
set_bitmap(t->ts_io_bitmap, from, num, !turn_on); set_bitmap(t->io_bitmap_ptr, from, num, !turn_on);
tss = init_tss + get_cpu(); tss = init_tss + get_cpu();
if (tss->bitmap == IO_BITMAP_OFFSET) { /* already active? */ if (tss->io_bitmap_base == IO_BITMAP_OFFSET) { /* already active? */
set_bitmap(tss->io_bitmap, from, num, !turn_on); set_bitmap(tss->io_bitmap, from, num, !turn_on);
} else { } else {
memcpy(tss->io_bitmap, t->ts_io_bitmap, IO_BITMAP_BYTES); memcpy(tss->io_bitmap, t->io_bitmap_ptr, IO_BITMAP_BYTES);
tss->bitmap = IO_BITMAP_OFFSET; /* Activate it in the TSS */ tss->io_bitmap_base = IO_BITMAP_OFFSET; /* Activate it in the TSS */
} }
put_cpu(); put_cpu();
out: return 0;
return ret;
} }
/* /*
......
...@@ -241,9 +241,9 @@ void exit_thread(void) ...@@ -241,9 +241,9 @@ void exit_thread(void)
struct task_struct *tsk = current; struct task_struct *tsk = current;
/* The process may have allocated an io port bitmap... nuke it. */ /* The process may have allocated an io port bitmap... nuke it. */
if (unlikely(NULL != tsk->thread.ts_io_bitmap)) { if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
kfree(tsk->thread.ts_io_bitmap); kfree(tsk->thread.io_bitmap_ptr);
tsk->thread.ts_io_bitmap = NULL; tsk->thread.io_bitmap_ptr = NULL;
} }
} }
...@@ -308,11 +308,11 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, ...@@ -308,11 +308,11 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
savesegment(gs,p->thread.gs); savesegment(gs,p->thread.gs);
tsk = current; tsk = current;
if (unlikely(NULL != tsk->thread.ts_io_bitmap)) { if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
p->thread.ts_io_bitmap = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
if (!p->thread.ts_io_bitmap) if (!p->thread.io_bitmap_ptr)
return -ENOMEM; return -ENOMEM;
memcpy(p->thread.ts_io_bitmap, tsk->thread.ts_io_bitmap, memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr,
IO_BITMAP_BYTES); IO_BITMAP_BYTES);
} }
...@@ -342,8 +342,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, ...@@ -342,8 +342,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
err = 0; err = 0;
out: out:
if (err && p->thread.ts_io_bitmap) if (err && p->thread.io_bitmap_ptr)
kfree(p->thread.ts_io_bitmap); kfree(p->thread.io_bitmap_ptr);
return err; return err;
} }
...@@ -492,8 +492,8 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct ...@@ -492,8 +492,8 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
loaddebug(next, 7); loaddebug(next, 7);
} }
if (unlikely(prev->ts_io_bitmap || next->ts_io_bitmap)) { if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) {
if (next->ts_io_bitmap) { if (next->io_bitmap_ptr) {
/* /*
* 4 cachelines copy ... not good, but not that * 4 cachelines copy ... not good, but not that
* bad either. Anyone got something better? * bad either. Anyone got something better?
...@@ -502,9 +502,9 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct ...@@ -502,9 +502,9 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
* and playing VM tricks to switch the IO bitmap * and playing VM tricks to switch the IO bitmap
* is not really acceptable.] * is not really acceptable.]
*/ */
memcpy(tss->io_bitmap, next->ts_io_bitmap, memcpy(tss->io_bitmap, next->io_bitmap_ptr,
IO_BITMAP_BYTES); IO_BITMAP_BYTES);
tss->bitmap = IO_BITMAP_OFFSET; tss->io_bitmap_base = IO_BITMAP_OFFSET;
} else } else
/* /*
* a bitmap offset pointing outside of the TSS limit * a bitmap offset pointing outside of the TSS limit
...@@ -512,7 +512,7 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct ...@@ -512,7 +512,7 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
* tries to use a port IO instruction. The first * tries to use a port IO instruction. The first
* sys_ioperm() call sets up the bitmap properly. * sys_ioperm() call sets up the bitmap properly.
*/ */
tss->bitmap = INVALID_IO_BITMAP_OFFSET; tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
} }
return prev_p; return prev_p;
} }
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/arch_hooks.h> #include <asm/arch_hooks.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/io_apic.h>
#include "setup_arch_pre.h" #include "setup_arch_pre.h"
#include "mach_resources.h" #include "mach_resources.h"
...@@ -543,10 +544,12 @@ static void __init parse_cmdline_early (char ** cmdline_p) ...@@ -543,10 +544,12 @@ static void __init parse_cmdline_early (char ** cmdline_p)
if (!acpi_force) acpi_disabled = 1; if (!acpi_force) acpi_disabled = 1;
} }
#ifdef CONFIG_X86_LOCAL_APIC
/* disable IO-APIC */ /* disable IO-APIC */
else if (!memcmp(from, "noapic", 6)) else if (!memcmp(from, "noapic", 6))
disable_ioapic_setup(); disable_ioapic_setup();
#endif #endif /* CONFIG_X86_LOCAL_APIC */
#endif /* CONFIG_ACPI_BOOT */
/* /*
* highmem=size forces highmem to be exactly 'size' bytes. * highmem=size forces highmem to be exactly 'size' bytes.
......
...@@ -222,85 +222,105 @@ __copy_user_intel(void *to, const void *from,unsigned long size) ...@@ -222,85 +222,105 @@ __copy_user_intel(void *to, const void *from,unsigned long size)
{ {
int d0, d1; int d0, d1;
__asm__ __volatile__( __asm__ __volatile__(
" .align 2,0x90\n" " .align 2,0x90\n"
"0: movl 32(%4), %%eax\n" "1: movl 32(%4), %%eax\n"
" cmpl $67, %0\n" " cmpl $67, %0\n"
" jbe 1f\n" " jbe 3f\n"
" movl 64(%4), %%eax\n" "2: movl 64(%4), %%eax\n"
" .align 2,0x90\n" " .align 2,0x90\n"
"1: movl 0(%4), %%eax\n" "3: movl 0(%4), %%eax\n"
" movl 4(%4), %%edx\n" "4: movl 4(%4), %%edx\n"
"2: movl %%eax, 0(%3)\n" "5: movl %%eax, 0(%3)\n"
"21: movl %%edx, 4(%3)\n" "6: movl %%edx, 4(%3)\n"
" movl 8(%4), %%eax\n" "7: movl 8(%4), %%eax\n"
" movl 12(%4),%%edx\n" "8: movl 12(%4),%%edx\n"
"3: movl %%eax, 8(%3)\n" "9: movl %%eax, 8(%3)\n"
"31: movl %%edx, 12(%3)\n" "10: movl %%edx, 12(%3)\n"
" movl 16(%4), %%eax\n" "11: movl 16(%4), %%eax\n"
" movl 20(%4), %%edx\n" "12: movl 20(%4), %%edx\n"
"4: movl %%eax, 16(%3)\n" "13: movl %%eax, 16(%3)\n"
"41: movl %%edx, 20(%3)\n" "14: movl %%edx, 20(%3)\n"
" movl 24(%4), %%eax\n" "15: movl 24(%4), %%eax\n"
" movl 28(%4), %%edx\n" "16: movl 28(%4), %%edx\n"
"10: movl %%eax, 24(%3)\n" "17: movl %%eax, 24(%3)\n"
"51: movl %%edx, 28(%3)\n" "18: movl %%edx, 28(%3)\n"
" movl 32(%4), %%eax\n" "19: movl 32(%4), %%eax\n"
" movl 36(%4), %%edx\n" "20: movl 36(%4), %%edx\n"
"11: movl %%eax, 32(%3)\n" "21: movl %%eax, 32(%3)\n"
"61: movl %%edx, 36(%3)\n" "22: movl %%edx, 36(%3)\n"
" movl 40(%4), %%eax\n" "23: movl 40(%4), %%eax\n"
" movl 44(%4), %%edx\n" "24: movl 44(%4), %%edx\n"
"12: movl %%eax, 40(%3)\n" "25: movl %%eax, 40(%3)\n"
"71: movl %%edx, 44(%3)\n" "26: movl %%edx, 44(%3)\n"
" movl 48(%4), %%eax\n" "27: movl 48(%4), %%eax\n"
" movl 52(%4), %%edx\n" "28: movl 52(%4), %%edx\n"
"13: movl %%eax, 48(%3)\n" "29: movl %%eax, 48(%3)\n"
"81: movl %%edx, 52(%3)\n" "30: movl %%edx, 52(%3)\n"
" movl 56(%4), %%eax\n" "31: movl 56(%4), %%eax\n"
" movl 60(%4), %%edx\n" "32: movl 60(%4), %%edx\n"
"14: movl %%eax, 56(%3)\n" "33: movl %%eax, 56(%3)\n"
"91: movl %%edx, 60(%3)\n" "34: movl %%edx, 60(%3)\n"
" addl $-64, %0\n" " addl $-64, %0\n"
" addl $64, %4\n" " addl $64, %4\n"
" addl $64, %3\n" " addl $64, %3\n"
" cmpl $63, %0\n" " cmpl $63, %0\n"
" ja 0b\n" " ja 1b\n"
"5: movl %0, %%eax\n" "35: movl %0, %%eax\n"
" shrl $2, %0\n" " shrl $2, %0\n"
" andl $3, %%eax\n" " andl $3, %%eax\n"
" cld\n" " cld\n"
"6: rep; movsl\n" "99: rep; movsl\n"
" movl %%eax, %0\n" "36: movl %%eax, %0\n"
"7: rep; movsb\n" "37: rep; movsb\n"
"8:\n" "100:\n"
".section .fixup,\"ax\"\n" ".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n" "101: lea 0(%%eax,%0,4),%0\n"
" jmp 8b\n" " jmp 100b\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" ".section __ex_table,\"a\"\n"
" .align 4\n" " .align 4\n"
" .long 2b,8b\n" " .long 1b,100b\n"
" .long 21b,8b\n" " .long 2b,100b\n"
" .long 3b,8b\n" " .long 3b,100b\n"
" .long 31b,8b\n" " .long 4b,100b\n"
" .long 4b,8b\n" " .long 5b,100b\n"
" .long 41b,8b\n" " .long 6b,100b\n"
" .long 10b,8b\n" " .long 7b,100b\n"
" .long 51b,8b\n" " .long 8b,100b\n"
" .long 11b,8b\n" " .long 9b,100b\n"
" .long 61b,8b\n" " .long 10b,100b\n"
" .long 12b,8b\n" " .long 11b,100b\n"
" .long 71b,8b\n" " .long 12b,100b\n"
" .long 13b,8b\n" " .long 13b,100b\n"
" .long 81b,8b\n" " .long 14b,100b\n"
" .long 14b,8b\n" " .long 15b,100b\n"
" .long 91b,8b\n" " .long 16b,100b\n"
" .long 6b,9b\n" " .long 17b,100b\n"
" .long 7b,8b\n" " .long 18b,100b\n"
".previous" " .long 19b,100b\n"
" .long 20b,100b\n"
" .long 21b,100b\n"
" .long 22b,100b\n"
" .long 23b,100b\n"
" .long 24b,100b\n"
" .long 25b,100b\n"
" .long 26b,100b\n"
" .long 27b,100b\n"
" .long 28b,100b\n"
" .long 29b,100b\n"
" .long 30b,100b\n"
" .long 31b,100b\n"
" .long 32b,100b\n"
" .long 33b,100b\n"
" .long 34b,100b\n"
" .long 35b,100b\n"
" .long 36b,100b\n"
" .long 37b,100b\n"
" .long 99b,101b\n"
".previous"
: "=&c"(size), "=&D" (d0), "=&S" (d1) : "=&c"(size), "=&D" (d0), "=&S" (d1)
: "1"(to), "2"(from), "0"(size) : "1"(to), "2"(from), "0"(size)
: "eax", "edx", "memory"); : "eax", "edx", "memory");
return size; return size;
} }
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
#include <asm/io.h> #include <asm/io.h>
/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */ /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_value) static void set_bitmap(unsigned long *bitmap, unsigned int base, unsigned int extent, int new_value)
{ {
unsigned long mask; unsigned long mask;
unsigned long *bitmap_base = bitmap + (base / BITS_PER_LONG); unsigned long *bitmap_base = bitmap + (base / BITS_PER_LONG);
unsigned long low_index = base & (BITS_PER_LONG-1); unsigned int low_index = base & (BITS_PER_LONG-1);
int length = low_index + extent; int length = low_index + extent;
if (low_index != 0) { if (low_index != 0) {
...@@ -58,9 +58,10 @@ static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_ ...@@ -58,9 +58,10 @@ static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
{ {
struct thread_struct * t = &current->thread; struct thread_struct * t = &current->thread;
struct tss_struct *tss; struct tss_struct * tss;
unsigned long *bitmap;
if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32)) if ((from + num <= from) || (from + num > IO_BITMAP_BITS))
return -EINVAL; return -EINVAL;
if (turn_on && !capable(CAP_SYS_RAWIO)) if (turn_on && !capable(CAP_SYS_RAWIO))
return -EPERM; return -EPERM;
...@@ -70,24 +71,25 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) ...@@ -70,24 +71,25 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
* IO bitmap up. ioperm() is much less timing critical than clone(), * IO bitmap up. ioperm() is much less timing critical than clone(),
* this is why we delay this operation until now: * this is why we delay this operation until now:
*/ */
if (!t->io_bitmap_ptr) { if (!t->io_bitmap_ptr) {
t->io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); bitmap = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
if (!t->io_bitmap_ptr) if (!bitmap)
return -ENOMEM; return -ENOMEM;
memset(t->io_bitmap_ptr,0xff,IO_BITMAP_BYTES); memset(bitmap, 0xff, IO_BITMAP_BYTES);
t->io_bitmap_ptr = bitmap;
} }
/* /*
* do it in the per-thread copy and in the TSS ... * do it in the per-thread copy and in the TSS ...
*/ */
set_bitmap((unsigned long *) t->io_bitmap_ptr, from, num, !turn_on); set_bitmap(t->io_bitmap_ptr, from, num, !turn_on);
tss = init_tss + get_cpu(); tss = init_tss + get_cpu();
if (tss->io_map_base != IO_BITMAP_OFFSET) { if (tss->io_bitmap_base == IO_BITMAP_OFFSET) { /* already active? */
memcpy(tss->io_bitmap, t->io_bitmap_ptr, sizeof(tss->io_bitmap)); set_bitmap(tss->io_bitmap, from, num, !turn_on);
tss->io_map_base = IO_BITMAP_OFFSET;
} else { } else {
set_bitmap((unsigned long *) tss->io_bitmap, from, num, !turn_on); memcpy(tss->io_bitmap, t->io_bitmap_ptr, IO_BITMAP_BYTES);
tss->io_bitmap_base = IO_BITMAP_OFFSET; /* Activate it in the TSS */
} }
put_cpu(); put_cpu();
return 0; return 0;
......
...@@ -209,7 +209,7 @@ void exit_thread(void) ...@@ -209,7 +209,7 @@ void exit_thread(void)
if (me->thread.io_bitmap_ptr) { if (me->thread.io_bitmap_ptr) {
kfree(me->thread.io_bitmap_ptr); kfree(me->thread.io_bitmap_ptr);
me->thread.io_bitmap_ptr = NULL; me->thread.io_bitmap_ptr = NULL;
(init_tss + smp_processor_id())->io_map_base = (init_tss + smp_processor_id())->io_bitmap_base =
INVALID_IO_BITMAP_OFFSET; INVALID_IO_BITMAP_OFFSET;
} }
} }
...@@ -312,11 +312,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp, ...@@ -312,11 +312,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
asm("movl %%ds,%0" : "=m" (p->thread.ds)); asm("movl %%ds,%0" : "=m" (p->thread.ds));
if (unlikely(me->thread.io_bitmap_ptr != NULL)) { if (unlikely(me->thread.io_bitmap_ptr != NULL)) {
p->thread.io_bitmap_ptr = kmalloc((IO_BITMAP_SIZE+1)*4, GFP_KERNEL); p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
if (!p->thread.io_bitmap_ptr) if (!p->thread.io_bitmap_ptr)
return -ENOMEM; return -ENOMEM;
memcpy(p->thread.io_bitmap_ptr, me->thread.io_bitmap_ptr, memcpy(p->thread.io_bitmap_ptr, me->thread.io_bitmap_ptr, IO_BITMAP_BYTES);
(IO_BITMAP_SIZE+1)*4);
} }
/* /*
...@@ -449,9 +448,8 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct * ...@@ -449,9 +448,8 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct *
* bad either. Anyone got something better? * bad either. Anyone got something better?
* This only affects processes which use ioperm(). * This only affects processes which use ioperm().
*/ */
memcpy(tss->io_bitmap, next->io_bitmap_ptr, memcpy(tss->io_bitmap, next->io_bitmap_ptr, IO_BITMAP_BYTES);
IO_BITMAP_SIZE*sizeof(u32)); tss->io_bitmap_base = IO_BITMAP_OFFSET;
tss->io_map_base = IO_BITMAP_OFFSET;
} else { } else {
/* /*
* a bitmap offset pointing outside of the TSS limit * a bitmap offset pointing outside of the TSS limit
...@@ -459,7 +457,7 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct * ...@@ -459,7 +457,7 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct *
* tries to use a port IO instruction. The first * tries to use a port IO instruction. The first
* sys_ioperm() call sets up the bitmap properly. * sys_ioperm() call sets up the bitmap properly.
*/ */
tss->io_map_base = INVALID_IO_BITMAP_OFFSET; tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
} }
} }
......
...@@ -288,7 +288,12 @@ void __init cpu_init (void) ...@@ -288,7 +288,12 @@ void __init cpu_init (void)
estacks += EXCEPTION_STKSZ; estacks += EXCEPTION_STKSZ;
} }
t->io_map_base = INVALID_IO_BITMAP_OFFSET; t->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
/*
* This is required because the CPU will access up to
* 8 bits beyond the end of the IO permission bitmap.
*/
t->io_bitmap[IO_BITMAP_LONGS] = ~0UL;
atomic_inc(&init_mm.mm_count); atomic_inc(&init_mm.mm_count);
me->active_mm = &init_mm; me->active_mm = &init_mm;
......
...@@ -82,3 +82,20 @@ void device_pm_power_up(void) ...@@ -82,3 +82,20 @@ void device_pm_power_up(void)
sysdev_resume(); sysdev_resume();
dpm_power_up(); dpm_power_up();
} }
/**
* device_resume - resume all the devices in the system
* @level: stage of resume process we're at
*
* This function is deprecated, and should be replaced with appropriate
* calls to device_pm_power_up() and device_pm_resume() above.
*/
void device_resume(u32 level)
{
printk("%s is deprecated. Called from:\n",__FUNCTION__);
dump_stack();
}
EXPORT_SYMBOL(device_resume);
...@@ -123,3 +123,24 @@ int device_pm_power_down(u32 state) ...@@ -123,3 +123,24 @@ int device_pm_power_down(u32 state)
dpm_power_up(); dpm_power_up();
goto Done; goto Done;
} }
/**
* device_suspend - suspend all devices on the device ree
* @state: state we're entering
* @level: Stage of suspend sequence we're in.
*
*
* This function is deprecated. Calls should be replaced with
* appropriate calls to device_pm_suspend() and device_pm_power_down().
*/
int device_suspend(u32 state, u32 level)
{
printk("%s Called from:\n",__FUNCTION__);
dump_stack();
return -EFAULT;
}
EXPORT_SYMBOL(device_suspend);
...@@ -142,8 +142,6 @@ static struct tty_driver *pcxe_driver; ...@@ -142,8 +142,6 @@ static struct tty_driver *pcxe_driver;
static struct timer_list pcxx_timer; static struct timer_list pcxx_timer;
DECLARE_TASK_QUEUE(tq_pcxx);
static void pcxxpoll(unsigned long dummy); static void pcxxpoll(unsigned long dummy);
static void fepcmd(struct channel *, int, int, int, int, int); static void fepcmd(struct channel *, int, int, int, int, int);
static void pcxe_put_char(struct tty_struct *, unsigned char); static void pcxe_put_char(struct tty_struct *, unsigned char);
...@@ -161,7 +159,6 @@ static void receive_data(struct channel *); ...@@ -161,7 +159,6 @@ static void receive_data(struct channel *);
static void pcxxparam(struct tty_struct *, struct channel *ch); static void pcxxparam(struct tty_struct *, struct channel *ch);
static void do_softint(void *); static void do_softint(void *);
static inline void pcxe_sched_event(struct channel *, int); static inline void pcxe_sched_event(struct channel *, int);
static void do_pcxe_bh(void);
static void pcxe_start(struct tty_struct *); static void pcxe_start(struct tty_struct *);
static void pcxe_stop(struct tty_struct *); static void pcxe_stop(struct tty_struct *);
static void pcxe_throttle(struct tty_struct *); static void pcxe_throttle(struct tty_struct *);
...@@ -220,7 +217,6 @@ static void pcxe_cleanup() ...@@ -220,7 +217,6 @@ static void pcxe_cleanup()
save_flags(flags); save_flags(flags);
cli(); cli();
del_timer_sync(&pcxx_timer); del_timer_sync(&pcxx_timer);
remove_bh(DIGI_BH);
if ((e1 = tty_unregister_driver(pcxe_driver))) if ((e1 = tty_unregister_driver(pcxe_driver)))
printk("SERIAL: failed to unregister serial driver (%d)\n", e1); printk("SERIAL: failed to unregister serial driver (%d)\n", e1);
...@@ -312,8 +308,7 @@ static inline void assertmemoff(struct channel *ch) ...@@ -312,8 +308,7 @@ static inline void assertmemoff(struct channel *ch)
static inline void pcxe_sched_event(struct channel *info, int event) static inline void pcxe_sched_event(struct channel *info, int event)
{ {
info->event |= 1 << event; info->event |= 1 << event;
queue_task(&info->tqueue, &tq_pcxx); schedule_work(&info->tqueue);
mark_bh(DIGI_BH);
} }
static void pcxx_error(int line, char *msg) static void pcxx_error(int line, char *msg)
...@@ -1150,8 +1145,6 @@ int __init pcxe_init(void) ...@@ -1150,8 +1145,6 @@ int __init pcxe_init(void)
} }
memset(digi_channels, 0, sizeof(struct channel) * nbdevs); memset(digi_channels, 0, sizeof(struct channel) * nbdevs);
init_bh(DIGI_BH,do_pcxe_bh);
init_timer(&pcxx_timer); init_timer(&pcxx_timer);
pcxx_timer.function = pcxxpoll; pcxx_timer.function = pcxxpoll;
...@@ -1450,8 +1443,7 @@ int __init pcxe_init(void) ...@@ -1450,8 +1443,7 @@ int __init pcxe_init(void)
} }
ch->brdchan = bc; ch->brdchan = bc;
ch->mailbox = gd; ch->mailbox = gd;
ch->tqueue.routine = do_softint; INIT_WORK(&ch->tqueue, do_softint, ch);
ch->tqueue.data = ch;
ch->board = &boards[crd]; ch->board = &boards[crd];
#ifdef DEFAULT_HW_FLOW #ifdef DEFAULT_HW_FLOW
ch->digiext.digi_flags = RTSPACE|CTSPACE; ch->digiext.digi_flags = RTSPACE|CTSPACE;
...@@ -2254,11 +2246,6 @@ static void pcxe_set_termios(struct tty_struct *tty, struct termios *old_termios ...@@ -2254,11 +2246,6 @@ static void pcxe_set_termios(struct tty_struct *tty, struct termios *old_termios
} }
static void do_pcxe_bh(void)
{
run_task_queue(&tq_pcxx);
}
static void do_softint(void *private_) static void do_softint(void *private_)
{ {
......
...@@ -85,10 +85,10 @@ struct channel { ...@@ -85,10 +85,10 @@ struct channel {
int count; int count;
int blocked_open; int blocked_open;
int close_delay; int close_delay;
int event; unsigned long event;
wait_queue_head_t open_wait; wait_queue_head_t open_wait;
wait_queue_head_t close_wait; wait_queue_head_t close_wait;
struct tq_struct tqueue; struct work_struct tqueue;
/* ------------ Async control data ------------- */ /* ------------ Async control data ------------- */
unchar modemfake; /* Modem values to be forced */ unchar modemfake; /* Modem values to be forced */
unchar modem; /* Force values */ unchar modem; /* Force values */
......
...@@ -465,7 +465,8 @@ static irqreturn_t rio_interrupt (int irq, void *ptr, struct pt_regs *regs) ...@@ -465,7 +465,8 @@ static irqreturn_t rio_interrupt (int irq, void *ptr, struct pt_regs *regs)
rio_reset_interrupt (HostP); rio_reset_interrupt (HostP);
} }
if ((HostP->Flags & RUN_STATE) != RC_RUNNING) return; if ((HostP->Flags & RUN_STATE) != RC_RUNNING)
return IRQ_HANDLED;
if (test_and_set_bit (RIO_BOARD_INTR_LOCK, &HostP->locks)) { if (test_and_set_bit (RIO_BOARD_INTR_LOCK, &HostP->locks)) {
printk (KERN_ERR "Recursive interrupt! (host %d/irq%d)\n", printk (KERN_ERR "Recursive interrupt! (host %d/irq%d)\n",
......
...@@ -171,8 +171,6 @@ ...@@ -171,8 +171,6 @@
#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif #endif
DECLARE_TASK_QUEUE(tq_specialix);
#undef RS_EVENT_WRITE_WAKEUP #undef RS_EVENT_WRITE_WAKEUP
#define RS_EVENT_WRITE_WAKEUP 0 #define RS_EVENT_WRITE_WAKEUP 0
...@@ -988,7 +986,7 @@ static void sx_change_speed(struct specialix_board *bp, struct specialix_port *p ...@@ -988,7 +986,7 @@ static void sx_change_speed(struct specialix_board *bp, struct specialix_port *p
long tmp; long tmp;
unsigned char cor1 = 0, cor3 = 0; unsigned char cor1 = 0, cor3 = 0;
unsigned char mcor1 = 0, mcor2 = 0; unsigned char mcor1 = 0, mcor2 = 0;
static int again; static unsigned long again;
if (!(tty = port->tty) || !tty->termios) if (!(tty = port->tty) || !tty->termios)
return; return;
......
...@@ -6272,8 +6272,8 @@ static int idetape_cleanup (ide_drive_t *drive) ...@@ -6272,8 +6272,8 @@ static int idetape_cleanup (ide_drive_t *drive)
DRIVER(drive)->busy = 0; DRIVER(drive)->busy = 0;
(void) ide_unregister_subdriver(drive); (void) ide_unregister_subdriver(drive);
drive->driver_data = NULL; drive->driver_data = NULL;
devfs_remove("%s/mt"); devfs_remove("%s/mt", drive->devfs_name);
devfs_remove("%s/mtn"); devfs_remove("%s/mtn", drive->devfs_name);
devfs_unregister_tape(drive->disk->number); devfs_unregister_tape(drive->disk->number);
kfree (tape); kfree (tape);
drive->disk->fops = ide_fops; drive->disk->fops = ide_fops;
......
...@@ -118,7 +118,7 @@ static inline void calculate_expire(struct csr_control *csr) ...@@ -118,7 +118,7 @@ static inline void calculate_expire(struct csr_control *csr)
/* Just to keep from rounding low */ /* Just to keep from rounding low */
csr->expire++; csr->expire++;
HPSB_VERBOSE("CSR: setting expire to %lu, HZ=%lu", csr->expire, HZ); HPSB_VERBOSE("CSR: setting expire to %lu, HZ=%u", csr->expire, HZ);
} }
......
...@@ -160,33 +160,54 @@ config VIDEO_STRADIS ...@@ -160,33 +160,54 @@ config VIDEO_STRADIS
<http://www.stradis.com/decoder.html>. <http://www.stradis.com/decoder.html>.
config VIDEO_ZORAN config VIDEO_ZORAN
tristate "Zoran ZR36057/36060 Video For Linux" tristate "Zoran ZR36057/36067 Video For Linux"
depends on VIDEO_DEV && PCI && I2C depends on VIDEO_DEV && PCI && I2C
help help
Say Y here to include support for video cards based on the Zoran Say Y for support for MJPEG capture cards based on the Zoran
ZR36057/36060 encoder/decoder chip (including the Iomega Buz and the 36057/36067 PCI controller chipset. This includes the Iomega
Miro DC10 and DC30 video capture cards). Buz, Pinnacle DC10+ and the Linux Media Labs LML33. There is
a driver homepage at <http://mjpeg.sf.net/driver-zoran/>. For
more information, check <file:Documentation/video4linux/Zoran>.
This driver is available as a module called zr36067 ( = code
which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read <file:Documentation/modules.txt>.
config VIDEO_ZORAN_BUZ config VIDEO_ZORAN_BUZ
tristate "Iomega Buz support" tristate "Iomega Buz support"
depends on VIDEO_ZORAN depends on VIDEO_ZORAN
help help
Say Y here to include support for the Iomega Buz video card. There Support for the Iomega Buz MJPEG capture/playback card.
is a Buz/Linux homepage at <http://www.lysator.liu.se/~gz/buz/>.
config VIDEO_ZORAN_DC10 config VIDEO_ZORAN_DC10
tristate "Miro DC10(+) support" tristate "Pinnacle/Miro DC10(+) support"
depends on VIDEO_ZORAN depends on VIDEO_ZORAN
help help
Say Y to support the Pinnacle Systems Studio DC10 plus TV/Video Support for the Pinnacle/Miro DC10(+) MJPEG capture/playback
card. Vendor page at <http://www.pinnaclesys.com/>. card.
config VIDEO_ZORAN_DC30
tristate "Pinnacle/Miro DC30(+) support"
depends on VIDEO_ZORAN
help
Support for the Pinnacle/Miro DC30(+) MJPEG capture/playback
card. This also supports really old DC10 cards based on the
zr36050 MJPEG codec and zr36016 VFE.
config VIDEO_ZORAN_LML33 config VIDEO_ZORAN_LML33
tristate "Linux Media Labs LML33 support" tristate "Linux Media Labs LML33 support"
depends on VIDEO_ZORAN depends on VIDEO_ZORAN
help help
Say Y here to support the Linux Media Labs LML33 TV/Video card. Support for the Linux Media Labs LML33 MJPEG capture/playback
Resources page is at <http://www.linuxmedialabs.com/lml33doc.html>. card.
config VIDEO_ZORAN_LML33R10
tristate "Linux Media Labs LML33R10 support"
depends on VIDEO_ZORAN
help
support for the Linux Media Labs LML33R10 MJPEG capture/playback
card.
config VIDEO_ZR36120 config VIDEO_ZR36120
tristate "Zoran ZR36120/36125 Video For Linux" tristate "Zoran ZR36120/36125 Video For Linux"
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \ bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \
bttv-risc.o bttv-vbi.o bttv-risc.o bttv-vbi.o
zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o
zr36067-objs := zoran_procfs.o zoran_device.o \
zoran_driver.o zoran_card.o
obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o
...@@ -17,10 +19,13 @@ obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o ...@@ -17,10 +19,13 @@ obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o
obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
obj-$(CONFIG_VIDEO_W9966) += w9966.o obj-$(CONFIG_VIDEO_W9966) += w9966.o
obj-$(CONFIG_VIDEO_ZORAN_BUZ) += saa7111.o saa7185.o obj-$(CONFIG_VIDEO_ZORAN_BUZ) += saa7111.o saa7185.o zr36060.o
obj-$(CONFIG_VIDEO_ZORAN_DC10) += saa7110.o adv7175.o obj-$(CONFIG_VIDEO_ZORAN_DC10) += saa7110.o adv7175.o zr36060.o
obj-$(CONFIG_VIDEO_ZORAN_LML33) += bt819.o bt856.o obj-$(CONFIG_VIDEO_ZORAN_DC30) += adv7175.o vpx3220.o zr36050.o \
obj-$(CONFIG_VIDEO_ZORAN) += zr36067.o zr36016.o
obj-$(CONFIG_VIDEO_ZORAN_LML33) += bt819.o bt856.o zr36060.o
obj-$(CONFIG_VIDEO_ZORAN_LML33R10) += saa7114.o adv7170.o zr36060.o
obj-$(CONFIG_VIDEO_ZORAN) += zr36067.o videocodec.o
obj-$(CONFIG_VIDEO_PMS) += pms.o obj-$(CONFIG_VIDEO_PMS) += pms.o
obj-$(CONFIG_VIDEO_PLANB) += planb.o obj-$(CONFIG_VIDEO_PLANB) += planb.o
obj-$(CONFIG_VIDEO_VINO) += vino.o obj-$(CONFIG_VIDEO_VINO) += vino.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -291,7 +291,7 @@ static int tvmixer_clients(struct i2c_client *client) ...@@ -291,7 +291,7 @@ static int tvmixer_clients(struct i2c_client *client)
devices[i].count = 0; devices[i].count = 0;
devices[i].dev = client; devices[i].dev = client;
printk("tvmixer: %s (%s) registered with minor %d\n", printk("tvmixer: %s (%s) registered with minor %d\n",
client->dev.name,client->adapter->dev.name,minor); client->name,client->adapter->name,minor);
return 0; return 0;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -435,7 +435,7 @@ static int sharp_do_wait_for_ready(struct map_info *map, struct flchip *chip, ...@@ -435,7 +435,7 @@ static int sharp_do_wait_for_ready(struct map_info *map, struct flchip *chip,
unsigned long adr) unsigned long adr)
{ {
int ret; int ret;
int timeo; unsigned long timeo;
int status; int status;
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
......
This diff is collapsed.
...@@ -706,7 +706,7 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length) ...@@ -706,7 +706,7 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length)
inline void wait_for_buffer(struct net_device * dev) inline void wait_for_buffer(struct net_device * dev)
{ {
int ioaddr = dev->base_addr; int ioaddr = dev->base_addr;
int tmp; unsigned long tmp;
int status; int status;
tmp = jiffies + HZ; tmp = jiffies + HZ;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -277,7 +277,7 @@ sbni_pci_probe( struct net_device *dev ) ...@@ -277,7 +277,7 @@ sbni_pci_probe( struct net_device *dev )
pci_irq_line = pdev->irq; pci_irq_line = pdev->irq;
/* Avoid already found cards from previous calls */ /* Avoid already found cards from previous calls */
if( !pci_request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) { if( !request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) {
pci_read_config_word( pdev, PCI_SUBSYSTEM_ID, &subsys ); pci_read_config_word( pdev, PCI_SUBSYSTEM_ID, &subsys );
if( subsys != 2 || /* Dual adapter is present */ if( subsys != 2 || /* Dual adapter is present */
check_region( pci_ioaddr += 4, SBNI_IO_EXTENT ) ) check_region( pci_ioaddr += 4, SBNI_IO_EXTENT ) )
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment