Commit 5e787ed5 authored by Linus Torvalds's avatar Linus Torvalds

v2.4.0.10 -> v2.4.0.11

  - Trond Myklebust: NFS/RPC client SMP fixes
  - rth: alpha pyxis and cabriolet fixes
  - remove broken sys_wait4() declarations
  - disable radeon debugging code
  - VIA IDE driver should not enable autodma unless asked for
  - Andrey Savochkin: eepro100 update. Should fix the resource timing problems.
  - Jeff Garzik: via82cxxx_audio update
  - YMF7xx PCI audio update: get rid of old broken driver, make new
  driver handle legacy control too.
  - fix missed wakeup on block device request list
  - hpt366 controller doesn't play nice with some IBM harddisks
  - remove inode pages from the page cache only after having removed them
  from the page tables.
  - shared memory out-of-swap writepage() fixup (no more magic return)
parent baf4e2cf
VERSION = 2 VERSION = 2
PATCHLEVEL = 4 PATCHLEVEL = 4
SUBLEVEL = 1 SUBLEVEL = 1
EXTRAVERSION =-pre10 EXTRAVERSION =-pre11
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
...@@ -23,7 +23,7 @@ obj-y := entry.o traps.o process.o osf_sys.o irq.o irq_alpha.o \ ...@@ -23,7 +23,7 @@ obj-y := entry.o traps.o process.o osf_sys.o irq.o irq_alpha.o \
# FIXME! # FIXME!
# These should be made conditional on the stuff that needs them! # These should be made conditional on the stuff that needs them!
# #
obj-y += irq_i8259.o irq_srm.o irq_pyxis.o \ obj-y += irq_i8259.o irq_srm.o \
es1888.o smc37c669.o smc37c93x.o ns87312.o es1888.o smc37c669.o smc37c93x.o ns87312.o
ifdef CONFIG_VGA_HOSE ifdef CONFIG_VGA_HOSE
...@@ -43,7 +43,7 @@ obj-y += core_apecs.o core_cia.o core_irongate.o core_lca.o core_mcpcia.o \ ...@@ -43,7 +43,7 @@ obj-y += core_apecs.o core_cia.o core_irongate.o core_lca.o core_mcpcia.o \
sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o sys_titan.o \ sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o sys_titan.o \
sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \ sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \
sys_sable.o sys_sio.o sys_sx164.o sys_takara.o sys_rx164.o \ sys_sable.o sys_sio.o sys_sx164.o sys_takara.o sys_rx164.o \
sys_wildfire.o core_wildfire.o sys_wildfire.o core_wildfire.o irq_pyxis.o
else else
...@@ -94,6 +94,10 @@ obj-$(CONFIG_ALPHA_SX164) += sys_sx164.o ...@@ -94,6 +94,10 @@ obj-$(CONFIG_ALPHA_SX164) += sys_sx164.o
obj-$(CONFIG_ALPHA_TAKARA) += sys_takara.o obj-$(CONFIG_ALPHA_TAKARA) += sys_takara.o
obj-$(CONFIG_ALPHA_WILDFIRE) += sys_wildfire.o obj-$(CONFIG_ALPHA_WILDFIRE) += sys_wildfire.o
ifneq ($(CONFIG_ALPHA_MIATA)$(CONFIG_ALPHA_RUFFIAN)$(CONFIG_ALPHA_SX164),)
obj-y += irq_pyxis.o
endif
endif # GENERIC endif # GENERIC
all: kernel.o head.o all: kernel.o head.o
......
...@@ -904,7 +904,6 @@ extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz); ...@@ -904,7 +904,6 @@ extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz);
extern int do_getitimer(int which, struct itimerval *value); extern int do_getitimer(int which, struct itimerval *value);
extern int do_setitimer(int which, struct itimerval *, struct itimerval *); extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
asmlinkage int sys_utimes(char *, struct timeval *); asmlinkage int sys_utimes(char *, struct timeval *);
extern int sys_wait4(pid_t, int *, int, struct rusage *);
extern int do_adjtimex(struct timex *); extern int do_adjtimex(struct timex *);
struct timeval32 struct timeval32
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
asmlinkage int sys_wait4(int, int *, int, struct rusage *);
asmlinkage void ret_from_sys_call(void); asmlinkage void ret_from_sys_call(void);
asmlinkage int do_signal(sigset_t *, struct pt_regs *, asmlinkage int do_signal(sigset_t *, struct pt_regs *,
struct switch_stack *, unsigned long, unsigned long); struct switch_stack *, unsigned long, unsigned long);
......
...@@ -42,7 +42,7 @@ static inline void ...@@ -42,7 +42,7 @@ static inline void
cabriolet_update_irq_hw(unsigned int irq, unsigned long mask) cabriolet_update_irq_hw(unsigned int irq, unsigned long mask)
{ {
int ofs = (irq - 16) / 8; int ofs = (irq - 16) / 8;
outb(mask >> (16 + ofs*3), 0x804 + ofs); outb(mask >> (16 + ofs * 8), 0x804 + ofs);
} }
static inline void static inline void
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn)) #define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn))
#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn)) #define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn))
asmlinkage int sys_wait4(pid_t pid, unsigned long * stat_addr,
int options, unsigned long *ru);
asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, int syscall); asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, int syscall);
int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from) int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
......
...@@ -1957,9 +1957,6 @@ put_rusage (struct rusage32 *ru, struct rusage *r) ...@@ -1957,9 +1957,6 @@ put_rusage (struct rusage32 *ru, struct rusage *r)
return err; return err;
} }
extern asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr,
int options, struct rusage * ru);
asmlinkage long asmlinkage long
sys32_wait4(__kernel_pid_t32 pid, unsigned int *stat_addr, int options, sys32_wait4(__kernel_pid_t32 pid, unsigned int *stat_addr, int options,
struct rusage32 *ru) struct rusage32 *ru)
......
...@@ -47,8 +47,6 @@ ...@@ -47,8 +47,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
const int frame_extra_sizes[16] = { const int frame_extra_sizes[16] = {
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
extern asmlinkage void syscall_trace(void); extern asmlinkage void syscall_trace(void);
#undef DEBUG_SIG #undef DEBUG_SIG
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
extern asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
extern asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); extern asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
extern asmlinkage int save_fp_context(struct sigcontext *sc); extern asmlinkage int save_fp_context(struct sigcontext *sc);
extern asmlinkage int restore_fp_context(struct sigcontext *sc); extern asmlinkage int restore_fp_context(struct sigcontext *sc);
......
...@@ -585,9 +585,6 @@ put_rusage (struct rusage32 *ru, struct rusage *r) ...@@ -585,9 +585,6 @@ put_rusage (struct rusage32 *ru, struct rusage *r)
return err; return err;
} }
extern asmlinkage int sys_wait4(pid_t pid, unsigned int * stat_addr,
int options, struct rusage * ru);
asmlinkage int asmlinkage int
sys32_wait4(__kernel_pid_t32 pid, unsigned int * stat_addr, int options, sys32_wait4(__kernel_pid_t32 pid, unsigned int * stat_addr, int options,
struct rusage32 * ru) struct rusage32 * ru)
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
extern asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
extern asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); extern asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
extern asmlinkage int save_fp_context(struct sigcontext *sc); extern asmlinkage int save_fp_context(struct sigcontext *sc);
extern asmlinkage int restore_fp_context(struct sigcontext *sc); extern asmlinkage int restore_fp_context(struct sigcontext *sc);
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
extern asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
extern asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs); extern asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs);
extern asmlinkage int save_fp_context(struct sigcontext *sc); extern asmlinkage int save_fp_context(struct sigcontext *sc);
extern asmlinkage int restore_fp_context(struct sigcontext *sc); extern asmlinkage int restore_fp_context(struct sigcontext *sc);
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#ifndef _PPC_KERNEL_OPEN_PIC_H #ifndef _PPC_KERNEL_OPEN_PIC_H
#define _PPC_KERNEL_OPEN_PIC_H #define _PPC_KERNEL_OPEN_PIC_H
#include <linux/config.h>
#define OPENPIC_SIZE 0x40000 #define OPENPIC_SIZE 0x40000
/* OpenPIC IRQ controller structure */ /* OpenPIC IRQ controller structure */
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* Common pmac/prep/chrp pci routines. -- Cort * Common pmac/prep/chrp pci routines. -- Cort
*/ */
#include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/delay.h> #include <linux/delay.h>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* The motherboard routes/maps will disappear shortly. -- Cort * The motherboard routes/maps will disappear shortly. -- Cort
*/ */
#include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/kernel.h> #include <linux/kernel.h>
......
...@@ -53,8 +53,6 @@ ...@@ -53,8 +53,6 @@
#define MSR_USERCHANGE (MSR_FE0 | MSR_FE1) #define MSR_USERCHANGE (MSR_FE0 | MSR_FE1)
int do_signal(sigset_t *oldset, struct pt_regs *regs); int do_signal(sigset_t *oldset, struct pt_regs *regs);
extern int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from) int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
{ {
......
...@@ -52,8 +52,6 @@ typedef struct ...@@ -52,8 +52,6 @@ typedef struct
struct ucontext uc; struct ucontext uc;
} rt_sigframe; } rt_sigframe;
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset)); asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
/* /*
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from) int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
......
/* $Id: signal.c,v 1.107 2000/09/05 21:44:54 davem Exp $ /* $Id: signal.c,v 1.108 2001/01/24 21:05:12 davem Exp $
* linux/arch/sparc/kernel/signal.c * linux/arch/sparc/kernel/signal.c
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
...@@ -28,9 +28,6 @@ ...@@ -28,9 +28,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
extern void fpsave(unsigned long *fpregs, unsigned long *fsr, extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
void *fpqueue, unsigned long *fpqdepth); void *fpqueue, unsigned long *fpqdepth);
extern void fpload(unsigned long *fpregs, unsigned long *fsr); extern void fpload(unsigned long *fpregs, unsigned long *fsr);
......
/* $Id: sys_sunos.c,v 1.130 2000/08/12 13:25:41 davem Exp $ /* $Id: sys_sunos.c,v 1.131 2001/01/24 21:05:12 davem Exp $
* sys_sunos.c: SunOS specific syscall compatibility support. * sys_sunos.c: SunOS specific syscall compatibility support.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
...@@ -834,7 +834,6 @@ asmlinkage int sunos_setpgrp(pid_t pid, pid_t pgid) ...@@ -834,7 +834,6 @@ asmlinkage int sunos_setpgrp(pid_t pid, pid_t pgid)
} }
/* So stupid... */ /* So stupid... */
extern asmlinkage int sys_wait4(pid_t, unsigned int *, int, struct rusage *);
asmlinkage int sunos_wait4(pid_t pid, unsigned int *stat_addr, int options, struct rusage *ru) asmlinkage int sunos_wait4(pid_t pid, unsigned int *stat_addr, int options, struct rusage *ru)
{ {
int ret; int ret;
......
/* $Id: signal.c,v 1.54 2000/09/05 21:44:54 davem Exp $ /* $Id: signal.c,v 1.55 2001/01/24 21:05:13 davem Exp $
* arch/sparc64/kernel/signal.c * arch/sparc64/kernel/signal.c
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
...@@ -31,9 +31,6 @@ ...@@ -31,9 +31,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs,
unsigned long orig_o0, int ret_from_syscall); unsigned long orig_o0, int ret_from_syscall);
......
/* $Id: signal32.c,v 1.67 2000/09/05 21:44:54 davem Exp $ /* $Id: signal32.c,v 1.68 2001/01/24 21:05:13 davem Exp $
* arch/sparc64/kernel/signal32.c * arch/sparc64/kernel/signal32.c
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
asmlinkage int sys_wait4(pid_t pid, unsigned long *stat_addr,
int options, unsigned long *ru);
asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs, asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs,
unsigned long orig_o0, int ret_from_syscall); unsigned long orig_o0, int ret_from_syscall);
......
/* $Id: sys_sparc32.c,v 1.171 2000/12/13 16:34:55 davem Exp $ /* $Id: sys_sparc32.c,v 1.172 2001/01/24 21:05:13 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls. * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
* *
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
...@@ -1794,9 +1794,6 @@ static int put_rusage (struct rusage32 *ru, struct rusage *r) ...@@ -1794,9 +1794,6 @@ static int put_rusage (struct rusage32 *ru, struct rusage *r)
return err; return err;
} }
extern asmlinkage int sys_wait4(pid_t pid,unsigned int * stat_addr,
int options, struct rusage * ru);
asmlinkage int sys32_wait4(__kernel_pid_t32 pid, unsigned int *stat_addr, int options, struct rusage32 *ru) asmlinkage int sys32_wait4(__kernel_pid_t32 pid, unsigned int *stat_addr, int options, struct rusage32 *ru)
{ {
if (!ru) if (!ru)
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#define ACPI_OS_NAME "Linux" #define ACPI_OS_NAME "Linux"
#include <linux/config.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ctype.h> #include <linux/ctype.h>
......
...@@ -630,15 +630,8 @@ void inline blkdev_release_request(struct request *req) ...@@ -630,15 +630,8 @@ void inline blkdev_release_request(struct request *req)
&& atomic_read(&queued_sectors) < low_queued_sectors) && atomic_read(&queued_sectors) < low_queued_sectors)
wake_up(&blk_buffers_wait); wake_up(&blk_buffers_wait);
if (!list_empty(&q->request_freelist[rw])) {
blk_refill_freelist(q, rw);
list_add(&req->table, &q->request_freelist[rw]);
return;
}
/* /*
* free list is empty, add to pending free list and * Add to pending free list and batch wakeups
* batch wakeups
*/ */
list_add(&req->table, &q->pending_freelist[rw]); list_add(&req->table, &q->pending_freelist[rw]);
......
...@@ -778,7 +778,7 @@ static void radeon_cp_dispatch_vertex( drm_device_t *dev, ...@@ -778,7 +778,7 @@ static void radeon_cp_dispatch_vertex( drm_device_t *dev,
radeon_update_ring_snapshot( dev_priv ); radeon_update_ring_snapshot( dev_priv );
if ( 1 ) if ( 0 )
radeon_print_dirty( "dispatch_vertex", sarea_priv->dirty ); radeon_print_dirty( "dispatch_vertex", sarea_priv->dirty );
if ( buf->used ) { if ( buf->used ) {
......
...@@ -55,6 +55,15 @@ const char *bad_ata100_5[] = { ...@@ -55,6 +55,15 @@ const char *bad_ata100_5[] = {
}; };
const char *bad_ata66_4[] = { const char *bad_ata66_4[] = {
"IBM-DTLA-307075",
"IBM-DTLA-307060",
"IBM-DTLA-307045",
"IBM-DTLA-307030",
"IBM-DTLA-307020",
"IBM-DTLA-307015",
"IBM-DTLA-305040",
"IBM-DTLA-305030",
"IBM-DTLA-305020",
"WDC AC310200R", "WDC AC310200R",
NULL NULL
}; };
......
...@@ -602,7 +602,9 @@ void __init ide_init_via82cxxx(ide_hwif_t *hwif) ...@@ -602,7 +602,9 @@ void __init ide_init_via82cxxx(ide_hwif_t *hwif)
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
if (hwif->dma_base) { if (hwif->dma_base) {
hwif->dmaproc = &via82cxxx_dmaproc; hwif->dmaproc = &via82cxxx_dmaproc;
#ifdef CONFIG_IDEDMA_AUTO
hwif->autodma = 1; hwif->autodma = 1;
#endif
} }
#endif /* CONFIG_BLK_DEV_IDEDMA */ #endif /* CONFIG_BLK_DEV_IDEDMA */
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
static const char *version = static const char *version =
"eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html\n" "eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html\n"
"eepro100.c: $Revision: 1.35 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n"; "eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n";
/* A few user-configurable values that apply to all boards. /* A few user-configurable values that apply to all boards.
First set is undocumented and spelled per Intel recommendations. */ First set is undocumented and spelled per Intel recommendations. */
...@@ -698,6 +698,7 @@ static int speedo_found1(struct pci_dev *pdev, ...@@ -698,6 +698,7 @@ static int speedo_found1(struct pci_dev *pdev,
This takes less than 10usec and will easily finish before the next This takes less than 10usec and will easily finish before the next
action. */ action. */
outl(PortReset, ioaddr + SCBPort); outl(PortReset, ioaddr + SCBPort);
inl(ioaddr + SCBPort);
udelay(10); udelay(10);
if (eeprom[3] & 0x0100) if (eeprom[3] & 0x0100)
...@@ -785,6 +786,7 @@ static int speedo_found1(struct pci_dev *pdev, ...@@ -785,6 +786,7 @@ static int speedo_found1(struct pci_dev *pdev,
#endif /* kernel_bloat */ #endif /* kernel_bloat */
outl(PortReset, ioaddr + SCBPort); outl(PortReset, ioaddr + SCBPort);
inl(ioaddr + SCBPort);
udelay(10); udelay(10);
/* Return the chip to its original power state. */ /* Return the chip to its original power state. */
...@@ -801,7 +803,7 @@ static int speedo_found1(struct pci_dev *pdev, ...@@ -801,7 +803,7 @@ static int speedo_found1(struct pci_dev *pdev,
sp->tx_ring = tx_ring_space; sp->tx_ring = tx_ring_space;
sp->tx_ring_dma = tx_ring_dma; sp->tx_ring_dma = tx_ring_dma;
sp->lstats = (struct speedo_stats *)(sp->tx_ring + TX_RING_SIZE); sp->lstats = (struct speedo_stats *)(sp->tx_ring + TX_RING_SIZE);
sp->lstats_dma = cpu_to_le32(TX_RING_ELEM_DMA(sp, TX_RING_SIZE)); sp->lstats_dma = TX_RING_ELEM_DMA(sp, TX_RING_SIZE);
init_timer(&sp->timer); /* used in ioctl() */ init_timer(&sp->timer); /* used in ioctl() */
sp->full_duplex = option >= 0 && (option & 0x10) ? 1 : 0; sp->full_duplex = option >= 0 && (option & 0x10) ? 1 : 0;
...@@ -1002,7 +1004,9 @@ static void speedo_resume(struct net_device *dev) ...@@ -1002,7 +1004,9 @@ static void speedo_resume(struct net_device *dev)
/* Set the segment registers to '0'. */ /* Set the segment registers to '0'. */
wait_for_cmd_done(ioaddr + SCBCmd); wait_for_cmd_done(ioaddr + SCBCmd);
outl(0, ioaddr + SCBPointer); outl(0, ioaddr + SCBPointer);
inl(ioaddr + SCBPointer); /* XXX */ /* impose a delay to avoid a bug */
inl(ioaddr + SCBPointer);
udelay(10);
outb(RxAddrLoad, ioaddr + SCBCmd); outb(RxAddrLoad, ioaddr + SCBCmd);
wait_for_cmd_done(ioaddr + SCBCmd); wait_for_cmd_done(ioaddr + SCBCmd);
outb(CUCmdBase, ioaddr + SCBCmd); outb(CUCmdBase, ioaddr + SCBCmd);
...@@ -1010,7 +1014,6 @@ static void speedo_resume(struct net_device *dev) ...@@ -1010,7 +1014,6 @@ static void speedo_resume(struct net_device *dev)
/* Load the statistics block and rx ring addresses. */ /* Load the statistics block and rx ring addresses. */
wait_for_cmd_done(ioaddr + SCBCmd); wait_for_cmd_done(ioaddr + SCBCmd);
outl(sp->lstats_dma, ioaddr + SCBPointer); outl(sp->lstats_dma, ioaddr + SCBPointer);
inl(ioaddr + SCBPointer); /* XXX */
outb(CUStatsAddr, ioaddr + SCBCmd); outb(CUStatsAddr, ioaddr + SCBCmd);
sp->lstats->done_marker = 0; sp->lstats->done_marker = 0;
...@@ -1045,7 +1048,7 @@ static void speedo_resume(struct net_device *dev) ...@@ -1045,7 +1048,7 @@ static void speedo_resume(struct net_device *dev)
/* Start the chip's Tx process and unmask interrupts. */ /* Start the chip's Tx process and unmask interrupts. */
wait_for_cmd_done(ioaddr + SCBCmd); wait_for_cmd_done(ioaddr + SCBCmd);
outl(cpu_to_le32(TX_RING_ELEM_DMA(sp, sp->dirty_tx % TX_RING_SIZE)), outl(TX_RING_ELEM_DMA(sp, sp->dirty_tx % TX_RING_SIZE),
ioaddr + SCBPointer); ioaddr + SCBPointer);
/* We are not ACK-ing FCP and ER in the interrupt handler yet so they should /* We are not ACK-ing FCP and ER in the interrupt handler yet so they should
remain masked --Dragan */ remain masked --Dragan */
...@@ -1274,7 +1277,7 @@ static void speedo_tx_timeout(struct net_device *dev) ...@@ -1274,7 +1277,7 @@ static void speedo_tx_timeout(struct net_device *dev)
/* Only the command unit has stopped. */ /* Only the command unit has stopped. */
printk(KERN_WARNING "%s: Trying to restart the transmitter...\n", printk(KERN_WARNING "%s: Trying to restart the transmitter...\n",
dev->name); dev->name);
outl(cpu_to_le32(TX_RING_ELEM_DMA(sp, dirty_tx % TX_RING_SIZE])), outl(TX_RING_ELEM_DMA(sp, dirty_tx % TX_RING_SIZE]),
ioaddr + SCBPointer); ioaddr + SCBPointer);
outw(CUStart, ioaddr + SCBCmd); outw(CUStart, ioaddr + SCBCmd);
reset_mii(dev); reset_mii(dev);
......
...@@ -142,9 +142,9 @@ if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then ...@@ -142,9 +142,9 @@ if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then
dep_tristate ' Yamaha FM synthesizer (YM3812/OPL-3) support' CONFIG_SOUND_YM3812 $CONFIG_SOUND_OSS dep_tristate ' Yamaha FM synthesizer (YM3812/OPL-3) support' CONFIG_SOUND_YM3812 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha OPL3-SA1 audio controller' CONFIG_SOUND_OPL3SA1 $CONFIG_SOUND_OSS dep_tristate ' Yamaha OPL3-SA1 audio controller' CONFIG_SOUND_OPL3SA1 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha OPL3-SA2, SA3, and SAx based PnP cards' CONFIG_SOUND_OPL3SA2 $CONFIG_SOUND_OSS dep_tristate ' Yamaha OPL3-SA2, SA3, and SAx based PnP cards' CONFIG_SOUND_OPL3SA2 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha YMF7xx PCI audio (legacy mode)' CONFIG_SOUND_YMPCI $CONFIG_SOUND_OSS $CONFIG_PCI dep_tristate ' Yamaha YMF7xx PCI audio (native mode)' CONFIG_SOUND_YMFPCI $CONFIG_SOUND_OSS $CONFIG_PCI
if [ "$CONFIG_SOUND_YMPCI" = "n" ]; then if [ "$CONFIG_SOUND_YMFPCI" != "n" ]; then
dep_tristate ' Yamaha YMF7xx PCI audio (native mode) (EXPERIMENTAL)' CONFIG_SOUND_YMFPCI $CONFIG_SOUND_OSS $CONFIG_PCI $CONFIG_EXPERIMENTAL bool ' Yamaha PCI legacy ports support' CONFIG_SOUND_YMFPCI_LEGACY
fi fi
dep_tristate ' 6850 UART support' CONFIG_SOUND_UART6850 $CONFIG_SOUND_OSS dep_tristate ' 6850 UART support' CONFIG_SOUND_UART6850 $CONFIG_SOUND_OSS
......
...@@ -47,8 +47,10 @@ obj-$(CONFIG_SOUND_ACI_MIXER) += aci.o ...@@ -47,8 +47,10 @@ obj-$(CONFIG_SOUND_ACI_MIXER) += aci.o
obj-$(CONFIG_SOUND_AWE32_SYNTH) += awe_wave.o obj-$(CONFIG_SOUND_AWE32_SYNTH) += awe_wave.o
obj-$(CONFIG_SOUND_VIA82CXXX) += via82cxxx_audio.o ac97_codec.o obj-$(CONFIG_SOUND_VIA82CXXX) += via82cxxx_audio.o ac97_codec.o
obj-$(CONFIG_SOUND_YMPCI) += ymf_sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_YMFPCI) += ymfpci.o ac97_codec.o obj-$(CONFIG_SOUND_YMFPCI) += ymfpci.o ac97_codec.o
ifeq ($(CONFIG_SOUND_YMFPCI_LEGACY),y)
obj-$(CONFIG_SOUND_YMFPCI) += opl3.o uart401.o
endif
obj-$(CONFIG_SOUND_MSNDCLAS) += msnd.o msnd_classic.o obj-$(CONFIG_SOUND_MSNDCLAS) += msnd.o msnd_classic.o
obj-$(CONFIG_SOUND_MSNDPIN) += msnd.o msnd_pinnacle.o obj-$(CONFIG_SOUND_MSNDPIN) += msnd.o msnd_pinnacle.o
obj-$(CONFIG_SOUND_VWSND) += vwsnd.o obj-$(CONFIG_SOUND_VWSND) += vwsnd.o
......
This diff is collapsed.
This diff is collapsed.
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
*/ */
#include <linux/config.h>
/* /*
* Direct registers * Direct registers
...@@ -131,7 +132,12 @@ ...@@ -131,7 +132,12 @@
#define YDSXG_AC97READCMD 0x8000 #define YDSXG_AC97READCMD 0x8000
#define YDSXG_AC97WRITECMD 0x0000 #define YDSXG_AC97WRITECMD 0x0000
#define PCIR_LEGCTRL 0x40
#define PCIR_ELEGCTRL 0x42
#define PCIR_DSXGCTRL 0x48 #define PCIR_DSXGCTRL 0x48
#define PCIR_OPLADR 0x60
#define PCIR_SBADR 0x62
#define PCIR_MPUADR 0x64
#define YDSXG_DSPLENGTH 0x0080 #define YDSXG_DSPLENGTH 0x0080
#define YDSXG_CTRLLENGTH 0x3000 #define YDSXG_CTRLLENGTH 0x3000
...@@ -185,8 +191,8 @@ typedef struct stru_ymfpci_playback_bank { ...@@ -185,8 +191,8 @@ typedef struct stru_ymfpci_playback_bank {
} ymfpci_playback_bank_t; } ymfpci_playback_bank_t;
typedef struct stru_ymfpci_capture_bank { typedef struct stru_ymfpci_capture_bank {
u32 base; /* 32-bit address */ u32 base; /* 32-bit address (aligned at 4) */
u32 loop_end; /* 32-bit offset */ u32 loop_end; /* size in BYTES (aligned at 4) */
u32 start; /* 32-bit offset */ u32 start; /* 32-bit offset */
u32 num_of_loops; /* counter */ u32 num_of_loops; /* counter */
} ymfpci_capture_bank_t; } ymfpci_capture_bank_t;
...@@ -198,8 +204,7 @@ typedef struct stru_ymfpci_effect_bank { ...@@ -198,8 +204,7 @@ typedef struct stru_ymfpci_effect_bank {
u32 temp; u32 temp;
} ymfpci_effect_bank_t; } ymfpci_effect_bank_t;
typedef struct stru_ymfpci_voice ymfpci_voice_t; typedef struct ymf_voice ymfpci_voice_t;
typedef struct ymf_pcm ymfpci_pcm_t;
/* /*
* Throughout the code Yaroslav names YMF unit pointer "codec" * Throughout the code Yaroslav names YMF unit pointer "codec"
* even though it does not correspond to any codec. Must be historic. * even though it does not correspond to any codec. Must be historic.
...@@ -214,52 +219,35 @@ typedef enum { ...@@ -214,52 +219,35 @@ typedef enum {
YMFPCI_MIDI YMFPCI_MIDI
} ymfpci_voice_type_t; } ymfpci_voice_type_t;
struct stru_ymfpci_voice { struct ymf_voice {
ymfpci_t *codec; // ymfpci_t *codec;
int number; int number;
int use: 1, char use, pcm, synth, midi; // bool
pcm: 1,
synth: 1,
midi: 1;
ymfpci_playback_bank_t *bank; ymfpci_playback_bank_t *bank;
void (*interrupt)(ymfpci_t *codec, ymfpci_voice_t *voice); struct ymf_pcm *ypcm;
ymfpci_pcm_t *ypcm;
}; };
typedef enum { struct ymf_capture {
PLAYBACK_VOICE, // struct ymf_unit *unit;
CAPTURE_REC, int use;
CAPTURE_AC97, ymfpci_capture_bank_t *bank;
EFFECT_DRY_LEFT, struct ymf_pcm *ypcm;
EFFECT_DRY_RIGHT,
EFFECT_EFF1,
EFFECT_EFF2,
EFFECT_EFF3
} ymfpci_pcm_type_t;
struct ymf_pcm {
ymfpci_t *codec;
ymfpci_pcm_type_t type;
struct ymf_state *state;
ymfpci_voice_t *voices[2]; /* playback only */
int running; // +
int spdif;
}; };
struct ymf_unit { struct ymf_unit {
u8 rev; /* PCI revision */ u8 rev; /* PCI revision */
void *reg_area_virt; void *reg_area_virt;
void *work_ptr; // + void *work_ptr;
unsigned int bank_size_playback; unsigned int bank_size_playback;
unsigned int bank_size_capture; unsigned int bank_size_capture;
unsigned int bank_size_effect; unsigned int bank_size_effect;
unsigned int work_size; unsigned int work_size;
void *bank_base_playback; // + void *bank_base_playback;
void *bank_base_capture; // + void *bank_base_capture;
void *bank_base_effect; // + void *bank_base_effect;
void *work_base; // + void *work_base;
u32 *ctrl_playback; u32 *ctrl_playback;
ymfpci_playback_bank_t *bank_playback[YDSXG_PLAYBACK_VOICES][2]; ymfpci_playback_bank_t *bank_playback[YDSXG_PLAYBACK_VOICES][2];
...@@ -269,13 +257,20 @@ struct ymf_unit { ...@@ -269,13 +257,20 @@ struct ymf_unit {
int start_count; int start_count;
u32 active_bank; u32 active_bank;
ymfpci_voice_t voices[64]; struct ymf_voice voices[64];
struct ymf_capture capture[5];
struct ac97_codec *ac97_codec[NR_AC97]; struct ac97_codec *ac97_codec[NR_AC97];
u16 ac97_features; u16 ac97_features;
struct pci_dev *pci; struct pci_dev *pci;
#ifdef CONFIG_SOUND_YMFPCI_LEGACY
/* legacy hardware resources */
unsigned int iosynth, iomidi;
struct address_info opl3_data, mpu_data;
#endif
spinlock_t reg_lock; spinlock_t reg_lock;
spinlock_t voice_lock; spinlock_t voice_lock;
...@@ -284,14 +279,11 @@ struct ymf_unit { ...@@ -284,14 +279,11 @@ struct ymf_unit {
struct semaphore open_sem; struct semaphore open_sem;
struct list_head ymf_devs; struct list_head ymf_devs;
struct ymf_state *states[1]; // * struct list_head states; /* List of states for this unit */
/* ypcm may be the same thing as state, but not for record, effects. */ /* For the moment we do not traverse list of states so it is
* entirely useless. Will be used (PM) or killed. XXX */
}; };
/*
* "Software" or virtual channel, an instance of opened /dev/dsp.
*/
struct ymf_dmabuf { struct ymf_dmabuf {
/* OSS buffer management stuff */ /* OSS buffer management stuff */
...@@ -312,7 +304,6 @@ struct ymf_dmabuf { ...@@ -312,7 +304,6 @@ struct ymf_dmabuf {
/* redundant, but makes calculations easier */ /* redundant, but makes calculations easier */
unsigned fragsize; unsigned fragsize;
unsigned dmasize; /* Total rawbuf[] size */ unsigned dmasize; /* Total rawbuf[] size */
unsigned fragsamples;
/* OSS stuff */ /* OSS stuff */
unsigned mapped:1; unsigned mapped:1;
...@@ -329,15 +320,40 @@ struct ymf_pcm_format { ...@@ -329,15 +320,40 @@ struct ymf_pcm_format {
int shift; /* redundant, computed from the above */ int shift; /* redundant, computed from the above */
}; };
struct ymf_state { typedef enum {
struct ymf_unit *unit; /* backpointer */ PLAYBACK_VOICE,
CAPTURE_REC,
CAPTURE_AC97,
EFFECT_DRY_LEFT,
EFFECT_DRY_RIGHT,
EFFECT_EFF1,
EFFECT_EFF2,
EFFECT_EFF3
} ymfpci_pcm_type_t;
/* virtual channel number */ /* This is variant record, but we hate unions. Little waste on pointers []. */
int virt; // * unused a.t.m. struct ymf_pcm {
ymfpci_pcm_type_t type;
struct ymf_state *state;
ymfpci_voice_t *voices[2];
int capture_bank_number;
struct ymf_dmabuf dmabuf;
int running;
int spdif;
};
struct ymf_pcm ypcm; // * /*
struct ymf_dmabuf dmabuf; // * * "Software" or virtual channel, an instance of opened /dev/dsp.
struct ymf_pcm_format format; // * * It may have two physical channels (pcms) for duplex operations.
*/
struct ymf_state {
struct list_head chain;
struct ymf_unit *unit; /* backpointer */
struct ymf_pcm rpcm, wpcm;
struct ymf_pcm_format format;
}; };
#endif /* __YMFPCI_H */ #endif /* __YMFPCI_H */
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <linux/sunrpc/clnt.h> #include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/sched.h> #include <linux/sunrpc/sched.h>
#include <linux/spinlock.h> #include <linux/smp_lock.h>
#include <linux/nfs.h> #include <linux/nfs.h>
#include <linux/nfs_fs.h> #include <linux/nfs_fs.h>
...@@ -52,11 +52,6 @@ ...@@ -52,11 +52,6 @@
*/ */
static struct rpc_wait_queue flushd_queue = RPC_INIT_WAITQ("nfs_flushd"); static struct rpc_wait_queue flushd_queue = RPC_INIT_WAITQ("nfs_flushd");
/*
* Spinlock
*/
spinlock_t nfs_flushd_lock = SPIN_LOCK_UNLOCKED;
/* /*
* Local function declarations. * Local function declarations.
*/ */
...@@ -68,17 +63,19 @@ int nfs_reqlist_init(struct nfs_server *server) ...@@ -68,17 +63,19 @@ int nfs_reqlist_init(struct nfs_server *server)
{ {
struct nfs_reqlist *cache; struct nfs_reqlist *cache;
struct rpc_task *task; struct rpc_task *task;
int status = 0; int status;
dprintk("NFS: writecache_init\n"); dprintk("NFS: writecache_init\n");
lock_kernel();
status = -ENOMEM;
/* Create the RPC task */ /* Create the RPC task */
if (!(task = rpc_new_task(server->client, NULL, RPC_TASK_ASYNC))) if (!(task = rpc_new_task(server->client, NULL, RPC_TASK_ASYNC)))
return -ENOMEM; goto out_unlock;
spin_lock(&nfs_flushd_lock);
cache = server->rw_requests; cache = server->rw_requests;
status = 0;
if (cache->task) if (cache->task)
goto out_unlock; goto out_unlock;
...@@ -93,12 +90,13 @@ int nfs_reqlist_init(struct nfs_server *server) ...@@ -93,12 +90,13 @@ int nfs_reqlist_init(struct nfs_server *server)
task->tk_action = nfs_flushd; task->tk_action = nfs_flushd;
task->tk_exit = nfs_flushd_exit; task->tk_exit = nfs_flushd_exit;
spin_unlock(&nfs_flushd_lock);
rpc_execute(task); rpc_execute(task);
unlock_kernel();
return 0; return 0;
out_unlock: out_unlock:
spin_unlock(&nfs_flushd_lock); if (task)
rpc_release_task(task); rpc_release_task(task);
unlock_kernel();
return status; return status;
} }
...@@ -106,23 +104,24 @@ void nfs_reqlist_exit(struct nfs_server *server) ...@@ -106,23 +104,24 @@ void nfs_reqlist_exit(struct nfs_server *server)
{ {
struct nfs_reqlist *cache; struct nfs_reqlist *cache;
lock_kernel();
cache = server->rw_requests; cache = server->rw_requests;
if (!cache) if (!cache)
return; goto out;
dprintk("NFS: reqlist_exit (ptr %p rpc %p)\n", cache, cache->task); dprintk("NFS: reqlist_exit (ptr %p rpc %p)\n", cache, cache->task);
while (cache->task || cache->inodes) { while (cache->task || cache->inodes) {
spin_lock(&nfs_flushd_lock);
if (!cache->task) { if (!cache->task) {
spin_unlock(&nfs_flushd_lock);
nfs_reqlist_init(server); nfs_reqlist_init(server);
} else { } else {
cache->task->tk_status = -ENOMEM; cache->task->tk_status = -ENOMEM;
rpc_wake_up_task(cache->task); rpc_wake_up_task(cache->task);
spin_unlock(&nfs_flushd_lock);
} }
interruptible_sleep_on_timeout(&cache->request_wait, 1 * HZ); interruptible_sleep_on_timeout(&cache->request_wait, 1 * HZ);
} }
out:
unlock_kernel();
} }
int nfs_reqlist_alloc(struct nfs_server *server) int nfs_reqlist_alloc(struct nfs_server *server)
...@@ -161,7 +160,6 @@ static void inode_append_flushd(struct inode *inode) ...@@ -161,7 +160,6 @@ static void inode_append_flushd(struct inode *inode)
struct nfs_reqlist *cache = NFS_REQUESTLIST(inode); struct nfs_reqlist *cache = NFS_REQUESTLIST(inode);
struct inode **q; struct inode **q;
spin_lock(&nfs_flushd_lock);
if (NFS_FLAGS(inode) & NFS_INO_FLUSH) if (NFS_FLAGS(inode) & NFS_INO_FLUSH)
goto out; goto out;
inode->u.nfs_i.hash_next = NULL; inode->u.nfs_i.hash_next = NULL;
...@@ -177,7 +175,6 @@ static void inode_append_flushd(struct inode *inode) ...@@ -177,7 +175,6 @@ static void inode_append_flushd(struct inode *inode)
NFS_FLAGS(inode) |= NFS_INO_FLUSH; NFS_FLAGS(inode) |= NFS_INO_FLUSH;
atomic_inc(&inode->i_count); atomic_inc(&inode->i_count);
out: out:
spin_unlock(&nfs_flushd_lock);
} }
void inode_remove_flushd(struct inode *inode) void inode_remove_flushd(struct inode *inode)
...@@ -185,7 +182,7 @@ void inode_remove_flushd(struct inode *inode) ...@@ -185,7 +182,7 @@ void inode_remove_flushd(struct inode *inode)
struct nfs_reqlist *cache = NFS_REQUESTLIST(inode); struct nfs_reqlist *cache = NFS_REQUESTLIST(inode);
struct inode **q; struct inode **q;
spin_lock(&nfs_flushd_lock); lock_kernel();
if (!(NFS_FLAGS(inode) & NFS_INO_FLUSH)) if (!(NFS_FLAGS(inode) & NFS_INO_FLUSH))
goto out; goto out;
...@@ -195,12 +192,10 @@ void inode_remove_flushd(struct inode *inode) ...@@ -195,12 +192,10 @@ void inode_remove_flushd(struct inode *inode)
if (*q) { if (*q) {
*q = inode->u.nfs_i.hash_next; *q = inode->u.nfs_i.hash_next;
NFS_FLAGS(inode) &= ~NFS_INO_FLUSH; NFS_FLAGS(inode) &= ~NFS_INO_FLUSH;
spin_unlock(&nfs_flushd_lock);
iput(inode); iput(inode);
return;
} }
out: out:
spin_unlock(&nfs_flushd_lock); unlock_kernel();
} }
void inode_schedule_scan(struct inode *inode, unsigned long time) void inode_schedule_scan(struct inode *inode, unsigned long time)
...@@ -209,6 +204,7 @@ void inode_schedule_scan(struct inode *inode, unsigned long time) ...@@ -209,6 +204,7 @@ void inode_schedule_scan(struct inode *inode, unsigned long time)
struct rpc_task *task; struct rpc_task *task;
unsigned long mintimeout; unsigned long mintimeout;
lock_kernel();
if (time_after(NFS_NEXTSCAN(inode), time)) if (time_after(NFS_NEXTSCAN(inode), time))
NFS_NEXTSCAN(inode) = time; NFS_NEXTSCAN(inode) = time;
mintimeout = jiffies + 1 * HZ; mintimeout = jiffies + 1 * HZ;
...@@ -216,16 +212,14 @@ void inode_schedule_scan(struct inode *inode, unsigned long time) ...@@ -216,16 +212,14 @@ void inode_schedule_scan(struct inode *inode, unsigned long time)
mintimeout = NFS_NEXTSCAN(inode); mintimeout = NFS_NEXTSCAN(inode);
inode_append_flushd(inode); inode_append_flushd(inode);
spin_lock(&nfs_flushd_lock);
task = cache->task; task = cache->task;
if (!task) { if (!task) {
spin_unlock(&nfs_flushd_lock);
nfs_reqlist_init(NFS_SERVER(inode)); nfs_reqlist_init(NFS_SERVER(inode));
} else { } else {
if (time_after(cache->runat, mintimeout)) if (time_after(cache->runat, mintimeout))
rpc_wake_up_task(task); rpc_wake_up_task(task);
spin_unlock(&nfs_flushd_lock);
} }
unlock_kernel();
} }
...@@ -242,10 +236,8 @@ nfs_flushd(struct rpc_task *task) ...@@ -242,10 +236,8 @@ nfs_flushd(struct rpc_task *task)
server = (struct nfs_server *) task->tk_calldata; server = (struct nfs_server *) task->tk_calldata;
cache = server->rw_requests; cache = server->rw_requests;
spin_lock(&nfs_flushd_lock);
next = cache->inodes; next = cache->inodes;
cache->inodes = NULL; cache->inodes = NULL;
spin_unlock(&nfs_flushd_lock);
while ((inode = next) != NULL) { while ((inode = next) != NULL) {
next = next->u.nfs_i.hash_next; next = next->u.nfs_i.hash_next;
...@@ -282,13 +274,11 @@ nfs_flushd(struct rpc_task *task) ...@@ -282,13 +274,11 @@ nfs_flushd(struct rpc_task *task)
task->tk_timeout = delay; task->tk_timeout = delay;
cache->runat = jiffies + task->tk_timeout; cache->runat = jiffies + task->tk_timeout;
spin_lock(&nfs_flushd_lock);
if (!atomic_read(&cache->nr_requests) && !cache->inodes) { if (!atomic_read(&cache->nr_requests) && !cache->inodes) {
cache->task = NULL; cache->task = NULL;
task->tk_action = NULL; task->tk_action = NULL;
} else } else
rpc_sleep_on(&flushd_queue, task, NULL, NULL); rpc_sleep_on(&flushd_queue, task, NULL, NULL);
spin_unlock(&nfs_flushd_lock);
} }
static void static void
...@@ -299,10 +289,8 @@ nfs_flushd_exit(struct rpc_task *task) ...@@ -299,10 +289,8 @@ nfs_flushd_exit(struct rpc_task *task)
server = (struct nfs_server *) task->tk_calldata; server = (struct nfs_server *) task->tk_calldata;
cache = server->rw_requests; cache = server->rw_requests;
spin_lock(&nfs_flushd_lock);
if (cache->task == task) if (cache->task == task)
cache->task = NULL; cache->task = NULL;
spin_unlock(&nfs_flushd_lock);
wake_up(&cache->request_wait); wake_up(&cache->request_wait);
} }
...@@ -572,7 +572,6 @@ static inline long sync(void) ...@@ -572,7 +572,6 @@ static inline long sync(void)
return sys_sync(); return sys_sync();
} }
extern long sys_wait4(int, int *, int, struct rusage *);
static inline pid_t waitpid(int pid, int * wait_stat, int flags) static inline pid_t waitpid(int pid, int * wait_stat, int flags)
{ {
return sys_wait4(pid, wait_stat, flags, NULL); return sys_wait4(pid, wait_stat, flags, NULL);
......
...@@ -945,7 +945,6 @@ void vmtruncate(struct inode * inode, loff_t offset) ...@@ -945,7 +945,6 @@ void vmtruncate(struct inode * inode, loff_t offset)
if (inode->i_size < offset) if (inode->i_size < offset)
goto do_expand; goto do_expand;
inode->i_size = offset; inode->i_size = offset;
truncate_inode_pages(mapping, offset);
spin_lock(&mapping->i_shared_lock); spin_lock(&mapping->i_shared_lock);
if (!mapping->i_mmap && !mapping->i_mmap_shared) if (!mapping->i_mmap && !mapping->i_mmap_shared)
goto out_unlock; goto out_unlock;
...@@ -960,8 +959,7 @@ void vmtruncate(struct inode * inode, loff_t offset) ...@@ -960,8 +959,7 @@ void vmtruncate(struct inode * inode, loff_t offset)
out_unlock: out_unlock:
spin_unlock(&mapping->i_shared_lock); spin_unlock(&mapping->i_shared_lock);
/* this should go into ->truncate */ truncate_inode_pages(mapping, offset);
inode->i_size = offset;
if (inode->i_op && inode->i_op->truncate) if (inode->i_op && inode->i_op->truncate)
inode->i_op->truncate(inode); inode->i_op->truncate(inode);
return; return;
......
...@@ -217,8 +217,11 @@ static int shmem_writepage(struct page * page) ...@@ -217,8 +217,11 @@ static int shmem_writepage(struct page * page)
info = &page->mapping->host->u.shmem_i; info = &page->mapping->host->u.shmem_i;
swap = __get_swap_page(2); swap = __get_swap_page(2);
if (!swap.val) if (!swap.val) {
return 1; set_page_dirty(page);
UnlockPage(page);
return -ENOMEM;
}
spin_lock(&info->lock); spin_lock(&info->lock);
shmem_recalc_inode(page->mapping->host); shmem_recalc_inode(page->mapping->host);
......
...@@ -267,22 +267,26 @@ rpcauth_holdcred(struct rpc_task *task) ...@@ -267,22 +267,26 @@ rpcauth_holdcred(struct rpc_task *task)
dprintk("RPC: %4d holding %s cred %p\n", dprintk("RPC: %4d holding %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred); task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred);
if (task->tk_msg.rpc_cred) { if (task->tk_msg.rpc_cred) {
spin_lock(&rpc_credcache_lock);
task->tk_msg.rpc_cred->cr_count++; task->tk_msg.rpc_cred->cr_count++;
task->tk_msg.rpc_cred->cr_expire = jiffies + task->tk_auth->au_expire; task->tk_msg.rpc_cred->cr_expire = jiffies + task->tk_auth->au_expire;
spin_unlock(&rpc_credcache_lock);
} }
} }
void void
rpcauth_releasecred(struct rpc_auth *auth, struct rpc_cred *cred) rpcauth_releasecred(struct rpc_auth *auth, struct rpc_cred *cred)
{ {
spin_lock(&rpc_credcache_lock);
if (cred != NULL && cred->cr_count > 0) { if (cred != NULL && cred->cr_count > 0) {
cred->cr_count--; if (!--cred->cr_count && (cred->cr_flags & RPCAUTH_CRED_DEAD)) {
if (cred->cr_flags & RPCAUTH_CRED_DEAD) { spin_unlock(&rpc_credcache_lock);
rpcauth_remove_credcache(auth, cred); rpcauth_remove_credcache(auth, cred);
if (!cred->cr_count) rpcauth_crdestroy(auth, cred);
rpcauth_crdestroy(auth, cred); return;
} }
} }
spin_unlock(&rpc_credcache_lock);
} }
void void
...@@ -335,13 +339,19 @@ rpcauth_invalcred(struct rpc_task *task) ...@@ -335,13 +339,19 @@ rpcauth_invalcred(struct rpc_task *task)
{ {
dprintk("RPC: %4d invalidating %s cred %p\n", dprintk("RPC: %4d invalidating %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred); task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred);
spin_lock(&rpc_credcache_lock);
if (task->tk_msg.rpc_cred) if (task->tk_msg.rpc_cred)
task->tk_msg.rpc_cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE; task->tk_msg.rpc_cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE;
spin_unlock(&rpc_credcache_lock);
} }
int int
rpcauth_uptodatecred(struct rpc_task *task) rpcauth_uptodatecred(struct rpc_task *task)
{ {
return !(task->tk_msg.rpc_cred) || int retval;
spin_lock(&rpc_credcache_lock);
retval = !(task->tk_msg.rpc_cred) ||
(task->tk_msg.rpc_cred->cr_flags & RPCAUTH_CRED_UPTODATE); (task->tk_msg.rpc_cred->cr_flags & RPCAUTH_CRED_UPTODATE);
spin_unlock(&rpc_credcache_lock);
return retval;
} }
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/config.h>
extern int sysctl_unix_max_dgram_qlen; extern int sysctl_unix_max_dgram_qlen;
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
* negotiation. * negotiation.
*/ */
#include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/socket.h> #include <linux/socket.h>
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* i-frames. * i-frames.
*/ */
#include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/socket.h> #include <linux/socket.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
* 2000-09-04 Henner Eisen dev_hold() / dev_put() for x25_neigh. * 2000-09-04 Henner Eisen dev_hold() / dev_put() for x25_neigh.
*/ */
#include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/socket.h> #include <linux/socket.h>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* needed cleaned seq-number fields. * needed cleaned seq-number fields.
*/ */
#include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/socket.h> #include <linux/socket.h>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
* negotiation. * negotiation.
*/ */
#include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/socket.h> #include <linux/socket.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
* Centralised disconnection processing. * Centralised disconnection processing.
*/ */
#include <linux/config.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/socket.h> #include <linux/socket.h>
......
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