diff options
151 files changed, 1180 insertions, 1381 deletions
@@ -1112,6 +1112,15 @@ S: Alleenstrasse 27 S: D-71679 Asperg S: Germany +N: Jan Hubicka +E: hubicka@freesoft.cz +E: hubicka@suse.cz +W: http://www.paru.cas.cz/~hubicka/ +D: Random kernel tweaks and fixes. +S: Dukelskych bojovniku 1944 +S: Tabor 390 03 +S: Czech Republic + N: Gareth Hughes E: gareth@valinux.com E: gareth@precisioninsight.com @@ -2734,7 +2743,7 @@ S: USA N: Steven Whitehouse E: SteveW@ACM.org -W: http://www-sigproc.eng.cam.ac.uk/~sjw44/ +W: http://www.chygwyn.com/~steve D: Linux DECnet project: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html D: Minor debugging of other networking protocols. D: Misc bug fixes and filesystem development diff --git a/Documentation/Configure.help b/Documentation/Configure.help index 62f8788f9..c7ee9aa5f 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -2769,7 +2769,7 @@ CONFIG_M386 SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S. - "586" for generic Pentium CPUs, possibly lacking the TSC (time stamp counter) register. - - "Pentium" for the Intel Pentium/Pentium MMX. + - "Pentium-Classic" for the Intel Pentium/Pentium MMX. - "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II. - "Pentium-III" for the Intel Pentium III. - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D). @@ -2777,7 +2777,7 @@ CONFIG_M386 - "Crusoe" for the Transmeta Crusoe series. - "Winchip-C6" for original IDT Winchip. - "Winchip-2" for IDT Winchip 2. - - "Winchip-2A/3" for IDT Winchips with 3dNow! capabilities. + - "Winchip-2A" for IDT Winchips with 3dNow! capabilities. If you don't know what to do, choose "386". diff --git a/Documentation/filesystems/devfs/ChangeLog b/Documentation/filesystems/devfs/ChangeLog index 4d7ccfcb5..908c24784 100644 --- a/Documentation/filesystems/devfs/ChangeLog +++ b/Documentation/filesystems/devfs/ChangeLog @@ -1592,3 +1592,24 @@ Changes for patch v174 Work sponsored by SGI - Updated README from master HTML file +=============================================================================== +Changes for patch v175 + +Work sponsored by SGI + +- DocBook update for fs/devfs/base.c + Thanks to Tim Waugh <twaugh@redhat.com> + +- Removed stale fs/tunnel.c (was never used or completed) +=============================================================================== +Changes for patch v176 + +Work sponsored by SGI + +- Updated ToDo list + +- Removed sample modules.conf: now distributed with devfsd + +- Updated README from master HTML file + +- Ported to kernel 2.4.0-test3-pre4 (which had devfs-patch-v174) diff --git a/Documentation/filesystems/devfs/README b/Documentation/filesystems/devfs/README index bb3e47e92..6febda525 100644 --- a/Documentation/filesystems/devfs/README +++ b/Documentation/filesystems/devfs/README @@ -3,7 +3,7 @@ Devfs (Device File System) FAQ Linux Devfs (Device File System) FAQ Richard Gooch -25-JUN-2000 +3-JUL-2000 ----------------------------------------------------------------------------- @@ -899,20 +899,19 @@ Note that newer versions of init create /dev/initctl automatically, so you don't have to worry about this. Module autoloading -Another thing to note is that if you want to support module -autoloading then you need to edit your /etc/modules.conf so -that things work properly. You should include the sample -modules.conf file in the -Documentation/filesystems/devfs directory into your -/etc/modules.conf to ensure correct operation. - -You will also need to configure devfsd to enable module +You will need to configure devfsd to enable module autoloading. The following lines should be placed in your -/etc/devfsd.conf: +/etc/devfsd.conf file: LOOKUP .* MODLOAD +As of devfsd-v1.3.10, a generic /etc/modules.devfs +configuration file is installed, which is used by the MODLOAD +action. This should be sufficient for most configurations. If you +require further configuration, edit your /etc/modules.conf +file. + Mounting root off a devfs device If you wish to mount root off a devfs device when you pass the "devfs=only" boot option, then you need to pass in the "root=" @@ -924,7 +923,7 @@ append = "root=<device>" Surprised? Yep, so was I. It turns out if you have (as most people do): -root = +root = <device> then LILO will determine the device number of and will write @@ -1540,8 +1539,17 @@ discusses the scsihosts= boot option Douglas Gilbert has written yet another useful document at -http://www.torque.net/scsi/linux_scsi_24 which +http://www.torque.net/scsi/linux_scsi_24/ which discusses the Linux SCSI subsystem in 2.4. +Johannes Erdfelt has started a discussion paper on Linux and +hot-swap devices, describing what the requirements are for a scalable +solution and how and why he's used devfs+devfsd. Note that this is an +early draft only, available in plain text form at: + +http://johannes.erdfelt.com/hotswap.txt. +Johannes has promised a HTML version will follow. + + diff --git a/Documentation/filesystems/devfs/ToDo b/Documentation/filesystems/devfs/ToDo index 3e1621bc1..c2cb38b70 100644 --- a/Documentation/filesystems/devfs/ToDo +++ b/Documentation/filesystems/devfs/ToDo @@ -2,7 +2,7 @@ Richard Gooch <rgooch@atnf.csiro.au> - 18-FEB-2000 + 3-JUL-2000 This is a list of things to be done for better devfs support in the Linux kernel. If you'd like to contribute to the devfs, please have a @@ -18,8 +18,6 @@ list (preferably with your name attached to them:-). - Atari floppy driver (drivers/block/ataflop.c) -- Network block device (drivers/block/nbd.c) - - SWIM3 (Super Woz Integrated Machine 3) floppy driver (drivers/block/swim3.c) - Amiga ZorroII ramdisc driver (drivers/block/z2ram.c) diff --git a/Documentation/filesystems/devfs/modules.conf b/Documentation/filesystems/devfs/modules.conf deleted file mode 100644 index a91c99651..000000000 --- a/Documentation/filesystems/devfs/modules.conf +++ /dev/null @@ -1,92 +0,0 @@ -# Sample entries for /etc/modules.conf for devfs - -############################################################################### -# Configuration section: change to suit your hardware -# -alias /dev/sound sb -alias /dev/v4l bttv -alias gen-watchdog pcwd -alias gen-md raid0 -alias /dev/joysticks joystick -probeall scsi-hosts sym53c8xx - -############################################################################### -# Generic section: do not change -# -# All HDDs -probeall /dev/discs scsi-hosts sd_mod ide-probe-mod ide-disk DAC960 - -# All CD-ROMs -probeall /dev/cdroms scsi-hosts sr_mod ide-probe-mod ide-cd - -# All tapes -probeall /dev/tapes scsi-hosts st ide-probe-mod ide-tape - -# All SCSI devices -probeall /dev/scsi scsi-hosts sd_mod sr_mod st sg - -# All IDE devices -probeall /dev/ide ide-probe-mod ide-disk ide-cd ide-tape ide-floppy - -# SCSI HDDs -probeall /dev/sd scsi-hosts sd_mod -alias /dev/sd* /dev/sd - -# SCSI CD-ROMs -probeall /dev/sr scsi-hosts sr_mod -alias /dev/sr* /dev/sr - -# SCSI tapes -probeall /dev/st scsi-hosts st -alias /dev/st* /dev/st -alias /dev/nst* /dev/st - -# SCSI generic -probeall /dev/sg scsi-hosts sg -alias /dev/sg* /dev/sg - -# Floppies -alias /dev/floppy floppy -alias /dev/fd* floppy - -# RAMDISCs -alias /dev/rd rd -alias /dev/ram* rd - -# Loop devices -alias /dev/loop* loop - -# Meta devices -alias /dev/md* gen-md - -# Parallel port printers -alias /dev/printers lp -alias /dev/lp* lp - -# Soundcard -alias /dev/audio /dev/sound -alias /dev/mixer /dev/sound -alias /dev/dsp /dev/sound -alias /dev/dspW /dev/sound -alias /dev/midi /dev/sound - -# Joysticks -alias /dev/js* /dev/joysticks - -# Serial ports -alias /dev/tts serial -alias /dev/ttyS* /dev/tts -alias /dev/cua* /dev/tts - -# Miscellaneous devices -alias /dev/watchdog gen-watchdog # alias for gen-watchdog needed! -alias /dev/atibm atixlmouse -alias /dev/inportbm msbusmouse -alias /dev/logibm busmouse - -# PPP devices -alias /dev/ppp* ppp_generic - -# Video capture devices -alias /dev/video* /dev/v4l -alias /dev/vbi* /dev/v4l diff --git a/Documentation/networking/decnet.txt b/Documentation/networking/decnet.txt index e09832dca..3a4116310 100644 --- a/Documentation/networking/decnet.txt +++ b/Documentation/networking/decnet.txt @@ -5,7 +5,7 @@ o Project Home Pages http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html - Kernel info - http://linux.dreamtime.org/decnet/ - Userland tools + http://linux-decnet.sourceforge.net/ - Userland tools o FTP sites ftp://ftp.sucs.swan.ac.uk/pub/Linux/DECnet/ @@ -15,7 +15,7 @@ - Mirror of Alexey Kuznetsov's iproute2 package and other utilities - ftp://ftp.dreamtime.org/pub/linux/decnet/ + ftp://linux-decnet.sourceforge.net/pub/linux-decnet/ - Patrick Caulfield's archive of userland tools and Eduardo Serrat's kernel patches @@ -153,17 +153,16 @@ information (_most_ of which _is_ _essential_) includes: - Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of tcpdump don't understand how to dump DECnet properly, so including the hex listing of the packet contents is _essential_, usually the -x flag. - You may also need to increase the length grabbed with the -s flag) + You may also need to increase the length grabbed with the -s flag. The + -e flag also provides very useful information (ethernet MAC addresses)) 7) Mailing list If you are keen to get involved in development, or want to ask questions about configuration, or even just report bugs, then there is a mailing -list that you can join: send mail to majordomo@dreamtime.org with +list that you can join, details are at: -subscribe linux-decnet - -as the body of the message. +http://sourceforge.net/mail/?group_id=4993 8) Legal Info diff --git a/MAINTAINERS b/MAINTAINERS index 937f2ed91..b3a4c6d86 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -282,7 +282,7 @@ DECnet NETWORK LAYER P: Steven Whitehouse M: SteveW@ACM.org W: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html -L: linux-decnet@dreamtime.org +L: linux-decnet-user@lists.sourceforge.net S: Maintained DEVICE NUMBER REGISTRY @@ -16,7 +16,7 @@ HPATH = $(TOPDIR)/include FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net HOSTCC = gcc -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer +HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -Werror CROSS_COMPILE = @@ -168,6 +168,7 @@ DRIVERS-$(CONFIG_I2O) += drivers/i2o/i2o.o DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda_drivers.a DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.a +DRIVERS-$(CONFIG_ACPI_INTERPRETER) += drivers/acpi/acpi.o DRIVERS += $(DRIVERS-y) @@ -434,7 +435,7 @@ sums: dep-files: scripts/mkdep archdep include/linux/version.h scripts/mkdep init/*.c > .depend - find $(FINDHPATH) -name SCCS -prune -or -follow -name \*.h ! -name modversions.h -print | env -i PATH="$(PATH)" HPATH="$(HPATH)" xargs scripts/mkdep > .hdepend + find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print | env -i PATH="$(PATH)" HPATH="$(HPATH)" xargs scripts/mkdep > .hdepend $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" ifdef CONFIG_MODVERSIONS diff --git a/arch/i386/config.in b/arch/i386/config.in index 81cd0241d..7344e802c 100644 --- a/arch/i386/config.in +++ b/arch/i386/config.in @@ -21,7 +21,7 @@ choice 'Processor family' \ "386 CONFIG_M386 \ 486 CONFIG_M486 \ 586/K5/5x86/6x86/6x86MX CONFIG_M586 \ - Pentium/Pentium-MMX CONFIG_M586TSC \ + Pentium-Classic/Pentium-MMX CONFIG_M586TSC \ Pentium-Pro/Celeron/Pentium-II CONFIG_M686 \ Pentium-III CONFIG_M686FXSR \ K6/K6-II/K6-III CONFIG_MK6 \ @@ -29,7 +29,7 @@ choice 'Processor family' \ Crusoe CONFIG_MCRUSOE \ Winchip-C6 CONFIG_MWINCHIPC6 \ Winchip-2 CONFIG_MWINCHIP2 \ - Winchip-2A/3 CONFIG_MWINCHIP3D" Pentium-Pro + Winchip-2A/Winchip-3 CONFIG_MWINCHIP3D" Pentium-Pro # # Define implied options from the CPU selection here # @@ -73,8 +73,6 @@ if [ "$CONFIG_M686FXSR" = "y" ]; then define_bool CONFIG_X86_USE_PPRO_CHECKSUM y define_bool CONFIG_X86_FXSR y define_bool CONFIG_X86_XMM y -else - define_bool CONFIG_X86_FXSR n fi if [ "$CONFIG_MK6" = "y" ]; then define_int CONFIG_X86_L1_CACHE_BYTES 32 @@ -209,7 +207,7 @@ tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Power Management support' CONFIG_PM -bool ' ACPI support' CONFIG_ACPI $CONFIG_PM +dep_bool ' ACPI support' CONFIG_ACPI $CONFIG_PM if [ "$CONFIG_ACPI" != "n" ]; then if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then bool ' ACPI interpreter (EXPERIMENTAL)' CONFIG_ACPI_INTERPRETER diff --git a/arch/i386/defconfig b/arch/i386/defconfig index ee4f04c6a..068aceaf2 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -36,7 +36,6 @@ CONFIG_X86_TSC=y CONFIG_X86_GOOD_APIC=y CONFIG_X86_PGE=y CONFIG_X86_USE_PPRO_CHECKSUM=y -# CONFIG_X86_FXSR is not set # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set # CONFIG_X86_CPUID is not set diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 7d7a58741..c693b2dc2 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -11,6 +11,8 @@ * * http://developer.intel.com/design/pentiumii/manuals/243192.htm * + * For more information, go to http://www.urbanmyth.org/microcode + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version @@ -226,7 +228,7 @@ static void do_update_one(void *arg) } wrmsr(0x79, (unsigned int)(m->bits), 0); - __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx", "cc"); + __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); rdmsr(0x8B, val[0], val[1]); req->err = 0; diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 771caa7e7..dc61a920b 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -1635,7 +1635,8 @@ int get_cpuinfo(char * buffer) x86_cap_flags[10] = "sep"; if (c->x86 < 6) x86_cap_flags[16] = "fcmov"; - x86_cap_flags[16] = "pat"; + else + x86_cap_flags[16] = "pat"; x86_cap_flags[22] = "mmxext"; x86_cap_flags[24] = "fxsr"; x86_cap_flags[30] = "3dnowext"; diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index cc4843b8a..116816f1f 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -682,7 +682,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) /* FALLTHRU */ default: - lock_kernel(); sigaddset(¤t->signal, signr); recalc_sigpending(current); current->flags |= PF_SIGNALED; diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 370c89385..a9ea15597 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -19,8 +19,6 @@ #include <linux/ptrace.h> #include <linux/timer.h> #include <linux/mm.h> -#include <linux/smp.h> -#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/delay.h> #include <linux/spinlock.h> @@ -77,68 +75,6 @@ static inline void console_verbose(void) console_loglevel = 15; } -#define DO_ERROR(trapnr, signr, str, name, tsk) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ -{ \ - tsk->thread.error_code = error_code; \ - tsk->thread.trap_no = trapnr; \ - die_if_no_fixup(str,regs,error_code); \ - force_sig(signr, tsk); \ -} - -#define DO_ERROR_INFO(trapnr, signr, str, name, tsk, sicode, siaddr) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ -{ \ - siginfo_t info; \ - tsk->thread.error_code = error_code; \ - tsk->thread.trap_no = trapnr; \ - die_if_no_fixup(str,regs,error_code); \ - info.si_signo = signr; \ - info.si_errno = 0; \ - info.si_code = sicode; \ - info.si_addr = (void *)siaddr; \ - force_sig_info(signr, &info, tsk); \ -} - -#define DO_VM86_ERROR(trapnr, signr, str, name, tsk) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ -{ \ - lock_kernel(); \ - if (regs->eflags & VM_MASK) { \ - if (!handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr)) \ - goto out; \ - /* else fall through */ \ - } \ - tsk->thread.error_code = error_code; \ - tsk->thread.trap_no = trapnr; \ - force_sig(signr, tsk); \ - die_if_kernel(str,regs,error_code); \ -out: \ - unlock_kernel(); \ -} - -#define DO_VM86_ERROR_INFO(trapnr, signr, str, name, tsk, sicode, siaddr) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ -{ \ - siginfo_t info; \ - lock_kernel(); \ - if (regs->eflags & VM_MASK) { \ - if (!handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr)) \ - goto out; \ - /* else fall through */ \ - } \ - tsk->thread.error_code = error_code; \ - tsk->thread.trap_no = trapnr; \ - info.si_signo = signr; \ - info.si_errno = 0; \ - info.si_code = sicode; \ - info.si_addr = (void *)siaddr; \ - force_sig_info(signr, &info, tsk); \ - die_if_kernel(str,regs,error_code); \ -out: \ - unlock_kernel(); \ -} - asmlinkage void divide_error(void); asmlinkage void debug(void); asmlinkage void nmi(void); @@ -285,20 +221,6 @@ static inline void die_if_kernel(const char * str, struct pt_regs * regs, long e die(str, regs, err); } -static void die_if_no_fixup(const char * str, struct pt_regs * regs, long err) -{ - if (!(regs->eflags & VM_MASK) && !(3 & regs->xcs)) - { - unsigned long fixup; - fixup = search_exception_table(regs->eip); - if (fixup) { - regs->eip = fixup; - return; - } - die(str, regs, err); - } -} - static inline unsigned long get_cr2(void) { unsigned long address; @@ -308,19 +230,88 @@ static inline unsigned long get_cr2(void) return address; } -DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, current, FPE_INTDIV, regs->eip) -DO_VM86_ERROR( 3, SIGTRAP, "int3", int3, current) -DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow, current) -DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds, current) -DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, current, ILL_ILLOPN, regs->eip) -DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available, current) -DO_ERROR( 8, SIGSEGV, "double fault", double_fault, current) -DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun, current) -DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS, current) -DO_ERROR(11, SIGBUS, "segment not present", segment_not_present, current) -DO_ERROR(12, SIGBUS, "stack segment", stack_segment, current) -DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, current, BUS_ADRALN, get_cr2()) -DO_ERROR(18, SIGSEGV, "reserved", reserved, current) +static void inline do_trap(int trapnr, int signr, char *str, int vm86, + struct pt_regs * regs, long error_code, siginfo_t *info) +{ + if (vm86 && regs->eflags & VM_MASK) + goto vm86_trap; + if (!(regs->xcs & 3)) + goto kernel_trap; + + trap_signal: { + struct task_struct *tsk = current; + tsk->thread.error_code = error_code; + tsk->thread.trap_no = trapnr; + if (info) + force_sig_info(signr, info, tsk); + else + force_sig(signr, tsk); + return; + } + + kernel_trap: { + unsigned long fixup = search_exception_table(regs->eip); + if (fixup) + regs->eip = fixup; + else + die(str, regs, error_code); + return; + } + + vm86_trap: { + int ret = handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr); + if (ret) goto trap_signal; + return; + } +} + +#define DO_ERROR(trapnr, signr, str, name) \ +asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +{ \ + do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \ +} + +#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ +asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +{ \ + siginfo_t info; \ + info.si_signo = signr; \ + info.si_errno = 0; \ + info.si_code = sicode; \ + info.si_addr = (void *)siaddr; \ + do_trap(trapnr, signr, str, 0, regs, error_code, &info); \ +} + +#define DO_VM86_ERROR(trapnr, signr, str, name) \ +asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +{ \ + do_trap(trapnr, signr, str, 1, regs, error_code, NULL); \ +} + +#define DO_VM86_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ +asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +{ \ + siginfo_t info; \ + info.si_signo = signr; \ + info.si_errno = 0; \ + info.si_code = sicode; \ + info.si_addr = (void *)siaddr; \ + do_trap(trapnr, signr, str, 1, regs, error_code, &info); \ +} + +DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->eip) +DO_VM86_ERROR( 3, SIGTRAP, "int3", int3) +DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow) +DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds) +DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, ILL_ILLOPN, regs->eip) +DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available) +DO_ERROR( 8, SIGSEGV, "double fault", double_fault) +DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun) +DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) +DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) +DO_ERROR(12, SIGBUS, "stack segment", stack_segment) +DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, get_cr2()) +DO_ERROR(18, SIGSEGV, "reserved", reserved) asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) { @@ -336,9 +327,7 @@ asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) return; gp_in_vm86: - lock_kernel(); handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code); - unlock_kernel(); return; gp_in_kernel: @@ -561,9 +550,7 @@ asmlinkage void do_debug(struct pt_regs * regs, long error_code) return; debug_vm86: - lock_kernel(); handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1); - unlock_kernel(); return; clear_dr7: @@ -752,12 +739,10 @@ asmlinkage void math_state_restore(struct pt_regs regs) asmlinkage void math_emulate(long arg) { - lock_kernel(); printk("math-emulation not enabled and no coprocessor found.\n"); printk("killing %s.\n",current->comm); force_sig(SIGFPE,current); schedule(); - unlock_kernel(); } #endif /* CONFIG_MATH_EMULATION */ diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index fa803c165..9875a3bdb 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c @@ -69,7 +69,6 @@ struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs) struct pt_regs *ret; unsigned long tmp; - lock_kernel(); if (!current->thread.vm86_info) { printk("no vm86_info: BAD\n"); do_exit(SIGSEGV); @@ -87,7 +86,6 @@ struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs) tss->esp0 = current->thread.esp0 = current->thread.saved_esp0; current->thread.saved_esp0 = 0; ret = KVM86->regs32; - unlock_kernel(); return ret; } @@ -138,7 +136,6 @@ asmlinkage int sys_vm86old(struct vm86_struct * v86) struct task_struct *tsk; int tmp, ret = -EPERM; - lock_kernel(); tsk = current; if (tsk->thread.saved_esp0) goto out; @@ -154,7 +151,6 @@ asmlinkage int sys_vm86old(struct vm86_struct * v86) do_sys_vm86(&info, tsk); ret = 0; /* we never return here */ out: - unlock_kernel(); return ret; } @@ -169,7 +165,6 @@ asmlinkage int sys_vm86(unsigned long subfunction, struct vm86plus_struct * v86) struct task_struct *tsk; int tmp, ret; - lock_kernel(); tsk = current; switch (subfunction) { case VM86_REQUEST_IRQ: @@ -204,7 +199,6 @@ asmlinkage int sys_vm86(unsigned long subfunction, struct vm86plus_struct * v86) do_sys_vm86(&info, tsk); ret = 0; /* we never return here */ out: - unlock_kernel(); return ret; } @@ -258,7 +252,6 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk tsk->thread.screen_bitmap = info->screen_bitmap; if (info->flags & VM86_SCREEN_BITMAP) mark_screen_rdonly(tsk); - unlock_kernel(); __asm__ __volatile__( "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t" "movl %0,%%esp\n\t" @@ -274,7 +267,6 @@ static inline void return_to_32bit(struct kernel_vm86_regs * regs16, int retval) regs32 = save_v86_state(regs16); regs32->eax = retval; - unlock_kernel(); __asm__ __volatile__("movl %0,%%esp\n\t" "jmp ret_from_sys_call" : : "r" (regs32), "b" (current)); @@ -432,7 +424,6 @@ cannot_handle: return_to_32bit(regs, VM86_INTx + (i << 8)); } -/* This must be called with the kernel lock held. */ int handle_vm86_trap(struct kernel_vm86_regs * regs, long error_code, int trapno) { if (VMPI.is_vm86pus) { @@ -456,7 +447,6 @@ int handle_vm86_trap(struct kernel_vm86_regs * regs, long error_code, int trapno return 0; } -/* This must be called with the kernel lock held. */ void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code) { unsigned char *csp, *ssp; @@ -586,7 +576,6 @@ static void irq_handler(int intno, void *dev_id, struct pt_regs * regs) { int irq_bit; unsigned long flags; - lock_kernel(); save_flags(flags); cli(); irq_bit = 1 << intno; @@ -598,7 +587,6 @@ static void irq_handler(int intno, void *dev_id, struct pt_regs * regs) { /* else user will poll for IRQs */ out: restore_flags(flags); - unlock_kernel(); } static inline void free_vm86_irq(int irqnumber) diff --git a/arch/mips/kernel/fpe.c b/arch/mips/kernel/fpe.c index 66703471c..2d82d8c31 100644 --- a/arch/mips/kernel/fpe.c +++ b/arch/mips/kernel/fpe.c @@ -4,9 +4,7 @@ * in the kernel space a lot easier. So far this handler in the released * kernel source is just a dummy. * - * Copyright (C) 1997 Ralf Baechle - * - * $Id: fpe.c,v 1.3 1998/04/05 11:23:50 ralf Exp $ + * Copyright (C) 1997, 2000 Ralf Baechle */ #include <linux/kernel.h> #include <linux/module.h> @@ -24,7 +22,6 @@ MODULE_SUPPORTED_DEVICE("MIPS FPU"); static void do_fpe(struct pt_regs *regs, unsigned int fcr31) { - lock_kernel(); #ifdef CONF_DEBUG_EXCEPTIONS show_regs(regs); #endif @@ -34,7 +31,6 @@ static void do_fpe(struct pt_regs *regs, unsigned int fcr31) goto out; force_sig(SIGFPE, current); out: - unlock_kernel(); } /* diff --git a/arch/mips/kernel/irixioctl.c b/arch/mips/kernel/irixioctl.c index 10ca5b15e..a30ae52c7 100644 --- a/arch/mips/kernel/irixioctl.c +++ b/arch/mips/kernel/irixioctl.c @@ -1,4 +1,4 @@ -/* $Id: irixioctl.c,v 1.6 1999/02/06 05:12:56 adevries Exp $ +/* * irixioctl.c: A fucking mess... * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) @@ -48,7 +48,7 @@ static struct tty_struct *get_tty(int fd) static struct tty_struct *get_real_tty(struct tty_struct *tp) { - if(tp->driver.type == TTY_DRIVER_TYPE_PTY && + if (tp->driver.type == TTY_DRIVER_TYPE_PTY && tp->driver.subtype == PTY_TYPE_MASTER) return tp->link; else @@ -61,7 +61,6 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg) mm_segment_t old_fs; int error = 0; - lock_kernel(); #ifdef DEBUG_IOCTLS printk("[%s:%d] irix_ioctl(%d, ", current->comm, current->pid, fd); #endif @@ -87,7 +86,7 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg) old_fs = get_fs(); set_fs(get_ds()); error = sys_ioctl(fd, TCGETS, (unsigned long) &kt); set_fs(old_fs); - if(error) + if (error) break; __put_user(kt.c_iflag, &it->c_iflag); __put_user(kt.c_oflag, &it->c_oflag); @@ -106,7 +105,7 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg) #ifdef DEBUG_IOCTLS printk("TCSETS, %08lx) ", arg); #endif - if(!access_ok(VERIFY_READ, it, sizeof(*it))) { + if (!access_ok(VERIFY_READ, it, sizeof(*it))) { error = -EFAULT; break; } @@ -259,6 +258,5 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg) #ifdef DEBUG_IOCTLS printk("error=%d\n", error); #endif - unlock_kernel(); return error; } diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index ffebb5037..7254ee95d 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -2,10 +2,9 @@ * irixsig.c: WHEEE, IRIX signals! YOW, am I compatable or what?!?! * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) - * - * $Id: irixsig.c,v 1.13 1999/10/09 00:00:58 ralf Exp $ + * Copyright (C) 1997 - 2000 Ralf Baechle (ralf@gnu.org) + * Copyright (C) 2000 Silicon Graphics, Inc. */ - #include <linux/kernel.h> #include <linux/sched.h> #include <linux/mm.h> @@ -132,10 +131,8 @@ static void inline setup_irix_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, int signr, sigset_t *oldmask, siginfo_t *info) { - lock_kernel(); printk("Aiee: setup_tr_frame wants to be written"); do_exit(SIGSEGV); - unlock_kernel(); } static inline void handle_signal(unsigned long sig, struct k_sigaction *ka, @@ -267,8 +264,8 @@ asmlinkage int do_irix_signal(sigset_t *oldset, struct pt_regs *regs) /* FALLTHRU */ default: - lock_kernel(); sigaddset(¤t->signal, signr); + recalc_sigpending(current); current->flags |= PF_SIGNALED; do_exit(exit_code); /* NOTREACHED */ @@ -432,23 +429,24 @@ irix_sigaction(int sig, const struct sigaction *act, asmlinkage int irix_sigpending(irix_sigset_t *set) { - lock_kernel(); + int err; + if (verify_area(VERIFY_WRITE, set, sizeof(*set)) < 0) return -EFAULT; /* fill in "set" with signals pending but blocked. */ spin_lock_irq(¤t->sigmask_lock); - __put_user(current->blocked.sig[0] & current->signal.sig[0], - &set->sig[0]); - __put_user(current->blocked.sig[1] & current->signal.sig[1], - &set->sig[1]); - __put_user(current->blocked.sig[2] & current->signal.sig[2], - &set->sig[2]); - __put_user(current->blocked.sig[3] & current->signal.sig[3], - &set->sig[3]); + err = __put_user(current->blocked.sig[0] & current->signal.sig[0], + &set->sig[0]); + err |= __put_user(current->blocked.sig[1] & current->signal.sig[1], + &set->sig[1]); + err |= __put_user(current->blocked.sig[2] & current->signal.sig[2], + &set->sig[2]); + err |= __put_user(current->blocked.sig[3] & current->signal.sig[3], + &set->sig[3]); spin_unlock_irq(¤t->sigmask_lock); - return 0; + return err; } asmlinkage int irix_sigprocmask(int how, irix_sigset_t *new, irix_sigset_t *old) @@ -456,10 +454,9 @@ asmlinkage int irix_sigprocmask(int how, irix_sigset_t *new, irix_sigset_t *old) sigset_t oldbits, newbits; int error; - - if(new) { + if (new) { error = verify_area(VERIFY_READ, new, sizeof(*new)); - if(error) + if (error) return error; __copy_from_user(&newbits, new, sizeof(unsigned long)*4); sigdelsetmask(&newbits, ~_BLOCKABLE); @@ -568,7 +565,6 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, sigset_t kset; int i, sig, error, timeo = 0; - lock_kernel(); #ifdef DEBUG_SIG printk("[%s:%d] irix_sigpoll_sys(%p,%p,%p)\n", current->comm, current->pid, set, info, tp); @@ -639,7 +635,6 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, error = -EINTR; out: - unlock_kernel(); return error; } @@ -665,39 +660,40 @@ asmlinkage int irix_waitsys(int type, int pid, struct irix5_siginfo *info, DECLARE_WAITQUEUE(wait, current); struct task_struct *p; - lock_kernel(); - if(!info) { + if (!info) { retval = -EINVAL; goto out; } retval = verify_area(VERIFY_WRITE, info, sizeof(*info)); if(retval) goto out; - if(ru) { + if (ru) { retval = verify_area(VERIFY_WRITE, ru, sizeof(*ru)); if(retval) goto out; } - if(options & ~(W_MASK)) { + if (options & ~(W_MASK)) { retval = -EINVAL; goto out; } - if(type != P_PID && type != P_PGID && type != P_ALL) { + if (type != P_PID && type != P_PGID && type != P_ALL) { retval = -EINVAL; goto out; } add_wait_queue(¤t->wait_chldexit, &wait); repeat: flag = 0; - for(p = current->p_cptr; p; p = p->p_osptr) { - if((type == P_PID) && p->pid != pid) + current->state = TASK_INTERRUPTIBLE; + read_lock(&tasklist_lock); + for (p = current->p_cptr; p; p = p->p_osptr) { + if ((type == P_PID) && p->pid != pid) continue; - if((type == P_PGID) && p->pgrp != pid) + if ((type == P_PGID) && p->pgrp != pid) continue; - if((p->exit_signal != SIGCHLD)) + if ((p->exit_signal != SIGCHLD)) continue; flag = 1; - switch(p->state) { + switch (p->state) { case TASK_STOPPED: if (!p->exit_code) continue; @@ -743,12 +739,13 @@ repeat: continue; } } - if(flag) { + read_unlock(&tasklist_lock); + if (flag) { retval = 0; - if(options & W_NOHANG) + if (options & W_NOHANG) goto end_waitsys; retval = -ERESTARTSYS; - if(signal_pending(current)) + if (signal_pending(current)) goto end_waitsys; current->state = TASK_INTERRUPTIBLE; schedule(); @@ -756,10 +753,10 @@ repeat: } retval = -ECHILD; end_waitsys: + current->state = TASK_RUNNING; remove_wait_queue(¤t->wait_chldexit, &wait); out: - unlock_kernel(); return retval; } @@ -782,8 +779,7 @@ asmlinkage int irix_getcontext(struct pt_regs *regs) struct irix5_context *ctx; unsigned long flags; - lock_kernel(); - if(regs->regs[2] == 1000) + if (regs->regs[2] == 1000) base = 1; ctx = (struct irix5_context *) regs->regs[base + 4]; @@ -806,7 +802,7 @@ asmlinkage int irix_getcontext(struct pt_regs *regs) __put_user(0, &ctx->weird_graphics_thing); __put_user(0, &ctx->regs[0]); - for(i = 1; i < 32; i++) + for (i = 1; i < 32; i++) __put_user(regs->regs[i], &ctx->regs[i]); __put_user(regs->lo, &ctx->regs[32]); __put_user(regs->hi, &ctx->regs[33]); @@ -824,7 +820,6 @@ asmlinkage int irix_getcontext(struct pt_regs *regs) error = 0; out: - unlock_kernel(); return error; } @@ -833,7 +828,6 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs) int error, base = 0; struct irix5_context *ctx; - lock_kernel(); if(regs->regs[2] == 1000) base = 1; ctx = (struct irix5_context *) regs->regs[base + 4]; @@ -844,15 +838,15 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs) #endif error = verify_area(VERIFY_READ, ctx, sizeof(*ctx)); - if(error) + if (error) goto out; - if(ctx->flags & 0x02) { + if (ctx->flags & 0x02) { /* XXX sigstack garbage, todo... */ printk("Wheee, cannot do sigstack stuff in setcontext\n"); } - if(ctx->flags & 0x04) { + if (ctx->flags & 0x04) { int i; /* XXX extra control block stuff... todo... */ @@ -863,7 +857,7 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs) regs->cp0_epc = ctx->regs[35]; } - if(ctx->flags & 0x08) { + if (ctx->flags & 0x08) { /* XXX fpu context, blah... */ printk("Wheee, cannot restore FPU context yet...\n"); } @@ -871,7 +865,6 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs) error = regs->regs[2]; out: - unlock_kernel(); return error; } @@ -881,7 +874,6 @@ asmlinkage int irix_sigstack(struct irix_sigstack *new, struct irix_sigstack *ol { int error; - lock_kernel(); #ifdef DEBUG_SIG printk("[%s:%d] irix_sigstack(%p,%p)\n", current->comm, current->pid, new, old); @@ -898,8 +890,8 @@ asmlinkage int irix_sigstack(struct irix_sigstack *new, struct irix_sigstack *ol goto out; } error = 0; + out: - unlock_kernel(); return error; } @@ -910,18 +902,17 @@ asmlinkage int irix_sigaltstack(struct irix_sigaltstack *new, { int error; - lock_kernel(); #ifdef DEBUG_SIG printk("[%s:%d] irix_sigaltstack(%p,%p)\n", current->comm, current->pid, new, old); #endif - if(new) { + if (new) { error = verify_area(VERIFY_READ, new, sizeof(*new)); if(error) goto out; } - if(old) { + if (old) { error = verify_area(VERIFY_WRITE, old, sizeof(*old)); if(error) goto out; @@ -930,7 +921,6 @@ asmlinkage int irix_sigaltstack(struct irix_sigaltstack *new, out: error = 0; - unlock_kernel(); return error; } @@ -943,7 +933,6 @@ asmlinkage int irix_sigsendset(struct irix_procset *pset, int sig) { int error; - lock_kernel(); error = verify_area(VERIFY_READ, pset, sizeof(*pset)); if(error) goto out; @@ -953,10 +942,8 @@ asmlinkage int irix_sigsendset(struct irix_procset *pset, int sig) pset->cmd, pset->ltype, pset->lid, pset->rtype, pset->rid, sig); #endif - error = -EINVAL; out: - unlock_kernel(); return error; } diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 18abc6699..5a9992141 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -1,5 +1,4 @@ -/* $Id: signal.c,v 1.24 2000/02/04 07:40:23 ralf Exp $ - * +/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. @@ -663,7 +662,6 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) /* FALLTHRU */ default: - lock_kernel(); sigaddset(¤t->signal, signr); recalc_sigpending(current); current->flags |= PF_SIGNALED; diff --git a/arch/mips/kernel/sysmips.c b/arch/mips/kernel/sysmips.c index 1602013ec..c9058df2c 100644 --- a/arch/mips/kernel/sysmips.c +++ b/arch/mips/kernel/sysmips.c @@ -5,9 +5,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1995, 1996, 1997 by Ralf Baechle - * - * $Id: sysmips.c,v 1.8 2000/02/05 06:47:08 ralf Exp $ + * Copyright (C) 1995, 1996, 1997, 2000 by Ralf Baechle */ #include <linux/errno.h> #include <linux/linkage.h> @@ -53,9 +51,7 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3) char *name; int flags, tmp, len, retval; - lock_kernel(); - switch(cmd) - { + switch(cmd) { case SETNAME: retval = -EPERM; if (!capable(CAP_SYS_ADMIN)) @@ -72,9 +68,10 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3) if (len == 0 || len > __NEW_UTS_LEN) goto out; - /* Fiiiixmeeee... */ copy_from_user(system_utsname.nodename, name, len); + down_write(&uts_sem); system_utsname.nodename[len] = '\0'; + up_write(&uts_sem); retval = 0; goto out; @@ -112,7 +109,6 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3) } out: - unlock_kernel(); return retval; } diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 3af7202f7..bc1bd5749 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1,5 +1,4 @@ -/* $Id: traps.c,v 1.28 2000/03/13 10:33:02 raiko Exp $ - * +/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. @@ -332,7 +331,6 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31) return; } #endif - lock_kernel(); if (fcr31 & 0x20000) { /* Retry instruction with flush to zero ... */ if (!(fcr31 & (1<<24))) { @@ -344,7 +342,7 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31) "ctc1\t%0,$31" : /* No outputs */ : "r" (fcr31)); - goto out; + return; } pc = regs->cp0_epc + ((regs->cp0_cause & CAUSEF_BD) ? 4 : 0); if (get_user(insn, (unsigned int *)pc)) { @@ -358,12 +356,9 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31) } if (compute_return_epc(regs)) - goto out; + return; //force_sig(SIGFPE, current); printk(KERN_DEBUG "Should send SIGFPE to %s\n", current->comm); - -out: - unlock_kernel(); } static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode) @@ -430,7 +425,6 @@ void do_ri(struct pt_regs *regs) { unsigned int opcode; - lock_kernel(); if (!get_insn_opcode(regs, &opcode)) { if ((opcode & OPCODE) == LL) simulate_ll(regs, opcode); @@ -440,7 +434,6 @@ void do_ri(struct pt_regs *regs) printk("[%s:%ld] Illegal instruction at %08lx ra=%08lx\n", current->comm, current->pid, regs->cp0_epc, regs->regs[31]); } - unlock_kernel(); if (compute_return_epc(regs)) return; force_sig(SIGILL, current); @@ -526,10 +519,8 @@ void simulate_sc(struct pt_regs *regp, unsigned int opcode) void do_ri(struct pt_regs *regs) { - lock_kernel(); printk("[%s:%d] Illegal instruction at %08lx ra=%08lx\n", current->comm, current->pid, regs->cp0_epc, regs->regs[31]); - unlock_kernel(); if (compute_return_epc(regs)) return; force_sig(SIGILL, current); diff --git a/arch/mips64/kernel/signal.c b/arch/mips64/kernel/signal.c index 8252d8a1c..7250885ee 100644 --- a/arch/mips64/kernel/signal.c +++ b/arch/mips64/kernel/signal.c @@ -1,5 +1,4 @@ -/* $Id: signal.c,v 1.4 2000/01/17 23:32:46 ralf Exp $ - * +/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. @@ -696,7 +695,6 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) /* FALLTHRU */ default: - lock_kernel(); sigaddset(¤t->signal, signr); recalc_sigpending(current); current->flags |= PF_SIGNALED; diff --git a/arch/mips64/kernel/signal32.c b/arch/mips64/kernel/signal32.c index 3fc21d31f..7bad6a10b 100644 --- a/arch/mips64/kernel/signal32.c +++ b/arch/mips64/kernel/signal32.c @@ -1,5 +1,4 @@ -/* $Id: signal32.c,v 1.4 2000/03/15 22:46:55 kanoj Exp $ - * +/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. @@ -771,7 +770,6 @@ printk("%s: delivering signal.\n", current->comm); /* FALLTHRU */ default: - lock_kernel(); sigaddset(¤t->signal, signr); recalc_sigpending(current); current->flags |= PF_SIGNALED; diff --git a/arch/mips64/kernel/traps.c b/arch/mips64/kernel/traps.c index f5346da1e..f9b322534 100644 --- a/arch/mips64/kernel/traps.c +++ b/arch/mips64/kernel/traps.c @@ -1,5 +1,4 @@ -/* $Id: traps.c,v 1.4 2000/01/20 23:50:27 ralf Exp $ - * +/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. @@ -241,7 +240,6 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31) return; } #endif - lock_kernel(); if (fcr31 & 0x20000) { /* Retry instruction with flush to zero ... */ if (!(fcr31 & (1<<24))) { @@ -253,7 +251,7 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31) "ctc1\t%0,$31" : /* No outputs */ : "r" (fcr31)); - goto out; + return; } pc = regs->cp0_epc + ((regs->cp0_cause & CAUSEF_BD) ? 4 : 0); if (get_user(insn, (unsigned int *)pc)) { @@ -267,12 +265,9 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31) } if (compute_return_epc(regs)) - goto out; + return; //force_sig(SIGFPE, current); printk(KERN_DEBUG "Should send SIGFPE to %s\n", current->comm); - -out: - unlock_kernel(); } static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode) @@ -331,11 +326,9 @@ void do_tr(struct pt_regs *regs) void do_ri(struct pt_regs *regs) { - lock_kernel(); printk("Cpu%d[%s:%ld] Illegal instruction at %08lx ra=%08lx\n", smp_processor_id(), current->comm, current->pid, regs->cp0_epc, regs->regs[31]); - unlock_kernel(); if (compute_return_epc(regs)) return; force_sig(SIGILL, current); diff --git a/arch/sparc/config.in b/arch/sparc/config.in index 6513c6ad7..e79dfd803 100644 --- a/arch/sparc/config.in +++ b/arch/sparc/config.in @@ -1,4 +1,4 @@ -# $Id: config.in,v 1.94 2000/06/04 22:23:10 anton Exp $ +# $Id: config.in,v 1.98 2000/07/06 01:41:29 davem Exp $ # For a description of the syntax of this configuration file, # see Documentation/kbuild/config-language.txt. # diff --git a/arch/sparc/defconfig b/arch/sparc/defconfig index 8d2f5b78e..cc5dfe78a 100644 --- a/arch/sparc/defconfig +++ b/arch/sparc/defconfig @@ -80,6 +80,11 @@ CONFIG_FONT_SUN8x16=y # CONFIG_FBCON_FONTS is not set # +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# # Misc Linux/SPARC drivers # CONFIG_SUN_OPENPROMIO=m @@ -107,6 +112,7 @@ CONFIG_BLK_DEV_MD=y CONFIG_MD_LINEAR=m CONFIG_MD_STRIPED=m CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_NBD=m @@ -261,6 +267,7 @@ CONFIG_MSDOS_FS=m # CONFIG_UMSDOS_FS is not set CONFIG_VFAT_FS=m CONFIG_EFS_FS=m +# CONFIG_JFFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_RAMFS is not set CONFIG_ISO9660_FS=m @@ -294,7 +301,6 @@ CONFIG_NFS_FS=y # CONFIG_ROOT_NFS is not set CONFIG_NFSD=m # CONFIG_NFSD_V3 is not set -# CONFIG_NFSD_TCP is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y CONFIG_SMB_FS=m diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index e8524e430..623ab7958 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.55 2000/05/23 23:09:08 davem Exp $ +# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $ # Makefile for the linux kernel. # # Note! Dependencies are done automagically by 'make dep', which also @@ -69,6 +69,7 @@ check_asm: dummy @echo 'struct task_struct _task;' >> check_asm.c @echo 'struct mm_struct _mm;' >> check_asm.c @echo 'struct thread_struct _thread;' >> check_asm.c + @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c @echo 'int main(void) {' >> check_asm.c $(SH) ./check_asm.sh task tmp.i check_asm.c $(SH) ./check_asm.sh mm tmp.i check_asm.c @@ -94,6 +95,7 @@ check_asm: dummy @echo 'struct task_struct _task;' >> check_asm.c @echo 'struct mm_struct _mm;' >> check_asm.c @echo 'struct thread_struct _thread;' >> check_asm.c + @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c @echo 'int main(void) {' >> check_asm.c $(SH) ./check_asm.sh task tmp.i check_asm.c $(SH) ./check_asm.sh mm tmp.i check_asm.c diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 77a6f4769..c0480ab5a 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c @@ -1,4 +1,4 @@ -/* $Id: irq.c,v 1.103 2000/05/09 17:40:13 davem Exp $ +/* $Id: irq.c,v 1.104 2000/06/30 10:18:38 davem Exp $ * arch/sparc/kernel/irq.c: Interrupt request handling routines. On the * Sparc the IRQ's are basically 'cast in stone' * and you are supposed to probe the prom's device @@ -196,14 +196,14 @@ void free_irq(unsigned int irq, void *dev_id) } #ifndef CONFIG_SMP -unsigned int local_bh_count; -unsigned int local_irq_count; +unsigned int __local_bh_count; +unsigned int __local_irq_count; #else /* SMP interrupt locking on Sparc. */ -unsigned int local_bh_count[NR_CPUS]; -unsigned int local_irq_count[NR_CPUS]; +unsigned int __local_bh_count[NR_CPUS]; +unsigned int __local_irq_count[NR_CPUS]; /* Who has global_irq_lock. */ unsigned char global_irq_holder = NO_PROC_ID; @@ -229,14 +229,14 @@ static void show(char * str) printk("irq: %d [ ", atomic_read(&global_irq_count)); for (i = 0; i < NR_CPUS; i++) { - printk("%d ", local_irq_count[i]); + printk("%d ", __local_irq_count[i]); } printk("]\n"); printk("bh: %d [ ", (spin_is_locked(&global_bh_lock) ? 1 : 0)); for (i = 0; i < NR_CPUS; i++) { - printk("%d ", local_bh_count[cpu]); + printk("%d ", __local_bh_count[cpu]); } printk("]\n"); @@ -263,7 +263,7 @@ static inline void wait_on_irq(int cpu) * already executing in one.. */ if (!atomic_read(&global_irq_count)) { - if (local_bh_count[cpu] || !spin_is_locked(&global_bh_lock)) + if (__local_bh_count[cpu] || !spin_is_locked(&global_bh_lock)) break; } @@ -282,7 +282,7 @@ static inline void wait_on_irq(int cpu) continue; if (spin_is_locked (&global_irq_lock)) continue; - if (!local_bh_count[cpu] && spin_is_locked(&global_bh_lock)) + if (!__local_bh_count[cpu] && spin_is_locked(&global_bh_lock)) continue; if (spin_trylock(&global_irq_lock)) break; @@ -358,7 +358,7 @@ void __global_cli(void) if ((flags & PSR_PIL) != PSR_PIL) { int cpu = smp_processor_id(); __cli(); - if (!local_irq_count[cpu]) + if (!__local_irq_count[cpu]) get_irqlock(cpu); } } @@ -367,7 +367,7 @@ void __global_sti(void) { int cpu = smp_processor_id(); - if (!local_irq_count[cpu]) + if (!__local_irq_count[cpu]) release_irqlock(cpu); __sti(); } @@ -394,7 +394,7 @@ unsigned long __global_save_flags(void) retval = 2 + local_enabled; /* check for global flags if we're not in an interrupt */ - if (!local_irq_count[smp_processor_id()]) { + if (!__local_irq_count[smp_processor_id()]) { if (local_enabled) retval = 1; if (global_irq_holder == (unsigned char) smp_processor_id()) diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 186f12825..db524c814 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c @@ -1,4 +1,4 @@ -/* $Id: sparc_ksyms.c,v 1.97 2000/05/09 17:40:13 davem Exp $ +/* $Id: sparc_ksyms.c,v 1.99 2000/06/30 10:18:38 davem Exp $ * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -42,6 +42,9 @@ #include <asm/sbus.h> #include <asm/dma.h> #endif +#ifdef CONFIG_PCI +#include <asm/pci.h> +#endif #include <asm/a.out.h> #include <asm/io-unit.h> @@ -143,8 +146,8 @@ EXPORT_SYMBOL(global_bh_lock); EXPORT_SYMBOL(global_irq_count); EXPORT_SYMBOL(synchronize_irq); #endif -EXPORT_SYMBOL(local_irq_count); -EXPORT_SYMBOL(local_bh_count); +EXPORT_SYMBOL(__local_irq_count); +EXPORT_SYMBOL(__local_bh_count); EXPORT_SYMBOL(udelay); EXPORT_SYMBOL(mstk48t02_regs); @@ -189,7 +192,17 @@ EXPORT_SYMBOL(sbus_iounmap); EXPORT_SYMBOL(sbus_ioremap); #endif #if CONFIG_PCI -/* We do not have modular drivers for PCI devices yet. */ +/* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */ +EXPORT_SYMBOL(ioremap); +EXPORT_SYMBOL(iounmap); + +EXPORT_SYMBOL(insl); +EXPORT_SYMBOL(outsl); +EXPORT_SYMBOL(pci_alloc_consistent); +EXPORT_SYMBOL(pci_free_consistent); +EXPORT_SYMBOL(pci_map_single); +EXPORT_SYMBOL(pci_unmap_single); +EXPORT_SYMBOL(pci_dma_sync_single); #endif /* Solaris/SunOS binary compatibility */ @@ -228,7 +241,7 @@ EXPORT_SYMBOL(__prom_getsibling); /* sparc library symbols */ EXPORT_SYMBOL(bcopy); EXPORT_SYMBOL_NOVERS(memscan); -EXPORT_SYMBOL(strlen); +EXPORT_SYMBOL_NOVERS(strlen); EXPORT_SYMBOL(strnlen); EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(strncpy); diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index 04358e900..66221c796 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c @@ -1,4 +1,4 @@ -/* $Id: sys_sparc.c,v 1.64 2000/06/26 23:20:24 davem Exp $ +/* $Id: sys_sparc.c,v 1.65 2000/07/06 01:41:29 davem Exp $ * linux/arch/sparc/kernel/sys_sparc.c * * This file contains various random system calls that diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 77565401f..1ba500986 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c @@ -1,4 +1,4 @@ -/* $Id: sys_sunos.c,v 1.126 2000/06/26 23:20:24 davem Exp $ +/* $Id: sys_sunos.c,v 1.128 2000/07/06 01:41:29 davem Exp $ * sys_sunos.c: SunOS specific syscall compatibility support. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -652,6 +652,8 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) if (!file) goto out; + inode = file->f_dentry->d_inode; + socket = &inode->u.socket_i; local.sin_family = AF_INET; local.sin_addr.s_addr = INADDR_ANY; diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 213ff8b1e..d1431a5c0 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -1,4 +1,4 @@ -/* $Id: srmmu.c,v 1.214 2000/06/22 01:28:44 anton Exp $ +/* $Id: srmmu.c,v 1.215 2000/06/30 13:25:28 anton Exp $ * srmmu.c: SRMMU specific routines for memory management. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -125,7 +125,7 @@ int srmmu_cache_pagetables; void *srmmu_nocache_pool; void *srmmu_nocache_bitmap; int srmmu_nocache_low; -unsigned long srmmu_nocache_used; +int srmmu_nocache_used; spinlock_t srmmu_nocache_spinlock; /* This makes sense. Honest it does - Anton */ @@ -1266,8 +1266,8 @@ static int srmmu_mmu_info(char *buf) return sprintf(buf, "MMU type\t: %s\n" "contexts\t: %d\n" - "nocache total\t: %lu\n" - "nocache used\t: %lu\n" + "nocache total\t: %ld\n" + "nocache used\t: %d\n" , srmmu_name, num_contexts, SRMMU_NOCACHE_SIZE, diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 944195694..af82be871 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -1,4 +1,4 @@ -/* $Id: sun4c.c,v 1.194 2000/06/05 06:08:45 anton Exp $ +/* $Id: sun4c.c,v 1.195 2000/06/30 13:25:28 anton Exp $ * sun4c.c: Doing in software what should be done in hardware. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -2360,8 +2360,11 @@ static int sun4c_check_pgt_cache(int low, int high) do { if (pgd_quicklist) sun4c_free_pgd_slow(sun4c_get_pgd_fast()), freed++; + /* Only two level page tables at the moment, sun4 3 level mmu is not supported - Anton */ +#if 0 if (pmd_quicklist) sun4c_free_pmd_slow(sun4c_get_pmd_fast()), freed++; +#endif if (pte_quicklist) sun4c_free_pte_slow(sun4c_get_pte_fast()), freed++; } while (pgtable_cache_size > low); diff --git a/arch/sparc/vmlinux.lds b/arch/sparc/vmlinux.lds index dbe55e5fe..bba19d4c5 100644 --- a/arch/sparc/vmlinux.lds +++ b/arch/sparc/vmlinux.lds @@ -73,5 +73,5 @@ SECTIONS .debug_pubnames 0 : { *(.debug_pubnames) } .debug_sfnames 0 : { *(.debug_sfnames) } .line 0 : { *(.line) } - /DISCARD/ : { *(.text.exit) *(.data.exit) } + /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) } } diff --git a/arch/sparc64/config.in b/arch/sparc64/config.in index 1a12dd236..5cd76d3af 100644 --- a/arch/sparc64/config.in +++ b/arch/sparc64/config.in @@ -1,4 +1,4 @@ -# $Id: config.in,v 1.115 2000/06/20 04:36:22 ecd Exp $ +# $Id: config.in,v 1.116 2000/07/06 01:41:29 davem Exp $ # For a description of the syntax of this configuration file, # see the Configure script. # diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 7ecaa1a9f..6612852e4 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig @@ -125,6 +125,11 @@ CONFIG_SPARCAUDIO_CS4231=y # CONFIG_SPARCAUDIO_DUMMY is not set # +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# # Block devices # CONFIG_BLK_DEV_FD=y @@ -397,6 +402,7 @@ CONFIG_MSDOS_FS=m # CONFIG_UMSDOS_FS is not set CONFIG_VFAT_FS=m CONFIG_EFS_FS=m +# CONFIG_JFFS_FS is not set CONFIG_CRAMFS=m CONFIG_RAMFS=m CONFIG_ISO9660_FS=m diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index d861c41c0..7697c63e5 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.55 2000/05/27 00:49:35 davem Exp $ +# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $ # Makefile for the linux kernel. # # Note! Dependencies are done automagically by 'make dep', which also @@ -91,6 +91,7 @@ check_asm: dummy @echo 'struct task_struct _task;' >> check_asm.c @echo 'struct mm_struct _mm;' >> check_asm.c @echo 'struct thread_struct _thread;' >> check_asm.c + @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c @echo 'int main(void) {' >> check_asm.c $(SH) ./check_asm.sh task tmp.i check_asm.c $(SH) ./check_asm.sh mm tmp.i check_asm.c @@ -120,6 +121,7 @@ check_asm: dummy @echo 'struct task_struct _task;' >> check_asm.c @echo 'struct mm_struct _mm;' >> check_asm.c @echo 'struct thread_struct _thread;' >> check_asm.c + @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c @echo 'int main(void) {' >> check_asm.c $(SH) ./check_asm.sh task tmp.i check_asm.c $(SH) ./check_asm.sh mm tmp.i check_asm.c @@ -145,6 +147,7 @@ check_asm: dummy @echo 'struct task_struct _task;' >> check_asm.c @echo 'struct mm_struct _mm;' >> check_asm.c @echo 'struct thread_struct _thread;' >> check_asm.c + @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c @echo 'int main(void) {' >> check_asm.c $(SH) ./check_asm.sh task tmp.i check_asm.c $(SH) ./check_asm.sh mm tmp.i check_asm.c diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index a4904efb3..12925b1c2 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -1,4 +1,4 @@ -/* $Id: irq.c,v 1.88 2000/06/26 19:40:27 davem Exp $ +/* $Id: irq.c,v 1.89 2000/06/30 10:18:38 davem Exp $ * irq.c: UltraSparc IRQ handling/init/registry. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) @@ -552,8 +552,8 @@ out: * lives in the brlock table for cache reasons. */ #ifndef CONFIG_SMP -unsigned int local_irq_count; -unsigned int local_bh_count; +unsigned int __local_irq_count; +unsigned int __local_bh_count; #else /* Who has global_irq_lock. */ @@ -605,14 +605,14 @@ again: spinlock_t *lock; if (!irqs_running() && - (local_bh_count || !spin_is_locked(&global_bh_lock))) + (local_bh_count(smp_processor_id()) || !spin_is_locked(&global_bh_lock))) break; br_write_unlock(BR_GLOBALIRQ_LOCK); lock = &__br_write_locks[BR_GLOBALIRQ_LOCK].lock; while (irqs_running() || spin_is_locked(lock) || - (!local_bh_count && spin_is_locked(&global_bh_lock))) { + (!local_bh_count(smp_processor_id()) && spin_is_locked(&global_bh_lock))) { if (!--count) { show("wait_on_irq"); count = (~0 >> 1); @@ -635,7 +635,7 @@ void __global_cli(void) if(flags == 0) { int cpu = smp_processor_id(); __cli(); - if (! local_irq_count) + if (! local_irq_count(cpu)) get_irqlock(cpu); } } @@ -644,7 +644,7 @@ void __global_sti(void) { int cpu = smp_processor_id(); - if (! local_irq_count) + if (! local_irq_count(cpu)) release_irqlock(cpu); __sti(); } @@ -656,7 +656,7 @@ unsigned long __global_save_flags(void) __save_flags(flags); local_enabled = ((flags == 0) ? 1 : 0); retval = 2 + local_enabled; - if (! local_irq_count) { + if (! local_irq_count(smp_processor_id())) { if (local_enabled) retval = 1; if (global_irq_holder == (unsigned char) smp_processor_id()) diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 060d1c477..dd8b8274d 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.107 2000/05/09 17:40:14 davem Exp $ +/* $Id: process.c,v 1.108 2000/06/30 10:18:38 davem Exp $ * arch/sparc64/kernel/process.c * * Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) @@ -270,7 +270,9 @@ void __show_regs(struct pt_regs * regs) spin_lock_irqsave(®dump_lock, flags); printk("CPU[%d]: local_irq_count[%u] irqs_running[%d]\n", - smp_processor_id(), local_irq_count, irqs_running()); + smp_processor_id(), + local_irq_count(smp_processor_id()), + irqs_running()); #endif printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x\n", regs->tstate, regs->tpc, regs->tnpc, regs->y); diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 942f37640..eccc7885a 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -1,4 +1,4 @@ -/* $Id: sparc64_ksyms.c,v 1.85 2000/05/23 02:14:25 davem Exp $ +/* $Id: sparc64_ksyms.c,v 1.86 2000/06/30 10:18:38 davem Exp $ * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -85,7 +85,6 @@ extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned extern int unregister_ioctl32_conversion(unsigned int cmd); extern int io_remap_page_range(unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space); -extern void bcopy (const char *, char *, int); extern int __ashrdi3(int, int); extern void dump_thread(struct pt_regs *, struct user *); @@ -158,8 +157,8 @@ EXPORT_SYMBOL(_do_write_unlock); #endif #else -EXPORT_SYMBOL(local_bh_count); -EXPORT_SYMBOL(local_irq_count); +EXPORT_SYMBOL(__local_bh_count); +EXPORT_SYMBOL(__local_irq_count); #endif /* rw semaphores */ @@ -263,7 +262,6 @@ EXPORT_SYMBOL(__prom_getchild); EXPORT_SYMBOL(__prom_getsibling); /* sparc library symbols */ -EXPORT_SYMBOL(bcopy); EXPORT_SYMBOL(__strlen); #if __GNUC__ > 2 || __GNUC_MINOR__ >= 91 EXPORT_SYMBOL(strlen); diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 42ba3907b..48cf27f38 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -1,4 +1,4 @@ -/* $Id: sys_sparc.c,v 1.42 2000/06/26 23:20:24 davem Exp $ +/* $Id: sys_sparc.c,v 1.43 2000/07/06 01:41:29 davem Exp $ * linux/arch/sparc64/kernel/sys_sparc.c * * This file contains various random system calls that diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 607633aec..8f3339bfa 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -1,4 +1,4 @@ -/* $Id: sys_sparc32.c,v 1.153 2000/06/26 23:20:24 davem Exp $ +/* $Id: sys_sparc32.c,v 1.154 2000/07/06 01:41:29 davem Exp $ * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls. * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index bad3d5e2f..4d2a9173d 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c @@ -1,4 +1,4 @@ -/* $Id: sys_sunos32.c,v 1.50 2000/06/26 23:20:24 davem Exp $ +/* $Id: sys_sunos32.c,v 1.51 2000/07/06 01:41:29 davem Exp $ * sys_sunos32.c: SunOS binary compatability layer on sparc64. * * Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu) diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index a9ee22cd7..3ac73f8e2 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c @@ -1,4 +1,4 @@ -/* $Id: misc.c,v 1.18 2000/05/09 17:40:14 davem Exp $ +/* $Id: misc.c,v 1.19 2000/06/30 10:18:38 davem Exp $ * misc.c: Miscellaneous prom functions that don't belong * anywhere else. * @@ -67,7 +67,7 @@ prom_cmdline(void) irq_exit(smp_processor_id(), 0); smp_capture(); #else - local_irq_count--; + local_irq_count(smp_processor_id())--; #endif p1275_cmd ("enter", P1275_INOUT(0,0)); @@ -77,7 +77,7 @@ prom_cmdline(void) irq_enter(smp_processor_id(), 0); spin_unlock_wait(&__br_write_locks[BR_GLOBALIRQ_LOCK].lock); #else - local_irq_count++; + local_irq_count(smp_processor_id())++; #endif #ifdef CONFIG_SUN_CONSOLE diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c index f4a9df85d..5be9c5d49 100644 --- a/arch/sparc64/solaris/fs.c +++ b/arch/sparc64/solaris/fs.c @@ -1,4 +1,4 @@ -/* $Id: fs.c,v 1.19 2000/05/09 04:48:35 davem Exp $ +/* $Id: fs.c,v 1.20 2000/07/06 01:41:30 davem Exp $ * fs.c: fs related syscall emulation for Solaris * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 4878a2366..5d711d576 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c @@ -1,4 +1,4 @@ -/* $Id: misc.c,v 1.27 2000/05/09 17:40:14 davem Exp $ +/* $Id: misc.c,v 1.28 2000/07/06 01:41:30 davem Exp $ * misc.c: Miscelaneous syscall emulation for Solaris * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) diff --git a/arch/sparc64/vmlinux.lds b/arch/sparc64/vmlinux.lds index c0b5c31d0..f686decfb 100644 --- a/arch/sparc64/vmlinux.lds +++ b/arch/sparc64/vmlinux.lds @@ -74,5 +74,5 @@ SECTIONS .debug_pubnames 0 : { *(.debug_pubnames) } .debug_sfnames 0 : { *(.debug_sfnames) } .line 0 : { *(.line) } - /DISCARD/ : { *(.text.exit) *(.data.exit) } + /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) } } diff --git a/drivers/acpi/include/acenv.h b/drivers/acpi/include/acenv.h index f2738537f..c8db25702 100644 --- a/drivers/acpi/include/acenv.h +++ b/drivers/acpi/include/acenv.h @@ -71,7 +71,6 @@ #ifdef _LINUX -#include <linux/config.h> #include <linux/string.h> #include <linux/kernel.h> #include <linux/ctype.h> diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 4fc415ea8..acf2c194c 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c @@ -376,13 +376,13 @@ static inline void dump_registers (const amb_dev * dev) { u32 * i; PRINTD (DBG_REGS, "reading PLX control: "); for (i = (u32 *) 0x00; i < (u32 *) 0x30; ++i) - rd_mem (dev, i); + rd_mem (dev, (size_t)i); PRINTD (DBG_REGS, "reading mailboxes: "); for (i = (u32 *) 0x40; i < (u32 *) 0x60; ++i) - rd_mem (dev, i); + rd_mem (dev, (size_t)i); PRINTD (DBG_REGS, "reading doorb irqev irqen reset:"); for (i = (u32 *) 0x60; i < (u32 *) 0x70; ++i) - rd_mem (dev, i); + rd_mem (dev, (size_t)i); } #else (void) dev; diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index c92345f00..053efbd30 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -2303,7 +2303,7 @@ __initfunc(static int ia_init(struct atm_dev *dev)) dev->number,error); return -EINVAL; } - IF_INIT(printk(DEV_LABEL "(itf %d): rev.%d,realbase=0x%x,irq=%d\n", + IF_INIT(printk(DEV_LABEL "(itf %d): rev.%d,realbase=0x%lx,irq=%d\n", dev->number, revision, real_base, iadev->irq);) /* find mapping size of board */ @@ -2342,7 +2342,7 @@ __initfunc(static int ia_init(struct atm_dev *dev)) dev->number); return error; } - IF_INIT(printk(DEV_LABEL " (itf %d): rev.%d,base=0x%x,irq=%d\n", + IF_INIT(printk(DEV_LABEL " (itf %d): rev.%d,base=0x%lx,irq=%d\n", dev->number, revision, base, iadev->irq);) /* filling the iphase dev structure */ diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index dd39f4ccf..733487374 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c @@ -441,7 +441,7 @@ static void ns_write_sram(ns_dev *card, u32 sram_address, u32 *value, int count) static int ns_init_card(int i, struct pci_dev *pcidev) { int j; - struct ns_dev *card; + struct ns_dev *card=NULL; unsigned short pci_command; unsigned char pci_latency; unsigned error; diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 9ae6fa94c..b03429fae 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -169,7 +169,7 @@ static int ida_proc_get_info(char *buffer, char **start, off_t offset, int lengt #else static void ida_procinit(int i) {} static int ida_proc_get_info(char *buffer, char **start, off_t offset, - int length, int *eof, void *data) {} + int length, int *eof, void *data) { return 0;} #endif static void ida_geninit(int ctlr) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 18a2c6c91..b8426a6dd 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -852,10 +852,10 @@ static void set_fdc(int drive) } /* locks the driver */ -static int lock_fdc(int drive, int interruptible) +static int _lock_fdc(int drive, int interruptible, int line) { if (!usage_count){ - printk(KERN_ERR "Trying to lock fdc while usage count=0\n"); + printk(KERN_ERR "Trying to lock fdc while usage count=0 at line %d\n", line); return -1; } if(floppy_grab_irq_and_dma()==-1) @@ -889,6 +889,8 @@ static int lock_fdc(int drive, int interruptible) return 0; } +#define lock_fdc(drive,interruptible) _lock_fdc(drive,interruptible, __LINE__) + #define LOCK_FDC(drive,interruptible) \ if (lock_fdc(drive,interruptible)) return -EINTR; @@ -2601,6 +2603,11 @@ static int make_raw_rw_request(void) int aligned_sector_t; int max_sector, max_size, tracksize, ssize; + if(max_buffer_sectors == 0) { + printk("VFS: Block I/O scheduled on unopened device\n"); + return 0; + } + set_fdc(DRIVE(CURRENT->rq_dev)); raw_cmd = &default_raw_cmd; @@ -2955,6 +2962,11 @@ static void process_fd_request(void) static void do_fd_request(request_queue_t * q) { + if(max_buffer_sectors == 0) { + printk("VFS: do_fd_request called on non-open device\n"); + return; + } + if (usage_count == 0) { printk("warning: usage count=0, CURRENT=%p exiting\n", CURRENT); printk("sect=%ld cmd=%d\n", CURRENT->sector, CURRENT->cmd); @@ -3782,9 +3794,14 @@ static int check_floppy_change(kdev_t dev) return 1; if (UDP->checkfreq < (int)(jiffies - UDRS->last_checked)) { + if(floppy_grab_irq_and_dma()) { + return 1; + } + lock_fdc(drive,0); poll_drive(0,0); process_fd_request(); + floppy_release_irq_and_dma(); } if (UTESTF(FD_DISK_CHANGED) || @@ -3810,6 +3827,10 @@ static int floppy_revalidate(kdev_t dev) UTESTF(FD_VERIFY) || test_bit(drive, &fake_change) || NO_GEOM){ + if(usage_count == 0) { + printk("VFS: revalidate called on non-open device.\n"); + return -EFAULT; + } lock_fdc(drive,0); cf = UTESTF(FD_DISK_CHANGED) || UTESTF(FD_VERIFY); if (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){ @@ -3831,7 +3852,7 @@ static int floppy_revalidate(kdev_t dev) size = 1024; if (!(bh = getblk(dev,0,size))){ process_fd_request(); - return 1; + return -ENXIO; } if (bh && !buffer_uptodate(bh)) ll_rw_block(READ, 1, &bh); diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 7735594cb..37e50dbcd 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -37,6 +37,8 @@ extern int mac_floppy_init(void); #endif +extern int lvm_init(void); + /* * For the allocated request tables */ diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c index fec570acb..61cb27ec7 100644 --- a/drivers/block/ps2esdi.c +++ b/drivers/block/ps2esdi.c @@ -121,7 +121,7 @@ static int ps2esdi_blocksizes[MAX_HD << 6] = {0,}; static int ps2esdi_drives = 0; static struct hd_struct ps2esdi[MAX_HD << 6]; static u_short io_base; -static struct timer_list esdi_timer = {NULL, NULL, 0, 0L, ps2esdi_reset_timer}; +static struct timer_list esdi_timer = {{NULL, NULL}, 0, 0L, ps2esdi_reset_timer}; static int reset_status; static int ps2esdi_slot = -1; int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */ diff --git a/drivers/cdrom/aztcd.c b/drivers/cdrom/aztcd.c index b3b73f2fc..8b551a99d 100644 --- a/drivers/cdrom/aztcd.c +++ b/drivers/cdrom/aztcd.c @@ -310,7 +310,7 @@ static char azt_auto_eject = AZT_AUTO_EJECT; static int AztTimeout, AztTries; static DECLARE_WAIT_QUEUE_HEAD(azt_waitq); -static struct timer_list delay_timer = { NULL, NULL, 0, 0, NULL }; +static struct timer_list delay_timer = { {NULL, NULL}, 0, 0, NULL }; static struct azt_DiskInfo DiskInfo; static struct azt_Toc Toc[MAX_TRACKS]; diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c index 56054ae9e..27405b3c3 100644 --- a/drivers/cdrom/cdu31a.c +++ b/drivers/cdrom/cdu31a.c @@ -3245,6 +3245,7 @@ static struct cdrom_device_info scd_info = { &scd_dops, /* device operations */ NULL, /* link */ NULL, /* handle */ + 0, /* devfs */ 0, /* dev */ 0, /* mask */ 2, /* maximum speed */ diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index 574ee429e..ac667047b 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c @@ -297,6 +297,7 @@ static struct cdrom_device_info mcdx_info = { &mcdx_dops, /* device operations */ NULL, /* link */ NULL, /* handle */ + 0, /* de, devfs */ 0, /* dev */ 0, /* mask */ 2, /* maximum speed */ diff --git a/drivers/char/console.c b/drivers/char/console.c index 6e862ec53..e0c5b9064 100644 --- a/drivers/char/console.c +++ b/drivers/char/console.c @@ -587,10 +587,11 @@ void redraw_screen(int new_console, int is_switch) if (redraw) { set_origin(currcons); - set_palette(currcons); - if (sw->con_switch(vc_cons[currcons].d) && vcmode != KD_GRAPHICS) + if (sw->con_switch(vc_cons[currcons].d) && vcmode != KD_GRAPHICS) { /* Update the screen contents */ + set_palette(currcons); do_update_region(currcons, origin, screenbuf_size/2); + } } set_cursor(currcons); if (is_switch) { @@ -2433,8 +2434,6 @@ void __init con_init(void) * kmalloc is not running yet - we use the bootmem allocator. */ for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) { - int j, k ; - vc_cons[currcons].d = (struct vc_data *) alloc_bootmem(sizeof(struct vc_data)); vt_cons[currcons] = (struct vt_struct *) @@ -2444,11 +2443,6 @@ void __init con_init(void) kmalloced = 0; vc_init(currcons, video_num_lines, video_num_columns, currcons || !sw->con_save_screen); - for (j=k=0; j<16; j++) { - vc_cons[currcons].d->vc_palette[k++] = default_red[j] ; - vc_cons[currcons].d->vc_palette[k++] = default_grn[j] ; - vc_cons[currcons].d->vc_palette[k++] = default_blu[j] ; - } } currcons = fg_console = 0; master_display_fg = vc_cons[currcons].d; diff --git a/drivers/char/drm/proc.c b/drivers/char/drm/proc.c index d44195539..7f85da2c9 100644 --- a/drivers/char/drm/proc.c +++ b/drivers/char/drm/proc.c @@ -225,7 +225,7 @@ static int _drm_queues_info(char *buf, char **start, off_t offset, int len, atomic_inc(&q->use_count); DRM_PROC_PRINT_RET(atomic_dec(&q->use_count), "%5d/0x%03x %5d %5d" - " %5d/%c%c/%c%c%c %5d %10d %10d %10d\n", + " %5d/%c%c/%c%c%c %5Zd %10d %10d %10d\n", i, q->flags, atomic_read(&q->use_count), diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index 7a0df755e..e9585bcaa 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c @@ -9,7 +9,7 @@ * Al Longyear <longyear@netcom.com>, Paul Mackerras <Paul.Mackerras@cs.anu.edu.au> * * Original release 01/11/99 - * ==FILEDATE 19991217== + * ==FILEDATE 20000706== * * This code is released under the GNU General Public License (GPL) * @@ -78,7 +78,7 @@ */ #define HDLC_MAGIC 0x239e -#define HDLC_VERSION "1.13" +#define HDLC_VERSION "1.16" #include <linux/version.h> #include <linux/config.h> @@ -239,6 +239,7 @@ struct n_hdlc { /* Queues for select() functionality */ wait_queue_head_t read_wait; wait_queue_head_t write_wait; + wait_queue_head_t poll_wait; int tbusy; /* reentrancy flag for tx wakeup code */ int woke_up; @@ -317,6 +318,7 @@ static void n_hdlc_release (struct n_hdlc *n_hdlc) /* Ensure that the n_hdlcd process is not hanging on select()/poll() */ wake_up_interruptible (&n_hdlc->read_wait); + wake_up_interruptible (&n_hdlc->poll_wait); wake_up_interruptible (&n_hdlc->write_wait); if (tty != NULL && tty->disc_data == n_hdlc) @@ -463,9 +465,10 @@ static void n_hdlc_send_frames (struct n_hdlc *n_hdlc, struct tty_struct *tty) register int actual; unsigned long flags; N_HDLC_BUF *tbuf; - + if (debuglevel >= DEBUG_LEVEL_INFO) printk("%s(%d)n_hdlc_send_frames() called\n",__FILE__,__LINE__); + check_again: save_flags(flags); cli (); @@ -475,6 +478,7 @@ static void n_hdlc_send_frames (struct n_hdlc *n_hdlc, struct tty_struct *tty) return; } n_hdlc->tbusy = 1; + n_hdlc->woke_up = 0; restore_flags(flags); /* get current transmit buffer or get new transmit */ @@ -490,7 +494,6 @@ static void n_hdlc_send_frames (struct n_hdlc *n_hdlc, struct tty_struct *tty) __FILE__,__LINE__,tbuf,tbuf->count); /* Send the next block of data to device */ - n_hdlc->woke_up = 0; tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); actual = tty->driver.write(tty, 0, tbuf->buf, tbuf->count); @@ -512,6 +515,7 @@ static void n_hdlc_send_frames (struct n_hdlc *n_hdlc, struct tty_struct *tty) /* wait up sleeping writers */ wake_up_interruptible(&n_hdlc->write_wait); + wake_up_interruptible(&n_hdlc->poll_wait); /* get next pending transmit buffer */ tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list); @@ -521,11 +525,6 @@ static void n_hdlc_send_frames (struct n_hdlc *n_hdlc, struct tty_struct *tty) __FILE__,__LINE__,tbuf); /* buffer not accepted by driver */ - - /* check if wake up code called since last write call */ - if (n_hdlc->woke_up) - continue; - /* set this buffer as pending buffer */ n_hdlc->tbuf = tbuf; break; @@ -541,6 +540,9 @@ static void n_hdlc_send_frames (struct n_hdlc *n_hdlc, struct tty_struct *tty) n_hdlc->tbusy = 0; restore_flags(flags); + if (n_hdlc->woke_up) + goto check_again; + if (debuglevel >= DEBUG_LEVEL_INFO) printk("%s(%d)n_hdlc_send_frames() exit\n",__FILE__,__LINE__); @@ -568,11 +570,8 @@ static void n_hdlc_tty_wakeup (struct tty_struct *tty) tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); return; } - - if (!n_hdlc->tbuf) - tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); - else - n_hdlc_send_frames (n_hdlc, tty); + + n_hdlc_send_frames (n_hdlc, tty); } /* end of n_hdlc_tty_wakeup() */ @@ -659,11 +658,12 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, /* wake up any blocked reads and perform async signalling */ wake_up_interruptible (&n_hdlc->read_wait); + wake_up_interruptible (&n_hdlc->poll_wait); if (n_hdlc->tty->fasync != NULL) #if LINUX_VERSION_CODE < VERSION(2,3,0) kill_fasync (n_hdlc->tty->fasync, SIGIO); #else - kill_fasync(&n_hdlc->tty->fasync, SIGIO, POLL_IN); + kill_fasync (&n_hdlc->tty->fasync, SIGIO, POLL_IN); #endif } /* end of n_hdlc_tty_receive() */ @@ -788,34 +788,31 @@ static rw_ret_t n_hdlc_tty_write (struct tty_struct *tty, struct file *file, count = maxframe; } + add_wait_queue(&n_hdlc->write_wait, &wait); + set_current_state(TASK_INTERRUPTIBLE); + /* Allocate transmit buffer */ - tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list); - if (!tbuf) { - /* sleep until transmit buffer available */ - add_wait_queue(&n_hdlc->write_wait, &wait); - while (!tbuf) { - set_current_state(TASK_INTERRUPTIBLE); - schedule(); - - n_hdlc = tty2n_hdlc (tty); - if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC || - tty != n_hdlc->tty) { - printk("n_hdlc_tty_write: %p invalid after wait!\n", n_hdlc); - error = -EIO; - break; - } + /* sleep until transmit buffer available */ + while (!(tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list))) { + schedule(); - if (signal_pending(current)) { - error = -EINTR; - break; - } + n_hdlc = tty2n_hdlc (tty); + if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC || + tty != n_hdlc->tty) { + printk("n_hdlc_tty_write: %p invalid after wait!\n", n_hdlc); + error = -EIO; + break; + } - tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list); + if (signal_pending(current)) { + error = -EINTR; + break; } - set_current_state(TASK_RUNNING); - remove_wait_queue(&n_hdlc->write_wait, &wait); } + set_current_state(TASK_RUNNING); + remove_wait_queue(&n_hdlc->write_wait, &wait); + if (!error) { /* Retrieve the user's buffer */ COPY_FROM_USER (error, tbuf->buf, data, count); @@ -978,8 +975,6 @@ static int n_hdlc_tty_select (struct tty_struct *tty, struct inode *inode, * Return Value: * * bit mask containing info on which ops will not block - * - * Note: Called without the kernel lock held. Which is fine. */ static unsigned int n_hdlc_tty_poll (struct tty_struct *tty, struct file *filp, poll_table * wait) @@ -994,11 +989,9 @@ static unsigned int n_hdlc_tty_poll (struct tty_struct *tty, /* queue current process into any wait queue that */ /* may awaken in the future (read and write) */ #if LINUX_VERSION_CODE < VERSION(2,1,89) - poll_wait(&n_hdlc->read_wait, wait); - poll_wait(&n_hdlc->write_wait, wait); + poll_wait(&n_hdlc->poll_wait, wait); #else - poll_wait(filp, &n_hdlc->read_wait, wait); - poll_wait(filp, &n_hdlc->write_wait, wait); + poll_wait(filp, &n_hdlc->poll_wait, wait); #endif /* set bits for operations that wont block */ if(n_hdlc->rx_buf_list.head) @@ -1062,6 +1055,7 @@ static struct n_hdlc *n_hdlc_alloc (void) n_hdlc->flags = 0; init_waitqueue_head(&n_hdlc->read_wait); + init_waitqueue_head(&n_hdlc->poll_wait); init_waitqueue_head(&n_hdlc->write_wait); return n_hdlc; diff --git a/drivers/i2o/i2o_block.c b/drivers/i2o/i2o_block.c index 2dc69ae33..76ddf7c38 100644 --- a/drivers/i2o/i2o_block.c +++ b/drivers/i2o/i2o_block.c @@ -83,10 +83,10 @@ /* * Events that this OSM is interested in */ -#define I2OB_EVENT_MASK I2O_EVT_IND_BSA_VOLUME_LOAD | \ - I2O_EVT_IND_BSA_VOLUME_UNLOAD | \ - I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ | \ - I2O_EVT_IND_BSA_CAPACITY_CHANGE +#define I2OB_EVENT_MASK (I2O_EVT_IND_BSA_VOLUME_LOAD | \ + I2O_EVT_IND_BSA_VOLUME_UNLOAD | \ + I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ | \ + I2O_EVT_IND_BSA_CAPACITY_CHANGE) /* @@ -147,7 +147,7 @@ struct i2ob_request struct i2ob_request *next; struct request *req; int num; -} __cacheline_aligned; +}; /* * Per IOP requst queue information diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index 70da1321a..a7619eb8d 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c @@ -233,7 +233,7 @@ void ide_config(dev_link_t *link) config_info_t conf; cistpl_cftable_entry_t *cfg = &parse.cftable_entry; cistpl_cftable_entry_t dflt = { 0 }; - int i, pass, last_ret, last_fn, hd, io_base, ctl_base; + int i, pass, last_ret, last_fn, hd=-1, io_base, ctl_base; DEBUG(0, "ide_config(0x%p)\n", link); diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index c9c3cb120..43838c6dd 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -2858,6 +2858,15 @@ int __init ide_setup (char *s) const char max_drive = 'a' + ((MAX_HWIFS * MAX_DRIVES) - 1); const char max_hwif = '0' + (MAX_HWIFS - 1); + if (strncmp(s,"ide",3) && + strncmp(s,"idebus",6) && +#ifdef CONFIG_BLK_DEV_VIA82CXXX + strncmp(s,"splitfifo",9) && +#endif /* CONFIG_BLK_DEV_VIA82CXXX */ + strncmp(s,"hdxlun",6) && + (strncmp(s,"hd",2) && s[2] != '=')) + return 0; + printk("ide_setup: %s", s); init_ide_data (); @@ -2867,7 +2876,7 @@ int __init ide_setup (char *s) printk(" : Enabled support for IDE doublers\n"); ide_doubler = 1; - return 0; + return 1; } #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ @@ -2875,7 +2884,7 @@ int __init ide_setup (char *s) if (!strcmp(s, "ide=reverse")) { ide_scan_direction = 1; printk(" : Enabled support for IDE inverse scan order.\n"); - return 0; + return 1; } #endif /* CONFIG_BLK_DEV_IDEPCI */ @@ -3188,17 +3197,17 @@ int __init ide_setup (char *s) case 0: goto bad_option; default: printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n"); - return 0; + return 1; } } bad_option: printk(" -- BAD OPTION\n"); - return 0; + return 1; bad_hwif: printk("-- NOT SUPPORTED ON ide%d", hw); done: printk("\n"); - return 0; + return 1; } /* @@ -3614,6 +3623,10 @@ int __init ide_init (void) return 0; } +#ifdef MODULE +char *options = NULL; +MODULE_PARM(options,"s"); + static void __init parse_options (char *line) { char *next = line; @@ -3623,21 +3636,11 @@ static void __init parse_options (char *line) while ((line = next) != NULL) { if ((next = strchr(line,' ')) != NULL) *next++ = 0; - if (!strncmp(line,"ide",3) || - !strncmp(line,"idebus",6) || -#ifdef CONFIG_BLK_DEV_VIA82CXXX - !strncmp(line,"splitfifo",9) || -#endif /* CONFIG_BLK_DEV_VIA82CXXX */ - !strncmp(line,"hdxlun",6) || - (!strncmp(line,"hd",2) && line[2] != '=')) - (void) ide_setup(line); + if (!ide_setup(line)) + printk ("Unknown option '%s'\n", line); } } -#ifdef MODULE -char *options = NULL; -MODULE_PARM(options,"s"); - int init_module (void) { parse_options(options); @@ -3664,12 +3667,6 @@ void cleanup_module (void) #else /* !MODULE */ -static int parse_ide_setup (char *line) -{ - parse_options(line); - /* We MUST return 0 as otherwise no subsequent __setup option works... */ - return 0; -} -__setup("", parse_ide_setup); +__setup("", ide_setup); #endif /* MODULE */ diff --git a/drivers/isdn/avmb1/capi.c b/drivers/isdn/avmb1/capi.c index 009010896..06ddc8199 100644 --- a/drivers/isdn/avmb1/capi.c +++ b/drivers/isdn/avmb1/capi.c @@ -171,6 +171,7 @@ * */ +#include <linux/config.h> #include <linux/module.h> #include <linux/errno.h> #include <linux/kernel.h> diff --git a/drivers/isdn/isdn_cards.c b/drivers/isdn/isdn_cards.c index bdbcd4191..a17cd1f79 100644 --- a/drivers/isdn/isdn_cards.c +++ b/drivers/isdn/isdn_cards.c @@ -76,6 +76,9 @@ extern void capi_init(void); extern void capidrv_init(void); #endif +extern int act2000_init(void); + + void isdn_cards_init(void) { diff --git a/drivers/isdn/isdn_ppp.h b/drivers/isdn/isdn_ppp.h index 1a1dcfcfe..2de3035c1 100644 --- a/drivers/isdn/isdn_ppp.h +++ b/drivers/isdn/isdn_ppp.h @@ -76,6 +76,7 @@ */ #include <linux/ppp_defs.h> /* for PPP_PROTOCOL */ +#include <linux/isdn_ppp.h> /* for isdn_ppp info */ extern void isdn_ppp_timer_timeout(void); extern int isdn_ppp_read(int, struct file *, char *, int); extern int isdn_ppp_write(int, struct file *, const char *, int); diff --git a/drivers/mtd/doc1000.c b/drivers/mtd/doc1000.c index 3b288b129..ce1b6fdd8 100644 --- a/drivers/mtd/doc1000.c +++ b/drivers/mtd/doc1000.c @@ -14,6 +14,7 @@ ======================================================================*/ +#include <linux/config.h> #include <linux/module.h> #include <asm/uaccess.h> #include <linux/types.h> @@ -91,7 +92,7 @@ static inline int check_write(volatile u_char *addr); static inline void block_erase (volatile u_char *addr); static inline int check_erase(volatile u_char *addr); -#ifdef __SMP__ +#ifdef CONFIG_SMP #warning This is definitely not SMP safe. Lock the paging mechanism. #endif diff --git a/drivers/mtd/docprobe.c b/drivers/mtd/docprobe.c index b2c4380d3..5feb64901 100644 --- a/drivers/mtd/docprobe.c +++ b/drivers/mtd/docprobe.c @@ -27,6 +27,7 @@ */ +#include <linux/config.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/kmod.h> diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index 2d7b5d5fe..a69ec9e65 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c @@ -10,7 +10,6 @@ #include <linux/types.h> #include <linux/module.h> -#include <linux/config.h> #include <linux/mtd/mtd.h> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index bbfc66eaa..7403b6b94 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -10,6 +10,7 @@ #define DEBUGLVL debug #endif +#include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/sched.h> diff --git a/drivers/mtd/nftl.c b/drivers/mtd/nftl.c index 083b1219e..95e851b2c 100644 --- a/drivers/mtd/nftl.c +++ b/drivers/mtd/nftl.c @@ -1,10 +1,41 @@ /* Linux driver for NAND Flash Translation Layer */ /* (c) 1999 Machine Vision Holdings, Inc. */ -/* Author: David Woodhouse <dwmw2@infradead.org */ -/* $Id: nftl.c,v 1.34 2000/06/07 14:48:52 dwmw2 Exp $ */ +/* Author: David Woodhouse <dwmw2@infradead.org> */ +/* $Id: nftl.c,v 1.35 2000/07/06 14:35:01 dwmw2 Exp $ */ /* + The contents of this file are distributed under the GNU Public + Licence version 2 ("GPL"). The legal note below refers only to the + _use_ of the code in some jurisdictions, and does not in any way + affect the copying, distribution and modification of this code, + which is permitted under the terms of the GPL. + + Section 0 of the GPL says: + + "Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope." + + You may copy, distribute and modify this code to your hearts' + content - it's just that in some jurisdictions, you may only _use_ + it under the terms of the licence below. This puts it in a similar + situation to the ISDN code, which you may need telco approval to + use, and indeed any code which has uses that may be restricted in + law. For example, certain malicious uses of the networking stack + may be illegal, but that doesn't prevent the networking code from + being under GPL. + + In fact the ISDN case is worse than this, because modification of + the code automatically invalidates its approval. Modificiation, + unlike usage, _is_ one of the rights which is protected by the + GPL. Happily, the law in those places where approval is required + doesn't actually prevent you from modifying the code - it's just + that you may not be allowed to _use_ it once you've done so - and + because usage isn't addressed by the GPL, that's just fine. + + dwmw2@infradead.org + 6/7/0 + LEGAL NOTE: The NFTL format is patented by M-Systems. They have granted a licence for its use with their DiskOnChip products: @@ -16,8 +47,7 @@ A signed copy of this agreement from M-Systems is kept on file by Red Hat UK Limited. In the unlikely event that you need access to it, - please contact dwmw2@redhat.com for assistance. -*/ + please contact dwmw2@redhat.com for assistance. */ #define PRERELEASE @@ -25,6 +55,7 @@ #define DEBUGLVL debug #endif +#include <linux/config.h> #include <linux/kernel.h> #include <linux/module.h> #include <asm/errno.h> @@ -1267,7 +1298,7 @@ int __init init_nftl(void) printk(KERN_NOTICE "M-Systems NAND Flash Translation Layer driver. (C) 1999 MVHI\n"); #ifdef PRERELEASE - printk(KERN_INFO"$Id: nftl.c,v 1.34 2000/06/07 14:48:52 dwmw2 Exp $\n"); + printk(KERN_INFO"$Id: nftl.c,v 1.35 2000/07/06 14:35:01 dwmw2 Exp $\n"); #endif if (register_blkdev(NFTL_MAJOR, "nftl", &nftl_fops)){ diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 3f74c6537..9bb2fa52f 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -959,11 +959,11 @@ static int __devinit vortex_probe1(struct pci_dev *pdev, #endif if (pdev && vci->drv_flags & HAS_CB_FNS) { - u32 fn_st_addr; /* Cardbus function status space */ + unsigned long fn_st_addr; /* Cardbus function status space */ fn_st_addr = pci_resource_start (pdev, 2); if (fn_st_addr) vp->cb_fn_base = ioremap(fn_st_addr, 128); - printk(KERN_INFO "%s: CardBus functions mapped %8.8x->%p\n", + printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", dev->name, fn_st_addr, vp->cb_fn_base); #if 1 /* AKPM: the 575_cb and 905B LEDs seem OK without this */ if (vortex_pci_tbl[chip_idx].device != 0x5257) { diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 7bc5e03ce..6d06b0a5f 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -1332,7 +1332,6 @@ static void rtl8139_timer (unsigned long data) { struct net_device *dev = (struct net_device *) data; struct rtl8139_private *tp = (struct rtl8139_private *) dev->priv; - void *ioaddr = tp->mmio_addr; int next_tick = 60 * HZ; int mii_reg5; @@ -1342,6 +1341,7 @@ static void rtl8139_timer (unsigned long data) #if 0 if (!tp->duplex_lock && mii_reg5 != 0xffff) { + void *ioaddr = tp->mmio_addr; int duplex = (mii_reg5 & 0x0100) || (mii_reg5 & 0x01C0) == 0x0040; if (tp->full_duplex != duplex) { diff --git a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h index cb2441285..df51afa30 100644 --- a/drivers/net/acenic_firmware.h +++ b/drivers/net/acenic_firmware.h @@ -17,9 +17,6 @@ #define tigonFwSbssLen 0x38 #define tigonFwBssAddr 0x00015dd0 #define tigonFwBssLen 0x2080 -u32 tigonFwText[]; -u32 tigonFwData[]; -u32 tigonFwRodata[]; #ifndef CONFIG_ACENIC_OMIT_TIGON_I /* Generated by genfw.c */ u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __initdata = { @@ -4595,6 +4592,10 @@ u32 tigonFwData[(MAX_DATA_LEN/4) + 1] __initdata = { 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x30001, 0x1, 0x30201, 0x0, 0x0, 0x0 }; +#else +#define tigonFwText NULL +#define tigonFwData NULL +#define tigonFwRodata NULL #endif /* Generated by genfw.c */ #define tigon2FwReleaseMajor 0xc diff --git a/drivers/net/bonding.c b/drivers/net/bonding.c index c806f028d..0b9d33e10 100644 --- a/drivers/net/bonding.c +++ b/drivers/net/bonding.c @@ -180,7 +180,7 @@ static int bond_release(struct net_device *master, struct net_device *dev) } } - return; + return 0; } /* It is pretty silly, SIOCSIFHWADDR exists to make this. */ diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 841c0e12c..a2da24437 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -5,7 +5,9 @@ * PPPoE --- PPP over Ethernet (RFC 2516) * * - * Version: 0.5.0 + * Version: 0.5.1 + * + * 030700 : Fixed connect logic to allow for disconnect * * Author: Michal Ostrowski <mostrows@styx.uwaterloo.ca> * @@ -545,7 +547,7 @@ int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr, goto end; error = -EBUSY; - if (sk->state & PPPOX_CONNECTED) + if ((sk->state & PPPOX_CONNECTED) && sp->sa_addr.pppoe.sid) goto end; dev = dev_get_by_name(sp->sa_addr.pppoe.dev); diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c index 10df97225..410bb59c9 100644 --- a/drivers/net/slhc.c +++ b/drivers/net/slhc.c @@ -56,6 +56,7 @@ #include <linux/string.h> #include <linux/errno.h> #include <linux/kernel.h> +#include <net/slhc_vj.h> #ifdef CONFIG_INET /* Entire module is for IP only */ @@ -78,7 +79,6 @@ #include <asm/system.h> #include <asm/uaccess.h> #include <net/checksum.h> -#include <net/slhc_vj.h> #include <asm/unaligned.h> int last_retran; diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 5db78eb16..39d278bb1 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c @@ -1,4 +1,4 @@ -/* $Id: sunlance.c,v 1.101 2000/06/19 06:24:46 davem Exp $ +/* $Id: sunlance.c,v 1.102 2000/06/30 10:18:35 davem Exp $ * lance.c: Linux/Sparc/Lance driver * * Written 1995, 1996 by Miguel de Icaza diff --git a/drivers/parport/init.c b/drivers/parport/init.c index 8ad352774..416ca51cb 100644 --- a/drivers/parport/init.c +++ b/drivers/parport/init.c @@ -20,7 +20,9 @@ #ifndef MODULE static int io[PARPORT_MAX+1] __initdata = { [0 ... PARPORT_MAX] = 0 }; +#ifdef CONFIG_PARPORT_PC static int io_hi[PARPORT_MAX+1] __initdata = { [0 ... PARPORT_MAX] = 0 }; +#endif static int irq[PARPORT_MAX] __initdata = { [0 ... PARPORT_MAX-1] = PARPORT_IRQ_PROBEONLY }; static int dma[PARPORT_MAX] __initdata = { [0 ... PARPORT_MAX-1] = PARPORT_DMA_NONE }; diff --git a/drivers/sbus/audio/audio.c b/drivers/sbus/audio/audio.c index a4db8b9c4..be7e9de06 100644 --- a/drivers/sbus/audio/audio.c +++ b/drivers/sbus/audio/audio.c @@ -1,4 +1,4 @@ -/* $Id: audio.c,v 1.52 2000/06/22 11:42:27 davem Exp $ +/* $Id: audio.c,v 1.53 2000/07/06 01:41:34 davem Exp $ * drivers/sbus/audio/audio.c * * Copyright 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index e197661f7..b01f26969 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c @@ -400,7 +400,7 @@ static int jsf_ioctl_program(unsigned long arg) togo = abuf.size; if ((togo & 3) || (p & 3)) return -EINVAL; - uptr = (char *) abuf.data; + uptr = (char *) (unsigned long) abuf.data; if (verify_area(VERIFY_READ, uptr, togo)) return -EFAULT; while (togo != 0) { diff --git a/drivers/sbus/char/sab82532.c b/drivers/sbus/char/sab82532.c index 378148159..6fb6678f7 100644 --- a/drivers/sbus/char/sab82532.c +++ b/drivers/sbus/char/sab82532.c @@ -1,4 +1,4 @@ -/* $Id: sab82532.c,v 1.45 2000/05/08 22:23:08 ecd Exp $ +/* $Id: sab82532.c,v 1.46 2000/07/06 01:41:37 davem Exp $ * sab82532.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -2173,7 +2173,7 @@ static void __init sab82532_kgdb_hook(int line) static inline void __init show_serial_version(void) { - char *revision = "$Revision: 1.45 $"; + char *revision = "$Revision: 1.46 $"; char *version, *p; version = strchr(revision, ' '); diff --git a/drivers/sbus/char/zs.c b/drivers/sbus/char/zs.c index f9512e12c..40284c603 100644 --- a/drivers/sbus/char/zs.c +++ b/drivers/sbus/char/zs.c @@ -1,4 +1,4 @@ -/* $Id: zs.c,v 1.57 2000/04/26 09:36:32 davem Exp $ +/* $Id: zs.c,v 1.58 2000/07/06 01:41:38 davem Exp $ * zs.c: Zilog serial port driver for the Sparc. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -824,20 +824,6 @@ static void do_serial_hangup(void *private_) tty_hangup(tty); } - -/* - * This subroutine is called when the RS_TIMER goes off. It is used - * by the serial driver to handle ports that do not have an interrupt - * (irq=0). This doesn't work at all for 16450's, as a sun has a Z8530. - */ - -static void zs_timer(void) -{ - printk("zs_timer called\n"); - prom_halt(); - return; -} - static int startup(struct sun_serial * info) { unsigned long flags; @@ -1920,7 +1906,7 @@ int zs_open(struct tty_struct *tty, struct file * filp) static void show_serial_version(void) { - char *revision = "$Revision: 1.57 $"; + char *revision = "$Revision: 1.58 $"; char *version, *p; version = strchr(revision, ' '); diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 71cd7337a..9694cf5e7 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c @@ -693,7 +693,7 @@ static int fdomain_get_irq( int base ) static int fdomain_isa_detect( int *irq, int *iobase ) { int i, j; - int base; + int base = 0xdeadbeef; int flag = 0; #if DEBUG_DETECT diff --git a/drivers/scsi/inia100.c b/drivers/scsi/inia100.c index 6ca6ca7f9..984d9b6db 100644 --- a/drivers/scsi/inia100.c +++ b/drivers/scsi/inia100.c @@ -228,7 +228,6 @@ int orc_ReturnNumberOfAdapters(void) }; unsigned int dRegValue; - unsigned short command; WORD wBIOS, wBASE; BYTE bPCIBusNum, bInterrupt, bPCIDeviceNum; diff --git a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c index 6200afafc..05fd57cb0 100644 --- a/drivers/scsi/qlogicfc.c +++ b/drivers/scsi/qlogicfc.c @@ -73,8 +73,8 @@ typedef dma_addr_t dma64_addr_t; #define pci64_unmap_single(d,a,s,dir) pci_unmap_single((d),(a),(s),(dir)) #define pci64_unmap_sg(d,s,n,dir) pci_unmap_sg((d),(s),(n),(dir)) #if BITS_PER_LONG > 32 -#define pci64_dma_hi32(a) ((u32) (0xffffffff & (a>>32))) -#define pci64_dma_lo32(a) ((u32) (0xffffffff & (a))) +#define pci64_dma_hi32(a) ((u32) (0xffffffff & (((u64)(a))>>32))) +#define pci64_dma_lo32(a) ((u32) (0xffffffff & (((u64)(a))))) #else #define pci64_dma_hi32(a) 0 #define pci64_dma_lo32(a) (a) diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index a1779ad10..47d1d0c2d 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c @@ -165,6 +165,7 @@ #include "constants.h" #include "sd.h" #include <linux/stat.h> +#include <scsi/scsicam.h> #include "dc390.h" diff --git a/drivers/sound/nm256_audio.c b/drivers/sound/nm256_audio.c index ef87c6293..887f4f53e 100644 --- a/drivers/sound/nm256_audio.c +++ b/drivers/sound/nm256_audio.c @@ -379,7 +379,7 @@ nm256_write_block (struct nm256_info *card, char *buffer, u32 amt) card->abuf1 + card->curPlayPos, rem); if (amt > rem) - nm256_writeBuffer8 (card, buffer, 1, card->abuf1, + nm256_writeBuffer8 (card, buffer + rem, 1, card->abuf1, amt - rem); } else diff --git a/drivers/sound/trident.c b/drivers/sound/trident.c index 2eb458274..6e2b70791 100644 --- a/drivers/sound/trident.c +++ b/drivers/sound/trident.c @@ -538,7 +538,7 @@ static struct trident_channel *ali_alloc_rec_pcm_channel(struct trident_card *ca } -static void trident_free_pcm_channel(struct trident_card *card, int channel) +static void trident_free_pcm_channel(struct trident_card *card, unsigned int channel) { int bank; @@ -551,7 +551,7 @@ static void trident_free_pcm_channel(struct trident_card *card, int channel) card->banks[bank].bitmap &= ~(1 << (channel)); } -static void ali_free_pcm_channel(struct trident_card *card, int channel) +static void ali_free_pcm_channel(struct trident_card *card, unsigned int channel) { int bank; diff --git a/drivers/usb/printer.c b/drivers/usb/printer.c index 638a91ed9..4dc11aee0 100644 --- a/drivers/usb/printer.c +++ b/drivers/usb/printer.c @@ -42,7 +42,7 @@ #include <linux/init.h> #include <linux/malloc.h> #include <linux/lp.h> -#define DEBUG +#undef DEBUG #include <linux/usb.h> #define USBLP_BUF_SIZE 8192 diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c index b9b1a1aed..5ce2f2648 100644 --- a/drivers/video/igafb.c +++ b/drivers/video/igafb.c @@ -356,7 +356,7 @@ static int iga_setcolreg(unsigned regno, unsigned red, unsigned green, pci_outb(info, green, DAC_DATA); pci_outb(info, blue, DAC_DATA); - if (regno < 16) + if (regno < 16) { switch (default_var.bits_per_pixel) { #ifdef FBCON_HAS_CFB16 case 16: @@ -372,11 +372,14 @@ static int iga_setcolreg(unsigned regno, unsigned red, unsigned green, #endif #ifdef FBCON_HAS_CFB32 case 32: + { int i; i = (regno << 8) | regno; info->fbcon_cmap.cfb32[regno] = (i << 16) | i; + } break; #endif } + } return 0; } @@ -510,6 +513,8 @@ static void igafb_set_disp(int con, struct fb_info_iga *info) break; #endif default: + printk(KERN_WARNING "igafb_set_disp: unknown resolution %d\n", + default_var.bits_per_pixel); return; } memcpy(&info->dispsw, sw, sizeof(*sw)); diff --git a/fs/Config.in b/fs/Config.in index f18e30675..851c54726 100644 --- a/fs/Config.in +++ b/fs/Config.in @@ -24,7 +24,7 @@ dep_tristate ' MSDOS fs support' CONFIG_MSDOS_FS $CONFIG_FAT_FS dep_tristate ' UMSDOS: Unix-like file system on top of standard MSDOS fs' CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS dep_tristate ' VFAT (Windows-95) fs support' CONFIG_VFAT_FS $CONFIG_FAT_FS dep_tristate 'EFS file system support (read only) (EXPERIMENTAL)' CONFIG_EFS_FS $CONFIG_EXPERIMENTAL -dep_tristate 'Journalling Flash File System (JFFS) support (EXPERIMENTAL)' CONFIG_JFFS_FS $CONFIG_EXPERIMENTAL +dep_tristate 'Journalling Flash File System (JFFS) support (EXPERIMENTAL)' CONFIG_JFFS_FS $CONFIG_EXPERIMENTAL $CONFIG_MTD tristate 'Compressed ROM file system support' CONFIG_CRAMFS tristate 'Simple RAM-based file system support' CONFIG_RAMFS diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h index 9e1a59ed2..e88beb5f3 100644 --- a/fs/adfs/adfs.h +++ b/fs/adfs/adfs.h @@ -73,7 +73,7 @@ int adfs_bmap(struct inode *inode, int block); #endif struct inode *adfs_iget(struct super_block *sb, struct object_info *obj); void adfs_read_inode(struct inode *inode); -void adfs_write_inode(struct inode *inode); +void adfs_write_inode(struct inode *inode,int unused); int adfs_notify_change(struct dentry *dentry, struct iattr *attr); /* map.c */ diff --git a/fs/adfs/inode.c b/fs/adfs/inode.c index fa3655a12..5dacc56d6 100644 --- a/fs/adfs/inode.c +++ b/fs/adfs/inode.c @@ -349,7 +349,7 @@ out: * The adfs-specific inode data has already been updated by * adfs_notify_change() */ -void adfs_write_inode(struct inode *inode) +void adfs_write_inode(struct inode *inode, int unused) { struct super_block *sb = inode->i_sb; struct object_info obj; diff --git a/fs/affs/dir.c b/fs/affs/dir.c index 3fc8409b0..aba6b0baa 100644 --- a/fs/affs/dir.c +++ b/fs/affs/dir.c @@ -111,7 +111,7 @@ affs_readdir(struct file *filp, void *dirent, filldir_t filldir) * we can jump directly to where we left off. */ if (filp->private_data && filp->f_version == inode->i_version) { - i = (s32)filp->private_data; + i = (s32)(unsigned long)filp->private_data; j = 0; pr_debug("AFFS: readdir() left off=%d\n",i); } @@ -137,7 +137,7 @@ affs_readdir(struct file *filp, void *dirent, filldir_t filldir) filp->private_data = (void *)ino; if (filldir(dirent,name,namelen,filp->f_pos,ino) < 0) goto readdir_done; - filp->private_data = (void *)i; + filp->private_data = (void *)(unsigned long)i; affs_brelse(fh_bh); fh_bh = NULL; stored++; diff --git a/fs/affs/inode.c b/fs/affs/inode.c index 1551e613c..84ea2adf8 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c @@ -191,7 +191,7 @@ affs_read_inode(struct inode *inode) } void -affs_write_inode(struct inode *inode) +affs_write_inode(struct inode *inode, int unused) { struct buffer_head *bh; struct file_end *file_end; diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 2b47ab674..5f41c53ac 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -84,7 +84,7 @@ static void bfs_read_inode(struct inode * inode) brelse(bh); } -static void bfs_write_inode(struct inode * inode) +static void bfs_write_inode(struct inode * inode, int unused) { unsigned long ino = inode->i_ino; kdev_t dev = inode->i_dev; diff --git a/fs/devfs/base.c b/fs/devfs/base.c index 18c51e28c..bacb67241 100644 --- a/fs/devfs/base.c +++ b/fs/devfs/base.c @@ -1090,7 +1090,7 @@ static void free_dentries (struct devfs_entry *de) /** * is_devfsd_or_child - Test if the current process is devfsd or one of its children. - * fs_info: The filesystem information. + * @fs_info: The filesystem information. * * Returns %TRUE if devfsd or child, else %FALSE. */ @@ -1424,7 +1424,7 @@ static void unregister (struct devfs_entry *de) /** * devfs_unregister - Unregister a device entry. - * de: A handle previously created by devfs_register() or returned from + * @de: A handle previously created by devfs_register() or returned from * devfs_find_handle(). If this is %NULL the routine does nothing. */ @@ -2295,7 +2295,7 @@ static void devfs_read_inode (struct inode *inode) #endif } /* End Function devfs_read_inode */ -static void devfs_write_inode (struct inode *inode) +static void devfs_write_inode (struct inode *inode, int wait) { int index; struct devfs_entry *de; @@ -2368,8 +2368,8 @@ static struct super_operations devfs_sops = /** * get_vfs_inode - Get a VFS inode. * @sb: The super block. - * @di: The devfs inode. - * @dentry The dentry to register with the devfs inode. + * @de: The devfs inode. + * @dentry: The dentry to register with the devfs inode. * * Returns the inode on success, else %NULL. */ @@ -2553,18 +2553,15 @@ static void devfs_d_iput (struct dentry *dentry, struct inode *inode) { struct devfs_entry *de; - lock_kernel(); + lock_kernel (); de = get_devfs_entry_from_vfs_inode (inode); #ifdef CONFIG_DEVFS_DEBUG if (devfs_debug & DEBUG_D_IPUT) printk ("%s: d_iput(): dentry: %p inode: %p de: %p de->dentry: %p\n", DEVFS_NAME, dentry, inode, de, de->inode.dentry); #endif - if (de->inode.dentry == dentry) - { - de->inode.dentry = NULL; - } - unlock_kernel(); + if (de->inode.dentry == dentry) de->inode.dentry = NULL; + unlock_kernel (); iput (inode); } /* End Function devfs_d_iput */ @@ -2589,7 +2586,7 @@ static struct dentry_operations devfs_wait_dops = /** * devfs_d_delete - Callback for when all files for a dentry are closed. - * @detry: The dentry. + * @dentry: The dentry. */ static int devfs_d_delete (struct dentry *dentry) @@ -2641,7 +2638,7 @@ static int devfs_d_revalidate_wait (struct dentry *dentry, int flags) struct inode *dir; struct fs_info *fs_info; - lock_kernel(); + lock_kernel (); dir = dentry->d_parent->d_inode; fs_info = dir->i_sb->u.generic_sbp; if (!de || de->registered) @@ -2689,7 +2686,7 @@ static int devfs_d_revalidate_wait (struct dentry *dentry, int flags) } if ( wait_for_devfsd_finished (fs_info) ) dentry->d_op = &devfs_dops; out: - unlock_kernel(); + unlock_kernel (); return 1; } /* End Function devfs_d_revalidate_wait */ @@ -3043,20 +3040,20 @@ static int devfs_mknod (struct inode *dir, struct dentry *dentry, int mode, static int devfs_readlink (struct dentry *dentry, char *buffer, int buflen) { struct devfs_entry *de; - lock_kernel(); - de = get_devfs_entry_from_vfs_inode (dentry->d_inode); - unlock_kernel(); + lock_kernel (); + de = get_devfs_entry_from_vfs_inode (dentry->d_inode); + unlock_kernel (); return vfs_readlink (dentry, buffer, buflen, de->u.symlink.linkname); } /* End Function devfs_readlink */ static int devfs_follow_link (struct dentry *dentry, struct nameidata *nd) { struct devfs_entry *de; - lock_kernel(); - de = get_devfs_entry_from_vfs_inode (dentry->d_inode); - unlock_kernel(); + lock_kernel (); + de = get_devfs_entry_from_vfs_inode (dentry->d_inode); + unlock_kernel (); return vfs_follow_link (nd, de->u.symlink.linkname); } /* End Function devfs_follow_link */ diff --git a/fs/fat/fatfs_syms.c b/fs/fat/fatfs_syms.c index 22ce56b68..0b7793f07 100644 --- a/fs/fat/fatfs_syms.c +++ b/fs/fat/fatfs_syms.c @@ -17,19 +17,11 @@ #include "tables.h" EXPORT_SYMBOL(fat_new_dir); -EXPORT_SYMBOL(fat_bmap); EXPORT_SYMBOL(fat_get_block); -EXPORT_SYMBOL(fat_brelse); -EXPORT_SYMBOL(fat_cache_inval_inode); EXPORT_SYMBOL(fat_clear_inode); EXPORT_SYMBOL(fat_date_unix2dos); EXPORT_SYMBOL(fat_delete_inode); -EXPORT_SYMBOL(fat_esc2uni); -EXPORT_SYMBOL(fat_file_read); -EXPORT_SYMBOL(fat_file_write); -EXPORT_SYMBOL(fat_fs_panic); EXPORT_SYMBOL(fat__get_entry); -EXPORT_SYMBOL(fat_lock_creation); EXPORT_SYMBOL(fat_mark_buffer_dirty); EXPORT_SYMBOL(fat_notify_change); EXPORT_SYMBOL(fat_parent_ino); @@ -42,14 +34,10 @@ EXPORT_SYMBOL(fat_search_long); EXPORT_SYMBOL(fat_readdir); EXPORT_SYMBOL(fat_scan); EXPORT_SYMBOL(fat_statfs); -EXPORT_SYMBOL(fat_uni2esc); -EXPORT_SYMBOL(fat_unlock_creation); EXPORT_SYMBOL(fat_write_inode); EXPORT_SYMBOL(register_cvf_format); EXPORT_SYMBOL(unregister_cvf_format); EXPORT_SYMBOL(fat_get_cluster); -EXPORT_SYMBOL(lock_fat); -EXPORT_SYMBOL(unlock_fat); EXPORT_SYMBOL(fat_dir_ioctl); EXPORT_SYMBOL(fat_add_entries); EXPORT_SYMBOL(fat_dir_empty); diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 704c1fde5..fc9c7d0d2 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c @@ -8,7 +8,7 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * $Id: inode-v23.c,v 1.15 2000/06/16 16:23:02 dwmw2 Exp $ + * $Id: inode-v23.c,v 1.16 2000/07/06 14:38:10 dwmw2 Exp $ * * * Ported to Linux 2.3.x and MTD: @@ -24,6 +24,7 @@ * maybe other stuff do to. */ +#include <linux/config.h> #include <linux/module.h> #include <linux/init.h> #include <linux/types.h> @@ -1364,6 +1365,7 @@ jffs_file_write(struct file *filp, const char *buf, size_t count, loff_t *ppos) } inode->i_ctime = inode->i_mtime = CURRENT_TIME; mark_inode_dirty(inode); + invalidate_inode_pages(inode); err = written; out: diff --git a/fs/jffs/intrep.c b/fs/jffs/intrep.c index c0073e255..039aaa04e 100644 --- a/fs/jffs/intrep.c +++ b/fs/jffs/intrep.c @@ -58,6 +58,7 @@ * */ #define __NO_VERSION__ +#include <linux/config.h> #include <linux/types.h> #include <linux/malloc.h> #include <linux/jffs.h> diff --git a/fs/jffs/jffs_fm.c b/fs/jffs/jffs_fm.c index c1fe3a7b9..b2644ba5e 100644 --- a/fs/jffs/jffs_fm.c +++ b/fs/jffs/jffs_fm.c @@ -17,6 +17,7 @@ * */ #define __NO_VERSION__ +#include <linux/config.h> #include <linux/malloc.h> #include <linux/blkdev.h> #include <linux/jffs.h> diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 9a179d530..d93ed2ac5 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c @@ -86,7 +86,7 @@ nlm_decode_fh(u32 *p, struct nfs_fh *f) if ((len = ntohl(*p++)) != NFS2_FHSIZE) { printk(KERN_NOTICE - "lockd: bad fhandle size %x (should be %Zu)\n", + "lockd: bad fhandle size %x (should be %d)\n", len, NFS2_FHSIZE); return NULL; } diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c index ca30b7753..fa2bd5f03 100644 --- a/fs/minix/bitmap.c +++ b/fs/minix/bitmap.c @@ -80,7 +80,7 @@ void minix_free_block(struct inode * inode, int block) return; } bh = sb->u.minix_sb.s_zmap[zone]; - if (!minix_clear_bit(bit,bh->b_data)) + if (!minix_test_and_clear_bit(bit,bh->b_data)) printk("free_block (%s:%d): bit already cleared\n", kdevname(sb->s_dev), block); else @@ -112,7 +112,7 @@ repeat: } if (!bh || j >= 8192) return 0; - if (minix_set_bit(j,bh->b_data)) { + if (minix_test_and_set_bit(j,bh->b_data)) { printk("new_block: bit already set"); DQUOT_FREE_BLOCK(sb, inode, 1); goto repeat; @@ -221,7 +221,7 @@ void minix_free_inode(struct inode * inode) bh = inode->i_sb->u.minix_sb.s_imap[ino >> 13]; minix_clear_inode(inode); clear_inode(inode); - if (!minix_clear_bit(ino & 8191, bh->b_data)) + if (!minix_test_and_clear_bit(ino & 8191, bh->b_data)) printk("free_inode: bit %lu already cleared.\n",ino); mark_buffer_dirty(bh, 1); } @@ -252,7 +252,7 @@ struct inode * minix_new_inode(const struct inode * dir, int * error) unlock_super(sb); return NULL; } - if (minix_set_bit(j,bh->b_data)) { /* shouldn't happen */ + if (minix_test_and_set_bit(j,bh->b_data)) { /* shouldn't happen */ printk("new_inode: bit already set"); iput(inode); unlock_super(sb); diff --git a/fs/namei.c b/fs/namei.c index 41cfda556..cba4fb775 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1906,7 +1906,7 @@ static char *page_getlink(struct dentry * dentry, struct page **ppage) struct page * page; struct address_space *mapping = dentry->d_inode->i_mapping; page = read_cache_page(mapping, 0, (filler_t *)mapping->a_ops->readpage, - dentry); + NULL); if (IS_ERR(page)) goto sync_fail; wait_on_page(page); diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index f5795583b..425778412 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -60,7 +60,7 @@ nfsd_cache_init(void) nfscache = (struct svc_cacherep *) __get_free_pages(GFP_KERNEL, order); if (!nfscache) { - printk (KERN_ERR "nfsd: cannot allocate %d bytes for reply cache\n", i); + printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for reply cache\n", i); return; } memset(nfscache, 0, i); @@ -70,7 +70,7 @@ nfsd_cache_init(void) if (!hash_list) { free_pages ((unsigned long)nfscache, order); nfscache = NULL; - printk (KERN_ERR "nfsd: cannot allocate %d bytes for hash list\n", i); + printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for hash list\n", i); return; } diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 913cbf5f8..d3bb67b53 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -312,7 +312,7 @@ done: EXPORT_NO_SYMBOLS; MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>"); -extern int (*do_nfsservctl)(int, void *, void *); +extern long (*do_nfsservctl)(int, void *, void *); /* * Initialize the module diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 511a14dc9..cc3896c38 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -8,7 +8,6 @@ * Extensive rewrite by Neil Brown <neilb@cse.unsw.edu.au> Southern-Spring 1999 */ -#include <linux/config.h> #include <linux/sched.h> #include <linux/malloc.h> #include <linux/fs.h> diff --git a/fs/ntfs/fs.c b/fs/ntfs/fs.c index b81d6c031..38ca56312 100644 --- a/fs/ntfs/fs.c +++ b/fs/ntfs/fs.c @@ -709,7 +709,7 @@ static void ntfs_read_inode(struct inode* inode) #ifdef CONFIG_NTFS_RW static void -ntfs_write_inode (struct inode *ino) +ntfs_write_inode (struct inode *ino, int unused) { ntfs_debug (DEBUG_LINUX, "ntfs:write inode %x\n", ino->i_ino); ntfs_update_inode (NTFS_LINO2NINO (ino)); diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c index 29e455045..8db218b2d 100644 --- a/fs/partitions/msdos.c +++ b/fs/partitions/msdos.c @@ -36,6 +36,10 @@ #include "check.h" #include "msdos.h" +#if CONFIG_BLK_DEV_MD && CONFIG_AUTODETECT_RAID +extern void md_autodetect_dev(kdev_t dev); +#endif + static int current_minor; /* diff --git a/fs/qnx4/fsync.c b/fs/qnx4/fsync.c index e90291f03..26c8d7792 100644 --- a/fs/qnx4/fsync.c +++ b/fs/qnx4/fsync.c @@ -60,6 +60,7 @@ static int sync_block(struct inode *inode, unsigned short *block, int wait) return 0; } +#ifdef WTF static int sync_iblock(struct inode *inode, unsigned short *iblock, struct buffer_head **bh, int wait) { @@ -83,6 +84,7 @@ static int sync_iblock(struct inode *inode, unsigned short *iblock, return -1; return 0; } +#endif static int sync_direct(struct inode *inode, int wait) { @@ -100,6 +102,7 @@ static int sync_direct(struct inode *inode, int wait) return err; } +#ifdef WTF static int sync_indirect(struct inode *inode, unsigned short *iblock, int wait) { int i; @@ -146,8 +149,9 @@ static int sync_dindirect(struct inode *inode, unsigned short *diblock, brelse(dind_bh); return err; } +#endif -int qnx4_sync_file(struct file *file, struct dentry *dentry) +int qnx4_sync_file(struct file *file, struct dentry *dentry, int unused) { struct inode *inode = dentry->d_inode; int wait, err = 0; diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 3576482ca..0785ee368 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -73,7 +73,7 @@ static void qnx4_write_super(struct super_block *sb) sb->s_dirt = 0; } -static void qnx4_write_inode(struct inode *inode) +static void qnx4_write_inode(struct inode *inode, int unused) { struct qnx4_inode_entry *raw_inode; int block, ino; diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index 49d47afa7..cbabee222 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c @@ -214,7 +214,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name, if (status) { #ifdef SMBFS_PARANOIA -printk("smb_file_read: %s/%s validation failed, error=%d\n", +printk("smb_file_read: %s/%s validation failed, error=%Zd\n", dentry->d_parent->d_name.name, dentry->d_name.name, status); #endif goto out; @@ -308,7 +308,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name, if (result) { #ifdef SMBFS_PARANOIA -printk("smb_file_write: %s/%s validation failed, error=%d\n", +printk("smb_file_write: %s/%s validation failed, error=%Zd\n", dentry->d_parent->d_name.name, dentry->d_name.name, result); #endif goto out; diff --git a/fs/tunnel.c b/fs/tunnel.c deleted file mode 100644 index 8fee49a00..000000000 --- a/fs/tunnel.c +++ /dev/null @@ -1,50 +0,0 @@ -/* fs/tunnel.c: utility functions to support VFS tunnelling - - Copyright (C) 1999 Richard Gooch - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - Richard Gooch may be reached by email at rgooch@atnf.csiro.au - The postal address is: - Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. - - ChangeLog - - 19991121 Richard Gooch <rgooch@atnf.csiro.au> - Created. -*/ -#include <linux/types.h> -#include <linux/errno.h> -#include <linux/ctype.h> -#include <linux/module.h> -#include <linux/fs.h> - - -/*PUBLIC_FUNCTION*/ -struct dentry *vfs_tunnel_lookup (const struct dentry *dentry, - const struct dentry *parent, - const struct dentry *covered) -/* [SUMMARY] Lookup the corresponding dentry in the mounted-over FS. - <dentry> The dentry which is in the overmounting FS. - <parent> The parent of the dentry in the mounted-over FS. This may be NULL. - <covered> The dentry covered by the root dentry of the overmounting FS. - [RETURNS] A dentry on success, else NULL. -*/ -{ - struct dentry *root = dentry->d_sb->s_root; - - if (covered == root) return NULL; - if (parent) return lookup_dentry (dentry->d_name.name, parent, 0); -} /* End Function vfs_tunnel_lookup */ diff --git a/fs/umsdos/dir.c b/fs/umsdos/dir.c index a8352917a..a84b8891f 100644 --- a/fs/umsdos/dir.c +++ b/fs/umsdos/dir.c @@ -16,8 +16,7 @@ #include <linux/limits.h> #include <linux/umsdos_fs.h> #include <linux/malloc.h> - -#include <asm/uaccess.h> +#include <linux/pagemap.h> #define UMSDOS_SPECIAL_DIRFPOS 3 extern struct dentry *saved_root; @@ -102,7 +101,7 @@ static int umsdos_readdir_x (struct inode *dir, struct file *filp, struct dentry *demd; off_t start_fpos; int ret = 0; - struct file new_filp; + loff_t pos; umsdos_startlookup (dir); @@ -162,24 +161,21 @@ static int umsdos_readdir_x (struct inode *dir, struct file *filp, goto out_dput; } - /* set up our private filp ... */ - fill_new_filp(&new_filp, demd); - new_filp.f_pos = filp->f_pos; + pos = filp->f_pos; start_fpos = filp->f_pos; - if (new_filp.f_pos <= UMSDOS_SPECIAL_DIRFPOS + 1) - new_filp.f_pos = 0; -Printk (("f_pos %Ld i_size %ld\n", new_filp.f_pos, demd->d_inode->i_size)); + if (pos <= UMSDOS_SPECIAL_DIRFPOS + 1) + pos = 0; ret = 0; - while (new_filp.f_pos < demd->d_inode->i_size) { - off_t cur_f_pos = new_filp.f_pos; + while (pos < demd->d_inode->i_size) { + off_t cur_f_pos = pos; struct dentry *dret; struct inode *inode; struct umsdos_dirent entry; struct umsdos_info info; ret = -EIO; - if (umsdos_emd_dir_readentry (&new_filp, &entry) != 0) + if (umsdos_emd_dir_readentry (demd, &pos, &entry) != 0) break; if (entry.name_len == 0) continue; @@ -240,7 +236,7 @@ dret->d_parent->d_name.name, dret->d_name.name); if (inode != pseudo_root && !(entry.flags & UMSDOS_HIDDEN)) { if (filldir (dirbuf, entry.name, entry.name_len, cur_f_pos, inode->i_ino) < 0) { - new_filp.f_pos = cur_f_pos; + pos = cur_f_pos; } Printk(("umsdos_readdir_x: got %s/%s, ino=%ld\n", dret->d_parent->d_name.name, dret->d_name.name, inode->i_ino)); @@ -278,7 +274,7 @@ filp->f_dentry->d_name.name, info.entry.name); * (see comments at the beginning), we put back * the special offset. */ - filp->f_pos = new_filp.f_pos; + filp->f_pos = pos; if (filp->f_pos == 0) filp->f_pos = start_fpos; out_dput: @@ -688,28 +684,26 @@ struct dentry *umsdos_solve_hlink (struct dentry *hlink) struct dentry *dentry_dst; char *path, *pt; int len; - struct file filp; + struct address_space *mapping = hlink->d_inode->i_mapping; + struct page *page; -#ifdef UMSDOS_DEBUG_VERBOSE -printk("umsdos_solve_hlink: following %s/%s\n", -hlink->d_parent->d_name.name, hlink->d_name.name); -#endif + page=read_cache_page(mapping,0,(filler_t *)mapping->a_ops->readpage,NULL); + dentry_dst=(struct dentry *)page; + if (IS_ERR(page)) + goto out; + wait_on_page(page); + if (!Page_Uptodate(page)) + goto async_fail; - dentry_dst = ERR_PTR (-ENOMEM); + dentry_dst = ERR_PTR(-ENOMEM); path = (char *) kmalloc (PATH_MAX, GFP_KERNEL); if (path == NULL) - goto out; + goto out_release; + memcpy(path, (char*)kmap(page), hlink->d_inode->i_size); + kunmap(page); + page_cache_release(page); - fill_new_filp (&filp, hlink); - filp.f_flags = O_RDONLY; - - len = umsdos_file_read_kmem (&filp, path, hlink->d_inode->i_size); - if (len != hlink->d_inode->i_size) - goto out_noread; -#ifdef UMSDOS_DEBUG_VERBOSE -printk ("umsdos_solve_hlink: %s/%s is path %s\n", -hlink->d_parent->d_name.name, hlink->d_name.name, path); -#endif + len = hlink->d_inode->i_size; /* start at root dentry */ dentry_dst = dget(base); @@ -775,17 +769,17 @@ dentry_dst->d_parent->d_name.name, dentry_dst->d_name.name); } else printk(KERN_WARNING "umsdos_solve_hlink: err=%ld\n", PTR_ERR(dentry_dst)); - -out_free: kfree (path); out: dput(hlink); /* original hlink no longer needed */ return dentry_dst; -out_noread: - printk(KERN_WARNING "umsdos_solve_hlink: failed reading pseudolink!\n"); - goto out_free; +async_fail: + dentry_dst = ERR_PTR(-EIO); +out_release: + page_cache_release(page); + goto out; } diff --git a/fs/umsdos/emd.c b/fs/umsdos/emd.c index d9b00e8c9..84e8ca99f 100644 --- a/fs/umsdos/emd.c +++ b/fs/umsdos/emd.c @@ -15,169 +15,25 @@ #include <linux/msdos_fs.h> #include <linux/umsdos_fs.h> #include <linux/dcache.h> - -#include <asm/uaccess.h> +#include <linux/pagemap.h> #include <asm/delay.h> - -/* - * Read a file into kernel space memory - * returns how many bytes read (from fat_file_read) - */ - -ssize_t umsdos_file_read_kmem ( struct file *filp, - char *buf, - size_t count) +static void copy_entry(struct umsdos_dirent *p, struct umsdos_dirent *q) { - ssize_t ret; - mm_segment_t old_fs = get_fs (); - - set_fs (KERNEL_DS); - ret = fat_file_read (filp, buf, count, &filp->f_pos); - set_fs (old_fs); - return ret; + p->name_len = q->name_len; + p->flags = q->flags; + p->nlink = le16_to_cpu (q->nlink); + /* FIXME -- 32bit UID/GID issues */ + p->uid = le16_to_cpu (q->uid); + p->gid = le16_to_cpu (q->gid); + p->atime = le32_to_cpu (q->atime); + p->mtime = le32_to_cpu (q->mtime); + p->ctime = le32_to_cpu (q->ctime); + p->rdev = le16_to_cpu (q->rdev); + p->mode = le16_to_cpu (q->mode); } - -/* - * Write to file from kernel space. - * Does the real job, assumes all structures are initialized! - */ - - -ssize_t umsdos_file_write_kmem_real (struct file * filp, - const char *buf, - size_t count) -{ - mm_segment_t old_fs = get_fs (); - ssize_t ret; - - set_fs (KERNEL_DS); - ret = fat_file_write (filp, buf, count, &filp->f_pos); - set_fs (old_fs); - if (ret < 0) { - printk(KERN_WARNING "umsdos_file_write: ret=%d\n", ret); - goto out; - } -#ifdef UMSDOS_PARANOIA -if (ret != count) -printk(KERN_WARNING "umsdos_file_write: count=%u, ret=%u\n", count, ret); -#endif -out: - return ret; -} - - -/* - * Write to a file from kernel space. - */ - -ssize_t umsdos_file_write_kmem (struct file *filp, - const char *buf, - size_t count) -{ - ssize_t ret; - - ret = umsdos_file_write_kmem_real (filp, buf, count); - return ret; -} - - - -/* - * Write a block of bytes into one EMD file. - * The block of data is NOT in user space. - * - * Return 0 if OK, a negative error code if not. - * - * Note: buffer is in kernel memory, not in user space. - */ - -ssize_t umsdos_emd_dir_write ( struct file *filp, - char *buf, - size_t count) -{ - int written; - -#ifdef __BIG_ENDIAN - struct umsdos_dirent *d = (struct umsdos_dirent *) buf; - - d->nlink = cpu_to_le16 (d->nlink); - d->uid = cpu_to_le16 (d->uid); - d->gid = cpu_to_le16 (d->gid); - d->atime = cpu_to_le32 (d->atime); - d->mtime = cpu_to_le32 (d->mtime); - d->ctime = cpu_to_le32 (d->ctime); - d->rdev = cpu_to_le16 (d->rdev); - d->mode = cpu_to_le16 (d->mode); -#endif - - filp->f_flags = 0; -Printk (("umsdos_emd_dir_write /mn/: calling write_kmem with %p, %p, %d, %Ld\n", -filp, buf, count, filp->f_pos)); - written = umsdos_file_write_kmem (filp, buf, count); - -#ifdef __BIG_ENDIAN - d->nlink = le16_to_cpu (d->nlink); - d->uid = le16_to_cpu (d->uid); - d->gid = le16_to_cpu (d->gid); - d->atime = le32_to_cpu (d->atime); - d->mtime = le32_to_cpu (d->mtime); - d->ctime = le32_to_cpu (d->ctime); - d->rdev = le16_to_cpu (d->rdev); - d->mode = le16_to_cpu (d->mode); -#endif - -#ifdef UMSDOS_PARANOIA -if (written != count) -printk(KERN_ERR "umsdos_emd_dir_write: ERROR: written (%d) != count (%d)\n", -written, count); -#endif - - return (written != count) ? -EIO : 0; -} - - - -/* - * Read a block of bytes from one EMD file. - * The block of data is NOT in user space. - * Return 0 if OK, -EIO if any error. - */ -/* buffer in kernel memory, not in user space */ - -ssize_t umsdos_emd_dir_read (struct file *filp, char *buf, size_t count) -{ - ssize_t sizeread, ret = 0; - -#ifdef __BIG_ENDIAN - struct umsdos_dirent *d = (struct umsdos_dirent *) buf; - -#endif - - filp->f_flags = 0; - sizeread = umsdos_file_read_kmem (filp, buf, count); - if (sizeread != count) { - printk (KERN_WARNING - "UMSDOS: EMD problem, pos=%Ld, count=%d, read=%d\n", - filp->f_pos, count, sizeread); - ret = -EIO; - } -#ifdef __BIG_ENDIAN - d->nlink = le16_to_cpu (d->nlink); - d->uid = le16_to_cpu (d->uid); - d->gid = le16_to_cpu (d->gid); - d->atime = le32_to_cpu (d->atime); - d->mtime = le32_to_cpu (d->mtime); - d->ctime = le32_to_cpu (d->ctime); - d->rdev = le16_to_cpu (d->rdev); - d->mode = le16_to_cpu (d->mode); -#endif - return ret; -} - - /* * Lookup the EMD dentry for a directory. * @@ -256,35 +112,60 @@ out: * does not change {d,i}_count */ -int umsdos_emd_dir_readentry (struct file *filp, struct umsdos_dirent *entry) +int umsdos_emd_dir_readentry (struct dentry *demd, loff_t *pos, struct umsdos_dirent *entry) { - int ret; - - Printk ((KERN_DEBUG "umsdos_emd_dir_readentry /mn/: entering.\n")); - - ret = umsdos_emd_dir_read (filp, (char *) entry, UMSDOS_REC_SIZE); - if (ret == 0) { /* if no error */ - /* Variable size record. Maybe, we have to read some more */ - int recsize = umsdos_evalrecsize (entry->name_len); - - if (recsize > UMSDOS_REC_SIZE) { -Printk ((KERN_DEBUG "umsdos_emd_dir_readentry /mn/: %d > %d!\n", -recsize, UMSDOS_REC_SIZE)); - ret = umsdos_emd_dir_read (filp, - ((char *) entry) + UMSDOS_REC_SIZE, - recsize - UMSDOS_REC_SIZE); + struct address_space *mapping = demd->d_inode->i_mapping; + struct page *page; + struct umsdos_dirent *p; + int offs = *pos & ~PAGE_CACHE_MASK; + int recsize; + + page = read_cache_page(mapping, *pos>>PAGE_CACHE_SHIFT, + (filler_t*)mapping->a_ops->readpage, NULL); + if (IS_ERR(page)) + goto sync_fail; + wait_on_page(page); + if (!Page_Uptodate(page)) + goto async_fail; + p = (struct umsdos_dirent*)((char*)kmap(page)+offs); + recsize = umsdos_evalrecsize(p->name_len); + if (offs + recsize > PAGE_CACHE_SIZE) { + struct page *page2; + int part = ((char*)page_address(page)+PAGE_CACHE_SIZE)-p->spare; + page2 = read_cache_page(mapping, 1+(*pos>>PAGE_CACHE_SHIFT), + (filler_t*)mapping->a_ops->readpage, NULL); + if (IS_ERR(page2)) { + kunmap(page); + page_cache_release(page); + page = page2; + goto sync_fail; } - } - Printk (("umsdos_emd_dir_readentry /mn/: ret=%d.\n", ret)); - if (entry && ret == 0) { -Printk (("umsdos_emd_dir_readentry /mn/: returning len=%d,name=%.*s\n", -(int) entry->name_len, (int) entry->name_len, entry->name)); - } - return ret; + wait_on_page(page2); + if (!Page_Uptodate(page2)) { + kunmap(page); + page_cache_release(page2); + goto async_fail; + } + memcpy(entry->spare,p->spare,part); + memcpy(entry->spare+part,(char*)kmap(page2), + recsize+offs-PAGE_CACHE_SIZE); + kunmap(page2); + page_cache_release(page2); + } else + memcpy(entry->spare,p->spare,((char*)p+recsize)-p->spare); + copy_entry(entry, p); + kunmap(page); + page_cache_release(page); + *pos += recsize; + return 0; +async_fail: + page_cache_release(page); + page = ERR_PTR(-EIO); +sync_fail: + return PTR_ERR(page); } - /* * Write an entry in the EMD file. * Return 0 if OK, -EIO if some error. @@ -298,8 +179,10 @@ static int umsdos_writeentry (struct dentry *parent, struct umsdos_info *info, struct umsdos_dirent *entry = &info->entry; struct dentry *emd_dentry; int ret; - struct umsdos_dirent entry0; - struct file filp; + struct umsdos_dirent entry0,*p; + struct address_space *mapping; + struct page *page, *page2 = NULL; + int offs; emd_dentry = umsdos_get_emd_dentry(parent); ret = PTR_ERR(emd_dentry); @@ -335,76 +218,97 @@ static int umsdos_writeentry (struct dentry *parent, struct umsdos_info *info, memset (entry->spare, 0, sizeof (entry->spare)); } - fill_new_filp (&filp, emd_dentry); - filp.f_pos = info->f_pos; - filp.f_reada = 0; - filp.f_flags = O_RDWR; - /* write the entry and update the parent timestamps */ - ret = umsdos_emd_dir_write (&filp, (char *) entry, info->recsize); - if (!ret) { - dir->i_ctime = dir->i_mtime = CURRENT_TIME; - mark_inode_dirty(dir); - } else - printk ("UMSDOS: problem with EMD file: can't write\n"); + mapping = emd_dentry->d_inode->i_mapping; + offs = info->f_pos & ~PAGE_CACHE_MASK; + ret = -ENOMEM; + page = grab_cache_page(mapping, info->f_pos>>PAGE_CACHE_SHIFT); + if (!page) + goto out_dput; + p = (struct umsdos_dirent*)((char*)page_address(page)+offs); + if (offs + info->recsize > PAGE_CACHE_SIZE) { + ret = mapping->a_ops->prepare_write(NULL,page,offs, + PAGE_CACHE_SIZE); + if (ret) + goto out_unlock; + page2 = grab_cache_page(mapping, + (info->f_pos>>PAGE_CACHE_SHIFT)+1); + if (!page2) + goto out_unlock2; + ret = mapping->a_ops->prepare_write(NULL,page2,0, + offs+info->recsize-PAGE_CACHE_SIZE); + if (ret) + goto out_unlock3; + p->name_len = entry->name_len; + p->flags = entry->flags; + p->nlink = cpu_to_le16(entry->nlink); + p->uid = cpu_to_le16(entry->uid); + p->gid = cpu_to_le16(entry->gid); + p->atime = cpu_to_le32(entry->atime); + p->mtime = cpu_to_le32(entry->mtime); + p->ctime = cpu_to_le32(entry->ctime); + p->rdev = cpu_to_le16(entry->rdev); + p->mode = cpu_to_le16(entry->mode); + memcpy(p->name,entry->name, + ((char*)page_address(page)+PAGE_CACHE_SIZE)-p->spare); + memcpy((char*)page_address(page2), + entry->spare+PAGE_CACHE_SIZE-offs, + offs+info->recsize-PAGE_CACHE_SIZE); + ret = mapping->a_ops->commit_write(NULL,page2,0, + offs+info->recsize-PAGE_CACHE_SIZE); + if (ret) + goto out_unlock3; + ret = mapping->a_ops->commit_write(NULL,page,offs, + PAGE_CACHE_SIZE); + UnlockPage(page2); + page_cache_release(page2); + if (ret) + goto out_unlock; + } else { + ret = mapping->a_ops->prepare_write(NULL,page,offs, + info->recsize); + if (ret) + goto out_unlock; + p->name_len = entry->name_len; + p->flags = entry->flags; + p->nlink = cpu_to_le16(entry->nlink); + p->uid = cpu_to_le16(entry->uid); + p->gid = cpu_to_le16(entry->gid); + p->atime = cpu_to_le32(entry->atime); + p->mtime = cpu_to_le32(entry->mtime); + p->ctime = cpu_to_le32(entry->ctime); + p->rdev = cpu_to_le16(entry->rdev); + p->mode = cpu_to_le16(entry->mode); + memcpy(p->spare,entry->spare,((char*)p+info->recsize)-p->spare); + ret = mapping->a_ops->commit_write(NULL,page,offs, + info->recsize); + if (ret) + goto out_unlock; + } + UnlockPage(page); + page_cache_release(page); + + dir->i_ctime = dir->i_mtime = CURRENT_TIME; + mark_inode_dirty(dir); out_dput: dput(emd_dentry); out: Printk (("umsdos_writeentry /mn/: returning %d...\n", ret)); return ret; +out_unlock3: + UnlockPage(page2); + page_cache_release(page2); +out_unlock2: + ClearPageUptodate(page); + kunmap(page); +out_unlock: + UnlockPage(page); + page_cache_release(page); + printk ("UMSDOS: problem with EMD file: can't write\n"); + goto out_dput; } - - -#define CHUNK_SIZE (8*UMSDOS_REC_SIZE) -struct find_buffer { - char buffer[CHUNK_SIZE]; - int pos; /* read offset in buffer */ - int size; /* Current size of buffer */ - struct file filp; -}; - - - -/* - * Fill the read buffer and take care of the bytes remaining inside. - * Unread bytes are simply moved to the beginning. - * - * Return -ENOENT if EOF, 0 if OK, a negative error code if any problem. - * - * Note: the caller must hold a lock on the parent directory. - */ - -static int umsdos_fillbuf (struct find_buffer *buf) -{ - struct inode *inode = buf->filp.f_dentry->d_inode; - int mustmove = buf->size - buf->pos; - int mustread, remain; - int ret = -ENOENT; - - if (mustmove > 0) { - memcpy (buf->buffer, buf->buffer + buf->pos, mustmove); - } - buf->pos = 0; - mustread = CHUNK_SIZE - mustmove; - remain = inode->i_size - buf->filp.f_pos; - if (remain < mustread) - mustread = remain; - if (mustread > 0) { - ret = umsdos_emd_dir_read (&buf->filp, buf->buffer + mustmove, - mustread); - if (ret == 0) - buf->size = mustmove + mustread; - } else if (mustmove) { - buf->size = mustmove; - ret = 0; - } - return ret; -} - - - /* * General search, locate a name in the EMD file or an empty slot to * store it. if info->entry.name_len == 0, search the first empty @@ -432,115 +336,144 @@ static int umsdos_fillbuf (struct find_buffer *buf) * record, multiple contiguous records are allocated. */ -static int umsdos_find (struct dentry *parent, struct umsdos_info *info) +static int umsdos_find (struct dentry *demd, struct umsdos_info *info) { struct umsdos_dirent *entry = &info->entry; int recsize = info->recsize; - struct dentry *demd; struct inode *emd_dir; int ret = -ENOENT; - struct find_buffer buf; struct { off_t posok; /* Position available to store the entry */ - int found; /* A valid empty position has been found. */ off_t one; /* One empty position -> maybe <- large enough */ - int onesize; /* size of empty region starting at one */ } empty; + int found = 0; + int empty_size = 0; + struct address_space *mapping; + filler_t *readpage; + struct page *page = NULL; + int index = -1; + int offs = PAGE_CACHE_SIZE,max_offs = PAGE_CACHE_SIZE; + char *p = NULL; + loff_t pos = 0; -Printk (("umsdos_find: locating %s in %s/%s\n", -entry->name, parent->d_parent->d_name.name, parent->d_name.name)); - - /* - * Lookup the EMD file in the parent directory. - */ - demd = umsdos_get_emd_dentry(parent); - ret = PTR_ERR(demd); - if (IS_ERR(demd)) - goto out; /* make sure there's an EMD file ... */ ret = -ENOENT; emd_dir = demd->d_inode; if (!emd_dir) goto out_dput; + mapping = emd_dir->i_mapping; + readpage = (filler_t*)mapping->a_ops->readpage; -Printk(("umsdos_find: found EMD file %s/%s, ino=%p\n", -demd->d_parent->d_name.name, demd->d_name.name, emd_dir)); - - fill_new_filp (&buf.filp, demd); - - buf.pos = 0; - buf.size = 0; - - empty.found = 0; empty.posok = emd_dir->i_size; - empty.onesize = 0; while (1) { - struct umsdos_dirent *rentry = (struct umsdos_dirent *) - (buf.buffer + buf.pos); - int file_pos = buf.filp.f_pos - buf.size + buf.pos; - - if (buf.pos == buf.size) { - ret = umsdos_fillbuf (&buf); - if (ret < 0) { - /* Not found, so note where it can be added */ + struct umsdos_dirent *rentry; + int entry_size; + + if (offs >= max_offs) { + if (page) { + kunmap(page); + page_cache_release(page); + } + if (pos >= emd_dir->i_size) { info->f_pos = empty.posok; break; } - } else if (rentry->name_len == 0) { + if (++index == (emd_dir->i_size>>PAGE_CACHE_SHIFT)) + max_offs = emd_dir->i_size & ~PAGE_CACHE_MASK; + offs -= PAGE_CACHE_SIZE; + page = read_cache_page(mapping,index,readpage,NULL); + if (IS_ERR(page)) + goto sync_fail; + wait_on_page(page); + if (!Page_Uptodate(page)) + goto async_fail; + p = (char*)kmap(page); + } + + rentry = (struct umsdos_dirent *)(p+offs); + + if (rentry->name_len == 0) { /* We are looking for an empty section at least */ /* as large as recsize. */ if (entry->name_len == 0) { - info->f_pos = file_pos; + info->f_pos = pos; ret = 0; break; - } else if (!empty.found) { - if (empty.onesize == 0) { - /* This is the first empty record of a section. */ - empty.one = file_pos; - } - /* grow the empty section */ - empty.onesize += UMSDOS_REC_SIZE; - if (empty.onesize == recsize) { - /* Here is a large enough section. */ - empty.posok = empty.one; - empty.found = 1; - } } - buf.pos += UMSDOS_REC_SIZE; - } else { - int entry_size = umsdos_evalrecsize (rentry->name_len); - - if (buf.pos + entry_size > buf.size) { - ret = umsdos_fillbuf (&buf); - if (ret < 0) { - /* Not found, so note where it can be added */ - info->f_pos = empty.posok; - break; - } - } else { - empty.onesize = 0; /* Reset the free slot search. */ - if (entry->name_len == rentry->name_len - && memcmp (entry->name, rentry->name, rentry->name_len) == 0) { - info->f_pos = file_pos; - *entry = *rentry; - ret = 0; - break; - } else { - buf.pos += entry_size; - } + offs += UMSDOS_REC_SIZE; + pos += UMSDOS_REC_SIZE; + if (found) + continue; + if (!empty_size) + empty.one = pos-UMSDOS_REC_SIZE; + empty_size += UMSDOS_REC_SIZE; + if (empty_size == recsize) { + /* Here is a large enough section. */ + empty.posok = empty.one; + found = 1; } + continue; } + + entry_size = umsdos_evalrecsize(rentry->name_len); + if (entry_size > PAGE_CACHE_SIZE) + goto async_fail; + empty_size = 0; + if (entry->name_len != rentry->name_len) + goto skip_it; + + if (entry_size + offs > PAGE_CACHE_SIZE) { + /* Sucker spans the page boundary */ + int len = (p+PAGE_CACHE_SIZE)-rentry->name; + struct page *next_page; + char *q; + next_page = read_cache_page(mapping,index+1,readpage,NULL); + if (IS_ERR(next_page)) { + page_cache_release(page); + page = next_page; + goto sync_fail; + } + wait_on_page(next_page); + if (!Page_Uptodate(next_page)) { + page_cache_release(page); + page = next_page; + goto async_fail; + } + q = (char*)kmap(next_page); + if (memcmp(entry->name, rentry->name, len) || + memcmp(entry->name+len, q, entry->name_len-len)) { + kunmap(next_page); + page_cache_release(next_page); + goto skip_it; + } + kunmap(next_page); + page_cache_release(next_page); + } else if (memcmp (entry->name, rentry->name, entry->name_len)) + goto skip_it; + + info->f_pos = pos; + copy_entry(entry, rentry); + ret = 0; + break; +skip_it: + offs+=entry_size; + pos+=entry_size; + } + if (page) { + kunmap(page); + page_cache_release(page); } -Printk(("umsdos_find: ready to mangle %s, len=%d, pos=%ld\n", -entry->name, entry->name_len, (long)info->f_pos)); umsdos_manglename (info); out_dput: dput(demd); - -out: - Printk (("umsdos_find: returning %d\n", ret)); return ret; + +async_fail: + page_cache_release(page); + page = ERR_PTR(-EIO); +sync_fail: + return PTR_ERR(page); } @@ -557,12 +490,17 @@ out: int umsdos_newentry (struct dentry *parent, struct umsdos_info *info) { int err, ret = -EEXIST; + struct dentry *demd = umsdos_get_emd_dentry(parent); - err = umsdos_find (parent, info); + ret = PTR_ERR(demd); + if (IS_ERR(ret)) + goto out; + err = umsdos_find (demd, info); if (err && err == -ENOENT) { ret = umsdos_writeentry (parent, info, 0); Printk (("umsdos_writeentry EMD ret = %d\n", ret)); } +out: return ret; } @@ -580,15 +518,20 @@ int umsdos_newentry (struct dentry *parent, struct umsdos_info *info) int umsdos_newhidden (struct dentry *parent, struct umsdos_info *info) { int ret; + struct dentry *demd = umsdos_get_emd_dentry(parent); + ret = PTR_ERR(demd); + if (IS_ERR(ret)) + goto out; umsdos_parse ("..LINK", 6, info); info->entry.name_len = 0; - ret = umsdos_find (parent, info); + ret = umsdos_find (demd, info); if (ret == -ENOENT || ret == 0) { info->entry.name_len = sprintf (info->entry.name, "..LINK%ld", info->f_pos); ret = 0; } +out: return ret; } @@ -603,8 +546,12 @@ int umsdos_newhidden (struct dentry *parent, struct umsdos_info *info) int umsdos_delentry (struct dentry *parent, struct umsdos_info *info, int isdir) { int ret; + struct dentry *demd = umsdos_get_emd_dentry(parent); - ret = umsdos_find (parent, info); + ret = PTR_ERR(demd); + if (IS_ERR(ret)) + goto out; + ret = umsdos_find (demd, info); if (ret) goto out; if (info->entry.name_len == 0) @@ -637,7 +584,7 @@ int umsdos_isempty (struct dentry *dentry) { struct dentry *demd; int ret = 2; - struct file filp; + loff_t pos = 0; demd = umsdos_get_emd_dentry(dentry); if (IS_ERR(demd)) @@ -646,14 +593,11 @@ int umsdos_isempty (struct dentry *dentry) if (!demd->d_inode) goto out_dput; - fill_new_filp (&filp, demd); - filp.f_flags = O_RDONLY; - ret = 1; - while (filp.f_pos < demd->d_inode->i_size) { + while (pos < demd->d_inode->i_size) { struct umsdos_dirent entry; - if (umsdos_emd_dir_readentry (&filp, &entry) != 0) { + if (umsdos_emd_dir_readentry (demd, &pos, &entry) != 0) { ret = 0; break; } @@ -666,9 +610,6 @@ int umsdos_isempty (struct dentry *dentry) out_dput: dput(demd); out: -Printk(("umsdos_isempty: checked %s/%s, empty=%d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, ret)); - return ret; } @@ -686,8 +627,12 @@ int umsdos_findentry (struct dentry *parent, struct umsdos_info *info, int expect) { int ret; + struct dentry *demd = umsdos_get_emd_dentry(parent); - ret = umsdos_find (parent, info); + ret = PTR_ERR(demd); + if (IS_ERR(ret)) + goto out; + ret = umsdos_find (demd, info); if (ret) goto out; diff --git a/fs/umsdos/inode.c b/fs/umsdos/inode.c index 8c61dcaf8..bb48b6bf2 100644 --- a/fs/umsdos/inode.c +++ b/fs/umsdos/inode.c @@ -18,6 +18,7 @@ #include <linux/stat.h> #include <linux/umsdos_fs.h> #include <linux/list.h> +#include <linux/pagemap.h> extern struct dentry_operations umsdos_dentry_operations; @@ -28,23 +29,6 @@ struct inode *pseudo_root = NULL; /* Useful to simulate the pseudo DOS */ static struct dentry *check_pseudo_root(struct super_block *); -/* - * Initialize a private filp - */ -void fill_new_filp (struct file *filp, struct dentry *dentry) -{ - if (!dentry) - printk(KERN_ERR "fill_new_filp: NULL dentry!\n"); - - memset (filp, 0, sizeof (struct file)); - filp->f_reada = 1; - filp->f_flags = O_RDWR; - filp->f_dentry = dentry; - filp->f_op = dentry->d_inode->i_fop; -} - - - void UMSDOS_put_inode (struct inode *inode) { PRINTK ((KERN_DEBUG @@ -200,9 +184,11 @@ int umsdos_notify_change_locked(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; struct dentry *demd; + struct address_space *mapping; + struct page *page; int ret = 0; - struct file filp; - struct umsdos_dirent entry; + struct umsdos_dirent *entry; + int offs; Printk(("UMSDOS_notify_change: entering for %s/%s (%d)\n", dentry->d_parent->d_name.name, dentry->d_name.name, inode->u.umsdos_i.i_patched)); @@ -235,52 +221,43 @@ dentry->d_parent->d_name.name, dentry->d_name.name, inode->u.umsdos_i.i_patched) * See emd.c */ - fill_new_filp (&filp, demd); - filp.f_pos = inode->u.umsdos_i.pos; -Printk(("UMSDOS_notify_change: %s/%s reading at %d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, (int) filp.f_pos)); - /* Read only the start of the entry since we don't touch the name */ - ret = umsdos_emd_dir_read (&filp, (char *) &entry, UMSDOS_REC_SIZE); - if (ret) { - printk(KERN_WARNING - "umsdos_notify_change: %s/%s EMD read error, ret=%d\n", - dentry->d_parent->d_name.name, dentry->d_name.name,ret); + mapping = demd->d_inode->i_mapping; + offs = inode->u.umsdos_i.pos & ~PAGE_CACHE_MASK; + ret = -ENOMEM; + page=grab_cache_page(mapping,inode->u.umsdos_i.pos>>PAGE_CACHE_SHIFT); + if (!page) goto out_dput; - } + ret=mapping->a_ops->prepare_write(NULL,page,offs,offs+UMSDOS_REC_SIZE); + if (ret) + goto out_unlock; + entry = (struct umsdos_dirent*)((char*)page_address(page)+offs); if (attr->ia_valid & ATTR_UID) - entry.uid = attr->ia_uid; + entry->uid = cpu_to_le16(attr->ia_uid); if (attr->ia_valid & ATTR_GID) - entry.gid = attr->ia_gid; + entry->gid = cpu_to_le16(attr->ia_gid); if (attr->ia_valid & ATTR_MODE) - entry.mode = attr->ia_mode; + entry->mode = cpu_to_le16(attr->ia_mode); if (attr->ia_valid & ATTR_ATIME) - entry.atime = attr->ia_atime; + entry->atime = cpu_to_le32(attr->ia_atime); if (attr->ia_valid & ATTR_MTIME) - entry.mtime = attr->ia_mtime; + entry->mtime = cpu_to_le32(attr->ia_mtime); if (attr->ia_valid & ATTR_CTIME) - entry.ctime = attr->ia_ctime; - - entry.nlink = inode->i_nlink; - filp.f_pos = inode->u.umsdos_i.pos; - ret = umsdos_emd_dir_write (&filp, (char *) &entry, UMSDOS_REC_SIZE); + entry->ctime = cpu_to_le32(attr->ia_ctime); + entry->nlink = cpu_to_le16(inode->i_nlink); + ret=mapping->a_ops->commit_write(NULL,page,offs,offs+UMSDOS_REC_SIZE); if (ret) printk(KERN_WARNING "umsdos_notify_change: %s/%s EMD write error, ret=%d\n", dentry->d_parent->d_name.name, dentry->d_name.name,ret); - Printk (("notify pos %lu ret %d nlink %d ", - inode->u.umsdos_i.pos, ret, entry.nlink)); /* #Specification: notify_change / msdos fs * notify_change operation are done only on the * EMD file. The msdos fs is not even called. */ -#ifdef UMSDOS_DEBUG_VERBOSE -if (entry.flags & UMSDOS_HIDDEN) -printk("umsdos_notify_change: %s/%s hidden, nlink=%d, ret=%d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, entry.nlink, ret); -#endif - +out_unlock: + UnlockPage(page); + page_cache_release(page); out_dput: dput(demd); out: diff --git a/fs/umsdos/ioctl.c b/fs/umsdos/ioctl.c index a8adf6ed8..17d38c2dd 100644 --- a/fs/umsdos/ioctl.c +++ b/fs/umsdos/ioctl.c @@ -75,7 +75,6 @@ int UMSDOS_ioctl_dir(struct inode *dir, struct file *filp, unsigned int cmd, struct dentry *dentry = filp->f_dentry; struct umsdos_ioctl *idata = (struct umsdos_ioctl *) data_ptr; int ret; - struct file new_filp; struct umsdos_ioctl data; Printk(("UMSDOS_ioctl_dir: %s/%s, cmd=%d, data=%08lx\n", @@ -161,6 +160,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name, cmd, data_ptr)); * Return > 0 if success. */ struct dentry *demd; + loff_t pos = filp->f_pos; /* The absence of the EMD is simply seen as an EOF */ demd = umsdos_get_emd_dentry(dentry); @@ -171,14 +171,12 @@ dentry->d_parent->d_name.name, dentry->d_name.name, cmd, data_ptr)); if (!demd->d_inode) goto read_dput; - fill_new_filp(&new_filp, demd); - new_filp.f_pos = filp->f_pos; - while (new_filp.f_pos < demd->d_inode->i_size) { - off_t f_pos = new_filp.f_pos; + while (pos < demd->d_inode->i_size) { + off_t f_pos = pos; struct umsdos_dirent entry; struct umsdos_info info; - ret = umsdos_emd_dir_readentry (&new_filp, &entry); + ret = umsdos_emd_dir_readentry (demd, &pos, &entry); if (ret) break; if (entry.name_len <= 0) @@ -199,7 +197,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name, cmd, data_ptr)); break; } /* update the original f_pos */ - filp->f_pos = new_filp.f_pos; + filp->f_pos = pos; read_dput: d_drop(demd); dput(demd); diff --git a/fs/umsdos/namei.c b/fs/umsdos/namei.c index c4cb0cb9f..4102ce6e0 100644 --- a/fs/umsdos/namei.c +++ b/fs/umsdos/namei.c @@ -496,10 +496,6 @@ static int umsdos_symlink_x (struct inode *dir, struct dentry *dentry, const char *symname, int mode, char flags) { int ret, len; - struct file filp; - -Printk(("umsdos_symlink: %s/%s to %s\n", -dentry->d_parent->d_name.name, dentry->d_name.name, symname)); ret = umsdos_create_any (dir, dentry, mode, 0, flags); if (ret) { @@ -508,19 +504,13 @@ dentry->d_parent->d_name.name, dentry->d_name.name, symname)); goto out; } - fill_new_filp (&filp, dentry); len = strlen (symname); - ret = umsdos_file_write_kmem_real (&filp, symname, len); + ret = block_symlink(dentry->d_inode, symname, len); if (ret < 0) goto out_unlink; - if (ret != len) - goto out_error; - ret = 0; out: return ret; -out_error: - ret = -EIO; out_unlink: printk(KERN_WARNING "umsdos_symlink: write failed, unlinking\n"); UMSDOS_unlink (dir, dentry); diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h index 0d7a881a7..4cdfb21d5 100644 --- a/include/asm-alpha/bitops.h +++ b/include/asm-alpha/bitops.h @@ -290,8 +290,9 @@ found_middle: #define ext2_find_next_zero_bit find_next_zero_bit /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h index 666efc117..9773f6749 100644 --- a/include/asm-arm/bitops.h +++ b/include/asm-arm/bitops.h @@ -80,8 +80,9 @@ extern __inline__ unsigned long ffz(unsigned long word) #define ext2_find_next_zero_bit find_next_zero_bit /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index e8c859dd4..53486c977 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h @@ -227,8 +227,9 @@ extern __inline__ int ffs(int x) #define ext2_find_next_zero_bit find_next_zero_bit /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 80aeb3201..e9faddd62 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -144,8 +144,7 @@ extern inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx) "=b" (*ebx), "=c" (*ecx), "=d" (*edx) - : "a" (op) - : "cc"); + : "a" (op)); } diff --git a/include/asm-ia64/bitops.h b/include/asm-ia64/bitops.h index 13b9dcbdc..054704c47 100644 --- a/include/asm-ia64/bitops.h +++ b/include/asm-ia64/bitops.h @@ -231,8 +231,9 @@ found_middle: #define ext2_find_next_zero_bit find_next_zero_bit /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index e17fdf7f8..ff1c8b9fa 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h @@ -262,7 +262,7 @@ minix_find_first_zero_bit (const void *vaddr, unsigned size) } extern __inline__ int -minix_set_bit (int nr, void *vaddr) +minix_test_and_set_bit (int nr, void *vaddr) { char retval; @@ -272,8 +272,10 @@ minix_set_bit (int nr, void *vaddr) return retval; } +#define minix_set_bit(nr,addr) ((void)minix_test_and_set_bit(nr,addr)) + extern __inline__ int -minix_clear_bit (int nr, void *vaddr) +minix_test_and_clear_bit (int nr, void *vaddr) { char retval; diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index caffa4ede..326294ab2 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h @@ -553,8 +553,9 @@ found_middle: * FIXME: These assume that Minix uses the native byte/bitorder. * This limits the Minix filesystem's value for data exchange very much. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-mips64/bitops.h b/include/asm-mips64/bitops.h index 5f27e05cf..90fcb8688 100644 --- a/include/asm-mips64/bitops.h +++ b/include/asm-mips64/bitops.h @@ -443,8 +443,9 @@ found_middle: * FIXME: These assume that Minix uses the native byte/bitorder. * This limits the Minix filesystem's value for data exchange very much. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-ppc/bitops.h b/include/asm-ppc/bitops.h index 7f6f12155..ccb0f199f 100644 --- a/include/asm-ppc/bitops.h +++ b/include/asm-ppc/bitops.h @@ -325,8 +325,9 @@ found_middle: } /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) ext2_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) ext2_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr) +#define minix_set_bit(nr,addr) ((void)ext2_set_bit(nr,addr)) +#define minix_test_and_clear_bit(nr,addr) ext2_clear_bit(nr,addr) #define minix_test_bit(nr,addr) ext2_test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size) diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 3043d3b60..710cf8829 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h @@ -878,8 +878,9 @@ ext2_find_next_zero_bit(void *vaddr, unsigned size, unsigned offset) /* Bitmap functions for the minix filesystem. */ /* FIXME !!! */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-sh/bitops.h b/include/asm-sh/bitops.h index 85462da1e..6ce4ea388 100644 --- a/include/asm-sh/bitops.h +++ b/include/asm-sh/bitops.h @@ -254,8 +254,9 @@ found_middle: #endif /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-sparc/asm_offsets.h b/include/asm-sparc/asm_offsets.h index f4af06b1f..3447973a0 100644 --- a/include/asm-sparc/asm_offsets.h +++ b/include/asm-sparc/asm_offsets.h @@ -99,94 +99,94 @@ #define AOFF_task_it_virt_incr 0x000000cc #define ASIZ_task_it_virt_incr 0x00000004 #define AOFF_task_real_timer 0x000000d0 -#define ASIZ_task_real_timer 0x00000018 -#define AOFF_task_times 0x000000e8 +#define ASIZ_task_real_timer 0x00000014 +#define AOFF_task_times 0x000000e4 #define ASIZ_task_times 0x00000010 -#define AOFF_task_start_time 0x000000f8 +#define AOFF_task_start_time 0x000000f4 #define ASIZ_task_start_time 0x00000004 -#define AOFF_task_per_cpu_utime 0x000000fc +#define AOFF_task_per_cpu_utime 0x000000f8 #define ASIZ_task_per_cpu_utime 0x00000004 -#define AOFF_task_min_flt 0x00000104 +#define AOFF_task_min_flt 0x00000100 #define ASIZ_task_min_flt 0x00000004 -#define AOFF_task_maj_flt 0x00000108 +#define AOFF_task_maj_flt 0x00000104 #define ASIZ_task_maj_flt 0x00000004 -#define AOFF_task_nswap 0x0000010c +#define AOFF_task_nswap 0x00000108 #define ASIZ_task_nswap 0x00000004 -#define AOFF_task_cmin_flt 0x00000110 +#define AOFF_task_cmin_flt 0x0000010c #define ASIZ_task_cmin_flt 0x00000004 -#define AOFF_task_cmaj_flt 0x00000114 +#define AOFF_task_cmaj_flt 0x00000110 #define ASIZ_task_cmaj_flt 0x00000004 -#define AOFF_task_cnswap 0x00000118 +#define AOFF_task_cnswap 0x00000114 #define ASIZ_task_cnswap 0x00000004 -#define AOFF_task_uid 0x00000120 +#define AOFF_task_uid 0x0000011c #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x00000124 +#define AOFF_task_euid 0x00000120 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x00000128 +#define AOFF_task_suid 0x00000124 #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x0000012c +#define AOFF_task_fsuid 0x00000128 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x00000130 +#define AOFF_task_gid 0x0000012c #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x00000134 +#define AOFF_task_egid 0x00000130 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x00000138 +#define AOFF_task_sgid 0x00000134 #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x0000013c +#define AOFF_task_fsgid 0x00000138 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x00000140 +#define AOFF_task_ngroups 0x0000013c #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000144 +#define AOFF_task_groups 0x00000140 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x000001c4 +#define AOFF_task_cap_effective 0x000001c0 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x000001c8 +#define AOFF_task_cap_inheritable 0x000001c4 #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x000001cc +#define AOFF_task_cap_permitted 0x000001c8 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x000001d4 +#define AOFF_task_user 0x000001d0 #define ASIZ_task_user 0x00000004 -#define AOFF_task_rlim 0x000001d8 +#define AOFF_task_rlim 0x000001d4 #define ASIZ_task_rlim 0x00000050 -#define AOFF_task_used_math 0x00000228 +#define AOFF_task_used_math 0x00000224 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000022a +#define AOFF_task_comm 0x00000226 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000023c +#define AOFF_task_link_count 0x00000238 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000240 +#define AOFF_task_tty 0x0000023c #define ASIZ_task_tty 0x00000004 -#define AOFF_task_semundo 0x00000244 +#define AOFF_task_semundo 0x00000240 #define ASIZ_task_semundo 0x00000004 -#define AOFF_task_semsleeping 0x00000248 +#define AOFF_task_semsleeping 0x00000244 #define ASIZ_task_semsleeping 0x00000004 -#define AOFF_task_thread 0x00000250 +#define AOFF_task_thread 0x00000248 #define ASIZ_task_thread 0x00000380 -#define AOFF_task_fs 0x000005d0 +#define AOFF_task_fs 0x000005c8 #define ASIZ_task_fs 0x00000004 -#define AOFF_task_files 0x000005d4 +#define AOFF_task_files 0x000005cc #define ASIZ_task_files 0x00000004 -#define AOFF_task_sigmask_lock 0x000005d8 +#define AOFF_task_sigmask_lock 0x000005d0 #define ASIZ_task_sigmask_lock 0x00000004 -#define AOFF_task_sig 0x000005dc +#define AOFF_task_sig 0x000005d4 #define ASIZ_task_sig 0x00000004 -#define AOFF_task_signal 0x000005e0 +#define AOFF_task_signal 0x000005d8 #define ASIZ_task_signal 0x00000008 -#define AOFF_task_blocked 0x000005e8 +#define AOFF_task_blocked 0x000005e0 #define ASIZ_task_blocked 0x00000008 -#define AOFF_task_sigqueue 0x000005f0 +#define AOFF_task_sigqueue 0x000005e8 #define ASIZ_task_sigqueue 0x00000004 -#define AOFF_task_sigqueue_tail 0x000005f4 +#define AOFF_task_sigqueue_tail 0x000005ec #define ASIZ_task_sigqueue_tail 0x00000004 -#define AOFF_task_sas_ss_sp 0x000005f8 +#define AOFF_task_sas_ss_sp 0x000005f0 #define ASIZ_task_sas_ss_sp 0x00000004 -#define AOFF_task_sas_ss_size 0x000005fc +#define AOFF_task_sas_ss_size 0x000005f4 #define ASIZ_task_sas_ss_size 0x00000004 -#define AOFF_task_parent_exec_id 0x00000600 +#define AOFF_task_parent_exec_id 0x000005f8 #define ASIZ_task_parent_exec_id 0x00000004 -#define AOFF_task_self_exec_id 0x00000604 +#define AOFF_task_self_exec_id 0x000005fc #define ASIZ_task_self_exec_id 0x00000004 -#define AOFF_task_alloc_lock 0x00000608 +#define AOFF_task_alloc_lock 0x00000600 #define ASIZ_task_alloc_lock 0x00000004 #define AOFF_mm_mmap 0x00000000 #define ASIZ_mm_mmap 0x00000004 @@ -382,66 +382,66 @@ #define AOFF_task_it_virt_incr 0x000000d0 #define ASIZ_task_it_virt_incr 0x00000004 #define AOFF_task_real_timer 0x000000d4 -#define ASIZ_task_real_timer 0x00000018 -#define AOFF_task_times 0x000000ec +#define ASIZ_task_real_timer 0x00000014 +#define AOFF_task_times 0x000000e8 #define ASIZ_task_times 0x00000010 -#define AOFF_task_start_time 0x000000fc +#define AOFF_task_start_time 0x000000f8 #define ASIZ_task_start_time 0x00000004 -#define AOFF_task_per_cpu_utime 0x00000100 +#define AOFF_task_per_cpu_utime 0x000000fc #define ASIZ_task_per_cpu_utime 0x00000080 -#define AOFF_task_min_flt 0x00000200 +#define AOFF_task_min_flt 0x000001fc #define ASIZ_task_min_flt 0x00000004 -#define AOFF_task_maj_flt 0x00000204 +#define AOFF_task_maj_flt 0x00000200 #define ASIZ_task_maj_flt 0x00000004 -#define AOFF_task_nswap 0x00000208 +#define AOFF_task_nswap 0x00000204 #define ASIZ_task_nswap 0x00000004 -#define AOFF_task_cmin_flt 0x0000020c +#define AOFF_task_cmin_flt 0x00000208 #define ASIZ_task_cmin_flt 0x00000004 -#define AOFF_task_cmaj_flt 0x00000210 +#define AOFF_task_cmaj_flt 0x0000020c #define ASIZ_task_cmaj_flt 0x00000004 -#define AOFF_task_cnswap 0x00000214 +#define AOFF_task_cnswap 0x00000210 #define ASIZ_task_cnswap 0x00000004 -#define AOFF_task_uid 0x0000021c +#define AOFF_task_uid 0x00000218 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x00000220 +#define AOFF_task_euid 0x0000021c #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x00000224 +#define AOFF_task_suid 0x00000220 #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x00000228 +#define AOFF_task_fsuid 0x00000224 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x0000022c +#define AOFF_task_gid 0x00000228 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x00000230 +#define AOFF_task_egid 0x0000022c #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x00000234 +#define AOFF_task_sgid 0x00000230 #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x00000238 +#define AOFF_task_fsgid 0x00000234 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x0000023c +#define AOFF_task_ngroups 0x00000238 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000240 +#define AOFF_task_groups 0x0000023c #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x000002c0 +#define AOFF_task_cap_effective 0x000002bc #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x000002c4 +#define AOFF_task_cap_inheritable 0x000002c0 #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x000002c8 +#define AOFF_task_cap_permitted 0x000002c4 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x000002d0 +#define AOFF_task_user 0x000002cc #define ASIZ_task_user 0x00000004 -#define AOFF_task_rlim 0x000002d4 +#define AOFF_task_rlim 0x000002d0 #define ASIZ_task_rlim 0x00000050 -#define AOFF_task_used_math 0x00000324 +#define AOFF_task_used_math 0x00000320 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x00000326 +#define AOFF_task_comm 0x00000322 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x00000338 +#define AOFF_task_link_count 0x00000334 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x0000033c +#define AOFF_task_tty 0x00000338 #define ASIZ_task_tty 0x00000004 -#define AOFF_task_semundo 0x00000340 +#define AOFF_task_semundo 0x0000033c #define ASIZ_task_semundo 0x00000004 -#define AOFF_task_semsleeping 0x00000344 +#define AOFF_task_semsleeping 0x00000340 #define ASIZ_task_semsleeping 0x00000004 #define AOFF_task_thread 0x00000348 #define ASIZ_task_thread 0x00000380 diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h index b2c8acfff..eb9710eb1 100644 --- a/include/asm-sparc/bitops.h +++ b/include/asm-sparc/bitops.h @@ -1,4 +1,4 @@ -/* $Id: bitops.h,v 1.56 2000/05/09 17:40:15 davem Exp $ +/* $Id: bitops.h,v 1.57 2000/06/30 10:18:39 davem Exp $ * bitops.h: Bit string operations on the Sparc. * * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) @@ -399,8 +399,9 @@ found_middle: #define ext2_find_next_zero_bit find_next_zero_le_bit /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index ec122d7dc..2a373ed60 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h @@ -1,4 +1,4 @@ -/* $Id: fcntl.h,v 1.12 1999/12/27 06:37:11 anton Exp $ */ +/* $Id: fcntl.h,v 1.13 2000/07/06 01:41:45 davem Exp $ */ #ifndef _SPARC_FCNTL_H #define _SPARC_FCNTL_H diff --git a/include/asm-sparc/hardirq.h b/include/asm-sparc/hardirq.h index c34312aa4..8b7b095ad 100644 --- a/include/asm-sparc/hardirq.h +++ b/include/asm-sparc/hardirq.h @@ -11,23 +11,24 @@ #include <linux/threads.h> #ifndef CONFIG_SMP -extern unsigned int local_irq_count; +extern unsigned int __local_irq_count; +#define local_irq_count(cpu) __local_irq_count /* * Are we in an interrupt context? Either doing bottom half * or hardware interrupt processing? */ -#define in_interrupt() ((local_irq_count + local_bh_count) != 0) +#define in_interrupt() ((__local_irq_count + __local_bh_count) != 0) -#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count == 0) +#define hardirq_trylock(cpu) ((void)(cpu), __local_irq_count == 0) #define hardirq_endlock(cpu) do { (void)(cpu); } while (0) -#define hardirq_enter(cpu) (local_irq_count++) -#define hardirq_exit(cpu) (local_irq_count--) +#define hardirq_enter(cpu) (__local_irq_count++) +#define hardirq_exit(cpu) (__local_irq_count--) #define synchronize_irq() barrier() -#define in_irq() (local_irq_count != 0) +#define in_irq() (__local_irq_count != 0) #else @@ -36,7 +37,8 @@ extern unsigned int local_irq_count; #include <asm/system.h> #include <asm/smp.h> -extern unsigned int local_irq_count[NR_CPUS]; +extern unsigned int __local_irq_count[NR_CPUS]; +#define local_irq_count(cpu) __local_irq_count[cpu] extern unsigned char global_irq_holder; extern spinlock_t global_irq_lock; extern atomic_t global_irq_count; @@ -46,10 +48,10 @@ extern atomic_t global_irq_count; * or hardware interrupt processing? */ #define in_interrupt() ({ int __cpu = smp_processor_id(); \ - (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); }) + (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); }) #define in_irq() ({ int __cpu = smp_processor_id(); \ - (local_irq_count[__cpu] != 0); }) + (local_irq_count(__cpu) != 0); }) static inline void release_irqlock(int cpu) { @@ -62,14 +64,14 @@ static inline void release_irqlock(int cpu) static inline void hardirq_enter(int cpu) { - ++local_irq_count[cpu]; + ++local_irq_count(cpu); atomic_inc(&global_irq_count); } static inline void hardirq_exit(int cpu) { atomic_dec(&global_irq_count); - --local_irq_count[cpu]; + --local_irq_count(cpu); } static inline int hardirq_trylock(int cpu) diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h index 512a8e818..5859d82e9 100644 --- a/include/asm-sparc/irq.h +++ b/include/asm-sparc/irq.h @@ -1,4 +1,4 @@ -/* $Id: irq.h,v 1.29 2000/05/09 17:40:15 davem Exp $ +/* $Id: irq.h,v 1.30 2000/06/30 10:18:39 davem Exp $ * irq.h: IRQ registers on the Sparc. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -23,16 +23,16 @@ BTFIXUPDEF_CALL(char *, __irq_itoa, unsigned int) /* IRQ handler dispatch entry and exit. */ #ifdef CONFIG_SMP -extern unsigned int local_irq_count[NR_CPUS]; +extern unsigned int __local_irq_count[NR_CPUS]; #define irq_enter(cpu, irq) \ do { hardirq_enter(cpu); \ spin_unlock_wait(&global_irq_lock); \ } while(0) #define irq_exit(cpu, irq) hardirq_exit(cpu) #else -extern unsigned int local_irq_count; -#define irq_enter(cpu, irq) (local_irq_count++) -#define irq_exit(cpu, irq) (local_irq_count--) +extern unsigned int __local_irq_count; +#define irq_enter(cpu, irq) (__local_irq_count++) +#define irq_exit(cpu, irq) (__local_irq_count--) #endif /* Dave Redman (djhr@tadpole.co.uk) diff --git a/include/asm-sparc/softirq.h b/include/asm-sparc/softirq.h index ec3e43f59..f35407dc8 100644 --- a/include/asm-sparc/softirq.h +++ b/include/asm-sparc/softirq.h @@ -16,20 +16,23 @@ #ifdef CONFIG_SMP -extern unsigned int local_bh_count[NR_CPUS]; +extern unsigned int __local_bh_count[NR_CPUS]; +#define local_bh_count(cpu) __local_bh_count[cpu] -#define local_bh_disable() (local_bh_count[smp_processor_id()]++) -#define local_bh_enable() (local_bh_count[smp_processor_id()]--) +#define local_bh_disable() (local_bh_count(smp_processor_id())++) +#define local_bh_enable() (local_bh_count(smp_processor_id())--) -#define in_softirq() (local_bh_count[smp_processor_id()] != 0) +#define in_softirq() (local_bh_count(smp_processor_id()) != 0) #else -extern unsigned int local_bh_count; -#define local_bh_disable() (local_bh_count++) -#define local_bh_enable() (local_bh_count--) +extern unsigned int __local_bh_count; +#define local_bh_count(cpu) __local_bh_count -#define in_softirq() (local_bh_count != 0) +#define local_bh_disable() (__local_bh_count++) +#define local_bh_enable() (__local_bh_count--) + +#define in_softirq() (__local_bh_count != 0) #endif /* SMP */ diff --git a/include/asm-sparc64/asm_offsets.h b/include/asm-sparc64/asm_offsets.h index 70e1356fd..832e22fa3 100644 --- a/include/asm-sparc64/asm_offsets.h +++ b/include/asm-sparc64/asm_offsets.h @@ -105,96 +105,96 @@ #define AOFF_task_it_virt_incr 0x00000168 #define ASIZ_task_it_virt_incr 0x00000008 #define AOFF_task_real_timer 0x00000170 -#define ASIZ_task_real_timer 0x00000030 -#define AOFF_task_times 0x000001a0 +#define ASIZ_task_real_timer 0x00000028 +#define AOFF_task_times 0x00000198 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x000001c0 +#define AOFF_task_start_time 0x000001b8 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x000001c8 +#define AOFF_task_per_cpu_utime 0x000001c0 #define ASIZ_task_per_cpu_utime 0x00000008 -#define AOFF_task_min_flt 0x000001d8 +#define AOFF_task_min_flt 0x000001d0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000001e0 +#define AOFF_task_maj_flt 0x000001d8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000001e8 +#define AOFF_task_nswap 0x000001e0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000001f0 +#define AOFF_task_cmin_flt 0x000001e8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000001f8 +#define AOFF_task_cmaj_flt 0x000001f0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x00000200 +#define AOFF_task_cnswap 0x000001f8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x0000020c +#define AOFF_task_uid 0x00000204 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x00000210 +#define AOFF_task_euid 0x00000208 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x00000214 +#define AOFF_task_suid 0x0000020c #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x00000218 +#define AOFF_task_fsuid 0x00000210 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x0000021c +#define AOFF_task_gid 0x00000214 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x00000220 +#define AOFF_task_egid 0x00000218 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x00000224 +#define AOFF_task_sgid 0x0000021c #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x00000228 +#define AOFF_task_fsgid 0x00000220 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x0000022c +#define AOFF_task_ngroups 0x00000224 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000230 +#define AOFF_task_groups 0x00000228 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x000002b0 +#define AOFF_task_cap_effective 0x000002a8 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x000002b4 +#define AOFF_task_cap_inheritable 0x000002ac #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x000002b8 +#define AOFF_task_cap_permitted 0x000002b0 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x000002c0 +#define AOFF_task_user 0x000002b8 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x000002c8 +#define AOFF_task_rlim 0x000002c0 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000368 +#define AOFF_task_used_math 0x00000360 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000036a +#define AOFF_task_comm 0x00000362 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000037c +#define AOFF_task_link_count 0x00000374 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000380 +#define AOFF_task_tty 0x00000378 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000388 +#define AOFF_task_semundo 0x00000380 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000390 +#define AOFF_task_semsleeping 0x00000388 #define ASIZ_task_semsleeping 0x00000008 -#define AOFF_task_thread 0x000003a0 +#define AOFF_task_thread 0x00000390 #define ASIZ_task_thread 0x00000450 -#define AOFF_task_fs 0x000007f0 +#define AOFF_task_fs 0x000007e0 #define ASIZ_task_fs 0x00000008 -#define AOFF_task_files 0x000007f8 +#define AOFF_task_files 0x000007e8 #define ASIZ_task_files 0x00000008 -#define AOFF_task_sigmask_lock 0x00000800 +#define AOFF_task_sigmask_lock 0x000007f0 #define ASIZ_task_sigmask_lock 0x00000004 -#define AOFF_task_sig 0x00000808 +#define AOFF_task_sig 0x000007f8 #define ASIZ_task_sig 0x00000008 -#define AOFF_task_signal 0x00000810 +#define AOFF_task_signal 0x00000800 #define ASIZ_task_signal 0x00000008 -#define AOFF_task_blocked 0x00000818 +#define AOFF_task_blocked 0x00000808 #define ASIZ_task_blocked 0x00000008 -#define AOFF_task_sigqueue 0x00000820 +#define AOFF_task_sigqueue 0x00000810 #define ASIZ_task_sigqueue 0x00000008 -#define AOFF_task_sigqueue_tail 0x00000828 +#define AOFF_task_sigqueue_tail 0x00000818 #define ASIZ_task_sigqueue_tail 0x00000008 -#define AOFF_task_sas_ss_sp 0x00000830 +#define AOFF_task_sas_ss_sp 0x00000820 #define ASIZ_task_sas_ss_sp 0x00000008 -#define AOFF_task_sas_ss_size 0x00000838 +#define AOFF_task_sas_ss_size 0x00000828 #define ASIZ_task_sas_ss_size 0x00000008 -#define AOFF_task_parent_exec_id 0x00000840 +#define AOFF_task_parent_exec_id 0x00000830 #define ASIZ_task_parent_exec_id 0x00000004 -#define AOFF_task_self_exec_id 0x00000844 +#define AOFF_task_self_exec_id 0x00000834 #define ASIZ_task_self_exec_id 0x00000004 -#define AOFF_task_alloc_lock 0x00000848 +#define AOFF_task_alloc_lock 0x00000838 #define ASIZ_task_alloc_lock 0x00000004 -#define ASIZ_task 0x00000850 +#define ASIZ_task 0x00000840 #define AOFF_mm_mmap 0x00000000 #define ASIZ_mm_mmap 0x00000008 #define AOFF_mm_mmap_avl 0x00000008 @@ -401,96 +401,96 @@ #define AOFF_task_it_virt_incr 0x00000168 #define ASIZ_task_it_virt_incr 0x00000008 #define AOFF_task_real_timer 0x00000170 -#define ASIZ_task_real_timer 0x00000030 -#define AOFF_task_times 0x000001a0 +#define ASIZ_task_real_timer 0x00000028 +#define AOFF_task_times 0x00000198 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x000001c0 +#define AOFF_task_start_time 0x000001b8 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x000001c8 +#define AOFF_task_per_cpu_utime 0x000001c0 #define ASIZ_task_per_cpu_utime 0x00000100 -#define AOFF_task_min_flt 0x000003c8 +#define AOFF_task_min_flt 0x000003c0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000003d0 +#define AOFF_task_maj_flt 0x000003c8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000003d8 +#define AOFF_task_nswap 0x000003d0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000003e0 +#define AOFF_task_cmin_flt 0x000003d8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000003e8 +#define AOFF_task_cmaj_flt 0x000003e0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000003f0 +#define AOFF_task_cnswap 0x000003e8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x000003fc +#define AOFF_task_uid 0x000003f4 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x00000400 +#define AOFF_task_euid 0x000003f8 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x00000404 +#define AOFF_task_suid 0x000003fc #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x00000408 +#define AOFF_task_fsuid 0x00000400 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x0000040c +#define AOFF_task_gid 0x00000404 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x00000410 +#define AOFF_task_egid 0x00000408 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x00000414 +#define AOFF_task_sgid 0x0000040c #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x00000418 +#define AOFF_task_fsgid 0x00000410 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x0000041c +#define AOFF_task_ngroups 0x00000414 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000420 +#define AOFF_task_groups 0x00000418 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x000004a0 +#define AOFF_task_cap_effective 0x00000498 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x000004a4 +#define AOFF_task_cap_inheritable 0x0000049c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x000004a8 +#define AOFF_task_cap_permitted 0x000004a0 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x000004b0 +#define AOFF_task_user 0x000004a8 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x000004b8 +#define AOFF_task_rlim 0x000004b0 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000558 +#define AOFF_task_used_math 0x00000550 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000055a +#define AOFF_task_comm 0x00000552 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000056c +#define AOFF_task_link_count 0x00000564 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000570 +#define AOFF_task_tty 0x00000568 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000578 +#define AOFF_task_semundo 0x00000570 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000580 +#define AOFF_task_semsleeping 0x00000578 #define ASIZ_task_semsleeping 0x00000008 -#define AOFF_task_thread 0x00000590 +#define AOFF_task_thread 0x00000580 #define ASIZ_task_thread 0x00000450 -#define AOFF_task_fs 0x000009e0 +#define AOFF_task_fs 0x000009d0 #define ASIZ_task_fs 0x00000008 -#define AOFF_task_files 0x000009e8 +#define AOFF_task_files 0x000009d8 #define ASIZ_task_files 0x00000008 -#define AOFF_task_sigmask_lock 0x000009f0 +#define AOFF_task_sigmask_lock 0x000009e0 #define ASIZ_task_sigmask_lock 0x00000001 -#define AOFF_task_sig 0x000009f8 +#define AOFF_task_sig 0x000009e8 #define ASIZ_task_sig 0x00000008 -#define AOFF_task_signal 0x00000a00 +#define AOFF_task_signal 0x000009f0 #define ASIZ_task_signal 0x00000008 -#define AOFF_task_blocked 0x00000a08 +#define AOFF_task_blocked 0x000009f8 #define ASIZ_task_blocked 0x00000008 -#define AOFF_task_sigqueue 0x00000a10 +#define AOFF_task_sigqueue 0x00000a00 #define ASIZ_task_sigqueue 0x00000008 -#define AOFF_task_sigqueue_tail 0x00000a18 +#define AOFF_task_sigqueue_tail 0x00000a08 #define ASIZ_task_sigqueue_tail 0x00000008 -#define AOFF_task_sas_ss_sp 0x00000a20 +#define AOFF_task_sas_ss_sp 0x00000a10 #define ASIZ_task_sas_ss_sp 0x00000008 -#define AOFF_task_sas_ss_size 0x00000a28 +#define AOFF_task_sas_ss_size 0x00000a18 #define ASIZ_task_sas_ss_size 0x00000008 -#define AOFF_task_parent_exec_id 0x00000a30 +#define AOFF_task_parent_exec_id 0x00000a20 #define ASIZ_task_parent_exec_id 0x00000004 -#define AOFF_task_self_exec_id 0x00000a34 +#define AOFF_task_self_exec_id 0x00000a24 #define ASIZ_task_self_exec_id 0x00000004 -#define AOFF_task_alloc_lock 0x00000a38 +#define AOFF_task_alloc_lock 0x00000a28 #define ASIZ_task_alloc_lock 0x00000001 -#define ASIZ_task 0x00000a40 +#define ASIZ_task 0x00000a30 #define AOFF_mm_mmap 0x00000000 #define ASIZ_mm_mmap 0x00000008 #define AOFF_mm_mmap_avl 0x00000008 @@ -695,66 +695,66 @@ #define AOFF_task_it_virt_incr 0x00000170 #define ASIZ_task_it_virt_incr 0x00000008 #define AOFF_task_real_timer 0x00000178 -#define ASIZ_task_real_timer 0x00000030 -#define AOFF_task_times 0x000001a8 +#define ASIZ_task_real_timer 0x00000028 +#define AOFF_task_times 0x000001a0 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x000001c8 +#define AOFF_task_start_time 0x000001c0 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x000001d0 +#define AOFF_task_per_cpu_utime 0x000001c8 #define ASIZ_task_per_cpu_utime 0x00000100 -#define AOFF_task_min_flt 0x000003d0 +#define AOFF_task_min_flt 0x000003c8 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000003d8 +#define AOFF_task_maj_flt 0x000003d0 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000003e0 +#define AOFF_task_nswap 0x000003d8 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000003e8 +#define AOFF_task_cmin_flt 0x000003e0 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000003f0 +#define AOFF_task_cmaj_flt 0x000003e8 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000003f8 +#define AOFF_task_cnswap 0x000003f0 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x00000404 +#define AOFF_task_uid 0x000003fc #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x00000408 +#define AOFF_task_euid 0x00000400 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x0000040c +#define AOFF_task_suid 0x00000404 #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x00000410 +#define AOFF_task_fsuid 0x00000408 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x00000414 +#define AOFF_task_gid 0x0000040c #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x00000418 +#define AOFF_task_egid 0x00000410 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x0000041c +#define AOFF_task_sgid 0x00000414 #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x00000420 +#define AOFF_task_fsgid 0x00000418 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x00000424 +#define AOFF_task_ngroups 0x0000041c #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000428 +#define AOFF_task_groups 0x00000420 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x000004a8 +#define AOFF_task_cap_effective 0x000004a0 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x000004ac +#define AOFF_task_cap_inheritable 0x000004a4 #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x000004b0 +#define AOFF_task_cap_permitted 0x000004a8 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x000004b8 +#define AOFF_task_user 0x000004b0 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x000004c0 +#define AOFF_task_rlim 0x000004b8 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000560 +#define AOFF_task_used_math 0x00000558 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x00000562 +#define AOFF_task_comm 0x0000055a #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x00000574 +#define AOFF_task_link_count 0x0000056c #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000578 +#define AOFF_task_tty 0x00000570 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000580 +#define AOFF_task_semundo 0x00000578 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000588 +#define AOFF_task_semsleeping 0x00000580 #define ASIZ_task_semsleeping 0x00000008 #define AOFF_task_thread 0x00000590 #define ASIZ_task_thread 0x00000450 diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h index 512d16410..0f42cad91 100644 --- a/include/asm-sparc64/bitops.h +++ b/include/asm-sparc64/bitops.h @@ -1,4 +1,4 @@ -/* $Id: bitops.h,v 1.28 2000/03/27 10:38:56 davem Exp $ +/* $Id: bitops.h,v 1.29 2000/06/30 10:18:39 davem Exp $ * bitops.h: Bit string operations on the V9. * * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) @@ -9,9 +9,9 @@ #include <asm/byteorder.h> -extern long __test_and_set_bit(unsigned long nr, void *addr); -extern long __test_and_clear_bit(unsigned long nr, void *addr); -extern long __test_and_change_bit(unsigned long nr, void *addr); +extern long __test_and_set_bit(unsigned long nr, volatile void *addr); +extern long __test_and_clear_bit(unsigned long nr, volatile void *addr); +extern long __test_and_change_bit(unsigned long nr, volatile void *addr); #define test_and_set_bit(nr,addr) (__test_and_set_bit(nr,addr)!=0) #define test_and_clear_bit(nr,addr) (__test_and_clear_bit(nr,addr)!=0) @@ -165,8 +165,8 @@ found_middle: #define find_first_zero_bit(addr, size) \ find_next_zero_bit((addr), (size), 0) -extern long __test_and_set_le_bit(int nr, void *addr); -extern long __test_and_clear_le_bit(int nr, void *addr); +extern long __test_and_set_le_bit(int nr, volatile void *addr); +extern long __test_and_clear_le_bit(int nr, volatile void *addr); #define test_and_set_le_bit(nr,addr) (__test_and_set_le_bit(nr,addr)!=0) #define test_and_clear_le_bit(nr,addr) (__test_and_clear_le_bit(nr,addr)!=0) @@ -230,8 +230,9 @@ found_middle: #define ext2_find_next_zero_bit find_next_zero_le_bit /* Bitmap functions for the minix filesystem. */ -#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) -#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr) #define minix_test_bit(nr,addr) test_bit(nr,addr) #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h index cd8cc2124..8c7935dec 100644 --- a/include/asm-sparc64/fcntl.h +++ b/include/asm-sparc64/fcntl.h @@ -1,4 +1,4 @@ -/* $Id: fcntl.h,v 1.7 2000/01/04 23:54:58 davem Exp $ */ +/* $Id: fcntl.h,v 1.8 2000/07/06 01:41:45 davem Exp $ */ #ifndef _SPARC64_FCNTL_H #define _SPARC64_FCNTL_H diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h index 92b419aff..090239035 100644 --- a/include/asm-sparc64/hardirq.h +++ b/include/asm-sparc64/hardirq.h @@ -12,11 +12,12 @@ #include <linux/spinlock.h> #ifndef CONFIG_SMP -extern unsigned int local_irq_count; -#define irq_enter(cpu, irq) (local_irq_count++) -#define irq_exit(cpu, irq) (local_irq_count--) +extern unsigned int __local_irq_count; +#define local_irq_count(cpu) __local_irq_count +#define irq_enter(cpu, irq) (__local_irq_count++) +#define irq_exit(cpu, irq) (__local_irq_count--) #else -#define local_irq_count (__brlock_array[smp_processor_id()][BR_GLOBALIRQ_LOCK]) +#define local_irq_count(cpu) (__brlock_array[cpu][BR_GLOBALIRQ_LOCK]) #define irq_enter(cpu, irq) br_read_lock(BR_GLOBALIRQ_LOCK) #define irq_exit(cpu, irq) br_read_unlock(BR_GLOBALIRQ_LOCK) #endif @@ -25,18 +26,19 @@ extern unsigned int local_irq_count; * Are we in an interrupt context? Either doing bottom half * or hardware interrupt processing? On any cpu? */ -#define in_interrupt() ((local_irq_count + local_bh_count) != 0) +#define in_interrupt() ((local_irq_count(smp_processor_id()) + \ + local_bh_count(smp_processor_id())) != 0) /* This tests only the local processors hw IRQ context disposition. */ -#define in_irq() (local_irq_count != 0) +#define in_irq() (local_irq_count(smp_processor_id()) != 0) #ifndef CONFIG_SMP -#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count == 0) +#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count(smp_processor_id()) == 0) #define hardirq_endlock(cpu) do { (void)(cpu); } while(0) -#define hardirq_enter(cpu) ((void)(cpu), local_irq_count++) -#define hardirq_exit(cpu) ((void)(cpu), local_irq_count--) +#define hardirq_enter(cpu) ((void)(cpu), local_irq_count(smp_processor_id())++) +#define hardirq_exit(cpu) ((void)(cpu), local_irq_count(smp_processor_id())--) #define synchronize_irq() barrier() diff --git a/include/asm-sparc64/softirq.h b/include/asm-sparc64/softirq.h index 9a4f442ff..b224a279a 100644 --- a/include/asm-sparc64/softirq.h +++ b/include/asm-sparc64/softirq.h @@ -12,14 +12,15 @@ #include <asm/system.h> /* for membar() */ #ifndef CONFIG_SMP -extern unsigned int local_bh_count; +extern unsigned int __local_bh_count; +#define local_bh_count(cpu) __local_bh_count #else -#define local_bh_count (cpu_data[smp_processor_id()].bh_count) +#define local_bh_count(cpu) (cpu_data[cpu].bh_count) #endif -#define local_bh_disable() (local_bh_count++) -#define local_bh_enable() (local_bh_count--) +#define local_bh_disable() (local_bh_count(smp_processor_id())++) +#define local_bh_enable() (local_bh_count(smp_processor_id())--) -#define in_softirq() (local_bh_count != 0) +#define in_softirq() (local_bh_count(smp_processor_id()) != 0) #endif /* !(__SPARC64_SOFTIRQ_H) */ diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 262d5ea37..5610b7fe2 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -177,7 +177,7 @@ extern int * max_sectors[MAX_BLKDEV]; extern int * max_segments[MAX_BLKDEV]; -#define MAX_SECTORS 128 +#define MAX_SECTORS 254 #define MAX_SEGMENTS MAX_SECTORS diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p index 677bee22e..93ad4d11d 100644 --- a/include/linux/umsdos_fs.p +++ b/include/linux/umsdos_fs.p @@ -17,26 +17,10 @@ struct dentry *umsdos_covered(struct dentry *, char *, int); struct dentry *umsdos_solve_hlink (struct dentry *hlink); /* emd.c 22/06/95 00.22.04 */ -ssize_t umsdos_file_write_kmem_real (struct file *filp, - const char *buf, - size_t count); - -ssize_t umsdos_file_read_kmem (struct file *filp, - char *buf, - size_t count); -ssize_t umsdos_file_write_kmem (struct file *filp, - const char *buf, - size_t count); -ssize_t umsdos_emd_dir_write (struct file *filp, - char *buf, - size_t count); -ssize_t umsdos_emd_dir_read (struct file *filp, - char *buf, - size_t count); struct dentry *umsdos_get_emd_dentry(struct dentry *); int umsdos_have_emd(struct dentry *); int umsdos_make_emd(struct dentry *); -int umsdos_emd_dir_readentry (struct file *, struct umsdos_dirent *); +int umsdos_emd_dir_readentry (struct dentry *, loff_t *, struct umsdos_dirent *); int umsdos_newentry (struct dentry *, struct umsdos_info *); int umsdos_newhidden (struct dentry *, struct umsdos_info *); int umsdos_delentry (struct dentry *, struct umsdos_info *, int); diff --git a/include/linux/umsdos_fs_i.h b/include/linux/umsdos_fs_i.h index e123efb10..0edfb1d54 100644 --- a/include/linux/umsdos_fs_i.h +++ b/include/linux/umsdos_fs_i.h @@ -21,13 +21,9 @@ * So we duplicate the msdos_inode_info, and add our own info at the * end. * - * For all file type (and directory) the inode has a reference to: - * the directory which hold this entry: i_dir_owner - * The EMD file of i_dir_owner: i_emd_owner * The offset in this EMD file of the entry: pos * - * For directory, we also have a reference to the inode of its - * own EMD file. Also, we have dir_locking_info to help synchronise + * For directory, we have dir_locking_info to help synchronise * file creation and file lookup. See also msdos_fs_i.h for more * information about msdos_inode_info. * @@ -56,11 +52,7 @@ struct umsdos_inode_info { struct dir_locking_info dir_info; int i_patched; /* Inode has been patched */ int i_is_hlink; /* Resolved hardlink inode? */ - unsigned long i_emd_owner; /* Is this the EMD file inode? */ off_t pos; /* Entry offset in the emd_owner file */ - /* The rest is used only if this inode describes a directory */ - struct dentry *i_emd_dentry; /* EMD dentry for this directory */ - unsigned long i_emd_dir; /* Inode of the EMD file */ }; #endif diff --git a/include/net/slhc_vj.h b/include/net/slhc_vj.h index 04387d8a8..0a85dc014 100644 --- a/include/net/slhc_vj.h +++ b/include/net/slhc_vj.h @@ -80,6 +80,10 @@ * means "IP packet". */ + +#include <linux/ip.h> +#include <linux/tcp.h> + /* SLIP compression masks for len/vers byte */ #define SL_TYPE_IP 0x40 #define SL_TYPE_UNCOMPRESSED_TCP 0x70 diff --git a/net/802/tr.c b/net/802/tr.c index 316cc6a22..cb6604698 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -457,7 +457,7 @@ static void rif_check_expire(unsigned long dummy) */ #ifndef CONFIG_PROC_FS -static int rif_get_info(char *buffer,char **start, off_t offset, int length) {} +static int rif_get_info(char *buffer,char **start, off_t offset, int length) { return 0;} #else static int rif_get_info(char *buffer,char **start, off_t offset, int length) { diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index bc9e2cb48..76bc28648 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -1172,8 +1172,8 @@ static int decnet_dev_get_info(char *buffer, char **start, off_t offset, int len dn_db->parms.blksize, dn_db->parms.priority, dn_db->parms.state, dn_db->parms.name, - dn_db->router ? dn_addr2asc(dn_eth2dn(dn_db->router->primary_key), router_buf) : "", - dn_db->peer ? dn_addr2asc(dn_eth2dn(dn_db->peer->primary_key), peer_buf) : ""); + dn_db->router ? dn_addr2asc(dn_ntohs(*(dn_address *)dn_db->router->primary_key), router_buf) : "", + dn_db->peer ? dn_addr2asc(dn_ntohs(*(dn_address *)dn_db->peer->primary_key), peer_buf) : ""); pos = begin + len; diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index de4722707..4ed38175b 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -5,7 +5,7 @@ * * Implementation of the Transmission Control Protocol(TCP). * - * Version: $Id: tcp_timer.c,v 1.76 2000/05/03 06:37:07 davem Exp $ + * Version: $Id: tcp_timer.c,v 1.77 2000/06/30 10:18:38 davem Exp $ * * Authors: Ross Biro, <bir7@leland.Stanford.Edu> * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index f0165c28b..a04b85cfa 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -8,7 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * - * Version: $Id: af_unix.c,v 1.100 2000/06/26 23:20:27 davem Exp $ + * Version: $Id: af_unix.c,v 1.101 2000/07/06 01:41:46 davem Exp $ * * Fixes: * Linus Torvalds : Assorted bug cures. |