Commit 79e75677 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.4.0-test4pre4

parent 5733013c
...@@ -1387,6 +1387,7 @@ E: greg@kroah.com ...@@ -1387,6 +1387,7 @@ E: greg@kroah.com
W: http://www.kroah.com/linux-usb/ W: http://www.kroah.com/linux-usb/
D: USB Serial Converter driver framework, USB Handspring Visor driver D: USB Serial Converter driver framework, USB Handspring Visor driver
D: ConnectTech WHITEHeat USB driver, Generic USB Serial driver D: ConnectTech WHITEHeat USB driver, Generic USB Serial driver
D: USB Bluetooth driver
D: bits and pieces of USB core code. D: bits and pieces of USB core code.
N: Russell Kroll N: Russell Kroll
......
...@@ -1159,6 +1159,13 @@ M: vojtech@suse.cz ...@@ -1159,6 +1159,13 @@ M: vojtech@suse.cz
L: linux-usb@suse.com L: linux-usb@suse.com
S: Supported S: Supported
USB BLUETOOTH DRIVER
P: Greg Kroah-Hartman
M: greg@kroah.com
L: linux-usb@suse.com
S: Maintained
W: http://www.kroah.com/linux-usb/
USB HID/HIDBP/INPUT DRIVERS USB HID/HIDBP/INPUT DRIVERS
P: Vojtech Pavlik P: Vojtech Pavlik
M: vojtech@suse.cz M: vojtech@suse.cz
......
...@@ -150,7 +150,7 @@ main (int argc, char *argv[]) ...@@ -150,7 +150,7 @@ main (int argc, char *argv[])
prog_name, inname); prog_name, inname);
exit(1); exit(1);
} }
if (!elf_check_arch(elf->e_machine)) { if (!elf_check_arch(elf)) {
fprintf(stderr, "%s: is not for this processor (e_machine=%d)\n", fprintf(stderr, "%s: is not for this processor (e_machine=%d)\n",
prog_name, elf->e_machine); prog_name, elf->e_machine);
exit(1); exit(1);
......
...@@ -157,7 +157,7 @@ _start (void) ...@@ -157,7 +157,7 @@ _start (void)
cons_write("not an ELF executable\n"); cons_write("not an ELF executable\n");
return; return;
} }
if (!elf_check_arch(elf->e_machine)) { if (!elf_check_arch(elf)) {
cons_write("kernel not for this processor\n"); cons_write("kernel not for this processor\n");
return; return;
} }
......
...@@ -28,7 +28,7 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ...@@ -28,7 +28,7 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef double elf_fpreg_t; typedef double elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#define elf_check_arch(x) ((x) == EM_MIPS || (x) == EM_MIPS_RS4_BE) #define elf_check_arch(x) ((x)->e_machine == EM_MIPS || (x)->e_machine == EM_MIPS_RS4_BE)
#define TASK32_SIZE 0x80000000UL #define TASK32_SIZE 0x80000000UL
#undef ELF_ET_DYN_BASE #undef ELF_ET_DYN_BASE
......
...@@ -300,7 +300,7 @@ CONFIG_NFSD=m ...@@ -300,7 +300,7 @@ CONFIG_NFSD=m
CONFIG_SUNRPC=y CONFIG_SUNRPC=y
CONFIG_LOCKD=y CONFIG_LOCKD=y
CONFIG_SMB_FS=m CONFIG_SMB_FS=m
CONFIG_NCP_FS=m # CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set # CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set # CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set # CONFIG_NCPFS_STRONG is not set
......
/* $Id: process.c,v 1.150 2000/07/11 18:49:22 anton Exp $ /* $Id: process.c,v 1.151 2000/07/11 23:22:17 davem Exp $
* linux/arch/sparc/kernel/process.c * linux/arch/sparc/kernel/process.c
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: sparc_ksyms.c,v 1.100 2000/07/07 07:49:08 anton Exp $ /* $Id: sparc_ksyms.c,v 1.101 2000/07/12 00:25:32 anton Exp $
* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
* *
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
#include <linux/in6.h> #include <linux/in6.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/mm.h> #include <linux/mm.h>
#ifdef CONFIG_PCI
#include <linux/pci.h>
#endif
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/delay.h> #include <asm/delay.h>
...@@ -42,9 +45,6 @@ ...@@ -42,9 +45,6 @@
#include <asm/sbus.h> #include <asm/sbus.h>
#include <asm/dma.h> #include <asm/dma.h>
#endif #endif
#ifdef CONFIG_PCI
#include <asm/pci.h>
#endif
#include <asm/a.out.h> #include <asm/a.out.h>
#include <asm/io-unit.h> #include <asm/io-unit.h>
......
...@@ -437,17 +437,17 @@ CONFIG_SUNRPC=y ...@@ -437,17 +437,17 @@ CONFIG_SUNRPC=y
CONFIG_LOCKD=y CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y CONFIG_LOCKD_V4=y
CONFIG_SMB_FS=m CONFIG_SMB_FS=m
CONFIG_NCP_FS=m # CONFIG_NCP_FS is not set
CONFIG_NCPFS_PACKET_SIGNING=y # CONFIG_NCPFS_PACKET_SIGNING is not set
CONFIG_NCPFS_IOCTL_LOCKING=y # CONFIG_NCPFS_IOCTL_LOCKING is not set
CONFIG_NCPFS_STRONG=y # CONFIG_NCPFS_STRONG is not set
CONFIG_NCPFS_NFS_NS=y # CONFIG_NCPFS_NFS_NS is not set
CONFIG_NCPFS_OS2_NS=y # CONFIG_NCPFS_OS2_NS is not set
CONFIG_NCPFS_SMALLDOS=y # CONFIG_NCPFS_SMALLDOS is not set
CONFIG_NCPFS_MOUNT_SUBDIR=y # CONFIG_NCPFS_MOUNT_SUBDIR is not set
CONFIG_NCPFS_NDS_DOMAINS=y # CONFIG_NCPFS_NDS_DOMAINS is not set
CONFIG_NCPFS_NLS=y # CONFIG_NCPFS_NLS is not set
CONFIG_NCPFS_EXTRAS=y # CONFIG_NCPFS_EXTRAS is not set
# #
# Partition Types # Partition Types
......
...@@ -79,7 +79,7 @@ typedef struct { ...@@ -79,7 +79,7 @@ typedef struct {
} pr_un; } pr_un;
} elf_xregset_t; } elf_xregset_t;
#define elf_check_arch(x) (((x) == EM_SPARC) || ((x) == EM_SPARC32PLUS)) #define elf_check_arch(x) (((x)->e_machine == EM_SPARC) || ((x)->e_machine == EM_SPARC32PLUS))
#define ELF_ET_DYN_BASE 0x08000000 #define ELF_ET_DYN_BASE 0x08000000
......
/* $Id: timod.c,v 1.7 2000/06/09 07:35:30 davem Exp $ /* $Id: timod.c,v 1.8 2000/07/12 00:51:06 davem Exp $
* timod.c: timod emulation. * timod.c: timod emulation.
* *
* Copyright (C) 1998 Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz) * Copyright (C) 1998 Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/file.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/poll.h> #include <linux/poll.h>
...@@ -619,22 +620,6 @@ int timod_putmsg(unsigned int fd, char *ctl_buf, int ctl_len, ...@@ -619,22 +620,6 @@ int timod_putmsg(unsigned int fd, char *ctl_buf, int ctl_len,
return -EINVAL; return -EINVAL;
} }
/* copied directly from fs/select.c */
static void free_wait(poll_table * p)
{
struct poll_table_entry * entry = p->entry + p->nr;
SOLD("entry");
while (p->nr > 0) {
p->nr--;
entry--;
remove_wait_queue(entry->wait_address,&entry->wait);
}
SOLD("done");
}
int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len, int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len,
char *data_buf, int data_maxlen, s32 *data_len, int *flags_p) char *data_buf, int data_maxlen, s32 *data_len, int *flags_p)
{ {
...@@ -670,14 +655,8 @@ int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len, ...@@ -670,14 +655,8 @@ int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len,
} }
if (!(filp->f_flags & O_NONBLOCK)) { if (!(filp->f_flags & O_NONBLOCK)) {
poll_table wait_table, *wait; poll_table wait_table, *wait;
struct poll_table_entry *entry;
SOLD("getting poll_table"); poll_initwait(&wait_table);
entry = (struct poll_table_entry *)__get_free_page(GFP_KERNEL);
if (!entry)
return -ENOMEM;
SOLD("got one");
wait_table.nr = 0;
wait_table.entry = entry;
wait = &wait_table; wait = &wait_table;
for(;;) { for(;;) {
SOLD("loop"); SOLD("loop");
...@@ -705,13 +684,17 @@ int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len, ...@@ -705,13 +684,17 @@ int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len,
SOLD("avoiding lockup"); SOLD("avoiding lockup");
break ; break ;
} }
if(wait_table.error) {
SOLD("wait-table error");
poll_freewait(&wait_table);
return wait_table.error;
}
SOLD("scheduling"); SOLD("scheduling");
schedule(); schedule();
} }
SOLD("loop done"); SOLD("loop done");
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
free_wait(&wait_table); poll_freewait(&wait_table);
free_page((unsigned long)entry);
if (signal_pending(current)) { if (signal_pending(current)) {
SOLD("signal pending"); SOLD("signal pending");
return -EINTR; return -EINTR;
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
# #
if [ "$CONFIG_SERIAL" = "n" ]; then if [ "$CONFIG_SERIAL" = "n" ]; then
define_bool CONFIG_PCMCIA_SERIAL n define_tristate CONFIG_PCMCIA_SERIAL n
else else
if [ "$CONFIG_SERIAL" = "m" -o "$CONFIG_PCMCIA" = "m" ]; then if [ "$CONFIG_SERIAL" = "m" -o "$CONFIG_PCMCIA" = "m" ]; then
define_bool CONFIG_PCMCIA_SERIAL m define_tristate CONFIG_PCMCIA_SERIAL m
else else
define_bool CONFIG_PCMCIA_SERIAL y define_tristate CONFIG_PCMCIA_SERIAL y
fi fi
fi fi
......
/* /*
* bluetooth.c Version 0.1 * bluetooth.c Version 0.2
* *
* Copyright (c) 2000 Greg Kroah-Hartman <greg@kroah.com> * Copyright (c) 2000 Greg Kroah-Hartman <greg@kroah.com>
* *
* USB Bluetooth driver, based on the Bluetooth Spec version 1.0B * USB Bluetooth driver, based on the Bluetooth Spec version 1.0B
* *
* *
* (07/11/2000) Version 0.2 gkh
* Fixed a small bug found by Nils Faerber in the usb_bluetooth_probe
* function.
*
* (07/09/2000) Version 0.1 gkh * (07/09/2000) Version 0.1 gkh
* Initial release. Has support for sending ACL data (which is really just * Initial release. Has support for sending ACL data (which is really just
* a HCI frame.) Raw HCI commands and HCI events are not supported. * a HCI frame.) Raw HCI commands and HCI events are not supported.
...@@ -619,6 +623,7 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum) ...@@ -619,6 +623,7 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum)
memset(bluetooth, 0, sizeof(struct usb_bluetooth)); memset(bluetooth, 0, sizeof(struct usb_bluetooth));
bluetooth->magic = USB_BLUETOOTH_MAGIC;
bluetooth->dev = dev; bluetooth->dev = dev;
bluetooth->minor = minor; bluetooth->minor = minor;
bluetooth->tqueue.routine = bluetooth_softint; bluetooth->tqueue.routine = bluetooth_softint;
...@@ -676,6 +681,8 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum) ...@@ -676,6 +681,8 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum)
tty_register_devfs (&bluetooth_tty_driver, 0, minor); tty_register_devfs (&bluetooth_tty_driver, 0, minor);
info("Bluetooth converter now attached to ttyBLUE%d (or usb/ttblue/%d for devfs)", minor, minor); info("Bluetooth converter now attached to ttyBLUE%d (or usb/ttblue/%d for devfs)", minor, minor);
bluetooth_table[minor] = bluetooth;
return bluetooth; /* success */ return bluetooth; /* success */
probe_error: probe_error:
......
...@@ -87,7 +87,6 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size, ...@@ -87,7 +87,6 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
int result; int result;
char *start = server->packet; char *start = server->packet;
poll_table wait_table; poll_table wait_table;
struct poll_table_entry entry;
int init_timeout, max_timeout; int init_timeout, max_timeout;
int timeout; int timeout;
int retrans; int retrans;
...@@ -136,8 +135,7 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size, ...@@ -136,8 +135,7 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
break; break;
} }
re_select: re_select:
wait_table.nr = 0; poll_initwait(&wait_table);
wait_table.entry = &entry;
/* mb() is not necessary because ->poll() will serialize /* mb() is not necessary because ->poll() will serialize
instructions adding the wait_table waitqueues in the instructions adding the wait_table waitqueues in the
waitqueue-head before going to calculate the mask-retval. */ waitqueue-head before going to calculate the mask-retval. */
...@@ -154,13 +152,16 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size, ...@@ -154,13 +152,16 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
timeout = max_timeout; timeout = max_timeout;
} }
timed_out = !schedule_timeout(timeout); timed_out = !schedule_timeout(timeout);
remove_wait_queue(entry.wait_address, &entry.wait); poll_freewait(&wait_table);
fput(file);
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
if (signal_pending(current)) { if (signal_pending(current)) {
result = -ERESTARTSYS; result = -ERESTARTSYS;
break; break;
} }
if(wait_table.error) {
result = wait_table.error;
break;
}
if (timed_out) { if (timed_out) {
if (n < retrans) if (n < retrans)
continue; continue;
...@@ -179,9 +180,8 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size, ...@@ -179,9 +180,8 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
major_timeout_seen = 1; major_timeout_seen = 1;
continue; continue;
} }
} else if (wait_table.nr) { } else {
remove_wait_queue(entry.wait_address, &entry.wait); poll_freewait(&wait_table);
fput(file);
} }
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
...@@ -262,7 +262,6 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size, ...@@ -262,7 +262,6 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) { static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) {
poll_table wait_table; poll_table wait_table;
struct poll_table_entry entry;
struct file *file; struct file *file;
struct socket *sock; struct socket *sock;
int init_timeout; int init_timeout;
...@@ -281,16 +280,14 @@ static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) { ...@@ -281,16 +280,14 @@ static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) {
init_timeout = 0x7FFF0000; init_timeout = 0x7FFF0000;
while (len) { while (len) {
wait_table.nr = 0; poll_initwait(&wait_table);
wait_table.entry = &entry;
/* mb() is not necessary because ->poll() will serialize /* mb() is not necessary because ->poll() will serialize
instructions adding the wait_table waitqueues in the instructions adding the wait_table waitqueues in the
waitqueue-head before going to calculate the mask-retval. */ waitqueue-head before going to calculate the mask-retval. */
__set_current_state(TASK_INTERRUPTIBLE); __set_current_state(TASK_INTERRUPTIBLE);
if (!(sock->ops->poll(file, sock, &wait_table) & POLLIN)) { if (!(sock->ops->poll(file, sock, &wait_table) & POLLIN)) {
init_timeout = schedule_timeout(init_timeout); init_timeout = schedule_timeout(init_timeout);
remove_wait_queue(entry.wait_address, &entry.wait); poll_freewait(&wait_table);
fput(file);
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
if (signal_pending(current)) { if (signal_pending(current)) {
return -ERESTARTSYS; return -ERESTARTSYS;
...@@ -298,9 +295,11 @@ static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) { ...@@ -298,9 +295,11 @@ static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) {
if (!init_timeout) { if (!init_timeout) {
return -EIO; return -EIO;
} }
} else if (wait_table.nr) { if(wait_table.error) {
remove_wait_queue(entry.wait_address, &entry.wait); return wait_table.error;
fput(file); }
} else {
poll_freewait(&wait_table);
} }
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
......
...@@ -31,14 +31,15 @@ ...@@ -31,14 +31,15 @@
* understand what I'm doing here, then you understand how the linux * understand what I'm doing here, then you understand how the linux
* sleep/wakeup mechanism works. * sleep/wakeup mechanism works.
* *
* Two very simple procedures, poll_wait() and free_wait() make all the * Two very simple procedures, poll_wait() and poll_freewait() make all the
* work. poll_wait() is an inline-function defined in <linux/poll.h>, * work. poll_wait() is an inline-function defined in <linux/poll.h>,
* as all select/poll functions have to call it to add an entry to the * as all select/poll functions have to call it to add an entry to the
* poll table. * poll table.
*/ */
static void free_wait(struct poll_table_page * p) void poll_freewait(poll_table* pt)
{ {
struct poll_table_page * p = pt->table;
while (p) { while (p) {
struct poll_table_entry * entry; struct poll_table_entry * entry;
struct poll_table_page *old; struct poll_table_page *old;
...@@ -66,6 +67,7 @@ void __pollwait(struct file * filp, wait_queue_head_t * wait_address, poll_table ...@@ -66,6 +67,7 @@ void __pollwait(struct file * filp, wait_queue_head_t * wait_address, poll_table
new_table = (struct poll_table_page *) __get_free_page(GFP_KERNEL); new_table = (struct poll_table_page *) __get_free_page(GFP_KERNEL);
if (!new_table) { if (!new_table) {
p->error = -ENOMEM; p->error = -ENOMEM;
__set_current_state(TASK_RUNNING);
return; return;
} }
new_table->nr = 0; new_table->nr = 0;
...@@ -160,8 +162,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout) ...@@ -160,8 +162,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
return retval; return retval;
n = retval; n = retval;
table.error = 0; poll_initwait(&table);
table.table = NULL;
wait = &table; wait = &table;
retval = 0; retval = 0;
for (;;) { for (;;) {
...@@ -201,11 +202,15 @@ int do_select(int n, fd_set_bits *fds, long *timeout) ...@@ -201,11 +202,15 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
wait = NULL; wait = NULL;
if (retval || !__timeout || signal_pending(current)) if (retval || !__timeout || signal_pending(current))
break; break;
if(table.error) {
retval = table.error;
break;
}
__timeout = schedule_timeout(__timeout); __timeout = schedule_timeout(__timeout);
} }
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
free_wait(table.table); poll_freewait(&table);
/* /*
* Up-to-date the caller timeout. * Up-to-date the caller timeout.
...@@ -354,18 +359,22 @@ static int do_poll(unsigned int nfds, unsigned int nchunks, unsigned int nleft, ...@@ -354,18 +359,22 @@ static int do_poll(unsigned int nfds, unsigned int nchunks, unsigned int nleft,
struct pollfd *fds[], poll_table *wait, long timeout) struct pollfd *fds[], poll_table *wait, long timeout)
{ {
int count = 0; int count = 0;
poll_table* pt = wait;
for (;;) { for (;;) {
unsigned int i; unsigned int i;
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
for (i=0; i < nchunks; i++) for (i=0; i < nchunks; i++)
do_pollfd(POLLFD_PER_PAGE, fds[i], &wait, &count); do_pollfd(POLLFD_PER_PAGE, fds[i], &pt, &count);
if (nleft) if (nleft)
do_pollfd(nleft, fds[nchunks], &wait, &count); do_pollfd(nleft, fds[nchunks], &pt, &count);
wait = NULL; pt = NULL;
if (count || !timeout || signal_pending(current)) if (count || !timeout || signal_pending(current))
break; break;
if(wait->error) {
return wait->error;
}
timeout = schedule_timeout(timeout); timeout = schedule_timeout(timeout);
} }
current->state = TASK_RUNNING; current->state = TASK_RUNNING;
...@@ -391,8 +400,7 @@ asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout) ...@@ -391,8 +400,7 @@ asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout)
timeout = MAX_SCHEDULE_TIMEOUT; timeout = MAX_SCHEDULE_TIMEOUT;
} }
table.error = 0; poll_initwait(&table);
table.table = NULL;
err = -ENOMEM; err = -ENOMEM;
fds = NULL; fds = NULL;
...@@ -452,6 +460,6 @@ asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout) ...@@ -452,6 +460,6 @@ asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout)
if (nfds != 0) if (nfds != 0)
kfree(fds); kfree(fds);
out: out:
free_wait(table.table); poll_freewait(&table);
return err; return err;
} }
...@@ -229,7 +229,7 @@ typedef struct siginfo32 { ...@@ -229,7 +229,7 @@ typedef struct siginfo32 {
/* /*
* This is used to ensure we don't load something for the wrong architecture. * This is used to ensure we don't load something for the wrong architecture.
*/ */
#define elf_check_arch(x) ((x) == EM_386) #define elf_check_arch(x) ((x)->e_machine == EM_386)
/* /*
* These are used to set parameters in the core dumps. * These are used to set parameters in the core dumps.
......
...@@ -22,7 +22,7 @@ typedef s390_regs elf_gregset_t; ...@@ -22,7 +22,7 @@ typedef s390_regs elf_gregset_t;
/* /*
* This is used to ensure we don't load something for the wrong architecture. * This is used to ensure we don't load something for the wrong architecture.
*/ */
#define elf_check_arch(x) ((x)->elf_machine == EM_S390) #define elf_check_arch(x) ((x)->e_machine == EM_S390)
/* /*
* These are used to set parameters in the core dumps. * These are used to set parameters in the core dumps.
......
This diff is collapsed.
/* $Id: elf.h,v 1.21 2000/04/14 09:59:04 davem Exp $ */ /* $Id: elf.h,v 1.22 2000/07/12 01:27:08 davem Exp $ */
#ifndef __ASMSPARC_ELF_H #ifndef __ASMSPARC_ELF_H
#define __ASMSPARC_ELF_H #define __ASMSPARC_ELF_H
......
This diff is collapsed.
...@@ -38,22 +38,13 @@ extern inline void poll_wait(struct file * filp, wait_queue_head_t * wait_addres ...@@ -38,22 +38,13 @@ extern inline void poll_wait(struct file * filp, wait_queue_head_t * wait_addres
__pollwait(filp, wait_address, p); __pollwait(filp, wait_address, p);
} }
/* static inline void poll_initwait(poll_table* pt)
* For the kernel fd_set we use a fixed set-size for allocation purposes. {
* This set-size doesn't necessarily bear any relation to the size the user pt->error = 0;
* uses, but should preferably obviously be larger than any possible user pt->table = NULL;
* size (NR_OPEN bits). }
* extern void poll_freewait(poll_table* pt);
* We need 6 bitmaps (in/out/ex for both incoming and outgoing), and we
* allocate one page for all the bitmaps. Thus we have 8*PAGE_SIZE bits,
* to be divided by 6. And we'd better make sure we round to a full
* long-word (in fact, we'll round to 64 bytes).
*/
#define KFDS_64BLOCK ((PAGE_SIZE/(6*64))*64)
#define KFDS_NR (KFDS_64BLOCK*8 > NR_OPEN ? NR_OPEN : KFDS_64BLOCK*8)
typedef unsigned long kernel_fd_set[KFDS_NR/__NFDBITS];
/* /*
* Scaleable version of the fd_set. * Scaleable version of the fd_set.
......
...@@ -235,6 +235,7 @@ EXPORT_SYMBOL(vfs_rename); ...@@ -235,6 +235,7 @@ EXPORT_SYMBOL(vfs_rename);
EXPORT_SYMBOL(vfs_statfs); EXPORT_SYMBOL(vfs_statfs);
EXPORT_SYMBOL(generic_read_dir); EXPORT_SYMBOL(generic_read_dir);
EXPORT_SYMBOL(__pollwait); EXPORT_SYMBOL(__pollwait);
EXPORT_SYMBOL(poll_freewait);
EXPORT_SYMBOL(ROOT_DEV); EXPORT_SYMBOL(ROOT_DEV);
EXPORT_SYMBOL(__find_get_page); EXPORT_SYMBOL(__find_get_page);
EXPORT_SYMBOL(__find_lock_page); EXPORT_SYMBOL(__find_lock_page);
......
...@@ -373,12 +373,12 @@ void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long s ...@@ -373,12 +373,12 @@ void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long s
spin_unlock(&mm->page_table_lock); spin_unlock(&mm->page_table_lock);
/* /*
* Update rss for the mm_struct (not necessarily current->mm) * Update rss for the mm_struct (not necessarily current->mm)
* Notice that rss is an unsigned long.
*/ */
if (mm->rss > 0) { if (mm->rss > freed)
mm->rss -= freed; mm->rss -= freed;
if (mm->rss < 0) else
mm->rss = 0; mm->rss = 0;
}
} }
......
...@@ -512,7 +512,6 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info, ...@@ -512,7 +512,6 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
info->indev, info->outdev, &elem, info->indev, info->outdev, &elem,
info->okfn); info->okfn);
} }
br_read_unlock_bh(BR_NETPROTO_LOCK);
switch (verdict) { switch (verdict) {
case NF_ACCEPT: case NF_ACCEPT:
...@@ -527,6 +526,7 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info, ...@@ -527,6 +526,7 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
kfree_skb(skb); kfree_skb(skb);
break; break;
} }
br_read_unlock_bh(BR_NETPROTO_LOCK);
/* Release those devices we held, or Alexey will kill me. */ /* Release those devices we held, or Alexey will kill me. */
if (info->indev) dev_put(info->indev); if (info->indev) dev_put(info->indev);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Authors: * Authors:
* Pedro Roque <roque@di.fc.ul.pt> * Pedro Roque <roque@di.fc.ul.pt>
* *
* $Id: reassembly.c,v 1.18 2000/07/07 22:29:42 davem Exp $ * $Id: reassembly.c,v 1.19 2000/07/11 22:35:24 davem Exp $
* *
* Based on: net/ipv4/ip_fragment.c * Based on: net/ipv4/ip_fragment.c
* *
......
...@@ -1751,11 +1751,12 @@ cbq_destroy(struct Qdisc* sch) ...@@ -1751,11 +1751,12 @@ cbq_destroy(struct Qdisc* sch)
static void cbq_put(struct Qdisc *sch, unsigned long arg) static void cbq_put(struct Qdisc *sch, unsigned long arg)
{ {
struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data;
struct cbq_class *cl = (struct cbq_class*)arg; struct cbq_class *cl = (struct cbq_class*)arg;
if (--cl->refcnt == 0) { if (--cl->refcnt == 0) {
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data;
spin_lock_bh(&sch->dev->queue_lock); spin_lock_bh(&sch->dev->queue_lock);
if (q->rx_class == cl) if (q->rx_class == cl)
q->rx_class = NULL; q->rx_class = NULL;
......
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