]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.4.0-test10pre3 2.4.0-test10pre3
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:39:27 +0000 (15:39 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:39:27 +0000 (15:39 -0500)
    - update email address of Joerg Reuter
    - Andries Brouwer: spelling fixes, missing atari brelse(), breada() fix
    - Geert Uytterhoeven: used named initializers for "struct console".
    - Carsten Paeth: ISDN capifs - iput() only once.
    - Petr Vandrovec: VFAT short name generation fix
    - Jeff Garzik: i810_rng cleanup, and i815 chipset added.
    - Bartlomiej Zolnierkiewicz: clean up some remaining old-style Makefiles
    - Dave Jones: x86 setup fixes (recognize Pentium IV etc).
    - x86: do the "fast A20" setup too in setup.S
    - NIIBE Yutaka: update SuperH for the global page table (vmalloc) change.
    - David Miller: sparc updates (vmalloc stuff still pending)
    - David Miller: CodaFS warnings and 64-bit warnings in pci_size()
    - David Miller: pcnet32 - correct NULL test
    - David Miller: vmlist lock -> page_table_lock clarification
    - Trond Myklebust: Ouch. rpcauth_lookup_credcache() memory corruption bug
    - Matthew Wilcox: file locking cleanups
    - David Woodhouse: USB audio spinlock fixes
    - Torben Mathiasen: tlan driver cleanups
    - Randy Dunlap: Yenta: CACHE_LINE_SIZE is in dwords, not bytes.
    - Randy Dunlap: more USB updates
    - Kanoj Sarcar: clean up the NUMA interfaces (pg_data instead of nodes)
    - "save_fpu()" was broken. Need to clear pending errors: save_init_fpu().

129 files changed:
CREDITS
Documentation/networking/z8530drv.txt
Documentation/s390/cds.txt
Documentation/vm/locking
MAINTAINERS
arch/alpha/kernel/setup.c
arch/arm/kernel/semaphore.c
arch/i386/boot/setup.S
arch/i386/kernel/i387.c
arch/i386/kernel/semaphore.c
arch/i386/kernel/setup.c
arch/ia64/hp/hpsim_console.c
arch/ia64/kernel/efi.c
arch/ia64/kernel/mca_asm.S
arch/ia64/kernel/palinfo.c
arch/ia64/kernel/semaphore.c
arch/ia64/kernel/smpboot.c
arch/m68k/amiga/config.c
arch/m68k/atari/debug.c
arch/m68k/kernel/semaphore.c
arch/m68k/mac/debug.c
arch/m68k/q40/config.c
arch/mips/baget/vacserial.c
arch/mips/dec/promcon.c
arch/mips/orion/promcon.c
arch/mips/sgi/kernel/promcon.c
arch/ppc/8260_io/uart.c
arch/ppc/8xx_io/uart.c
arch/ppc/amiga/config.c
arch/s390/kernel/semaphore.c
arch/sh/kernel/entry.S
arch/sh/kernel/semaphore.c
arch/sh/kernel/setup.c
arch/sh/mm/fault.c
arch/sh/mm/ioremap.c
arch/sparc/kernel/ioport.c
arch/sparc/kernel/semaphore.c
arch/sparc/kernel/setup.c
arch/sparc64/kernel/semaphore.c
arch/sparc64/kernel/setup.c
drivers/block/ll_rw_blk.c
drivers/block/paride/Makefile
drivers/char/console.c
drivers/char/dz.c
drivers/char/i810_rng.c
drivers/char/lp.c
drivers/char/serial.c
drivers/char/serial167.c
drivers/char/serial_21285.c
drivers/char/serial_amba.c
drivers/char/sh-sci.c
drivers/char/vme_scc.c
drivers/isdn/avmb1/capifs.c
drivers/isdn/hysdn/boardergo.c
drivers/isdn/sc/init.c
drivers/macintosh/macserial.c
drivers/net/hamradio/Makefile
drivers/net/hamradio/bpqether.c
drivers/net/hamradio/scc.c
drivers/net/pcnet32.c
drivers/net/skfp/skfddi.c
drivers/net/tlan.c
drivers/net/wavelan.c
drivers/parport/Makefile
drivers/pci/pci.c
drivers/pcmcia/yenta.c
drivers/s390/char/con3215.c
drivers/s390/char/hwc_con.c
drivers/sbus/audio/Makefile
drivers/sbus/audio/dbri.h
drivers/sbus/char/Makefile
drivers/sbus/char/sab82532.c
drivers/sbus/char/su.c
drivers/sbus/char/zs.c
drivers/scsi/aha152x.c
drivers/scsi/aic7xxx.c
drivers/scsi/imm.c
drivers/scsi/scsi.c
drivers/sgi/char/sgiserial.c
drivers/tc/zs.c
drivers/usb/audio.c
drivers/usb/mdc800.c
drivers/usb/pegasus.c
drivers/usb/plusb.c
drivers/usb/usbmouse.c
drivers/usb/wacom.c
fs/buffer.c
fs/coda/inode.c
fs/exec.c
fs/hpfs/buffer.c
fs/lockd/svclock.c
fs/locks.c
fs/partitions/atari.c
fs/pipe.c
fs/vfat/namei.c
include/asm-i386/i387.h
include/asm-i386/processor.h
include/asm-ia64/acpikcfg.h
include/asm-ia64/hw_irq.h
include/asm-ia64/pci.h
include/asm-ia64/pgtable.h
include/asm-sh/pgalloc-2level.h
include/asm-sh/pgalloc.h
include/asm-sparc/pgalloc.h
include/asm-sparc64/pgalloc.h
include/linux/coda_linux.h
include/linux/fs.h
include/linux/mm.h
include/linux/mmzone.h
include/linux/sunrpc/auth.h
ipc/sem.c
kernel/signal.c
kernel/user.c
mm/filemap.c
mm/mlock.c
mm/mmap.c
mm/mprotect.c
mm/mremap.c
mm/numa.c
mm/page_alloc.c
mm/swapfile.c
mm/vmscan.c
net/ax25/Config.in
net/ax25/af_ax25.c
net/ax25/ax25_ds_in.c
net/core/dv.c
net/socket.c
net/sunrpc/auth.c
net/sunrpc/auth_null.c

diff --git a/CREDITS b/CREDITS
index a9f3e219d5640c8d16ae0f8724ae465428cc6a6d..1e3563dc2a54760d268d1980c0f5b0dd53d29ca4 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1703,7 +1703,7 @@ D: cfdisk (curses based disk partitioning program)
 
 N: Torben Mathiasen
 E: torben.mathiasen@compaq.com
-E: tmm@image.dk
+E: torben@kernel.dk
 W: http://tlan.kernel.dk
 D: ThunderLAN maintainer
 D: ThunderLAN updates and other kernel fixes.
@@ -2173,9 +2173,9 @@ S: 79098 Freiburg
 S: Germany
 
 N: Joerg Reuter
-E: jreuter@poboxes.com
-W: http://poboxes.com/jreuter/
-W: http://qsl.net/dl1bke/
+E: jreuter@yaina.de
+W: http://yaina.de/jreuter/
+W: http://www.qsl.net/dl1bke/
 D: Generic Z8530 driver, AX.25 DAMA slave implementation
 D: Several AX.25 hacks
 
index c74fb4253e6bb50a435b245b5a9240c5bfa954c4..60f453d18f89d4a8dc6349465ee9ac7b0f82d7d3 100644 (file)
@@ -4,17 +4,14 @@ full package from:
 Internet:
 =========
 
-1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils-3.0-1.tar.gz
+1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz
 
-2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils-3.0-1.tar.gz
-
-3. ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming/z8530drv-utils-3.0.tar.gz
-   If you can't find it there, try .../tcpip/linux/z8530drv-utils-3.0.tar.gz
+2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz
 
 Please note that the information in this document may be hopelessly outdated.
 A new version of the documentation, along with links to other important
 Linux Kernel AX.25 documentation and programs, is available on
-http://www.rat.de/jr
+http://yaina.de/jreuter
 
 -----------------------------------------------------------------------------
 
@@ -23,7 +20,7 @@ http://www.rat.de/jr
 
    ********************************************************************
 
-        (c) 1993,1998 by Joerg Reuter DL1BKE <jreuter@poboxes.com>
+        (c) 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de>
 
         portions (c) 1993 Guido ten Dolle PE1NNZ
 
@@ -655,6 +652,6 @@ Many thanks to Linus Torvalds and Alan Cox for including the driver
 in the Linux standard distribution and their support.
 
 Joerg Reuter   ampr-net: dl1bke@db0pra.ampr.org
-               AX-25   : DL1BKE @ DB0ACH.#NRW.DEU.EU
-               Internet: jreuter@poboxes.com
-               WWW     : http://www.rat.de/jr/
+               AX-25   : DL1BKE @ DB0ABH.#BAY.DEU.EU
+               Internet: jreuter@yaina.de
+               WWW     : http://yaina.de/jreuter
index 99d514d4c3bbec5b316b6a78f7ab97c812b2dda5..1de55871840f54156b17242d85453a3c262674df 100644 (file)
@@ -419,7 +419,7 @@ therefore not rely on this parameter on function entry.
 free_irq() - Release Device Ownership
 
 A device driver may call free_irq() to release ownership of a previously
-aquired device.
+acquired device.
 
 void free_irq( unsigned int  irq,
                void         *dev_id);
index 125cde7cdf693de75910931821dbdb37d7ad3286..f2e8e6c75e3e921187ab9118c3b59f70aa29df65 100644 (file)
@@ -4,7 +4,7 @@ The intent of this file is to have an uptodate, running commentary
 from different people about how locking and synchronization is done 
 in the Linux vm code.
 
-vmlist_access_lock/vmlist_modify_lock
+page_table_lock
 --------------------------------------
 
 Page stealers pick processes out of the process pool and scan for 
@@ -12,10 +12,10 @@ the best process to steal pages from. To guarantee the existence
 of the victim mm, a mm_count inc and a mmdrop are done in swap_out().
 Page stealers hold kernel_lock to protect against a bunch of races.
 The vma list of the victim mm is also scanned by the stealer, 
-and the vmlist_lock is used to preserve list sanity against the
+and the page_table_lock is used to preserve list sanity against the
 process adding/deleting to the list. This also guarantees existence
 of the vma. Vma existence is not guaranteed once try_to_swap_out() 
-drops the vmlist lock. To guarantee the existence of the underlying 
+drops the page_table_lock. To guarantee the existence of the underlying 
 file structure, a get_file is done before the swapout() method is 
 invoked. The page passed into swapout() is guaranteed not to be reused
 for a different purpose because the page reference count due to being
@@ -32,19 +32,19 @@ you must hold mmap_sem to guard against clones doing mmap/munmap/faults,
 (ie all vm system calls and faults), and from ptrace, swapin due to 
 swap deletion etc.
 2. To modify the vmlist (add/delete or change fields in an element), 
-you must also hold vmlist_modify_lock, to guard against page stealers 
+you must also hold page_table_lock, to guard against page stealers 
 scanning the list.
 3. To scan the vmlist (find_vma()), you must either 
         a. grab mmap_sem, which should be done by all cases except 
           page stealer.
 or
-        b. grab vmlist_access_lock, only done by page stealer.
-4. While holding the vmlist_modify_lock, you must be able to guarantee
+        b. grab page_table_lock, only done by page stealer.
+4. While holding the page_table_lock, you must be able to guarantee
 that no code path will lead to page stealing. A better guarantee is
 to claim non sleepability, which ensures that you are not sleeping
 for a lock, whose holder might in turn be doing page stealing.
-5. You must be able to guarantee that while holding vmlist_modify_lock
-or vmlist_access_lock of mm A, you will not try to get either lock
+5. You must be able to guarantee that while holding page_table_lock
+or page_table_lock of mm A, you will not try to get either lock
 for mm B.
 
 The caveats are:
@@ -52,7 +52,7 @@ The caveats are:
 The update of mmap_cache is racy (page stealer can race with other code
 that invokes find_vma with mmap_sem held), but that is okay, since it 
 is a hint. This can be fixed, if desired, by having find_vma grab the
-vmlist lock.
+page_table_lock.
 
 
 Code that add/delete elements from the vmlist chain are
@@ -72,23 +72,16 @@ in some cases it is not really needed. Eg, vm_start is modified by
 expand_stack(), it is hard to come up with a destructive scenario without 
 having the vmlist protection in this case.
 
-The vmlist lock nests with the inode i_shared_lock and the kmem cache
+The page_table_lock nests with the inode i_shared_lock and the kmem cache
 c_spinlock spinlocks. This is okay, since code that holds i_shared_lock 
 never asks for memory, and the kmem code asks for pages after dropping
-c_spinlock. The vmlist lock also nests with pagecache_lock and 
+c_spinlock. The page_table_lock also nests with pagecache_lock and 
 pagemap_lru_lock spinlocks, and no code asks for memory with these locks
 held.
 
-The vmlist lock is grabbed while holding the kernel_lock spinning monitor.
+The page_table_lock is grabbed while holding the kernel_lock spinning monitor.
 
-The vmlist lock can be a sleeping or spin lock. In either case, care
-must be taken that it is not held on entry to the driver methods, since
-those methods might sleep or ask for memory, causing deadlocks.
-
-The current implementation of the vmlist lock uses the page_table_lock,
-which is also the spinlock that page stealers use to protect changes to
-the victim process' ptes. Thus we have a reduction in the total number
-of locks. 
+The page_table_lock is a spin lock.
 
 swap_list_lock/swap_device_lock
 -------------------------------
index 3be1a37d0c1e4ad817d781c9d06f936e2f187d6d..0e61213e5ca405aafb978df1a6b73bd4be0b4149 100644 (file)
@@ -295,9 +295,9 @@ S:  Supported
 
 DAMA SLAVE for AX.25
 P:     Joerg Reuter
-M:     jreuter@poboxes.com
-W:     http://poboxes.com/jreuter/
-W:     http://qsl.net/dl1bke/
+M:     jreuter@yaina.de
+W:     http://yaina.de/jreuter/
+W:     http://www.qsl.net/dl1bke/
 L:     linux-hams@vger.kernel.org
 S:     Maintained
 
@@ -423,8 +423,8 @@ S:  Maintained
 
 FILE LOCKING (flock() and fcntl()/lockf())
 P:     Matthew Wilcox
-M:     willy@thepuffingroup.com
-L:     linux-kernel@vger.kernel.org
+M:     matthew@wil.cx
+L:     linux-fsdevel@vger.kernel.org
 S:     Maintained
 
 FPU EMULATOR
@@ -1151,7 +1151,7 @@ S:        Maintained
 TLAN NETWORK DRIVER
 P:     Torben Mathiasen
 M:     torben.mathiasen@compaq.com
-M:     tmm@image.dk
+M:     torben@kernel.dk
 L:     tlan@vuser.vu.union.edu
 L:     linux-net@vger.kernel.org
 W:     http://tlan.kernel.dk
@@ -1386,9 +1386,9 @@ S:        Maintained for 2.2 only
 
 Z8530 DRIVER FOR AX.25
 P:     Joerg Reuter
-M:     jreuter@poboxes.com
-W:     http://poboxes.com/jreuter/
-W:     http://qsl.net/dl1bke/
+M:     jreuter@yaina.de
+W:     http://yaina.de/jreuter/
+W:     http://www.qsl.net/dl1bke/
 L:     linux-hams@vger.kernel.org
 S:     Maintained
 
index 4aded0d6aecdf484a7789f4f97cfa395b4b78a69..ed7d896c47f784ab9306f394ad6c06f640881d89 100644 (file)
@@ -449,17 +449,13 @@ static int __init srm_console_setup(struct console *co, char *options)
 }
 
 static struct console srmcons = {
-        "srm0",
-        srm_console_write,
-        NULL,
-        srm_console_device,
-        srm_console_wait_key,
-        NULL,
-       srm_console_setup,
-        CON_PRINTBUFFER | CON_ENABLED, /* fake it out */
-        -1,
-        0,
-        NULL
+       name:           "srm0",
+       write:          srm_console_write,
+       device:         srm_console_device,
+       wait_key:       srm_console_wait_key,
+       setup:          srm_console_setup,
+       flags:          CON_PRINTBUFFER | CON_ENABLED, /* fake it out */
+       index:          -1,
 };
 
 #else
index e01a6417eb64d9031118a2420a8e73d7ab531f6f..f898526411c1e1b4e7ed30b1859130f77fff65b7 100644 (file)
@@ -19,8 +19,8 @@
 /*
  * Semaphores are implemented using a two-way counter:
  * The "count" variable is decremented for each process
- * that tries to aquire the semaphore, while the "sleeping"
- * variable is a count of such aquires.
+ * that tries to acquire the semaphore, while the "sleeping"
+ * variable is a count of such acquires.
  *
  * Notably, the inline "up()" and "down()" functions can
  * efficiently test if they need to do any extra work (up
@@ -257,7 +257,7 @@ struct rw_semaphore *down_write_failed(struct rw_semaphore *sem)
        while (atomic_read(&sem->count) < 0) {
                set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (atomic_read(&sem->count) >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index c91d8ff0037e6bdeab951287dcf41bc3e0e9178c..d3e6fa4114bfb64c115b0ef34f0924a249334cbb 100644 (file)
@@ -641,6 +641,9 @@ end_move_self:                                      # now we are at the right place
        outb    %al, $0x60
        call    empty_8042
 
+       movb    $02, %al                        # "fast A20" version
+       outb    %al, $0x92                      # some chips have only this
+
 # wait until a20 really *is* enabled; it can take a fair amount of
 # time on certain systems; Toshiba Tecras are known to have this
 # problem.  The memory location used here (0x200) is the int 0x80
index b264c54a31a2feec155055def3f26563f983dfd4..5044c7cadb37a522a095f6b9c27894f0cda774cd 100644 (file)
  * FPU lazy state save handling.
  */
 
-void save_fpu( struct task_struct *tsk )
-{
-       if ( HAVE_FXSR ) {
-               asm volatile( "fxsave %0 ; fwait"
-                             : "=m" (tsk->thread.i387.fxsave) );
-       } else {
-               asm volatile( "fnsave %0 ; fwait"
-                             : "=m" (tsk->thread.i387.fsave) );
-       }
-       tsk->flags &= ~PF_USEDFPU;
-       stts();
-}
-
 void save_init_fpu( struct task_struct *tsk )
 {
        if ( HAVE_FXSR ) {
index febc592aeb5a740dafd574d3877d3250eca3d8b1..d70e9e569693127bf341e2646ec865758cd8ceb8 100644 (file)
@@ -20,8 +20,8 @@
 /*
  * Semaphores are implemented using a two-way counter:
  * The "count" variable is decremented for each process
- * that tries to aquire the semaphore, while the "sleeping"
- * variable is a count of such aquires.
+ * that tries to acquire the semaphore, while the "sleeping"
+ * variable is a count of such acquires.
  *
  * Notably, the inline "up()" and "down()" functions can
  * efficiently test if they need to do any extra work (up
@@ -373,7 +373,7 @@ struct rw_semaphore *down_write_failed(struct rw_semaphore *sem)
        while (atomic_read(&sem->count) < 0) {
                set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (atomic_read(&sem->count) >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index e765a0e948640f8d924feda8f273d1f03a5a2155..bd4adf92c4ca1c9dc55b44a093c076257d97d7c1 100644 (file)
  *  Forward port AMD Duron errata T13 from 2.2.17pre
  *  Dave Jones <davej@suse.de>, August 2000
  *
+ *  Forward port lots of fixes/improvements from 2.2.18pre
+ *  Cyrix III, Pentium IV support.
+ *  Dave Jones <davej@suse.de>, October 2000
+ *
  */
 
 /*
@@ -137,6 +141,8 @@ extern int root_mountflags;
 extern char _text, _etext, _edata, _end;
 extern unsigned long cpu_khz;
 
+static int disable_x86_serial_nr __initdata = 1;
+
 /*
  * This is set up by the setup-routine at boot-time
  */
@@ -844,12 +850,6 @@ static int __init get_model_name(struct cpuinfo_x86 *c)
 {
        unsigned int n, dummy, *v;
 
-       /* 
-        * Actually we must have cpuid or we could never have
-        * figured out that this was AMD/Cyrix/Transmeta
-        * from the vendor info :-).
-        */
-
        cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
        if (n < 0x80000004)
                return 0;
@@ -862,29 +862,45 @@ static int __init get_model_name(struct cpuinfo_x86 *c)
        return 1;
 }
 
+
+static void __init display_cacheinfo(struct cpuinfo_x86 *c)
+{
+       unsigned int n, dummy, ecx, edx;
+
+       cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
+
+       if (n >= 0x80000005) {
+               cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
+               printk("CPU: L1 I Cache: %dK  L1 D Cache: %dK (%d bytes/line)\n",
+                       edx>>24, ecx>>24, edx&0xFF);
+               c->x86_cache_size=(ecx>>24)+(edx>>24);  
+       }
+
+       if (n < 0x80000006)     /* Cyrix just has large L1. */
+               return;
+
+       cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
+       c->x86_cache_size = ecx >>16;
+
+       /* AMD errata T13 (order #21922) */
+       if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+               boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 3 &&
+               boot_cpu_data.x86_mask == 0)
+       {
+               c->x86_cache_size = 64;
+       }
+       printk("CPU: L2 Cache: %dK\n", ecx>>16);
+}
+
+
 static int __init amd_model(struct cpuinfo_x86 *c)
 {
        u32 l, h;
        unsigned long flags;
-       unsigned int n, dummy, ecx, edx;
        int mbytes = max_mapnr >> (20-PAGE_SHIFT);
 
        int r=get_model_name(c);
 
-       /*
-        * Set MTRR capability flag if appropriate
-        */
-       if(boot_cpu_data.x86 == 5) {
-               if((boot_cpu_data.x86_model == 13) ||
-                  (boot_cpu_data.x86_model == 9) ||
-                  ((boot_cpu_data.x86_model == 8) && 
-                   (boot_cpu_data.x86_mask >= 8)))
-                       c->x86_capability |= X86_FEATURE_MTRR;
-       }
-
-       /*
-        * Now do the cache operations. 
-        */
        switch(c->x86)
        {
                case 5:
@@ -923,6 +939,7 @@ static int __init amd_model(struct cpuinfo_x86 *c)
                                
                                if(mbytes>4092)
                                        mbytes=4092;
+
                                rdmsr(0xC0000082, l, h);
                                if((l&0xFFFF0000)==0)
                                {
@@ -935,35 +952,23 @@ static int __init amd_model(struct cpuinfo_x86 *c)
                                        printk(KERN_INFO "Enabling new style K6 write allocation for %d Mb\n",
                                                mbytes);
                                }
+
+                               /*  Set MTRR capability flag if appropriate */
+                               if((boot_cpu_data.x86_model == 13) ||
+                                  (boot_cpu_data.x86_model == 9) ||
+                                  ((boot_cpu_data.x86_model == 8) && 
+                                   (boot_cpu_data.x86_mask >= 8)))
+                                       c->x86_capability |= X86_FEATURE_MTRR;
                                break;
                        }
+
                        break;
+
                case 6: /* An Athlon/Duron. We can trust the BIOS probably */
                        break;          
        }
 
-       cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
-       if (n >= 0x80000005) {
-               cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
-               printk("CPU: L1 I Cache: %dK  L1 D Cache: %dK (%d bytes/line)\n",
-                       edx>>24, ecx>>24, edx&0xFF);
-               c->x86_cache_size=(ecx>>24)+(edx>>24);  
-       }
-
-       /* AMD errata T13 (order #21922) */
-       if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 3 &&
-               boot_cpu_data.x86_mask == 0)
-       {
-               c->x86_cache_size = 64;
-               printk("CPU: L2 Cache: 64K\n");
-       } else {
-               if (n >= 0x80000006) {
-                       cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
-                       printk("CPU: L2 Cache: %dK\n", ecx>>16);
-                       c->x86_cache_size=(ecx>>16);
-               }
-       }
-
+       display_cacheinfo(c);
        return r;
 }
                        
@@ -1097,9 +1102,8 @@ static void __init cyrix_model(struct cpuinfo_x86 *c)
                   bug to do with 'hlt'. I've not seen any boards using VSA2
                   and X doesn't seem to support it either so who cares 8).
                   VSA1 we work around however.
-                   
                */
-               
+
                printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n");
                isa_dma_bridge_buggy = 2;
 #endif         
@@ -1183,79 +1187,104 @@ static void __init centaur_model(struct cpuinfo_x86 *c)
        u32  lo,hi,newlo;
        u32  aa,bb,cc,dd;
 
-       switch(c->x86_model) {
-       case 4:
-               name="C6";
-               fcr_set=ECX8|DSMC|EDCTLB|EMMX|ERETSTK;
-               fcr_clr=DPDC;
-               printk("Disabling bugged TSC.\n");
-               c->x86_capability &= ~X86_FEATURE_TSC;
-               break;
-       case 8:
-               switch(c->x86_mask) {
-               default:
-                       name="2";
-                       break;
-               case 7 ... 9:
-                       name="2A";
-                       break;
-               case 10 ... 15:
-                       name="2B";
+       switch (c->x86) {
+
+               case 5:
+                       switch(c->x86_model) {
+                       case 4:
+                               name="C6";
+                               fcr_set=ECX8|DSMC|EDCTLB|EMMX|ERETSTK;
+                               fcr_clr=DPDC;
+                               printk("Disabling bugged TSC.\n");
+                               c->x86_capability &= ~X86_FEATURE_TSC;
+                               break;
+                       case 8:
+                               switch(c->x86_mask) {
+                               default:
+                                       name="2";
+                                       break;
+                               case 7 ... 9:
+                                       name="2A";
+                                       break;
+                               case 10 ... 15:
+                                       name="2B";
+                                       break;
+                               }
+                               fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
+                               fcr_clr=DPDC;
+                               break;
+                       case 9:
+                               name="3";
+                               fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
+                               fcr_clr=DPDC;
+                               break;
+                       case 10:
+                               name="4";
+                               /* no info on the WC4 yet */
+                               break;
+                       default:
+                               name="??";
+                       }
+
+                       /* get FCR  */
+                       rdmsr(0x107, lo, hi);
+
+                       newlo=(lo|fcr_set) & (~fcr_clr);
+
+                       if (newlo!=lo) {
+                               printk("Centaur FCR was 0x%X now 0x%X\n", lo, newlo );
+                               wrmsr(0x107, newlo, hi );
+                       } else {
+                               printk("Centaur FCR is 0x%X\n",lo);
+                       }
+                       /* Emulate MTRRs using Centaur's MCR. */
+                       c->x86_capability |= X86_FEATURE_MTRR;
+                       /* Report CX8 */
+                       c->x86_capability |= X86_FEATURE_CX8;
+                       /* Set 3DNow! on Winchip 2 and above. */
+                       if (c->x86_model >=8)
+                               c->x86_capability |= X86_FEATURE_AMD3D;
+                       /* See if we can find out some more. */
+                       cpuid(0x80000000,&aa,&bb,&cc,&dd);
+                       if (aa>=0x80000005) { /* Yes, we can. */
+                               cpuid(0x80000005,&aa,&bb,&cc,&dd);
+                               /* Add L1 data and code cache sizes. */
+                               c->x86_cache_size = (cc>>24)+(dd>>24);
+                       }
+                       sprintf( c->x86_model_id, "WinChip %s", name );
                        break;
-               }
-               fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
-               fcr_clr=DPDC;
-               break;
-       case 9:
-               name="3";
-               fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
-               fcr_clr=DPDC;
-               break;
-       case 10:
-               name="4";
-               /* no info on the WC4 yet */
-               break;
-       default:
-               name="??";
-       }
 
-       /* get FCR  */
-       rdmsr(0x107, lo, hi);
+               case 6:
+                       switch (c->x86_model) {
+                               case 6: /* Cyrix III */
+                                       rdmsr (0x1107, lo, hi);
+                                       lo |= (1<<1 | 1<<7);    /* Report CX8 & enable PGE */
+                                       wrmsr (0x1107, lo, hi);
 
-       newlo=(lo|fcr_set) & (~fcr_clr);
+                                       c->x86_capability |= X86_FEATURE_CX8;
+                                       rdmsr (0x80000001, lo, hi);
+                                       if (hi & (1<<31))
+                                               c->x86_capability |= X86_FEATURE_AMD3D;
 
-       if (newlo!=lo) {
-               printk("Centaur FCR was 0x%X now 0x%X\n", lo, newlo );
-               wrmsr(0x107, newlo, hi );
-       } else {
-               printk("Centaur FCR is 0x%X\n",lo);
+                                       get_model_name(c);
+                                       display_cacheinfo(c);
+                                       break;
+                       }
+                       break;
        }
 
-       /* Emulate MTRRs using Centaur's MCR. */
-       c->x86_capability |= X86_FEATURE_MTRR;
-       /* Report CX8 */
-       c->x86_capability |= X86_FEATURE_CX8;
-       /* Set 3DNow! on Winchip 2 and above. */
-       if (c->x86_model >=8)
-               c->x86_capability |= X86_FEATURE_AMD3D;
-       /* See if we can find out some more. */
-       cpuid(0x80000000,&aa,&bb,&cc,&dd);
-       if (aa>=0x80000005) { /* Yes, we can. */
-               cpuid(0x80000005,&aa,&bb,&cc,&dd);
-               /* Add L1 data and code cache sizes. */
-               c->x86_cache_size = (cc>>24)+(dd>>24);
-       }
-       sprintf( c->x86_model_id, "WinChip %s", name );
 }
 
+
 static void __init transmeta_model(struct cpuinfo_x86 *c)
 {
-       unsigned int cap_mask, uk, max, dummy, n, ecx, edx;
+       unsigned int cap_mask, uk, max, dummy;
        unsigned int cms_rev1, cms_rev2;
        unsigned int cpu_rev, cpu_freq, cpu_flags;
        char cpu_info[65];
 
        get_model_name(c);      /* Same as AMD/Cyrix */
+       display_cacheinfo(c);
 
        /* Print CMS and CPU revision */
        cpuid(0x80860000, &max, &dummy, &dummy, &dummy);
@@ -1309,22 +1338,6 @@ static void __init transmeta_model(struct cpuinfo_x86 *c)
        wrmsr(0x80860004, ~0, uk);
        cpuid(0x00000001, &dummy, &dummy, &dummy, &c->x86_capability);
        wrmsr(0x80860004, cap_mask, uk);
-
-
-       /* L1/L2 cache */
-       cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
-
-       if (n >= 0x80000005) {
-               cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
-               printk("CPU: L1 I Cache: %dK  L1 D Cache: %dK\n",
-                       ecx>>24, edx>>24);
-               c->x86_cache_size=(ecx>>24)+(edx>>24);  
-       }
-       if (n >= 0x80000006) {
-               cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
-               printk("CPU: L2 Cache: %dK\n", ecx>>16);
-               c->x86_cache_size=(ecx>>16);
-       }
 }
 
 
@@ -1407,7 +1420,7 @@ static struct cpu_model_info cpu_models[] __initdata = {
  *     to have CPUID. (Thanks to Herbert Oppmann)
  */
  
-static int deep_magic_nexgen_probe(void)
+static int __init deep_magic_nexgen_probe(void)
 {
        int ret;
        
@@ -1424,9 +1437,9 @@ static int deep_magic_nexgen_probe(void)
        return  ret;
 }
 
-static void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
+static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
 {
-       if(c->x86_capability&(1<<18)) {
+       if(c->x86_capability&(X86_FEATURE_PN) && disable_x86_serial_nr) {
                /* Disable processor serial number */
                unsigned long lo,hi;
                rdmsr(0x119,lo,hi);
@@ -1436,10 +1449,20 @@ static void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
        }
 }
 
+
+int __init x86_serial_nr_setup(char *s)
+{
+       disable_x86_serial_nr = 0;
+       return 1;
+}
+__setup("serialnumber", x86_serial_nr_setup);
+
+
 void __init identify_cpu(struct cpuinfo_x86 *c)
 {
        int i=0;
        char *p = NULL;
+       extern void mcheck_init(void);
 
        c->loops_per_sec = loops_per_sec;
        c->x86_cache_size = -1;
@@ -1476,9 +1499,10 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
                        return;
 
                case X86_VENDOR_INTEL:
-                       
+
                        squash_the_stupid_serial_number(c);
-                       
+                       mcheck_init();
+
                        if (c->cpuid_level > 1) {
                                /* supports eax=2  call */
                                int edx, dummy;
@@ -1522,6 +1546,13 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
                                }
                        }
 
+                       /* Pentium IV. */
+                       if (c->x86 == 15) {
+                               c->x86 = 6;
+                               get_model_name(c);
+                               goto name_decoded;
+                       }
+
                        /* Names for the Pentium II/Celeron processors 
                           detectable only by also checking the cache size.
                           Dixon is NOT a Celeron. */
@@ -1555,7 +1586,7 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
                        squash_the_stupid_serial_number(c);
                        return;
        }
-       
+
        /* may be changed in the switch so needs to be after */
        
        if(c->x86_vendor == X86_VENDOR_NEXGEN)
index b97116cee88868d182d932ba943fed1afc9bf564..4f56dc829635df6001eca9127681d4e0f00d3f3a 100644 (file)
@@ -28,17 +28,13 @@ static int simcons_wait_key (struct console *);
 static kdev_t simcons_console_device (struct console *);
 
 struct console hpsim_cons = {
-       "simcons",
-       simcons_write,          /* write */
-       NULL,                   /* read */
-       simcons_console_device, /* device */
-       simcons_wait_key,       /* wait_key */
-       NULL,                   /* unblank */
-       simcons_init,           /* setup */
-       CON_PRINTBUFFER,        /* flags */
-       -1,                     /* index */
-       0,                      /* cflag */
-       NULL                    /* next */
+       name:           "simcons",
+       write:          simcons_write,
+       device:         simcons_console_device,
+       wait_key:       simcons_wait_key,
+       setup:          simcons_init,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 static int
index a34d601eb5a7829b7aca66b6c8aaf32607e7a323..759db7f52ce2ef7e04eb411e2b84b513ab3f2806 100644 (file)
@@ -18,6 +18,7 @@
  * Goutham Rao: <goutham.rao@intel.com>
  *     Skip non-WB memory and ignore empty memory ranges.
  */
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
index af746a6589553ba5a86983f6415617017746e8ff..15993525d356e52f8555778802248b9b377c92ba 100644 (file)
@@ -6,6 +6,8 @@
 // 00/03/29 cfleck Added code to save INIT handoff state in pt_regs format, switch to temp kstack,
 //                switch modes, jump to C INIT handler
 //
+#include <linux/config.h>
+
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 #include <asm/mca_asm.h>
index 9ae2cdda9bc6910a644f2a380895f664790e50d3..de71a2d22e821dda1bdd75e35512c58f5888f0bb 100644 (file)
@@ -16,6 +16,7 @@
  *     - as of 2.2.9/2.2.12, the following values are still wrong
  *             PAL_VM_SUMMARY: key & rid sizes
  */
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/init.h>
index 1bbe4feab974f2ee9c130410e8af1bef4a44cca1..84ff34cf6305540e59ab7e419bf028e6b38a4901 100644 (file)
@@ -7,9 +7,9 @@
 
 /*
  * Semaphores are implemented using a two-way counter: The "count"
- * variable is decremented for each process that tries to aquire the
+ * variable is decremented for each process that tries to acquire the
  * semaphore, while the "sleepers" variable is a count of such
- * aquires.
+ * acquires.
  *
  * Notably, the inline "up()" and "down()" functions can efficiently
  * test if they need to do any extra work (up needs to do something
@@ -188,7 +188,7 @@ down_read_failed_biased (struct rw_semaphore *sem)
 }
 
 /*
- * This gets called if we failed to aquire the lock and we are not
+ * This gets called if we failed to acquire the lock and we are not
  * biased to acquire the lock.  We undo the decrement that was
  * done earlier, go to sleep, and then attempt to re-acquire the
  * lock afterwards.
@@ -279,7 +279,7 @@ down_write_failed (struct rw_semaphore *sem)
        while (sem->count < 0) {
                set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (sem->count >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index 9cc5424712a0d859599a0ed5d7801584fd69cd8f..83bff8b0c57def4044a7162c4a8b00c365233338 100644 (file)
@@ -4,8 +4,6 @@
  * Application processor startup code, moved from smp.c to better support kernel profile
  */
 
-#include <linux/config.h>
-
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/init.h>
index 3eca427f5c4edeeb7cd4d6b05dfc5828f7d7203a..d7cc137a9482e491466be1518746a071dcda047f 100644 (file)
@@ -89,17 +89,10 @@ static void amiga_heartbeat(int on);
 #endif
 
 static struct console amiga_console_driver = {
-       "debug",
-       NULL,                   /* write */
-       NULL,                   /* read */
-       NULL,                   /* device */
-       amiga_wait_key,         /* wait_key */
-       NULL,                   /* unblank */
-       NULL,                   /* setup */
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "debug",
+       wait_key:       amiga_wait_key,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 #ifdef CONFIG_MAGIC_SYSRQ
index e30cb4e55788e9eba9334254a2e10241c4e24a58..2900f775833479218e24dc65eca284b7892bc985 100644 (file)
@@ -31,17 +31,9 @@ int atari_SCC_init_done = 0;
 int atari_SCC_reset_done = 0;
 
 static struct console atari_console_driver = {
-       "debug",
-       NULL,                   /* write */
-       NULL,                   /* read */
-       NULL,                   /* device */
-       NULL,                   /* wait_key */
-       NULL,                   /* unblank */
-       NULL,                   /* setup */
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "debug",
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 
index b873ee9c70e644ca783214957eb4e1a1350de54e..139a75b64f221b04491390195716a38ad1bc6081 100644 (file)
@@ -182,7 +182,7 @@ void down_write_failed(struct rw_semaphore *sem)
        while (atomic_read(&sem->count) < 0) {
                set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (atomic_read(&sem->count) >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index fa3910b5e227d635ac5cc91593446101aabebe6e..330d30955dd4444a8ef1343187d6bafa514a7db9 100644 (file)
@@ -159,17 +159,9 @@ int mac_SCC_reset_done = 0;
 static int scc_port = -1;
 
 static struct console mac_console_driver = {
-       "debug",
-       NULL,                   /* write */
-       NULL,                   /* read */
-       NULL,                   /* device */
-       NULL,                   /* wait_key */
-       NULL,                   /* unblank */
-       NULL,                   /* setup */
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "debug",
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 /*
index df0a577629c90a860383555c500709787d6ecb04..2496aa9ba3fdf0b8d1ee88a9507644d2f90d4f77 100644 (file)
@@ -74,17 +74,10 @@ static unsigned char bin2bcd (unsigned char b);
 
 static int q40_wait_key(struct console *co){return 0;}
 static struct console q40_console_driver = {
-       "debug",
-       NULL,                   /* write */
-       NULL,                   /* read */
-       NULL,                   /* device */
-       q40_wait_key,           /* wait_key */
-       NULL,                   /* unblank */
-       NULL,                   /* setup */
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "debug",
+       wait_key:       q40_wait_key,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 
index 1c2918e5bf797d34bcb73fb7a26dd19ccf27ac78..d4200a3416712cb359f011357df94c589804ba3a 100644 (file)
@@ -2811,17 +2811,13 @@ static int __init serial_console_setup(struct console *co, char *options)
 }
 
 static struct console sercons = {
-       "ttyS",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 /*
index de9eaf5b2a319b0215e3ce1881cd62db7899c2dc..2c8ba4d7f3afdf3dcf3cafd8678bf8c22595d140 100644 (file)
@@ -47,17 +47,13 @@ static kdev_t prom_console_device(struct console *c)
 
 static struct console sercons =
 {
-    "ttyS",
-    prom_console_write,
-    NULL,
-    prom_console_device,
-    prom_console_wait_key,
-    NULL,
-    prom_console_setup,
-    CON_PRINTBUFFER,
-    -1,
-    0,
-    NULL
+    name:      "ttyS",
+    write:     prom_console_write,
+    device:    prom_console_device,
+    wait_key:  prom_console_wait_key,
+    setup:     prom_console_setup,
+    flags:     CON_PRINTBUFFER,
+    index:     -1,
 };
 
 /*
index 29b702f7f151945553586e4266bdafc0205f94cb..8609b88ec20063e4599ebc8cdde93448fe44cfb3 100644 (file)
@@ -68,17 +68,13 @@ static kdev_t prom_console_device(struct console *c)
 
 static struct console sercons =
 {
-    "ttyS",
-    prom_console_write,
-    NULL,
-    prom_console_device,
-    prom_console_wait_key,
-    NULL,
-    prom_console_setup,
-    CON_PRINTBUFFER,
-    -1,
-    0,
-    NULL
+    name:      "ttyS",
+    write:     prom_console_write,
+    device:    prom_console_device,
+    wait_key:  prom_console_wait_key,
+    setup:     prom_console_setup,
+    flags:     CON_PRINTBUFFER,
+    index:     -1,
 };
 
 /*
index 391f9613cd5aa13a21fe1b59b16c7adc3001c6c6..a5d8ecdf510ca24d05d48e5f567c696ac9e6eef7 100644 (file)
@@ -49,17 +49,13 @@ static kdev_t prom_console_device(struct console *c)
 
 static struct console sercons =
 {
-    "ttyS",
-    prom_console_write,
-    NULL,
-    prom_console_device,
-    prom_console_wait_key,
-    NULL,
-    prom_console_setup,
-    CON_PRINTBUFFER,
-    -1,
-    0,
-    NULL
+    name:      "ttyS",
+    write:     prom_console_write,
+    device:    prom_console_device,
+    wait_key:  prom_console_wait_key,
+    setup:     prom_console_setup,
+    flags:     CON_PRINTBUFFER,
+    index:     -1,
 };
 
 /*
index 97c4cb8808845b603aac51d3e5c564c93db1d808..f7ce9da03230c296bd885dba885508afa725e3b5 100644 (file)
@@ -2268,17 +2268,13 @@ static kdev_t serial_console_device(struct console *c)
 
 
 static struct console sercons = {
-       "ttyS",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       CONFIG_SERIAL_CONSOLE_PORT,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          CONFIG_SERIAL_CONSOLE_PORT,
 };
 
 /*
index b9f791832c1f6ce18ff9f63dca901c7f24bc3ede..7c05954c24b7c49cd5f4e4834b062b56905d96a5 100644 (file)
@@ -2407,17 +2407,13 @@ static kdev_t serial_console_device(struct console *c)
 
 
 static struct console sercons = {
-       "ttyS",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       CONFIG_SERIAL_CONSOLE_PORT,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          CONFIG_SERIAL_CONSOLE_PORT,
 };
 
 /*
index 652eb1582f3ef771d789e0a8617a2b2c31b6bf51..83e33e17b78b1510c5f3f113c76589f1e7249f56 100644 (file)
@@ -97,17 +97,10 @@ static void amiga_heartbeat(int on);
 #endif
 
 static struct console amiga_console_driver = {
-       "debug",
-       NULL,                   /* write */
-       NULL,                   /* read */
-       NULL,                   /* device */
-       amiga_wait_key,         /* wait_key */
-       NULL,                   /* unblank */
-       NULL,                   /* setup */
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "debug",
+       wait_key:       amiga_wait_key,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 #ifdef CONFIG_MAGIC_SYSRQ
index 36869222246c9d761efb0527a1cde2efbbe89793..86aef01853ced3761ae287b84a1d7a0ab8283aea 100644 (file)
@@ -16,8 +16,8 @@
 /*
  * Semaphores are implemented using a two-way counter:
  * The "count" variable is decremented for each process
- * that tries to aquire the semaphore, while the "sleeping"
- * variable is a count of such aquires.
+ * that tries to acquire the semaphore, while the "sleeping"
+ * variable is a count of such acquires.
  *
  * Notably, the inline "up()" and "down()" functions can
  * efficiently test if they need to do any extra work (up
@@ -242,7 +242,7 @@ void down_write_failed(struct rw_semaphore *sem)
        while (atomic_read(&sem->count) < 0) {
                set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (atomic_read(&sem->count) >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index 3b74e2d8e2fa937d20ead91e5fb04dc14c437fce..37d29a6c40ad82d5e9ae8460c10e7d8e1deccda3 100644 (file)
@@ -149,52 +149,55 @@ SYSCALL_NR =  (16*4+6*4)
 
        .align  2
 tlb_miss_load:
-       mov.l   2f, $r0
-       mov.l   @$r0, $r6
-       mov     $r15, $r4
-       mov.l   1f, $r0
-       jmp     @$r0
+       bra     call_dpf
         mov    #0, $r5
 
        .align  2
 tlb_miss_store:
-       mov.l   2f, $r0
-       mov.l   @$r0, $r6
-       mov     $r15, $r4
-       mov.l   1f, $r0
-       jmp     @$r0
+       bra     call_dpf
         mov    #1, $r5
 
        .align  2
 initial_page_write:
-       mov.l   2f, $r0
-       mov.l   @$r0, $r6
-       mov     $r15, $r4
-       mov.l   1f, $r0
-       jmp     @$r0
+       bra     call_dpf
         mov    #1, $r5
 
        .align  2
 tlb_protection_violation_load:
-       mov.l   2f, $r0
-       mov.l   @$r0, $r6
-       mov     $r15, $r4
-       mov.l   1f, $r0
-       jmp     @$r0
+       bra     call_dpf
         mov    #0, $r5
 
        .align  2
 tlb_protection_violation_store:
-       mov.l   2f, $r0
-       mov.l   @$r0, $r6
-       mov     $r15, $r4
+       bra     call_dpf
+        mov    #1, $r5
+
+call_dpf:
        mov.l   1f, $r0
+       mov     $r5, $r8
+       mov.l   @$r0, $r6
+       mov     $r6, $r9
+       mov.l   2f, $r0
+       sts     $pr, $r10
+       jsr     @$r0
+        mov    $r15, $r4
+       !
+       tst     #0xff, $r0
+       bf/s    0f
+        lds    $r10, $pr
+       rts
+        nop
+0:     STI()
+       mov.l   3f, $r0
+       mov     $r9, $r6
+       mov     $r8, $r5
        jmp     @$r0
-        mov    #1, $r5
+        mov    $r15, $r4
 
        .align 2
-1:     .long   SYMBOL_NAME(__do_page_fault)
-2:     .long   MMU_TEA
+1:     .long   MMU_TEA
+2:     .long   SYMBOL_NAME(__do_page_fault)
+3:     .long   SYMBOL_NAME(do_page_fault)
 
 #if defined(CONFIG_DEBUG_KERNEL_WITH_GDB_STUB) || defined(CONFIG_SH_STANDARD_BIOS)
        .align  2
index f733501c1cc674877bc20709290a20db2bf79d80..990960aa8379afc1f62b597546f74b7d27ad16ea 100644 (file)
@@ -253,7 +253,7 @@ struct rw_semaphore *down_write_failed(struct rw_semaphore *sem)
        while (atomic_read(&sem->count) < 0) {
                set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (atomic_read(&sem->count) >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index aaea2e6df23d881777a00f45afdff9b817941d2d..66f7460f9c5eceb3a67b73686efe4426840c0e10 100644 (file)
@@ -166,17 +166,13 @@ static int __init sh_console_setup(struct console *co, char *options)
 }
 
 static struct console sh_console = {
-       "bios",
-       sh_console_write,
-       NULL,
-       sh_console_device,
-       sh_console_wait_key,
-       NULL,
-       sh_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "bios",
+       write:          sh_console_write,
+       device:         sh_console_device,
+       wait_key:       sh_console_wait_key,
+       setup:          sh_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 void sh_console_init(void)
index 9c06626da9a8083e65b45511b394459603714185..b9c8c991b69a21fb60d97fd4ddf49e3beedd5d96 100644 (file)
@@ -231,8 +231,11 @@ do_sigbus:
                goto no_context;
 }
 
-static int __do_page_fault1(struct pt_regs *regs, unsigned long writeaccess,
-                           unsigned long address)
+/*
+ * Called with interrupt disabled.
+ */
+asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
+                              unsigned long address)
 {
        pgd_t *dir;
        pmd_t *pmd;
@@ -240,8 +243,6 @@ static int __do_page_fault1(struct pt_regs *regs, unsigned long writeaccess,
        pte_t entry;
 
        if (address >= VMALLOC_START && address < VMALLOC_END)
-               /* We can change the implementation of P3 area pte entries.
-                  set_pgdir and such. */
                dir = pgd_offset_k(address);
        else
                dir = pgd_offset(current->mm, address);
@@ -275,23 +276,6 @@ static int __do_page_fault1(struct pt_regs *regs, unsigned long writeaccess,
        return 0;
 }
 
-/*
- * Called with interrupt disabled.
- */
-asmlinkage void __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
-                               unsigned long address)
-{
-       /*
-        * XXX: Could you please implement this (calling __do_page_fault1)
-        * in assembler language in entry.S?
-        */
-       if (__do_page_fault1(regs, writeaccess, address)  == 0)
-               /* Done. */
-               return;
-       sti();
-       do_page_fault(regs, writeaccess, address);
-}
-
 void update_mmu_cache(struct vm_area_struct * vma,
                      unsigned long address, pte_t pte)
 {
index 2dd1e6ec2aad21cf2c7bf6fd3f45dc4895986d72..d859f34400593e972c70fe6aecd799739b6faf0e 100644 (file)
@@ -17,6 +17,9 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
        unsigned long phys_addr, unsigned long flags)
 {
        unsigned long end;
+       pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW |
+                                  _PAGE_DIRTY | _PAGE_ACCESSED |
+                                  _PAGE_HW_SHARED | _PAGE_FLAGS_HARD | flags);
 
        address &= ~PMD_MASK;
        end = address + size;
@@ -25,8 +28,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
        do {
                if (!pte_none(*pte))
                        printk("remap_area_pte: page already exists\n");
-               set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW | 
-                                       _PAGE_DIRTY | _PAGE_ACCESSED | flags)));
+               set_pte(pte, mk_pte_phys(phys_addr, pgprot));
                address += PAGE_SIZE;
                phys_addr += PAGE_SIZE;
                pte++;
@@ -55,22 +57,21 @@ static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned lo
 }
 
 static int remap_area_pages(unsigned long address, unsigned long phys_addr,
-                                unsigned long size, unsigned long flags)
+       unsigned long size, unsigned long flags)
 {
        pgd_t * dir;
        unsigned long end = address + size;
 
        phys_addr -= address;
-       dir = pgd_offset(&init_mm, address);
+       dir = pgd_offset_k(address);
        flush_cache_all();
        while (address < end) {
                pmd_t *pmd = pmd_alloc_kernel(dir, address);
                if (!pmd)
                        return -ENOMEM;
                if (remap_area_pmd(pmd, address, end - address,
-                                        phys_addr + address, flags))
+                                       phys_addr + address, flags))
                        return -ENOMEM;
-               set_pgdir(address, *dir);
                address = (address + PGDIR_SIZE) & PGDIR_MASK;
                dir++;
        }
index ca81aa872194f5ceb13a6ff85558cd38fef2a9ce..e0be43e089719b322953feaab23fdfa8e4348eea 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: ioport.c,v 1.39 2000/06/20 01:10:00 anton Exp $
+/* $Id: ioport.c,v 1.40 2000/10/10 09:44:46 anton Exp $
  * ioport.c:  Simple io mapping allocator.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -244,6 +244,7 @@ static void _sparc_free_io(struct resource *res)
        unsigned long plen;
 
        plen = res->end - res->start + 1;
+       plen = (plen + PAGE_SIZE-1) & PAGE_MASK;
        while (plen != 0) {
                plen -= PAGE_SIZE;
                (*_sparc_unmapioaddr)(res->start + plen);
@@ -323,7 +324,7 @@ void sbus_free_consistent(struct sbus_dev *sdev, long n, void *p, u32 ba)
                return;
        }
 
-       if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
+       if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
                printk("sbus_free_consistent: unaligned va %p\n", p);
                return;
        }
@@ -496,7 +497,7 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba)
 
        if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
                free_pages(va, order);
-               printk("sbus_alloc_consistent: no core\n");
+               printk("pci_alloc_consistent: no core\n");
                return NULL;
        }
        memset((char*)res, 0, sizeof(struct resource));
@@ -546,18 +547,18 @@ void pci_free_consistent(struct pci_dev *pdev, size_t n, void *p, dma_addr_t ba)
 
        if ((res = _sparc_find_resource(&_sparc_dvma,
            (unsigned long)p)) == NULL) {
-               printk("sbus_free_consistent: cannot free %p\n", p);
+               printk("pci_free_consistent: cannot free %p\n", p);
                return;
        }
 
-       if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
-               printk("sbus_free_consistent: unaligned va %p\n", p);
+       if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
+               printk("pci_free_consistent: unaligned va %p\n", p);
                return;
        }
 
        n = (n + PAGE_SIZE-1) & PAGE_MASK;
        if ((res->end-res->start)+1 != n) {
-               printk("sbus_free_consistent: region 0x%lx asked 0x%lx\n",
+               printk("pci_free_consistent: region 0x%lx asked 0x%lx\n",
                    (long)((res->end-res->start)+1), (long)n);
                return;
        }
index 1dcf35d4296a5aff2b88b89ea15a3effea76a64b..9b45d18bd785728595851e70625a370a513579d8 100644 (file)
@@ -218,7 +218,7 @@ void down_write_failed(struct rw_semaphore *sem)
        while (sem->count < 0) {
                set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (sem->count >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index bce4ffcdfd76c8574cac7d31c901bca007d47c5f..2c64c9ba193a71d1690b149a5e6931f7c002b5db 100644 (file)
@@ -287,7 +287,9 @@ static void prom_cons_write(struct console *con, const char *str, unsigned count
 }
 
 static struct console prom_console = {
-       "PROM", prom_cons_write, 0, 0, 0, 0, 0, CON_PRINTBUFFER, 0, 0, 0
+       name:           "PROM",
+       write:          prom_cons_write,
+       flags:          CON_PRINTBUFFER,
 };
 #endif
 
index 0919089ef18d5f25deeb019cf5f503969b42858a..5eac1939217e57291b74ee1a2e67be7a723cb6e5 100644 (file)
@@ -275,7 +275,7 @@ void down_write_failed(struct rw_semaphore *sem)
        while (sem->count < 0) {
                set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
                if (sem->count >= 0)
-                       break;  /* we must attempt to aquire or bias the lock */
+                       break;  /* we must attempt to acquire or bias the lock */
                schedule();
        }
 
index 84cc201fd49ec3bee5396f597dbe4b1444160d91..6f0d34c4a13c06f232532a0e5226f3bbfb731897 100644 (file)
@@ -75,17 +75,10 @@ prom_console_write(struct console *con, const char *s, unsigned n)
 }
 
 static struct console prom_console = {
-       "prom",
-       prom_console_write,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       CON_CONSDEV | CON_ENABLED,
-       -1,
-       0,
-       NULL
+       name:           "prom",
+       write:          prom_console_write,
+       flags:          CON_CONSDEV | CON_ENABLED,
+       index:          -1,
 };
 
 #define PROM_TRUE      -1
@@ -294,17 +287,10 @@ unsigned long cmdline_memory_size = 0;
 
 #ifdef PROM_DEBUG_CONSOLE
 static struct console prom_debug_console = {
-       "debug",
-       prom_console_write,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "debug",
+       write:          prom_console_write,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 #endif
 
index db562b8ac1d1d920eb60f7550308bc80aeb555aa..d9d3f86221201000a850438c69ae551997856a03 100644 (file)
@@ -328,7 +328,7 @@ static int ll_merge_requests_fn(request_queue_t *q, struct request *req,
  * on the list.
  *
  * This is called with interrupts off and no requests on the queue.
- * (and with the request spinlock aquired)
+ * (and with the request spinlock acquired)
  */
 static void generic_plug_device(request_queue_t *q, kdev_t dev)
 {
@@ -570,7 +570,7 @@ inline void drive_stat_acct (kdev_t dev, int rw,
 
 /*
  * add-request adds a request to the linked list.
- * It disables interrupts (aquires the request spinlock) so that it can muck
+ * It disables interrupts (acquires the request spinlock) so that it can muck
  * with the request-lists in peace. Thus it should be called with no spinlocks
  * held.
  *
@@ -624,7 +624,7 @@ void inline blkdev_release_request(struct request *req)
 }
 
 /*
- * Has to be called with the request spinlock aquired
+ * Has to be called with the request spinlock acquired
  */
 static void attempt_merge(request_queue_t * q,
                          struct request *req,
index 9f529353041b008c2729af9362ad891b4b754d6a..86dbc0a8942ccace6945e02d6531f05a38421a90 100644 (file)
 #
-# Makefile for PARIDE
+# Makefile for Parallel port IDE device drivers.
 #
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
+# 7 October 2000, Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+# Rewritten to use lists instead of if-statements.
 #
-# Note 2! The CFLAGS definitions are now inherited from the
-# parent makes..
-
-SUB_DIRS     := 
-MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS)
 
 L_TARGET := paride.a
-MX_OBJS  :=
-LX_OBJS  := 
-MI_OBJS  :=
-MIX_OBJS :=
-
-ifeq ($(CONFIG_PARIDE),y)
-  LX_OBJS += paride.o
-else
-  ifeq ($(CONFIG_PARIDE),m)
-    MX_OBJS += paride.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PD),y)
-  LX_OBJS += pd.o
-else
-  ifeq ($(CONFIG_PARIDE_PD),m)
-    M_OBJS += pd.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PCD),y)
-  LX_OBJS += pcd.o
-else
-  ifeq ($(CONFIG_PARIDE_PCD),m)
-    M_OBJS += pcd.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PF),y)
-  LX_OBJS += pf.o
-else
-  ifeq ($(CONFIG_PARIDE_PF),m)
-    M_OBJS += pf.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PT),y)
-  LX_OBJS += pt.o
-else
-  ifeq ($(CONFIG_PARIDE_PT),m)
-    M_OBJS += pt.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PG),y)
-  LX_OBJS += pg.o
-else
-  ifeq ($(CONFIG_PARIDE_PG),m)
-    M_OBJS += pg.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_ATEN),y)
-  LX_OBJS += aten.o
-else
-  ifeq ($(CONFIG_PARIDE_ATEN),m)
-    M_OBJS += aten.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_BPCK),y)
-  LX_OBJS += bpck.o
-else
-  ifeq ($(CONFIG_PARIDE_BPCK),m)
-    M_OBJS += bpck.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_COMM),y)
-  LX_OBJS += comm.o
-else
-  ifeq ($(CONFIG_PARIDE_COMM),m)
-    M_OBJS += comm.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_DSTR),y)
-  LX_OBJS += dstr.o
-else
-  ifeq ($(CONFIG_PARIDE_DSTR),m)
-    M_OBJS += dstr.o
-  endif
-endif
 
-ifeq ($(CONFIG_PARIDE_KBIC),y)
-  LX_OBJS += kbic.o
-else
-  ifeq ($(CONFIG_PARIDE_KBIC),m)
-    M_OBJS += kbic.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_EPAT),y)
-  LX_OBJS += epat.o
-else
-  ifeq ($(CONFIG_PARIDE_EPAT),m)
-    M_OBJS += epat.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_EPIA),y)
-  LX_OBJS += epia.o
-else
-  ifeq ($(CONFIG_PARIDE_EPIA),m)
-    M_OBJS += epia.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_FIT2),y)
-  LX_OBJS += fit2.o
-else
-  ifeq ($(CONFIG_PARIDE_FIT2),m)
-    M_OBJS += fit2.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_FIT3),y)
-  LX_OBJS += fit3.o
-else
-  ifeq ($(CONFIG_PARIDE_FIT3),m)
-    M_OBJS += fit3.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_FRPW),y)
-  LX_OBJS += frpw.o
-else
-  ifeq ($(CONFIG_PARIDE_FRPW),m)
-    M_OBJS += frpw.o
-  endif
-endif
-
-
-ifeq ($(CONFIG_PARIDE_FRIQ),y)
-  LX_OBJS += friq.o
-else
-  ifeq ($(CONFIG_PARIDE_FRIQ),m)
-    M_OBJS += friq.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_ON20),y)
-  LX_OBJS += on20.o
-else
-  ifeq ($(CONFIG_PARIDE_ON20),m)
-    M_OBJS += on20.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_ON26),y)
-  LX_OBJS += on26.o
-else
-  ifeq ($(CONFIG_PARIDE_ON26),m)
-    M_OBJS += on26.o
-  endif
-endif
-
-ifeq ($(CONFIG_PARIDE_KTTI),y)
-  LX_OBJS += ktti.o
-else
-  ifeq ($(CONFIG_PARIDE_KTTI),m)
-    M_OBJS += ktti.o
-  endif
-endif
+obj-$(CONFIG_PARIDE)           += paride.o
+obj-$(CONFIG_PARIDE_PD)                += pd.o
+obj-$(CONFIG_PARIDE_PCD)       += pcd.o
+obj-$(CONFIG_PARIDE_PF)                += pf.o
+obj-$(CONFIG_PARIDE_PT)                += pt.o
+obj-$(CONFIG_PARIDE_PG)                += pg.o
+obj-$(CONFIG_PARIDE_ATEN)      += aten.o
+obj-$(CONFIG_PARIDE_BPCK)      += bpck.o
+obj-$(CONFIG_PARIDE_COMM)      += comm.o
+obj-$(CONFIG_PARIDE_DSTR)      += dstr.o
+obj-$(CONFIG_PARIDE_KBIC)      += kbic.o
+obj-$(CONFIG_PARIDE_EPAT)      += epat.o
+obj-$(CONFIG_PARIDE_EPIA)      += epia.o
+obj-$(CONFIG_PARIDE_FIT2)      += fit2.o
+obj-$(CONFIG_PARIDE_FIT3)      += fit3.o
+obj-$(CONFIG_PARIDE_FRPW)      += frpw.o
+obj-$(CONFIG_PARIDE_FRIQ)      += friq.o
+obj-$(CONFIG_PARIDE_ON20)      += on20.o
+obj-$(CONFIG_PARIDE_ON26)      += on26.o
+obj-$(CONFIG_PARIDE_KTTI)      += ktti.o
+
+L_OBJS := $(obj-y)
+M_OBJS := $(obj-m)
 
 include $(TOPDIR)/Rules.make
-
index 67654551c29b8cd52f97d68d9bcf6f8ee169b22e..8c9a8ba4a8920d63bf3db7cba46a1c0ba463851c 100644 (file)
@@ -2147,17 +2147,13 @@ static kdev_t vt_console_device(struct console *c)
 }
 
 struct console vt_console_driver = {
-       "tty",
-       vt_console_print,
-       NULL,
-       vt_console_device,
-       keyboard_wait_for_keypress,
-       unblank_screen,
-       NULL,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "tty",
+       write:          vt_console_print,
+       device:         vt_console_device,
+       wait_key:       keyboard_wait_for_keypress,
+       unblank:        unblank_screen,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 #endif
 
index bf4b20e790ef3fd32ec3526b5b06b5a878953cfa..dd2b50d8cc8b9403a6209090195487fcd7a4b49f 100644 (file)
@@ -1553,17 +1553,13 @@ static int __init dz_console_setup(struct console *co, char *options)
 }
 
 static struct console dz_sercons = {
-       "ttyS",
-       dz_console_print,
-       NULL,
-       dz_console_device,
-       dz_console_wait_key,
-       NULL,
-       dz_console_setup,
-       CON_CONSDEV | CON_PRINTBUFFER,
-       CONSOLE_LINE,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          dz_console_print,
+       device:         dz_console_device,
+       wait_key:       dz_console_wait_key,
+       setup:          dz_console_setup,
+       flags:          CON_CONSDEV | CON_PRINTBUFFER,
+       index:          CONSOLE_LINE,
 };
 
 void __init dz_serial_console_init(void)
index 18e198f51b6e04f7c1cec9332532e2a1d9444c07..f3a6f6bdfa51f894ba6734fad908d4c9830df073 100644 (file)
@@ -2,6 +2,7 @@
 
        Hardware driver for Intel i810 Random Number Generator (RNG)
        Copyright 2000 Jeff Garzik <jgarzik@mandrakesoft.com>
+       Copyright 2000 Philipp Rumpf <prumpf@tux.org>
 
        Driver Web site:  http://gtf.org/garzik/drivers/i810_rng/
 
        This will slow things down but guarantee that bad data is
        never passed upstream.
 
+       * FIXME: module unload is racy.  To fix this, struct ctl_table
+       needs an owner member a la struct file_operations.
+
        * Since the RNG is accessed from a timer as well as normal
        kernel code, but not from interrupts, we use spin_lock_bh
        in regular code, and spin_lock in the timer function, to
        * Convert numeric globals to unsigned
        * Module unload cleanup
 
+       Version 0.9.1:
+       * Support i815 chipsets too (Matt Sottek)
+       * Fix reference counting when statically compiled (prumpf)
+       * Rewrite rng_dev_read (prumpf)
+       * Make module races less likely (prumpf)
+       * Small miscellaneous bug fixes (prumpf)
+       * Use pci table for PCI id list
+
  */
 
 
 /*
  * core module and version information
  */
-#define RNG_VERSION "0.9.0"
+#define RNG_VERSION "0.9.1"
 #define RNG_MODULE_NAME "i810_rng"
 #define RNG_DRIVER_NAME   RNG_MODULE_NAME " hardware driver " RNG_VERSION
 #define PFX RNG_MODULE_NAME ": "
 #endif
 
 
-/*
- * misc helper macros
- */
-#define arraysize(x)            (sizeof(x)/sizeof(*(x)))
-
 /*
  * prototypes
  */
@@ -363,7 +370,7 @@ static void rng_timer_tick (unsigned long data)
 
 
 /*
- * rng_enable - enable or disable the RNG and internal timer
+ * rng_enable - enable or disable the RNG hardware
  */
 static int rng_enable (int enable)
 {
@@ -377,15 +384,13 @@ static int rng_enable (int enable)
        hw_status = rng_hwstatus ();
 
        if (enable) {
-               rng_hw_enabled = 1;
+               rng_hw_enabled++;
                MOD_INC_USE_COUNT;
        } else {
-#ifndef __alpha__
-               if (GET_USE_COUNT (THIS_MODULE) > 0)
+               if (rng_hw_enabled) {
+                       rng_hw_enabled--;
                        MOD_DEC_USE_COUNT;
-               if (GET_USE_COUNT (THIS_MODULE) == 0)
-                       rng_hw_enabled = 0;
-#endif
+               }
        }
 
        if (rng_hw_enabled && ((hw_status & RNG_ENABLED) == 0)) {
@@ -407,7 +412,8 @@ static int rng_enable (int enable)
        else if (action == 2)
                printk (KERN_INFO PFX "RNG h/w disabled\n");
 
-       if ((!!enable) != (!!(new_status & RNG_ENABLED))) {
+       /* too bad C doesn't have ^^ */
+       if ((!enable) != (!(new_status & RNG_ENABLED))) {
                printk (KERN_ERR PFX "Unable to %sable the RNG\n",
                        enable ? "en" : "dis");
                rc = -EIO;
@@ -429,6 +435,7 @@ static int rng_handle_sysctl_enable (ctl_table * table, int write, struct file *
 
        DPRINTK ("ENTER\n");
 
+       MOD_INC_USE_COUNT;
        spin_lock_bh (&rng_lock);
        rng_enabled_sysctl = enabled_save = rng_timer_enabled;
        spin_unlock_bh (&rng_lock);
@@ -456,6 +463,9 @@ static int rng_handle_sysctl_enable (ctl_table * table, int write, struct file *
                spin_unlock_bh (&rng_lock);
        }
 
+       /* This needs to be in a higher layer */
+       MOD_DEC_USE_COUNT;
+
        DPRINTK ("EXIT, returning 0\n");
        return 0;
 }
@@ -661,63 +671,44 @@ static int rng_dev_release (struct inode *inode, struct file *filp)
 }
 
 
-static ssize_t rng_dev_read (struct file *filp, char * buf, size_t size,
-                            loff_t *offp)
+static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size,
+                            loff_t * offp)
 {
-       int have_data, copied = 0;
-       u8 data=0;
-       u8 *page;
-
-       if (size < 1)
-               return 0;
-
-       page = (unsigned char *) get_free_page (GFP_KERNEL);
-       if (!page)
-               return -ENOMEM;
-
-read_loop:
-       /* using the fact that read() can return >0 but
-        * less than the requested amount, we simply
-        * read up to PAGE_SIZE or buffer size, whichever
-        * is smaller, and return that data.
-        */
-       if ((copied == size) || (copied == PAGE_SIZE)) {
-               size_t tmpsize = (copied == size) ? size : PAGE_SIZE;
-               int rc = copy_to_user (buf, page, tmpsize);
-               free_page ((long)page);
-               if (rc) return rc;
-               return tmpsize;
-       }
+       int have_data;
+       u8 data = 0;
+       ssize_t ret = 0;
 
-       spin_lock_bh (&rng_lock);
+       while (size) {
+               spin_lock_bh (&rng_lock);
 
-       have_data = 0;
-       if (rng_data_present ()) {
-               data = rng_data_read ();
-               have_data = 1;
-       }
+               have_data = 0;
+               if (rng_data_present ()) {
+                       data = rng_data_read ();
+                       have_data = 1;
+               }
 
-       spin_unlock_bh (&rng_lock);
+               spin_unlock_bh (&rng_lock);
 
-       if (have_data) {
-               page[copied] = data;
-               copied++;
-       } else {
-               if (filp->f_flags & O_NONBLOCK) {
-                       free_page ((long)page);
-                       return -EAGAIN;
+               if (have_data) {
+                       if (put_user (data, buf++)) {
+                               ret = ret ? : -EFAULT;
+                               break;
+                       }
+                       size--;
+                       ret++;
                }
-       }
 
-       if (current->need_resched)
-               schedule ();
+               if (current->need_resched)
+                       schedule ();
+
+               if (signal_pending (current))
+                       return ret ? : -ERESTARTSYS;
 
-       if (signal_pending (current)) {
-               free_page ((long)page);
-               return -ERESTARTSYS;
+               if (filp->f_flags & O_NONBLOCK)
+                       return ret ? : -EAGAIN;
        }
 
-       goto read_loop;
+       return ret;
 }
 
 
@@ -793,8 +784,9 @@ err_out_free_res:
  * want to register another driver on the same PCI id.
  */
 const static struct pci_device_id rng_pci_tbl[] __initdata = {
-        { 0x8086, 0x2418, PCI_ANY_ID, PCI_ANY_ID, },
-        { 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, },
+       { 0x8086, 0x2418, PCI_ANY_ID, PCI_ANY_ID, },
+       { 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, },
+       { 0x8086, 0x1130, PCI_ANY_ID, PCI_ANY_ID, },
        { 0, },
 };
 MODULE_DEVICE_TABLE (pci, rng_pci_tbl);
@@ -834,12 +826,15 @@ static int __init rng_init (void)
        init_MUTEX (&rng_open_sem);
        init_waitqueue_head (&rng_open_wait);
 
-       pdev = pci_find_device (0x8086, 0x2418, NULL);
-       if (!pdev)
-               pdev = pci_find_device (0x8086, 0x2428, NULL);
-       if (!pdev)
-               return -ENODEV;
+       pci_for_each_dev(pdev) {
+               if (pci_match_device (rng_pci_tbl, pdev) != NULL)
+                       goto match;
+       }
+
+       DPRINTK ("EXIT, returning -ENODEV\n");
+       return -ENODEV;
 
+match:
        rc = rng_init_one (pdev);
        if (rc)
                return rc;
@@ -894,7 +889,7 @@ module_exit (rng_cleanup);
 *  4.11.1 (http://csrc.nist.gov/fips/fips1401.htm)
 *  The Monobit, Poker, Runs, and Long Runs tests are implemented below.
 *  This test is run at periodic intervals to verify
-*  data is sufficently random. If the tests are failed the RNG module
+*  data is sufficiently random. If the tests are failed the RNG module
 *  will no longer submit data to the entropy pool, but the tests will
 *  continue to run at the given interval. If at a later time the RNG
 *  passes all tests it will be re-enabled for the next period.
@@ -905,7 +900,7 @@ module_exit (rng_cleanup);
 *  disable the RNG, we will just leave it disabled for the period of
 *  time until the tests are rerun and passed.
 *
-*  For argument sake I tested /proc/urandom with these tests and it
+*  For argument sake I tested /dev/urandom with these tests and it
 *  took 142,095 tries before I got a failure, and urandom isn't as
 *  random as random :)
 */
@@ -923,7 +918,7 @@ static void rng_fips_test_store (int rng_data)
        int j;
        static int last_bit = 0;
 
-       DPRINTK ("ENTER, rng_data = %d\n", rng_data & 0xFF);
+       DPRINTK ("ENTER, rng_data = %d\n", rng_data);
 
        poker[rng_data >> 4]++;
        poker[rng_data & 15]++;
@@ -1010,8 +1005,8 @@ static void rng_run_fips_test (void)
        rng_trusted = rng_test;
 
        /* finally, clear out FIPS variables for start of next run */
-       memset (&poker, 0, sizeof (poker));
-       memset (&runs, 0, sizeof (runs));
+       memset (poker, 0, sizeof (poker));
+       memset (runs, 0, sizeof (runs));
        ones = 0;
        rlength = -1;
        current_bit = 0;
@@ -1019,4 +1014,3 @@ static void rng_run_fips_test (void)
 
        DPRINTK ("EXIT\n");
 }
-
index 2e9e170c46874cad04beecaee7b884101f129dbf..97f99de1cdc920fddf3b7b1fc6e49d29cb6bed95 100644 (file)
@@ -603,17 +603,10 @@ static kdev_t lp_console_device (struct console *c)
 }
 
 static struct console lpcons = {
-       "lp",
-       lp_console_write,
-       NULL,
-       lp_console_device,
-       NULL,
-       NULL,
-       NULL,
-       CON_PRINTBUFFER,
-       0,
-       0,
-       NULL
+       name:           "lp",
+       write:          lp_console_write,
+       device:         lp_console_device,
+       flags:          CON_PRINTBUFFER,
 };
 
 #endif /* console on line printer */
index b5492def344d3f0dab87c22ec129fd3ea0e9cdee..7ee9b021174100bf14dbc41d5173e4aeee6818ef 100644 (file)
@@ -5666,17 +5666,13 @@ static int __init serial_console_setup(struct console *co, char *options)
 }
 
 static struct console sercons = {
-       "ttyS",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 /*
index 35b480a1ce712ca3cda0bd64c21834166453bd42..3496229c6d7af7479dc275c29d4b348e1f89052f 100644 (file)
@@ -2858,17 +2858,13 @@ static int __init serial167_console_setup(struct console *co, char *options)
 
 
 static struct console sercons = {
-       "ttyS",
-       serial167_console_write,
-       NULL,
-       serial167_console_device,
-       serial167_console_wait_key,
-       NULL,
-       serial167_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial167_console_write,
+       device:         serial167_console_device,
+       wait_key:       serial167_console_wait_key,
+       setup:          serial167_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 
index 575cf0bc075972461fbd7a495a58b72ae072bba8..16ad022bd7a4c95dd0e7bd001a97e491f7380dc6 100644 (file)
@@ -490,17 +490,13 @@ static int __init rs285_console_setup(struct console *co, char *options)
 
 static struct console rs285_cons =
 {
-       SERIAL_21285_NAME,
-       rs285_console_write,
-       NULL,
-       rs285_console_device,
-       rs285_console_wait_key,
-       NULL,
-       rs285_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           SERIAL_21285_NAME,
+       write:          rs285_console_write,
+       device:         rs285_console_device,
+       wait_key:       rs285_console_wait_key,
+       setup:          rs285_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 void __init rs285_console_init(void)
index 580427f6b1f68c38599d29224d1f7b6eebd6978c..eaab7d34e6260d455297fc187d8147e687ec3313 100644 (file)
@@ -2016,7 +2016,6 @@ static struct console ambauart_cons =
 #endif
        device:         ambauart_console_device,
        wait_key:       ambauart_console_wait_key,
-       unblank:        NULL,
        setup:          ambauart_console_setup,
        flags:          CON_PRINTBUFFER,
        index:          -1,
index 8f0178d9b71ede39a3dea12a73ecbb61b46162ad..01812ecb0096e85649466114f835f7c212c0d4c2 100644 (file)
@@ -1247,17 +1247,13 @@ static int __init serial_console_setup(struct console *co, char *options)
 }
 
 static struct console sercons = {
-       "ttySC",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttySC",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 /*
index b6b2263a0f3af67ba94f7362e7476620cc9e1b05..ecf7cf05ec12592294a4d259729ad687e40ad139 100644 (file)
@@ -1111,17 +1111,13 @@ static int __init scc_console_setup(struct console *co, char *options)
 
 
 static struct console sercons = {
-       "ttyS",
-       scc_console_write,
-       NULL,
-       scc_console_device,
-       scc_console_wait_key,
-       NULL,
-       scc_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          scc_console_write,
+       device:         scc_console_device,
+       wait_key:       scc_console_wait_key,
+       setup:          scc_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 
index 64ef8436c11c6bee2d586b662a15b7bd23bcfe9d..d4956c45bb9e23bf39ff731f950e51c57a9a2efb 100644 (file)
@@ -1,11 +1,14 @@
 /*
- * $Id: capifs.c,v 1.9 2000/08/20 07:30:13 keil Exp $
+ * $Id: capifs.c,v 1.10 2000/10/12 10:12:35 calle Exp $
  * 
  * (c) Copyright 2000 by Carsten Paeth (calle@calle.de)
  *
  * Heavily based on devpts filesystem from H. Peter Anvin
  * 
  * $Log: capifs.c,v $
+ * Revision 1.10  2000/10/12 10:12:35  calle
+ * Bugfix: second iput(inode) on umount, destroies a foreign inode.
+ *
  * Revision 1.9  2000/08/20 07:30:13  keil
  * changes for 2.4
  *
@@ -69,7 +72,7 @@
 
 MODULE_AUTHOR("Carsten Paeth <calle@calle.de>");
 
-static char *revision = "$Revision: 1.9 $";
+static char *revision = "$Revision: 1.10 $";
 
 struct capifs_ncci {
        struct inode *inode;
@@ -552,6 +555,7 @@ void capifs_free_ncci(char type, unsigned int num)
                                continue;
                        if (np->inode) {
                                inode = np->inode;
+                               np->inode = 0;
                                np->used = 0;
                                inode->i_nlink--;
                                iput(inode);
index 54849eab1900dcbefcd476d90a3151aac265c0fd..471ec549ec9c2b5fbdd6f86041feb1c74c4174e4 100644 (file)
@@ -459,7 +459,7 @@ ergo_inithardware(hysdn_card * card)
        request_region(card->iobase + PCI9050_USER_IO, 1, "HYSDN");
        ergo_stopcard(card);    /* disable interrupts */
        if (request_irq(card->irq, ergo_interrupt, SA_SHIRQ, "HYSDN", card)) {
-               ergo_releasehardware(card);     /* return the aquired hardware */
+               ergo_releasehardware(card); /* return the acquired hardware */
                return (-1);
        }
        /* success, now setup the function pointers */
index e455c074e6f64dc590b4eb5e596078ad2c7bf2c5..e379ae44255d5192ccb78deed94975a03dff23a0 100644 (file)
@@ -302,7 +302,7 @@ int init_sc(void)
                        /*
                         * No interrupt could be used
                         */
-                       pr_debug("Failed to aquire an IRQ line\n");
+                       pr_debug("Failed to acquire an IRQ line\n");
                        continue;
                }
 
index 55cf255b9e5b5f1426e56079cc992de23f1c994f..6ed94158d4e139f4185a1547f823e48724799bee 100644 (file)
@@ -2890,17 +2890,13 @@ static int __init serial_console_setup(struct console *co, char *options)
 }
 
 static struct console sercons = {
-       "ttyS",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 /*
index 7ca3c1efdb6bc8600ade0266ac41589b985cdf21..3c5e330b52f271f188b43acd92721866efda2891 100644 (file)
@@ -4,7 +4,7 @@
 #
 # 19971130     Moved the amateur radio related network drivers from 
 #              drivers/net/ to drivers/hamradio for easier maintainance.
-#               Joerg Reuter DL1BKE <jreuter@poboxes.com>
+#               Joerg Reuter DL1BKE <jreuter@yaina.de>
 #
 # 20000806     Rewritten to use lists instead of if-statements.
 #              Christoph Hellwig <hch@caldera.de>
index 6319f983de17fe99501a997c40269cb20b3fd8c4..5f765d5bf9ef7e8b694cc06dc7211460ac265a02 100644 (file)
@@ -652,7 +652,7 @@ static void __exit bpq_cleanup_driver(void)
                unregister_netdev(&bpq->axdev);
 }
 
-MODULE_AUTHOR("Joerg Reuter DL1BKE <jreuter@poboxes.com>");
+MODULE_AUTHOR("Joerg Reuter DL1BKE <jreuter@yaina.de>");
 MODULE_DESCRIPTION("Transmit and receive AX.25 packets over Ethernet");
 module_init(bpq_init_driver);
 module_exit(bpq_cleanup_driver);
index 99d8c65aa5dfdb3f5aed27083c304402c55f19f7..2ea55b0f1dbff9fcdd193dde3ed39ff76de27319 100644 (file)
 
    vy 73,
    Joerg Reuter        ampr-net: dl1bke@db0pra.ampr.org
-               AX-25   : DL1BKE @ DB0ACH.#NRW.DEU.EU
-               Internet: jreuter@poboxes.com
-               www     : http://poboxes.com/jreuter/
+               AX-25   : DL1BKE @ DB0ABH.#BAY.DEU.EU
+               Internet: jreuter@yaina.de
+               www     : http://yaina.de/jreuter
 */
 
 /* ----------------------------------------------------------------------- */
@@ -2226,8 +2226,8 @@ static void __exit scc_cleanup_driver(void)
        scc_net_procfs_remove();
 }
 
-MODULE_AUTHOR("Joerg Reuter <jreuter@poboxes.com>");
+MODULE_AUTHOR("Joerg Reuter <jreuter@yaina.de>");
 MODULE_DESCRIPTION("AX.25 Device Driver for Z8530 based HDLC cards");
-MODULE_SUPPORTED_DEVICE("scc");
+MODULE_SUPPORTED_DEVICE("Z8530 based SCC cards for Amateur Radio");
 module_init(scc_init_driver);
 module_exit(scc_cleanup_driver);
index 44276a3d90483a700edf0c276ecf17a32706500f..9be388cf82081d330bd1862d63ca600e50288885 100644 (file)
@@ -683,11 +683,11 @@ pcnet32_probe1(unsigned long ioaddr, unsigned char irq_line, int shared, int car
     if (fdx && !(lp->options & PORT_ASEL) && full_duplex[card_idx])
        lp->options |= PORT_FD;
     
-    lp->a = *a;
     if (a == NULL) {
       printk(KERN_ERR "pcnet32: No access methods\n");
       return -ENODEV;
     }
+    lp->a = *a;
     
     /* detect special T1/E1 WAN card by checking for MAC address */
     if (dev->dev_addr[0] == 0x00 && dev->dev_addr[1] == 0xe0 && dev->dev_addr[2] == 0x75)
index 0b945d36fa3fccc826daf596acee00300dceded2..5ef2a4a1ee3808c812a5dcdbe230a187907fa73e 100644 (file)
@@ -1110,7 +1110,7 @@ struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev)
  *   dev - pointer to device information
  *
  * Functional Description:
- *   This function aquires the driver lock and only calls
+ *   This function acquires the driver lock and only calls
  *   skfp_ctl_set_multicast_list_wo_lock then.
  *   This routine follows a fairly simple algorithm for setting the
  *   adapter filters and CAM:
index bfbb8273adcaaf16c5a4f82395db4bed101a4e64..33e98c23e776bd1ba6756c42c9b6b4efeb548242 100644 (file)
  *                          - Incresed tx_timeout beacuse of auto-neg.
  *                          - Adjusted timers for forced speeds.
  *
+ *     v1.12 Oct 12, 2000   - Minor fixes (memleak, init, etc.)
+ *
  *******************************************************************************/
 
                                                                                 
@@ -153,14 +155,14 @@ typedef u32 (TLanIntVectorFunc)( struct net_device *, u16 );
 
 
 /* For removing EISA devices */
-static struct net_device       *TLan_Eisa_Devices = NULL;
+static struct net_device       *TLan_Eisa_Devices;
 
-static int             TLanDevicesInstalled = 0;
+static int             TLanDevicesInstalled;
 
 /* Force speed, duplex and aui settings */
-static int             aui = 0;
-static int             duplex = 0
-static int             speed = 0;
+static int             aui;
+static int             duplex; 
+static int             speed;
 
 MODULE_AUTHOR("Maintainer: Torben Mathiasen <torben.mathiasen@compaq.com>");
 MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters");
@@ -174,14 +176,14 @@ EXPORT_NO_SYMBOLS;
 #undef MONITOR
 
 /* Turn on debugging. See linux/Documentation/networking/tlan.txt for details */
-static  int            debug = 0;
+static  int            debug;
 
-static int             bbuf = 0;
+static int             bbuf;
 static u8              *TLanPadBuffer;
 static char            TLanSignature[] = "TLAN";
-static const char *tlan_banner = "ThunderLAN driver v1.11\n";
-static int tlan_have_pci = 0;
-static int tlan_have_eisa = 0;
+static const char *tlan_banner = "ThunderLAN driver v1.12\n";
+static int tlan_have_pci;
+static int tlan_have_eisa;
 
 const char *media[] = {
        "10BaseT-HD ", "10BaseT-FD ","100baseTx-HD ", 
@@ -244,7 +246,7 @@ static struct pci_device_id tlan_pci_tbl[] __devinitdata = {
 };
 MODULE_DEVICE_TABLE(pci, tlan_pci_tbl);                
 
-static int     TLan_EisaProbe( void );
+static void    TLan_EisaProbe( void );
 static void    TLan_Eisa_Cleanup( void );
 static int      TLan_Init( struct net_device * );
 static int     TLan_Open( struct net_device *dev );
@@ -371,7 +373,7 @@ TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type )
         **************************************************************/
 
 
-static void __exit tlan_remove_one( struct pci_dev *pdev)
+static void __devexit tlan_remove_one( struct pci_dev *pdev)
 {
        struct net_device *dev = pdev->driver_data;
        TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
@@ -397,7 +399,6 @@ static struct pci_driver tlan_driver = {
 
 static int __init tlan_probe(void)
 {
-       int             rc;
        static int      pad_allocated = 0;
        
        printk(KERN_INFO "%s", tlan_banner);
@@ -417,10 +418,10 @@ static int __init tlan_probe(void)
        
        /* Use new style PCI probing. Now the kernel will
           do most of this for us */
-       rc = pci_module_init(&tlan_driver);
+       pci_module_init(&tlan_driver);
 
        TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n");
-       rc = TLan_EisaProbe();
+       TLan_EisaProbe();
                
        printk(KERN_INFO "TLAN: %d device%s installed, PCI: %d  EISA: %d\n", 
                 TLanDevicesInstalled, TLanDevicesInstalled == 1 ? "" : "s",
@@ -459,7 +460,7 @@ static int __devinit tlan_init_one( struct pci_dev *pdev,
         *
         **************************************************************/
 
-static int __init TLan_probe1(struct pci_dev *pdev, 
+static int __devinit TLan_probe1(struct pci_dev *pdev, 
                                long ioaddr, int irq, int rev, const struct pci_device_id *ent )
 {
 
@@ -475,8 +476,6 @@ static int __init TLan_probe1(struct pci_dev *pdev,
        }
        
        priv = dev->priv;
-       memset(priv, 0, sizeof(TLanPrivateInfo));
-       
                
        dev->base_addr = ioaddr;
        dev->irq = irq;
@@ -485,8 +484,11 @@ static int __init TLan_probe1(struct pci_dev *pdev,
        /* Is this a PCI device? */
        if (pdev) {
                priv->adapter = &board_info[ent->driver_data];
-               if (pci_enable_device(pdev))
+               if (pci_enable_device(pdev)) {
+                       unregister_netdev(dev);
+                       kfree(dev);
                        return -1;
+               }
                pci_read_config_byte ( pdev, PCI_REVISION_ID, &pci_rev);
                priv->adapterRev = pci_rev; 
                pci_set_master(pdev);
@@ -618,7 +620,7 @@ module_exit(tlan_exit);
         *
         *************************************************************/
 
-static int __init TLan_EisaProbe (void) 
+static void  __init TLan_EisaProbe (void) 
 {
        long    ioaddr;
        int     rc = -ENODEV;
@@ -627,7 +629,7 @@ static int __init TLan_EisaProbe (void)
 
        if (!EISA_bus) {        
                TLAN_DBG(TLAN_DEBUG_PROBE, "No EISA bus present\n");
-               return 0;
+               return;
        }
        
        /* Loop through all slots of the EISA bus */
@@ -697,8 +699,6 @@ static int __init TLan_EisaProbe (void)
                
        }
 
-       return rc;
-
 } /* TLan_EisaProbe */
 
 
@@ -822,7 +822,7 @@ static int TLan_Open( struct net_device *dev )
        if ( err ) {
                printk(KERN_ERR "TLAN:  Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq );
                MOD_DEC_USE_COUNT;
-               return -EAGAIN;
+               return err;
        }
        
        init_timer(&priv->timer);
@@ -899,7 +899,6 @@ static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
 static void TLan_tx_timeout(struct net_device *dev)
 {
-       //TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
        
        TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Transmit timed out.\n", dev->name);
        
@@ -908,7 +907,7 @@ static void TLan_tx_timeout(struct net_device *dev)
        TLan_ReadAndClearStats( dev, TLAN_IGNORE );
        TLan_ResetAdapter( dev );
        dev->trans_start = jiffies;
-       netif_start_queue( dev );       
+       netif_wake_queue( dev );        
 
 }
        
@@ -2640,9 +2639,8 @@ void TLan_PhyFinishAutoNeg( struct net_device *dev )
         *
         * ******************************************************************/
 
-void TLan_PhyMonitor( struct net_device *data )
+void TLan_PhyMonitor( struct net_device *dev )
 {
-       struct net_device *dev = (struct net_device *)data;
        TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
        u16     phy;
        u16     phy_status;
index 30ab655af2547492af92a93602dc160da858d607..5c43c9a3abbdb7e7a18e41df9c6b341eeb262271 100644 (file)
@@ -3680,8 +3680,8 @@ static void wavelan_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 #endif
 
        /* Prevent reentrancy. We need to do that because we may have
-        * multiple interrupt handler running concurently.
-        * It is safe because wv_splhi() disable interrupts before aquiring
+        * multiple interrupt handler running concurrently.
+        * It is safe because wv_splhi() disables interrupts before acquiring
         * the spinlock. */
        spin_lock(&lp->spinlock);
 
index 68d5120e29559c03be1c2aee03a5285f6b52c86d..95a778e96aec347d745f5dee5668f41b8d142d61 100644 (file)
 #
-# Makefile for the kernel miscellaneous drivers.
+# Makefile for the kernel Parallel port device drivers.
 #
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
+# Note! Parport is the Borg.  We have assimilated some other
+# drivers in the `char', `net' and `scsi' directories,
+# but left them there to allay suspicion.
 #
-# Note 2! The CFLAGS definitions are now inherited from the
-# parent makes..
+# 7 October 2000, Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+# Rewritten to use lists instead of if-statements.
 #
-# Note 3! Parport is the Borg.  We have assimilated some other
-# drivers in the `char', `net' and `scsi' directories, but left them
-# there to allay suspicion.
-
-SUB_DIRS     := 
-MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS)
 
 L_TARGET := parport.a
-MX_OBJS  :=
-LX_OBJS  := 
-MI_OBJS  :=
-MIX_OBJS :=
 
-ifeq ($(CONFIG_PARPORT),y)
-  L_OBJS += share.o ieee1284.o ieee1284_ops.o procfs.o
+export-objs    := init.o parport_pc.o
 
-  ifeq ($(CONFIG_PARPORT_1284),y)
-    L_OBJS += daisy.o probe.o
-  endif
+list-multi     := parport.o
+parport-objs   := share.o ieee1284.o ieee1284_ops.o init.o procfs.o
 
-  ifeq ($(CONFIG_PARPORT_PC),y)
-    LX_OBJS += parport_pc.o
-  else
-    ifeq ($(CONFIG_PARPORT_PC),m)
-      MX_OBJS += parport_pc.o
-    endif
-  endif
-  ifeq ($(CONFIG_PARPORT_AMIGA),y)
-    LX_OBJS += parport_amiga.o
-  else
-    ifeq ($(CONFIG_PARPORT_AMIGA),m)
-      M_OBJS += parport_amiga.o
-    endif
-  endif
-  ifeq ($(CONFIG_PARPORT_MFC3),y)
-    LX_OBJS += parport_mfc3.o
-  else
-    ifeq ($(CONFIG_PARPORT_MFC3),m)
-      M_OBJS += parport_mfc3.o
-    endif
-  endif
-  ifeq ($(CONFIG_PARPORT_ATARI),y)
-    LX_OBJS += parport_atari.o
-  else
-    ifeq ($(CONFIG_PARPORT_ATARI),m)
-      M_OBJS += parport_atari.o
-    endif
-  endif
-  ifeq ($(CONFIG_PARPORT_SUNBPP),y)
-    LX_OBJS += parport_sunbpp.o
-  else
-    ifeq ($(CONFIG_PARPORT_SUNBPP),m)
-      MX_OBJS += parport_sunbpp.o
-    endif
-  endif
-  LX_OBJS += init.o
-else
-  ifeq ($(CONFIG_PARPORT),m)
-    MI_OBJS += share.o ieee1284.o ieee1284_ops.o
-    ifeq ($(CONFIG_PARPORT_1284),y)
-      MI_OBJS += daisy.o probe.o
-    endif
-    ifneq ($(CONFIG_PROC_FS),n) 
-      MI_OBJS += procfs.o
-    endif
-    MIX_OBJS += init.o
-    M_OBJS += parport.o
-  endif
-  ifeq ($(CONFIG_PARPORT_PC),m)
-    MX_OBJS += parport_pc.o
-  endif
-  ifeq ($(CONFIG_PARPORT_AMIGA),m)
-    M_OBJS += parport_amiga.o
-  endif
-  ifeq ($(CONFIG_PARPORT_MFC3),m)
-    M_OBJS += parport_mfc3.o
-  endif
-  ifeq ($(CONFIG_PARPORT_ATARI),m)
-    M_OBJS += parport_atari.o
-  endif
-  ifeq ($(CONFIG_PARPORT_SUNBPP),m)
-    M_OBJS += parport_sunbpp.o
-  endif
+ifeq ($(CONFIG_PARPORT_1284),y)
+       parport-objs    += daisy.o probe.o
 endif
 
+obj-$(CONFIG_PARPORT)          += parport.o
+obj-$(CONFIG_PARPORT_PC)       += parport_pc.o
+obj-$(CONFIG_PARPORT_AMIGA)    += parport_amiga.o
+obj-$(CONFIG_PARPORT_MFC3)     += parport_mfc3.o
+obj-$(CONFIG_PARPORT_ATARI)    += parport_atari.o
+obj-$(CONFIG_PARPORT_SUNBPP)   += parport_sunbpp.o
+
+# Extract lists of the multi-part drivers.
+# The 'int-*' lists are the intermediate files used to build the multi's.
+multi-y                := $(filter $(list-multi), $(obj-y))
+multi-m                := $(filter $(list-multi), $(obj-m))
+int-y          := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
+int-m          := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
+
+# Take multi-part drivers out of obj-y and put components in.
+obj-y          := $(filter-out $(list-multi), $(obj-y)) $(int-y)
+
+# Translate to Rules.make lists.
+L_OBJS         := $(filter-out $(export-objs), $(obj-y))
+LX_OBJS                := $(filter     $(export-objs), $(obj-y))
+M_OBJS         := $(sort $(filter-out  $(export-objs), $(obj-m)))
+MX_OBJS                := $(sort $(filter      $(export-objs), $(obj-m)))
+MI_OBJS                := $(sort $(filter-out  $(export-objs), $(int-m)))
+MIX_OBJS       := $(sort $(filter      $(export-objs), $(int-m)))
+
 include $(TOPDIR)/Rules.make
 
-# Special rule to build the composite parport.o module
-parport.o: $(MI_OBJS) $(MIX_OBJS)
-       $(LD) $(LD_RFLAG) -r -o $@ $(MI_OBJS) $(MIX_OBJS)
+parport.o: $(parport-objs)
+       $(LD) -r -o $@ $(parport-objs)
index f5a2c55406e97062777e3b17261ba1e06cbe89da..41478ea516443a15e459bda21afb06f18584a5c3 100644 (file)
@@ -477,7 +477,7 @@ static inline unsigned int pci_calc_resource_flags(unsigned int flags)
 /*
  * Find the extent of a PCI decode..
  */
-static u32 pci_size(u32 base, u32 mask)
+static u32 pci_size(u32 base, unsigned long mask)
 {
        u32 size = mask & base;         /* Find the significant bits */
        size = size & ~(size-1);        /* Get the lowest of them to find the decode size */
index 4569e0dd8f0b3fa6eab5b73a876590277a08088e..59e1dbdc6a5be7d6f6d15fbd255674e3f1dc8167 100644 (file)
@@ -626,7 +626,7 @@ static void yenta_config_init(pci_socket_t *socket)
                        PCI_COMMAND_WAIT);
 
        /* MAGIC NUMBERS! Fixme */
-       config_writeb(socket, PCI_CACHE_LINE_SIZE, 32);
+       config_writeb(socket, PCI_CACHE_LINE_SIZE, L1_CACHE_BYTES / 4);
        config_writeb(socket, PCI_LATENCY_TIMER, 168);
        config_writeb(socket, PCI_SEC_LATENCY_TIMER, 176);
        config_writeb(socket, PCI_PRIMARY_BUS, dev->bus->number);
index aec5d83af3b33a9cfae816e92626d179c454063e..624d7dfd7f0463f4df84b04d5df547e4fd861f32 100644 (file)
@@ -795,17 +795,12 @@ static int __init con3215_consetup(struct console *co, char *options)
  *  The console structure for the 3215 console
  */
 static struct console con3215 = {
-       "tty3215",
-       con3215_write,
-       NULL,
-       con3215_device,
-       NULL,
-       con3215_unblank,
-       con3215_consetup,
-       CON_PRINTBUFFER,
-       0,
-       0,
-       NULL
+       name:           "tty3215",
+       write:          con3215_write,
+       device:         con3215_device,
+       unblank:        con3215_unblank,
+       setup:          con3215_consetup,
+       flags:          CON_PRINTBUFFER,
 };
 
 #endif
index 16d5553e8e5452b379c9d3315d0081eadbf58968..238dd21505b1a4796b23bb202a2678d6b6db3d29 100644 (file)
@@ -35,17 +35,10 @@ kdev_t hwc_console_device (struct console *);
 struct console hwc_console =
 {
 
-       hwc_console_name,
-       hwc_console_write,
-       NULL,
-       hwc_console_device,
-       NULL,
-       NULL,
-       NULL,
-       CON_PRINTBUFFER,
-       0,
-       0,
-       NULL
+       name:           hwc_console_name,
+       write:          hwc_console_write,
+       device:         hwc_console_device,
+       flags:          CON_PRINTBUFFER,
 };
 
 void 
index cf38aa1d837a4dac08937bf8d70b29716d0d1fb4..eaac51698880094c93afc03c6771ad41261904ed 100644 (file)
@@ -1,76 +1,23 @@
 #
-# Makefile for the linux kernel.
+# Makefile for the kernel SPARC audio drivers.
 #
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-#
-# sbus audio drivers
+# 7 October 2000, Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+# Rewritten to use lists instead of if-statements.
 #
 
 O_TARGET := sparcaudio.o
-O_OBJS   :=
-M_OBJS   :=
-M :=
-MM :=
-
-ifeq ($(CONFIG_SPARCAUDIO),y)
-M=y
-else
-  ifeq ($(CONFIG_SPARCAUDIO),m)
-  MM=y
-  endif
-endif
-
-ifeq ($(CONFIG_SPARCAUDIO_AMD7930),y)
-M=y
-OX_OBJS += amd7930.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_AMD7930),m)
-  MM=y
-  MX_OBJS += amd7930.o
-  endif
-endif
-
-ifeq ($(CONFIG_SPARCAUDIO_CS4231),y)
-M=y
-O_OBJS += cs4231.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_CS4231),m)
-  MM=y
-  M_OBJS += cs4231.o
-  endif
-endif
 
-ifeq ($(CONFIG_SPARCAUDIO_DBRI),y)
-M=y
-OX_OBJS += dbri.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_DBRI),m)
-  MM=y
-  MX_OBJS += dbri.o
-  endif
-endif
+export-objs    := audio.o amd7930.o dbri.o
 
-ifeq ($(CONFIG_SPARCAUDIO_DUMMY),y)
-M=y
-O_OBJS += dmy.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_DUMMY),m)
-  MM=y
-  M_OBJS += dmy.o
-  endif
-endif
+obj-$(CONFIG_SPARCAUDIO)               += audio.o
+obj-$(CONFIG_SPARCAUDIO_AMD7930)       += amd7930.o
+obj-$(CONFIG_SPARCAUDIO_CS4231)                += cs4231.o
+obj-$(CONFIG_SPARCAUDIO_DBRI)          += dbri.o
+obj-$(CONFIG_SPARCAUDIO_DUMMY)         += dmy.o
 
-ifdef M
-OX_OBJS += audio.o
-else
-  ifdef MM
-  MX_OBJS += audio.o
-  endif
-endif
+O_OBJS         := $(filter-out $(export-objs), $(obj-y))
+OX_OBJS                := $(filter     $(export-objs), $(obj-y))
+M_OBJS         := $(sort $(filter-out  $(export-objs), $(obj-m)))
+MX_OBJS                := $(sort $(filter      $(export-objs), $(obj-m)))
 
 include $(TOPDIR)/Rules.make
index 1cbe77241914e0a94b44ac2f2defadc3eb658526..c7f8be99c94910a4778648a52ebe4db795029875 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: dbri.h,v 1.12 1999/09/21 14:37:34 davem Exp $
+/* $Id: dbri.h,v 1.13 2000/10/13 00:34:24 uzi Exp $
  * drivers/sbus/audio/cs4231.h
  *
  * Copyright (C) 1997 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de)
 #define REG9   0x24UL          /* Interrupt Queue Pointer */
 
 #define DBRI_NO_CMDS   64
-#define DBRI_NO_INTS   2
+#define DBRI_NO_INTS   1       /* Note: the value of this define was
+                                * originally 2.  The ringbuffer to store
+                                * interrupts in dma is currently broken.
+                                * This is a temporary fix until the ringbuffer
+                                * is fixed.
+                                */
 #define DBRI_INT_BLK   64
 #define DBRI_NO_DESCS  64
 
index 7c5a21b2cacd78c9d5d83bfb98ddfcc653dba4f3..1679cb6d4d7351899889aa657688400de74d2fed 100644 (file)
 #
-# Makefile for the linux kernel.
+# Makefile for the kernel miscellaneous SPARC device drivers.
 #
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
 # Dave Redman Frame Buffer tuning support.
-# OK this is kind of ugly but it does allow drivers to be added fairly
-# easily. and you can even choose what sort of support you want.
+#
+# 7 October 2000, Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+# Rewritten to use lists instead of if-statements.
+#
 
 O_TARGET := sunchar.o
 O_OBJS   := ${O_OBJ} sunkbd.o sunkbdmap.o sunmouse.o sunserial.o zs.o
-M_OBJS   :=
 
-ifeq ($(ARCH),sparc64)
+vfc-objs := vfc_dev.o vfc_i2c.o
 
 ifeq ($(CONFIG_PCI),y)
-
-OX_OBJS += su.o
-O_OBJS += pcikbd.o
-
-ifeq ($(CONFIG_SAB82532),y)
-O_OBJS += sab82532.o
-else
-  ifeq ($(CONFIG_SAB82532),m)
-  M_OBJS += sab82532.o
-  endif
-endif
-
-ifeq ($(CONFIG_ENVCTRL),y)
-O_OBJS += envctrl.o
-else
-  ifeq ($(CONFIG_ENVCTRL),m)
-  M_OBJS += envctrl.o
-  endif
-endif
-
-ifeq ($(CONFIG_DISPLAY7SEG),y)
-O_OBJS += display7seg.o
-else
-  ifeq ($(CONFIG_DISPLAY7SEG),m)
-  M_OBJS += display7seg.o
-  endif
-endif
-
-endif # eq($(CONFIG_PCI,y)
-
-ifeq ($(CONFIG_OBP_FLASH),y)
-O_OBJS += flash.o
-else
-  ifeq ($(CONFIG_OBP_FLASH),m)
-  M_OBJS += flash.o
-  endif
+OX_OBJS        += su.o
+O_OBJS += pcikbd.o
 endif
 
-else # !eq($(ARCH),sparc64)
+ifeq ($(ARCH),sparc64)
 
 ifeq ($(CONFIG_PCI),y)
-OX_OBJS += su.o
-O_OBJS += pcikbd.o
-endif
-
-endif # !eq($(ARCH),sparc64)
-
-ifeq ($(CONFIG_SUN_OPENPROMIO),y)
-O_OBJS += openprom.o
-else
-  ifeq ($(CONFIG_SUN_OPENPROMIO),m)
-  M_OBJS += openprom.o
-  endif
+obj-$(CONFIG_SAB82532)                 += sab82532.o
+obj-$(CONFIG_ENVCTRL)                  += envctrl.o
+obj-$(CONFIG_DISPLAY7SEG)              += display7seg.o
 endif
 
-ifeq ($(CONFIG_SUN_MOSTEK_RTC),y)
-O_OBJS += rtc.o
-else
-  ifeq ($(CONFIG_SUN_MOSTEK_RTC),m)
-  M_OBJS += rtc.o
-  endif
+obj-$(CONFIG_OBP_FLASH)                        += flash.o
 endif
 
-ifeq ($(CONFIG_SUN_BPP),y)
-O_OBJS += bpp.o
-else
-  ifeq ($(CONFIG_SUN_BPP),m)
-  M_OBJS += bpp.o
-  endif
-endif
-
-ifeq ($(CONFIG_SUN_VIDEOPIX),y)
-O_OBJS += vfc.o
-else
-  ifeq ($(CONFIG_SUN_VIDEOPIX),m)
-  M_OBJS += vfc.o
-  endif
-endif
+obj-$(CONFIG_SUN_OPENPROMIO)           += openprom.o
+obj-$(CONFIG_SUN_MOSTEK_RTC)           += rtc.o
+obj-$(CONFIG_SUN_BPP)                  += bpp.o
+obj-$(CONFIG_SUN_VIDEOPIX)             += vfc.o
+obj-$(CONFIG_SUN_AURORA)               += aurora.o
+obj-$(CONFIG_TADPOLE_TS102_UCTRL)      += uctrl.o
+obj-$(CONFIG_SUN_JSFLASH)              += jsflash.o
 
-ifeq ($(CONFIG_SUN_AURORA),y)
-O_OBJS += aurora.o
-else
-  ifeq ($(CONFIG_SUN_AURORA),m)
-  M_OBJS += aurora.o
-  endif
-endif
-
-ifeq ($(CONFIG_TADPOLE_TS102_UCTRL),y)
-O_OBJS += uctrl.o
-else
-  ifeq ($(CONFIG_TADPOLE_TS102_UCTRL),m)
-  M_OBJS += uctrl.o
-  endif
-endif
-
-ifeq ($(CONFIG_SUN_JSFLASH),y)
-O_OBJS += jsflash.o
-endif
-ifeq ($(CONFIG_SUN_JSFLASH),m)
-M_OBJS += jsflash.o
-endif
+O_OBJS := $(obj-y)
+M_OBJS := $(obj-m)
 
 include $(TOPDIR)/Rules.make
 
 sunkbdmap.o: sunkeymap.c
 
-vfc.o: vfc_dev.o vfc_i2c.o
-       $(LD) -r -o vfc.o vfc_dev.o vfc_i2c.o
+vfc.o: $(vfc-objs)
+       $(LD) -r -o $@ $(vfc-objs)
index 7d010f0359729d438a1256becd827466694f481e..be1071c784ae399eca3a3859ca103a19f2e791d8 100644 (file)
@@ -2596,17 +2596,13 @@ sab82532_console_setup(struct console *con, char *options)
 }
 
 static struct console sab82532_console = {
-       "ttyS",
-       sab82532_console_write,
-       NULL,
-       sab82532_console_device,
-       sab82532_console_wait_key,
-       NULL,
-       sab82532_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          sab82532_console_write,
+       device:         sab82532_console_device,
+       wait_key:       sab82532_console_wait_key,
+       setup:          sab82532_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 int __init sab82532_console_init(void)
index c6e90328ece137be394db3e387da540cb555aaa4..416bfd58aa110bcfa2450494ebfc4aee446d2e36 100644 (file)
@@ -2938,17 +2938,13 @@ static int __init serial_console_setup(struct console *co, char *options)
 }
 
 static struct console sercons = {
-       "ttyS",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 int su_console_registered = 0;
index 7acfb2abae0117f851e7ff259b74e15c2beaea1a..aa6472d492a79281d1b826c154847f3274beb04e 100644 (file)
@@ -2830,17 +2830,13 @@ static int __init zs_console_setup(struct console *con, char *options)
 }
 
 static struct console zs_console = {
-       "ttyS",
-       zs_console_write,
-       NULL,
-       zs_console_device,
-       zs_console_wait_key,
-       NULL,
-       zs_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          zs_console_write,
+       device:         zs_console_device,
+       wait_key:       zs_console_wait_key,
+       setup:          zs_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 static int __init zs_console_init(void)
index ba54b2bf0119d0c5ec31c3d3b76d8c21045791ea..a02006cb3e34d9c8bd2dddfceb6b6a78cff5e6ce 100644 (file)
@@ -1346,7 +1346,7 @@ int aha152x_release(struct Scsi_Host *shpnt)
 
 /*
  * setup controller to generate interrupts depending
- * on current state (lock has to be aquired)
+ * on current state (lock has to be acquired)
  *
  */ 
 static int setup_expected_interrupts(struct Scsi_Host *shpnt)
index 166ec8c5903be0313ecdddea890520b37b8e0110..8bb8cd96d99c1ab7eb035063a5113079c157b638 100644 (file)
@@ -7749,7 +7749,7 @@ aic785x_cable_detect(struct aic7xxx_host *p, int *int_50,
  * Description:
  *   Detect the cables that are present on the 2940-UWPro cards
  *
- * NOTE: This functions assumes the SEEPROM will have already been aquired
+ * NOTE: This function assumes the SEEPROM will have already been acquired
  *       prior to invocation of this function.
  *-F*************************************************************************/
 static void
@@ -7795,7 +7795,7 @@ aic2940_uwpro_wide_cable_detect(struct aic7xxx_host *p, int *int_68,
  * Description:
  *   Detect the cables that are present on aic787x class controller chips
  *
- * NOTE: This functions assumes the SEEPROM will have already been aquired
+ * NOTE: This function assumes the SEEPROM will have already been acquired
  *       prior to invocation of this function.
  *-F*************************************************************************/
 static void
@@ -7842,7 +7842,7 @@ aic787x_cable_detect(struct aic7xxx_host *p, int *int_50, int *int_68,
  * Description:
  *   Detect the termination settings present on ultra2 class controllers
  *
- * NOTE: This functions assumes the SEEPROM will have already been aquired
+ * NOTE: This function assumes the SEEPROM will have already been acquired
  *       prior to invocation of this function.
  *-F*************************************************************************/
 static void
index 2f0c1a185e3dad181449a36e622302b1362152d3..6d312168c056ffd2fc8e7a147f87c6c758642898 100644 (file)
@@ -1104,7 +1104,7 @@ int imm_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
 }
 
 /*
- * Aimmrently the the disk->capacity attribute is off by 1 sector 
+ * Apparently the the disk->capacity attribute is off by 1 sector 
  * for all disk drives.  We add the one here, but it should really
  * be done in sd.c.  Even if it gets fixed there, this will still
  * work.
@@ -1118,8 +1118,6 @@ int imm_biosparam(Disk * disk, kdev_t dev, int ip[])
        ip[0] = 0xff;
        ip[1] = 0x3f;
        ip[2] = (disk->capacity + 1) / (ip[0] * ip[1]);
-       if (ip[2] > 1023)
-           ip[2] = 1023;
     }
     return 0;
 }
index 542876daf7c9ab71798907d48a7a8c468f6d015c..2e9fd7313a606ba9125499a884107121a2703a88 100644 (file)
@@ -2155,8 +2155,11 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
               (scsi_memory_upper_value - scsi_init_memory_start) / 1024);
 #endif
 
-       /* Remove it from the linked list and /proc */
-       if (tpnt->present) {
+       /*
+        * Remove it from the linked list and /proc if all
+        * hosts were successfully removed (ie preset == 0)
+        */
+       if (!tpnt->present) {
                Scsi_Host_Template **SHTp = &scsi_hosts;
                Scsi_Host_Template *SHT;
 
index b0ccff4f88bdd75aa0243d02f328d1d81a431ecc..fdf62b8482a07da7dc88d4081f3242ddb979971f 100644 (file)
@@ -2208,17 +2208,13 @@ static int __init zs_console_setup(struct console *con, char *options)
 }
 
 static struct console sgi_console_driver = {
-        "ttyS",
-        zs_console_write,       /* write */
-        NULL,                   /* read */
-        zs_console_device,      /* device */
-        zs_console_wait_key,    /* wait_key */
-        NULL,                   /* unblank */
-        zs_console_setup,       /* setup */
-        CON_PRINTBUFFER,
-        -1,
-        0,
-        NULL
+       name:           "ttyS",
+       write:          zs_console_write,
+       device:         zs_console_device,
+       wait_key:       zs_console_wait_key,
+       setup:          zs_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 /*
index 7fa446c0053af0e817c87fa3dfc6109e63bf7c1a..f8ad9cf179ba614b772ab0290596645e24d83f75 100644 (file)
@@ -1998,17 +1998,13 @@ static int __init serial_console_setup(struct console *co, char *options)
 }
 
 static struct console sercons = {
-       "ttyS",
-       serial_console_write,
-       NULL,
-       serial_console_device,
-       serial_console_wait_key,
-       NULL,
-       serial_console_setup,
-       CON_PRINTBUFFER,
-       -1,
-       0,
-       NULL
+       name:           "ttyS",
+       write:          serial_console_write,
+       device:         serial_console_device,
+       wait_key:       serial_console_wait_key,
+       setup:          serial_console_setup,
+       flags:          CON_PRINTBUFFER,
+       index:          -1,
 };
 
 /*
index 7d948d95920f11c6b73b13ac88e8f9d1f29f283c..1db828b24066e859ed5d5750a72a156ca64ecfe4 100644 (file)
@@ -1009,8 +1009,10 @@ static int usbin_start(struct usb_audiodev *as)
                }
                spin_lock_irqsave(&as->lock, flags);
        }
-       if (u->dma.count >= u->dma.dmasize && !u->dma.mapped)
+       if (u->dma.count >= u->dma.dmasize && !u->dma.mapped) {
+               spin_unlock_irqrestore(&as->lock, flags);
                return 0;
+       }
        u->flags |= FLG_RUNNING;
        if (!(u->flags & FLG_URB0RUNNING)) {
                urb = &u->durb[0].urb;
@@ -1372,8 +1374,10 @@ static int usbout_start(struct usb_audiodev *as)
                }
                spin_lock_irqsave(&as->lock, flags);
        }
-       if (u->dma.count <= 0 && !u->dma.mapped)
+       if (u->dma.count <= 0 && !u->dma.mapped) {
+               spin_unlock_irqrestore(&as->lock, flags);
                return 0;
+       }
                u->flags |= FLG_RUNNING;
        if (!(u->flags & FLG_URB0RUNNING)) {
                urb = &u->durb[0].urb;
@@ -2772,6 +2776,14 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
        init_waitqueue_head(&as->usbin.dma.wait);
        init_waitqueue_head(&as->usbout.dma.wait);
        spin_lock_init(&as->lock);
+       spin_lock_init(&as->usbin.durb[0].urb.lock);
+       spin_lock_init(&as->usbin.durb[1].urb.lock);
+       spin_lock_init(&as->usbin.surb[0].urb.lock);
+       spin_lock_init(&as->usbin.surb[1].urb.lock);
+       spin_lock_init(&as->usbout.durb[0].urb.lock);
+       spin_lock_init(&as->usbout.durb[1].urb.lock);
+       spin_lock_init(&as->usbout.surb[0].urb.lock);
+       spin_lock_init(&as->usbout.surb[1].urb.lock);
        as->state = s;
        as->usbin.interface = asifin;
        as->usbout.interface = asifout;
index 80a1ebbf4174aacd275f0d151be86e24ee1e0d5d..c35f75c81e5bfec9325069a080f3cb9e0536cfc8 100644 (file)
@@ -562,6 +562,7 @@ static int mdc800_device_open (struct inode* inode, struct file *file)
        mdc800->camera_request_ready=0;
 
        retval=0;
+       mdc800->irq_urb->dev = mdc800->dev;
        if (usb_submit_urb (mdc800->irq_urb))
        {
                err ("request USB irq fails (submit_retval=%i urb_status=%i).",retval, mdc800->irq_urb->status);
@@ -640,6 +641,7 @@ static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, lof
                                mdc800->out_ptr=0;
 
                                /* Download -> Request new bytes */
+                               mdc800->download_urb->dev = mdc800->dev;
                                if (usb_submit_urb (mdc800->download_urb))
                                {
                                        err ("Can't submit download urb (status=%i)",mdc800->download_urb->status);
@@ -738,6 +740,7 @@ static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t l
 
                        mdc800->state=WORKING;
                        memcpy (mdc800->write_urb->transfer_buffer, mdc800->in,8);
+                       mdc800->write_urb->dev = mdc800->dev;
                        if (usb_submit_urb (mdc800->write_urb))
                        {
                                err ("submitting write urb fails (status=%i)", mdc800->write_urb->status);
index a71ff2439014291b40f59b080b70fa90914b82ed..02c1eff8056a9144213ce7b77db358f05b408b42 100644 (file)
@@ -50,7 +50,7 @@
 #include <linux/usb.h>
 
 
-static const char *version = __FILE__ ": v0.4.13 2000/10/09 (C) 1999-2000 Petko Manolov (petkan@dce.bg)";
+static const char *version = __FILE__ ": v0.4.13 2000/10/13 (C) 1999-2000 Petko Manolov (petkan@dce.bg)";
 
 
 #define        PEGASUS_USE_INTR
@@ -478,6 +478,7 @@ static void set_ethernet_addr( pegasus_t *pegasus )
        __u8    node_id[6];
 
        get_node_id(pegasus, node_id);
+       set_registers( pegasus, EthID, sizeof(node_id), node_id );
        memcpy( pegasus->net->dev_addr, node_id, sizeof(node_id) );
 }
 
@@ -631,7 +632,7 @@ static void write_bulk_callback( struct urb *urb )
        netif_wake_queue( pegasus->net );
 }
 
-
+#ifdef PEGASUS_USE_INTR
 static void intr_callback( struct urb *urb )
 {
        pegasus_t *pegasus = urb->context;
@@ -662,7 +663,7 @@ static void intr_callback( struct urb *urb )
                        info("intr status %d", urb->status);
        }
 }
-
+#endif
 
 static void pegasus_tx_timeout( struct net_device *net )
 {
@@ -904,7 +905,12 @@ static void * pegasus_probe( struct usb_device *dev, unsigned int ifnum )
        init_MUTEX( &pegasus-> ctrl_sem );
        init_waitqueue_head( &pegasus->ctrl_wait );
 
-       net = init_etherdev(0, 0);
+       net = init_etherdev( NULL, 0 );
+       if ( !net ) {
+               kfree( pegasus );
+               return  NULL;
+       }
+       
        pegasus->usb = dev;
        pegasus->net = net;
        net->priv = pegasus;
@@ -920,9 +926,6 @@ static void * pegasus_probe( struct usb_device *dev, unsigned int ifnum )
        net->get_stats = pegasus_netdev_stats;
        net->mtu = PEGASUS_MTU;
 
-       set_ethernet_addr( pegasus );
-       register_netdev( net );
-
        pegasus->features = usb_dev_id[dev_indx].private;
        if ( reset_mac(pegasus) ) {
                err("can't reset MAC");
@@ -932,18 +935,19 @@ static void * pegasus_probe( struct usb_device *dev, unsigned int ifnum )
                return NULL;
        }
 
+       set_ethernet_addr( pegasus );
+       
        if ( pegasus->features & PEGASUS_II ) {
                info( "setup Pegasus II specific registers" );
                setup_pegasus_II( pegasus );
        }
-
+       
        pegasus->phy = mii_phy_probe( pegasus );
        if ( !pegasus->phy ) {
                warn( "can't locate MII phy, using default" );
                pegasus->phy = 1;
        }
 
-
        info( "%s: %s", net->name, usb_dev_id[dev_indx].name );
 
        return pegasus;
index a8ffa3aba6903281965df825980ff1ff72a8e063..d3d1b4e6ac8b3857e3fb12e8cbbcec2475ba2a16 100644 (file)
@@ -245,6 +245,7 @@ static void plusb_int_complete(urb_t *purb)
                        return;
                }
                
+               s->bulkurb->dev = s->usbdev;
                ret=usb_submit_urb(s->bulkurb);
                if(ret && ret!=-EBUSY) {
                        err("plusb_int_complete: usb_submit_urb failed");
index 39df8e5e05b7ee5c011108009e6ea252d628f166..1e873b285209c6765da64b778b696d04961628df 100644 (file)
@@ -43,6 +43,7 @@ struct usb_mouse {
        char name[128];
        struct input_dev dev;
        struct urb irq;
+       struct usb_device *my_usb_device;       // for resubmitting my urb
        int open;
 };
 
@@ -72,6 +73,7 @@ static int usb_mouse_open(struct input_dev *dev)
        if (mouse->open++)
                return 0;
 
+       mouse->irq.dev = mouse->my_usb_device;
        if (usb_submit_urb(&mouse->irq))
                return -EIO;
 
@@ -148,6 +150,7 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum)
 
        kfree(buf);
 
+       mouse->my_usb_device = dev;
        FILL_INT_URB(&mouse->irq, dev, pipe, mouse->data, maxp > 8 ? 8 : maxp,
                usb_mouse_irq, mouse, endpoint->bInterval);
 
index b74a003e8f1f6c7f95bec6a68225bdf92c8d502d..4dcc86436fc254bfc1b41e13deb3ae9c8062777b 100644 (file)
@@ -117,6 +117,7 @@ struct wacom_features {
 struct wacom {
        signed char data[10];
        struct input_dev dev;
+       struct usb_device *usbdev;
        struct urb irq;
        struct wacom_features *features;
        int tool;
@@ -239,6 +240,7 @@ static int wacom_open(struct input_dev *dev)
        if (wacom->open++)
                return 0;
 
+       wacom->irq.dev = wacom->usbdev;
        if (usb_submit_urb(&wacom->irq))
                return -EIO;
 
@@ -293,6 +295,7 @@ static void *wacom_probe(struct usb_device *dev, unsigned int ifnum)
        wacom->dev.idvendor = dev->descriptor.idVendor;
        wacom->dev.idproduct = dev->descriptor.idProduct;
        wacom->dev.idversion = dev->descriptor.bcdDevice;
+       wacom->usbdev = dev;
 
        FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
                     wacom->data, wacom->features->pktlen, wacom->features->irq, wacom, endpoint->bInterval);
index 328daa93950a3feb80d459ad3d05c1dbfaaed9b1..4de38a0e486979ef30a8a401ade81724bd51a112 100644 (file)
@@ -586,7 +586,7 @@ unsigned int get_hardblocksize(kdev_t dev)
 
    These are two special cases. Normal usage imply the device driver
    to issue a sync on the device (without waiting I/O completation) and
-   then an invalidate_buffers call that doesn't trashes dirty buffers. */
+   then an invalidate_buffers call that doesn't trash dirty buffers. */
 void __invalidate_buffers(kdev_t dev, int destroy_dirty_buffers)
 {
        int i, nlist, slept;
@@ -618,6 +618,8 @@ void __invalidate_buffers(kdev_t dev, int destroy_dirty_buffers)
                                __remove_from_queues(bh);
                                put_last_free(bh);
                        }
+                       /* else complain loudly? */
+
                        write_unlock(&hash_table_lock);
                        if (slept)
                                goto out;
@@ -1041,13 +1043,9 @@ struct buffer_head * breada(kdev_t dev, int block, int bufsize,
 
        blocks = (filesize - pos) >> (9+index);
 
-       if (blocks < (read_ahead[MAJOR(dev)] >> index))
-               blocks = read_ahead[MAJOR(dev)] >> index;
        if (blocks > NBUF) 
                blocks = NBUF;
 
-/*     if (blocks) printk("breada (new) %d blocks\n",blocks); */
-
        bhlist[0] = bh;
        j = 1;
        for(i=1; i<blocks; i++) {
index 94a3be38981b189a5dfff3a846130e120df960f4..45acf28c6b62f8b9e8647358c8125058454e8d9c 100644 (file)
@@ -93,7 +93,7 @@ static int get_device_index(struct coda_mount_data *data)
 static struct super_block * coda_read_super(struct super_block *sb, 
                                            void *data, int silent)
 {
-        struct inode *psdev = 0, *root = 0; 
+        struct inode *root = 0; 
        struct coda_sb_info *sbi = NULL;
        struct venus_comm *vc = NULL;
         ViceFid fid;
index 1cab95172aadc2840d1fc94892c2e9dcf49d4111..203100d33743d81e0cf870082dc500f2e6459fdf 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -314,9 +314,9 @@ int setup_arg_pages(struct linux_binprm *bprm)
                mpnt->vm_pgoff = 0;
                mpnt->vm_file = NULL;
                mpnt->vm_private_data = (void *) 0;
-               vmlist_modify_lock(current->mm);
+               spin_lock(&current->mm->page_table_lock);
                insert_vm_struct(current->mm, mpnt);
-               vmlist_modify_unlock(current->mm);
+               spin_unlock(&current->mm->page_table_lock);
                current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
        } 
 
index 43eb2cb57f40b7fcf5d5520c2f84a5a9be44ccbb..5f5ec196fbe582a309beb609ef51407bd5958dd5 100644 (file)
@@ -125,8 +125,7 @@ void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head
        kdev_t dev = s->s_dev;
        struct buffer_head *bh;
 
-                                       /* vvvv - workaround for the breada bug */
-       if (!ahead || secno + ahead + (read_ahead[MAJOR(dev)] >> 9) >= s->s_hpfs_fs_size)
+       if (!ahead || secno + ahead >= s->s_hpfs_fs_size)
                *bhp = bh = bread(dev, secno, 512);
        else *bhp = bh = breada(dev, secno, 512, 0, (ahead + 1) << 9);
        if (bh != NULL)
@@ -174,8 +173,7 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
                goto bail;
        }
 
-                                       /* vvvv - workaround for the breada bug */
-       if (!ahead || secno + 4 + ahead + (read_ahead[MAJOR(dev)] >> 9) > s->s_hpfs_fs_size)
+       if (!ahead || secno + 4 + ahead > s->s_hpfs_fs_size)
                qbh->bh[0] = bh = bread(dev, secno, 512);
        else qbh->bh[0] = bh = breada(dev, secno, 512, 0, (ahead + 4) << 9);
        if (!bh)
index a175d39eb029060d5555d658a9f3b65afc97cca3..eae976616d6ea5a92d959d9ff1a98f67a306c322 100644 (file)
@@ -349,7 +349,7 @@ again:
        /* Append to list of blocked */
        nlmsvc_insert_block(block, NLM_NEVER);
 
-       if (list_empty(&block->b_call.a_args.lock.fl.fl_list)) {
+       if (list_empty(&block->b_call.a_args.lock.fl.fl_block)) {
                /* Now add block to block list of the conflicting lock
                   if we haven't done so. */
                dprintk("lockd: blocking on this lock.\n");
index 95310133dbf992e2ec421dceb7ceb2174191cfa2..0e92b740f482e527f9e6742f39bb6567725b29b5 100644 (file)
@@ -164,7 +164,7 @@ static inline void locks_free_lock(struct file_lock *fl)
        if (!list_empty(&fl->fl_block))
                panic("Attempting to free lock with active block list");
 
-       if (!list_empty(&fl->fl_link) || !list_empty(&fl->fl_list))
+       if (!list_empty(&fl->fl_link))
                panic("Attempting to free lock on active lock list");
 
        kmem_cache_free(filelock_cache, fl);
@@ -174,7 +174,6 @@ void locks_init_lock(struct file_lock *fl)
 {
        INIT_LIST_HEAD(&fl->fl_link);
        INIT_LIST_HEAD(&fl->fl_block);
-       INIT_LIST_HEAD(&fl->fl_list);
        init_waitqueue_head(&fl->fl_wait);
        fl->fl_next = NULL;
        fl->fl_fasync = NULL;
@@ -403,8 +402,8 @@ locks_same_owner(struct file_lock *fl1, struct file_lock *fl2)
  */
 static void locks_delete_block(struct file_lock *waiter)
 {
-       list_del(&waiter->fl_list);
-       INIT_LIST_HEAD(&waiter->fl_list);
+       list_del(&waiter->fl_block);
+       INIT_LIST_HEAD(&waiter->fl_block);
        list_del(&waiter->fl_link);
        INIT_LIST_HEAD(&waiter->fl_link);
        waiter->fl_next = NULL;
@@ -418,13 +417,13 @@ static void locks_delete_block(struct file_lock *waiter)
 static void locks_insert_block(struct file_lock *blocker, 
                               struct file_lock *waiter)
 {
-       if (!list_empty(&waiter->fl_list)) {
+       if (!list_empty(&waiter->fl_block)) {
                printk(KERN_ERR "locks_insert_block: removing duplicated lock "
                        "(pid=%d %Ld-%Ld type=%d)\n", waiter->fl_pid,
                        waiter->fl_start, waiter->fl_end, waiter->fl_type);
                locks_delete_block(waiter);
        }
-       list_add_tail(&waiter->fl_list, &blocker->fl_block);
+       list_add_tail(&waiter->fl_block, &blocker->fl_block);
        waiter->fl_next = blocker;
        list_add(&waiter->fl_link, &blocked_list);
 }
@@ -436,7 +435,7 @@ static void locks_insert_block(struct file_lock *blocker,
 static void locks_wake_up_blocks(struct file_lock *blocker, unsigned int wait)
 {
        while (!list_empty(&blocker->fl_block)) {
-               struct file_lock *waiter = list_entry(blocker->fl_block.next, struct file_lock, fl_list);
+               struct file_lock *waiter = list_entry(blocker->fl_block.next, struct file_lock, fl_block);
                /* N.B. Is it possible for the notify function to block?? */
                if (waiter->fl_notify)
                        waiter->fl_notify(waiter);
@@ -644,7 +643,6 @@ static int posix_locks_deadlock(struct file_lock *caller_fl,
        caller_pid = caller_fl->fl_pid;
        blocked_owner = block_fl->fl_owner;
        blocked_pid = block_fl->fl_pid;
-       tmp = blocked_list.next;
 
 next_task:
        if (caller_owner == blocked_owner && caller_pid == blocked_pid)
@@ -1708,7 +1706,7 @@ void
 posix_unblock_lock(struct file_lock *waiter)
 {
        acquire_fl_sem();
-       if (!list_empty(&waiter->fl_list)) {
+       if (!list_empty(&waiter->fl_block)) {
                locks_delete_block(waiter);
                wake_up(&waiter->fl_wait);
        }
@@ -1815,7 +1813,7 @@ int get_locks_status(char *buffer, char **start, off_t offset, int length)
 
                list_for_each(btmp, &fl->fl_block) {
                        struct file_lock *bfl = list_entry(btmp,
-                                       struct file_lock, fl_list);
+                                       struct file_lock, fl_block);
                        lock_get_status(q, bfl, i, " ->");
                        move_lock_status(&q, &pos, offset);
 
index a94f8f5fcddb0bfbefe4aac529ffc19c8f1e2aca..0180daca8ef469ad5aaa17000a14e8ffafb30a73 100644 (file)
@@ -62,6 +62,7 @@ int atari_partition (struct gendisk *hd, kdev_t dev,
       /* if there's no valid primary partition, assume that no Atari
         format partition table (there's no reliable magic or the like
         :-() */
+      brelse(bh);
       return 0;
   }
 
index 8745b6f88eb7956c8ae5b969368af2319652af0f..1856d54d35434b66ed12b8bbf2a13951d4ab50c7 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -284,7 +284,7 @@ pipe_poll(struct file *filp, poll_table *wait)
 
        poll_wait(filp, PIPE_WAIT(*inode), wait);
 
-       /* Reading only -- no need for aquiring the semaphore.  */
+       /* Reading only -- no need for acquiring the semaphore.  */
        mask = POLLIN | POLLRDNORM;
        if (PIPE_EMPTY(*inode))
                mask = POLLOUT | POLLWRNORM;
index 0ac6d53141c3b6bffeecf5078eff41376878e59b..1f4829709fe8e074f7f22d4273e2e94b3c0b003d 100644 (file)
@@ -618,12 +618,11 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls,
                                        sz = len;
                                        ext_start = NULL;
                                }
-                               break;
+                               goto stop0;
                        }
                }
-               if (charbuf[chi] == '.')
-                       break;
        }
+stop0:;        
        if (ext_start == name - 1) {
                sz = len;
                ext_start = NULL;
@@ -640,10 +639,12 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls,
                        if (chl == 0)
                                break;
                        for (chi = 0; chi < chl; chi++)
-                               if (!strchr(skip_chars, charbuf[chi]))
-                                       break;
+                               if (!strchr(skip_chars, charbuf[chi])) {
+                                       goto stop1;
+                               }
                        name_start++;
                }
+stop1:;                
                if (name_start != ext_start) {
                        sz = ext_start - name;
                        ext_start++;
index ec76508419440297c900b6ceef185fc47d262c03..e41ca1da0ed60ccc5ec71c91e579244649100732 100644 (file)
 /*
  * FPU lazy state save handling...
  */
-extern void save_fpu( struct task_struct *tsk );
 extern void save_init_fpu( struct task_struct *tsk );
 extern void restore_fpu( struct task_struct *tsk );
 
 #define unlazy_fpu( tsk ) do { \
        if ( tsk->flags & PF_USEDFPU ) \
-               save_fpu( tsk ); \
+               save_init_fpu( tsk ); \
 } while (0)
 
 #define clear_fpu( tsk ) do { \
index 769269192a515b44c3c84499dec7715d2300632c..76ac26cae5b7ad2bf90658789631107c8ad8d947 100644 (file)
@@ -85,7 +85,7 @@ struct cpuinfo_x86 {
 #define X86_FEATURE_CMOV       0x00008000      /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */
 #define X86_FEATURE_PAT                0x00010000      /* Page Attribute Table */
 #define X86_FEATURE_PSE36      0x00020000      /* 36-bit PSEs */
-#define X86_FEATURE_18         0x00040000
+#define X86_FEATURE_PN         0x00040000
 #define X86_FEATURE_19         0x00080000
 #define X86_FEATURE_20         0x00100000
 #define X86_FEATURE_21         0x00200000
index cc9dc35bb3315882b6d96eefc63c9335a7f0fdd2..1bf49cf0192459c16bba7c2566df636f0f33f97f 100644 (file)
@@ -1,4 +1,3 @@
-#ifdef CONFIG_ACPI_KERNEL_CONFIG
 /*
  *  acpikcfg.h - ACPI based Kernel Configuration Manager External Interfaces
  *
@@ -6,6 +5,9 @@
  *  Copyright (C) 2000 J.I. Lee  <jung-ik.lee@intel.com>
  */
 
+#include <linux/config.h>
+
+#ifdef CONFIG_ACPI_KERNEL_CONFIG
 
 u32    __init acpi_cf_init (void * rsdp);
 u32    __init acpi_cf_terminate (void );
index 19c93ab25d277b2662c00cebe5d3a0256c4f6800..06528f8d2f788a464686f61b9006d9d1849e922f 100644 (file)
@@ -6,8 +6,6 @@
  * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/config.h>
-
 #include <linux/types.h>
 
 #include <asm/ptrace.h>
index 1274433109612d9e16adc7ab81c494a76537f64a..652aaffcab9b82261f22eabd5c35d17e854cb606 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _ASM_IA64_PCI_H
 #define _ASM_IA64_PCI_H
 
-#include <linux/config.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/types.h>
index 9ed33ac5c601721eeba30ffd7b0271300cc17125..98b4787e5c470444ffcf06a4ac3d41f39bd9d31c 100644 (file)
 
 #include <asm/bitops.h>
 #include <asm/mmu_context.h>
-#include <asm/processor.h>
 #include <asm/system.h>
 
 /*
index a106b23a3a4d4b7607f758fc221217b0301bee9e..a9c9fddc473ef2de0d12c14e70b3ca7cc9b8d492 100644 (file)
@@ -5,15 +5,15 @@
  * traditional two-level paging, page table allocation routines:
  */
 
-extern __inline__ pmd_t *get_pmd_fast(void)
+static __inline__ pmd_t *get_pmd_fast(void)
 {
        return (pmd_t *)0;
 }
 
-extern __inline__ void free_pmd_fast(pmd_t *pmd) { }
-extern __inline__ void free_pmd_slow(pmd_t *pmd) { }
+static __inline__ void free_pmd_fast(pmd_t *pmd) { }
+static __inline__ void free_pmd_slow(pmd_t *pmd) { }
 
-extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
+static __inline__ pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
 {
        if (!pgd)
                BUG();
index 0b728aee381ab7297173a36d50437a4a2977fcfb..5984937fa4c6904f2d49186d815d2cb5b3879387 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <asm/processor.h>
 #include <linux/threads.h>
+#include <linux/slab.h>
 
 #define pgd_quicklist (current_cpu_data.pgd_quick)
 #define pmd_quicklist ((unsigned long *)0)
  * if any.
  */
 
-extern __inline__ pgd_t *get_pgd_slow(void)
+static __inline__ pgd_t *get_pgd_slow(void)
 {
-       pgd_t *ret = (pgd_t *)__get_free_page(GFP_KERNEL);
+       unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t));
+       pgd_t *ret = (pgd_t *)kmalloc(pgd_size, GFP_KERNEL);
+
+       if (ret)
+               memset(ret, 0, pgd_size);
 
-       if (ret) {
-               memset(ret, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
-               memcpy(ret + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
-       }
        return ret;
 }
 
-extern __inline__ pgd_t *get_pgd_fast(void)
+static __inline__ pgd_t *get_pgd_fast(void)
 {
        unsigned long *ret;
 
@@ -41,22 +42,22 @@ extern __inline__ pgd_t *get_pgd_fast(void)
        return (pgd_t *)ret;
 }
 
-extern __inline__ void free_pgd_fast(pgd_t *pgd)
+static __inline__ void free_pgd_fast(pgd_t *pgd)
 {
        *(unsigned long *)pgd = (unsigned long) pgd_quicklist;
        pgd_quicklist = (unsigned long *) pgd;
        pgtable_cache_size++;
 }
 
-extern __inline__ void free_pgd_slow(pgd_t *pgd)
+static __inline__ void free_pgd_slow(pgd_t *pgd)
 {
-       free_page((unsigned long)pgd);
+       kfree(pgd);
 }
 
 extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
 extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted);
 
-extern __inline__ pte_t *get_pte_fast(void)
+static __inline__ pte_t *get_pte_fast(void)
 {
        unsigned long *ret;
 
@@ -68,14 +69,14 @@ extern __inline__ pte_t *get_pte_fast(void)
        return (pte_t *)ret;
 }
 
-extern __inline__ void free_pte_fast(pte_t *pte)
+static __inline__ void free_pte_fast(pte_t *pte)
 {
        *(unsigned long *)pte = (unsigned long) pte_quicklist;
        pte_quicklist = (unsigned long *) pte;
        pgtable_cache_size++;
 }
 
-extern __inline__ void free_pte_slow(pte_t *pte)
+static __inline__ void free_pte_slow(pte_t *pte)
 {
        free_page((unsigned long)pte);
 }
@@ -85,7 +86,7 @@ extern __inline__ void free_pte_slow(pte_t *pte)
 #define pgd_free(pgd)     free_pgd_slow(pgd)
 #define pgd_alloc()         get_pgd_fast()
 
-extern inline pte_t * pte_alloc_kernel(pmd_t * pmd, unsigned long address)
+static __inline__ pte_t * pte_alloc_kernel(pmd_t * pmd, unsigned long address)
 {
        if (!pmd)
                BUG();
@@ -105,7 +106,7 @@ extern inline pte_t * pte_alloc_kernel(pmd_t * pmd, unsigned long address)
        return (pte_t *) pmd_page(*pmd) + address;
 }
 
-extern inline pte_t * pte_alloc(pmd_t * pmd, unsigned long address)
+static __inline__ pte_t * pte_alloc(pmd_t * pmd, unsigned long address)
 {
        address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
 
@@ -132,7 +133,7 @@ fix:
  * allocating and freeing a pmd is trivial: the 1-entry pmd is
  * inside the pgd, so has no extra memory associated with it.
  */
-extern inline void pmd_free(pmd_t * pmd)
+static __inline__ void pmd_free(pmd_t * pmd)
 {
 }
 
@@ -141,22 +142,6 @@ extern inline void pmd_free(pmd_t * pmd)
 
 extern int do_check_pgt_cache(int, int);
 
-extern inline void set_pgdir(unsigned long address, pgd_t entry)
-{
-       struct task_struct * p;
-       pgd_t *pgd;
-
-       read_lock(&tasklist_lock);
-       for_each_task(p) {
-               if (!p->mm)
-                       continue;
-               *pgd_offset(p->mm,address) = entry;
-       }
-       read_unlock(&tasklist_lock);
-       for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd)
-               pgd[address >> PGDIR_SHIFT] = entry;
-}
-
 /*
  * TLB flushing:
  *
@@ -174,8 +159,9 @@ extern void flush_tlb_mm(struct mm_struct *mm);
 extern void flush_tlb_range(struct mm_struct *mm, unsigned long start,
                            unsigned long end);
 extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
-extern inline void flush_tlb_pgtables(struct mm_struct *mm,
-                                     unsigned long start, unsigned long end)
+
+static __inline__ void flush_tlb_pgtables(struct mm_struct *mm,
+                                         unsigned long start, unsigned long end)
 {
 }
 
index 180709c85e66a2ff751bed01669ea03db0a11afd..66e4aab801f74fbf382a520c980ed19fcd459f17 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pgalloc.h,v 1.9 2000/08/01 04:53:58 anton Exp $ */
+/* $Id: pgalloc.h,v 1.10 2000/10/13 01:40:26 davem Exp $ */
 #ifndef _SPARC_PGALLOC_H
 #define _SPARC_PGALLOC_H
 
@@ -139,7 +139,7 @@ BTFIXUPDEF_CALL(pgd_t *, pgd_alloc, void)
 #define pgd_free(pgd) BTFIXUP_CALL(pgd_free)(pgd)
 #define pgd_alloc() BTFIXUP_CALL(pgd_alloc)()
 
-BTFIXUPDEF_CALL(void, set_pgdir, unsigned long, pgd_t)
+#error Anton, you need to do set_pgdir things now as on ix86, see i386/mm/fault.c
 
 #define set_pgdir(address,entry) BTFIXUP_CALL(set_pgdir)(address,entry)
 
index b81b9cee496af1dcc94274bce546c67beed8cd1f..be3dde29ca684cdb67a13fb4e84cfc8b3edb17a9 100644 (file)
@@ -304,7 +304,4 @@ extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
 
 extern int do_check_pgt_cache(int, int);
 
-/* Nothing to do on sparc64 :) */
-#define set_pgdir(address, entry)      do { } while(0)
-
 #endif /* _SPARC64_PGALLOC_H */
index 3374036ce6b10de493e476516123a6714096bf83..f5e795919e4e5ba093e5bdce90b8bd9ababa79cd 100644 (file)
@@ -40,8 +40,6 @@ int coda_release(struct inode *i, struct file *f);
 int coda_permission(struct inode *inode, int mask);
 int coda_revalidate_inode(struct dentry *);
 int coda_notify_change(struct dentry *, struct iattr *);
-int coda_pioctl(struct inode * inode, struct file * filp, 
-                unsigned int cmd, unsigned long arg);
 
 /* global variables */
 extern int coda_debug;
index eb224122683c43ae9c3c5805d5373e533a1d6805..72effef4a3c838717062826b8cf6b21417d821b8 100644 (file)
@@ -517,8 +517,7 @@ typedef struct files_struct *fl_owner_t;
 struct file_lock {
        struct file_lock *fl_next;      /* singly linked list for this inode  */
        struct list_head fl_link;       /* doubly linked list of all locks */
-       struct list_head fl_block; /* circular list of blocked processes */
-       struct list_head fl_list;       /* block list member */
+       struct list_head fl_block;      /* circular list of blocked processes */
        fl_owner_t fl_owner;
        unsigned int fl_pid;
        wait_queue_head_t fl_wait;
index 69d4d2490c0c2c62d2cafb9328b4ef3f1ff495ec..f67d6be5261b4696dca8b9f1888c0256a4e1b650 100644 (file)
@@ -380,7 +380,7 @@ extern void FASTCALL(free_pages(unsigned long addr, unsigned long order));
 #define free_page(addr) free_pages((addr),0)
 
 extern void show_free_areas(void);
-extern void show_free_areas_node(int nid);
+extern void show_free_areas_node(pg_data_t *pgdat);
 
 extern void clear_page_tables(struct mm_struct *, unsigned long, int);
 
@@ -527,11 +527,6 @@ extern struct vm_area_struct *find_extend_vma(struct mm_struct *mm, unsigned lon
 #define pgcache_under_min()    (atomic_read(&page_cache_size) * 100 < \
                                page_cache.min_percent * num_physpages)
 
-#define vmlist_access_lock(mm)         spin_lock(&mm->page_table_lock)
-#define vmlist_access_unlock(mm)       spin_unlock(&mm->page_table_lock)
-#define vmlist_modify_lock(mm)         vmlist_access_lock(mm)
-#define vmlist_modify_unlock(mm)       vmlist_access_unlock(mm)
-
 #endif /* __KERNEL__ */
 
 #endif
index 4a8280d7d36ae5e37d474d0f3d854cb6abd2d1a8..c14decdfcac6947627eef8527dd7eb45a6bcb4e2 100644 (file)
@@ -101,15 +101,15 @@ extern pg_data_t *pgdat_list;
  * prototypes for the discontig memory code.
  */
 struct page;
-extern void show_free_areas_core(int);
+extern void show_free_areas_core(pg_data_t *pgdat);
 extern void free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
   unsigned long *zones_size, unsigned long paddr, unsigned long *zholes_size,
   struct page *pmap);
 
-#ifndef CONFIG_DISCONTIGMEM
-
 extern pg_data_t contig_page_data;
 
+#ifndef CONFIG_DISCONTIGMEM
+
 #define NODE_DATA(nid)         (&contig_page_data)
 #define NODE_MEM_MAP(nid)      mem_map
 
index 242be9730f1b618739a2f192f7e415128247dd3a..d66474b60c427c30b13d4dfc7f2835177e5e42d8 100644 (file)
@@ -43,6 +43,7 @@ struct rpc_cred {
  * Client authentication handle
  */
 #define RPC_CREDCACHE_NR       8
+#define RPC_CREDCACHE_MASK     (RPC_CREDCACHE_NR - 1)
 struct rpc_auth {
        struct rpc_cred *       au_credcache[RPC_CREDCACHE_NR];
        unsigned long           au_expire;      /* cache expiry interval */
index 1976697c10d50035b58df837a7967e18dd0d3983..203418a8abb4fc2974fc27d465dcb6788b1080b0 100644 (file)
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -41,7 +41,7 @@
  *      get the semaphore and if this process wants to reduce some
  *      semaphore value we simply wake it up without doing the
  *      operation. So it has to try to get it later. Thus e.g. the
- *      running process may reaquire the semaphore during the current
+ *      running process may reacquire the semaphore during the current
  *      time slice. If it only waits for zero or increases the semaphore,
  *      we do the operation in advance and wake it up.
  *   2) It did not wake up all zero waiting processes. We try to do
index b4a1dee278df9cc0814226a09dfb4caf5e7aaa14..4f56f54439e8d37a4079ab9a0ef59d0ae8dd0c40 100644 (file)
@@ -458,7 +458,7 @@ static int send_signal(int sig, struct siginfo *info, struct sigpending *signals
  * NOTE! we rely on the previous spin_lock to
  * lock interrupts for us! We can only be called with
  * "sigmask_lock" held, and the local interrupt must
- * have been disabled when that got aquired!
+ * have been disabled when that got acquired!
  *
  * No need to set need_resched since signal event passing
  * goes through ->blocked
index 867408211bd7aaa266bcb9fa0b5d41c0dc8db9a0..d033c9659717f2cb6ce36e092f74561b9005941b 100644 (file)
@@ -76,7 +76,7 @@ static inline struct user_struct *uid_hash_find(uid_t uid, struct user_struct **
 
 /*
  * For SMP, we need to re-test the user struct counter
- * after having aquired the spinlock. This allows us to do
+ * after having acquired the spinlock. This allows us to do
  * the common case (not freeing anything) without having
  * any locking.
  */
index 6aca16409ec23d2d6a64d84aad114bcbde0bb170..68937481cf8e30e40e4d99a12633b596738ee71f 100644 (file)
@@ -1766,11 +1766,11 @@ static long madvise_fixup_start(struct vm_area_struct * vma,
        get_file(n->vm_file);
        if (n->vm_ops && n->vm_ops->open)
                n->vm_ops->open(n);
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_pgoff += (end - vma->vm_start) >> PAGE_SHIFT;
        vma->vm_start = end;
        insert_vm_struct(current->mm, n);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -1790,10 +1790,10 @@ static long madvise_fixup_end(struct vm_area_struct * vma,
        get_file(n->vm_file);
        if (n->vm_ops && n->vm_ops->open)
                n->vm_ops->open(n);
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_end = start;
        insert_vm_struct(current->mm, n);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -1823,7 +1823,7 @@ static long madvise_fixup_middle(struct vm_area_struct * vma,
                vma->vm_ops->open(left);
                vma->vm_ops->open(right);
        }
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_pgoff += (start - vma->vm_start) >> PAGE_SHIFT;
        vma->vm_start = start;
        vma->vm_end = end;
@@ -1831,7 +1831,7 @@ static long madvise_fixup_middle(struct vm_area_struct * vma,
        vma->vm_raend = 0;
        insert_vm_struct(current->mm, left);
        insert_vm_struct(current->mm, right);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
index a3d10ff99dc50ae438ec087fc7c9420ca61a70f4..f684a3c606ef4542c02ce52e29932e3ffd09004e 100644 (file)
@@ -14,9 +14,9 @@
 
 static inline int mlock_fixup_all(struct vm_area_struct * vma, int newflags)
 {
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_flags = newflags;
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -36,11 +36,11 @@ static inline int mlock_fixup_start(struct vm_area_struct * vma,
                get_file(n->vm_file);
        if (n->vm_ops && n->vm_ops->open)
                n->vm_ops->open(n);
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_pgoff += (end - vma->vm_start) >> PAGE_SHIFT;
        vma->vm_start = end;
        insert_vm_struct(current->mm, n);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -61,10 +61,10 @@ static inline int mlock_fixup_end(struct vm_area_struct * vma,
                get_file(n->vm_file);
        if (n->vm_ops && n->vm_ops->open)
                n->vm_ops->open(n);
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_end = start;
        insert_vm_struct(current->mm, n);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -96,7 +96,7 @@ static inline int mlock_fixup_middle(struct vm_area_struct * vma,
                vma->vm_ops->open(left);
                vma->vm_ops->open(right);
        }
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_pgoff += (start - vma->vm_start) >> PAGE_SHIFT;
        vma->vm_start = start;
        vma->vm_end = end;
@@ -104,7 +104,7 @@ static inline int mlock_fixup_middle(struct vm_area_struct * vma,
        vma->vm_raend = 0;
        insert_vm_struct(current->mm, left);
        insert_vm_struct(current->mm, right);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -183,9 +183,9 @@ static int do_mlock(unsigned long start, size_t len, int on)
                        break;
                }
        }
-       vmlist_modify_lock(current->mm);
+       spin_lock(&current->mm->page_table_lock);
        merge_segments(current->mm, start, end);
-       vmlist_modify_unlock(current->mm);
+       spin_unlock(&current->mm->page_table_lock);
        return error;
 }
 
@@ -257,9 +257,9 @@ static int do_mlockall(int flags)
                if (error)
                        break;
        }
-       vmlist_modify_lock(current->mm);
+       spin_lock(&current->mm->page_table_lock);
        merge_segments(current->mm, 0, TASK_SIZE);
-       vmlist_modify_unlock(current->mm);
+       spin_unlock(&current->mm->page_table_lock);
        return error;
 }
 
index 4348ad56b4fc5f86ae0ddf1da0dd9d53e322574e..c50de6ed80afd837716a8601c1c7e7ae00837f21 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -317,12 +317,12 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, unsigned lon
         */
        flags = vma->vm_flags;
        addr = vma->vm_start; /* can addr have changed?? */
-       vmlist_modify_lock(mm);
+       spin_lock(&mm->page_table_lock);
        insert_vm_struct(mm, vma);
        if (correct_wcount)
                atomic_inc(&file->f_dentry->d_inode->i_writecount);
        merge_segments(mm, vma->vm_start, vma->vm_end);
-       vmlist_modify_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
        
        mm->total_vm += len >> PAGE_SHIFT;
        if (flags & VM_LOCKED) {
@@ -534,11 +534,11 @@ static struct vm_area_struct * unmap_fixup(struct mm_struct *mm,
        /* Work out to one of the ends. */
        if (end == area->vm_end) {
                area->vm_end = addr;
-               vmlist_modify_lock(mm);
+               spin_lock(&mm->page_table_lock);
        } else if (addr == area->vm_start) {
                area->vm_pgoff += (end - area->vm_start) >> PAGE_SHIFT;
                area->vm_start = end;
-               vmlist_modify_lock(mm);
+               spin_lock(&mm->page_table_lock);
        } else {
        /* Unmapping a hole: area->vm_start < addr <= end < area->vm_end */
                /* Add end mapping -- leave beginning for below */
@@ -560,12 +560,12 @@ static struct vm_area_struct * unmap_fixup(struct mm_struct *mm,
                if (mpnt->vm_ops && mpnt->vm_ops->open)
                        mpnt->vm_ops->open(mpnt);
                area->vm_end = addr;    /* Truncate area */
-               vmlist_modify_lock(mm);
+               spin_lock(&mm->page_table_lock);
                insert_vm_struct(mm, mpnt);
        }
 
        insert_vm_struct(mm, area);
-       vmlist_modify_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
        return extra;
 }
 
@@ -670,7 +670,7 @@ int do_munmap(struct mm_struct *mm, unsigned long addr, size_t len)
 
        npp = (prev ? &prev->vm_next : &mm->mmap);
        free = NULL;
-       vmlist_modify_lock(mm);
+       spin_lock(&mm->page_table_lock);
        for ( ; mpnt && mpnt->vm_start < addr+len; mpnt = *npp) {
                *npp = mpnt->vm_next;
                mpnt->vm_next = free;
@@ -679,7 +679,7 @@ int do_munmap(struct mm_struct *mm, unsigned long addr, size_t len)
                        avl_remove(mpnt, &mm->mmap_avl);
        }
        mm->mmap_cache = NULL;  /* Kill the cache. */
-       vmlist_modify_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
 
        /* Ok - we have the memory areas we should free on the 'free' list,
         * so release them, and unmap the page range..
@@ -811,10 +811,10 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
        flags = vma->vm_flags;
        addr = vma->vm_start;
 
-       vmlist_modify_lock(mm);
+       spin_lock(&mm->page_table_lock);
        insert_vm_struct(mm, vma);
        merge_segments(mm, vma->vm_start, vma->vm_end);
-       vmlist_modify_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
        
        mm->total_vm += len >> PAGE_SHIFT;
        if (flags & VM_LOCKED) {
@@ -840,10 +840,10 @@ void exit_mmap(struct mm_struct * mm)
        struct vm_area_struct * mpnt;
 
        release_segments(mm);
-       vmlist_modify_lock(mm);
+       spin_lock(&mm->page_table_lock);
        mpnt = mm->mmap;
        mm->mmap = mm->mmap_avl = mm->mmap_cache = NULL;
-       vmlist_modify_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
        mm->rss = 0;
        mm->total_vm = 0;
        mm->locked_vm = 0;
@@ -985,9 +985,9 @@ void merge_segments (struct mm_struct * mm, unsigned long start_addr, unsigned l
                if (mpnt->vm_ops && mpnt->vm_ops->close) {
                        mpnt->vm_pgoff += (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
                        mpnt->vm_start = mpnt->vm_end;
-                       vmlist_modify_unlock(mm);
+                       spin_unlock(&mm->page_table_lock);
                        mpnt->vm_ops->close(mpnt);
-                       vmlist_modify_lock(mm);
+                       spin_lock(&mm->page_table_lock);
                }
                mm->map_count--;
                remove_shared_vm_struct(mpnt);
index 53fc53acb211dea5a4fe058e6c06bb8cab9413d4..b62536c7fea807b50e070abe7a2e3d5ebab51eef 100644 (file)
@@ -86,10 +86,10 @@ static void change_protection(unsigned long start, unsigned long end, pgprot_t n
 static inline int mprotect_fixup_all(struct vm_area_struct * vma,
        int newflags, pgprot_t prot)
 {
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_flags = newflags;
        vma->vm_page_prot = prot;
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -111,11 +111,11 @@ static inline int mprotect_fixup_start(struct vm_area_struct * vma,
                get_file(n->vm_file);
        if (n->vm_ops && n->vm_ops->open)
                n->vm_ops->open(n);
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_pgoff += (end - vma->vm_start) >> PAGE_SHIFT;
        vma->vm_start = end;
        insert_vm_struct(current->mm, n);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -138,10 +138,10 @@ static inline int mprotect_fixup_end(struct vm_area_struct * vma,
                get_file(n->vm_file);
        if (n->vm_ops && n->vm_ops->open)
                n->vm_ops->open(n);
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_end = start;
        insert_vm_struct(current->mm, n);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -172,7 +172,7 @@ static inline int mprotect_fixup_middle(struct vm_area_struct * vma,
                vma->vm_ops->open(left);
                vma->vm_ops->open(right);
        }
-       vmlist_modify_lock(vma->vm_mm);
+       spin_lock(&vma->vm_mm->page_table_lock);
        vma->vm_pgoff += (start - vma->vm_start) >> PAGE_SHIFT;
        vma->vm_start = start;
        vma->vm_end = end;
@@ -181,7 +181,7 @@ static inline int mprotect_fixup_middle(struct vm_area_struct * vma,
        vma->vm_page_prot = prot;
        insert_vm_struct(current->mm, left);
        insert_vm_struct(current->mm, right);
-       vmlist_modify_unlock(vma->vm_mm);
+       spin_unlock(&vma->vm_mm->page_table_lock);
        return 0;
 }
 
@@ -263,9 +263,9 @@ asmlinkage long sys_mprotect(unsigned long start, size_t len, unsigned long prot
                        break;
                }
        }
-       vmlist_modify_lock(current->mm);
+       spin_lock(&current->mm->page_table_lock);
        merge_segments(current->mm, start, end);
-       vmlist_modify_unlock(current->mm);
+       spin_unlock(&current->mm->page_table_lock);
 out:
        up(&current->mm->mmap_sem);
        return error;
index d1f6a7b8b0a9899475be43999548b5c4f43c2500..ebc27b74452487c5ec98f226a4da9fa5f0c9e062 100644 (file)
@@ -141,10 +141,10 @@ static inline unsigned long move_vma(struct vm_area_struct * vma,
                                get_file(new_vma->vm_file);
                        if (new_vma->vm_ops && new_vma->vm_ops->open)
                                new_vma->vm_ops->open(new_vma);
-                       vmlist_modify_lock(current->mm);
+                       spin_lock(&current->mm->page_table_lock);
                        insert_vm_struct(current->mm, new_vma);
                        merge_segments(current->mm, new_vma->vm_start, new_vma->vm_end);
-                       vmlist_modify_unlock(current->mm);
+                       spin_unlock(&current->mm->page_table_lock);
                        do_munmap(current->mm, addr, old_len);
                        current->mm->total_vm += new_len >> PAGE_SHIFT;
                        if (new_vma->vm_flags & VM_LOCKED) {
@@ -258,9 +258,9 @@ unsigned long do_mremap(unsigned long addr,
                /* can we just expand the current mapping? */
                if (max_addr - addr >= new_len) {
                        int pages = (new_len - old_len) >> PAGE_SHIFT;
-                       vmlist_modify_lock(vma->vm_mm);
+                       spin_lock(&vma->vm_mm->page_table_lock);
                        vma->vm_end = addr + new_len;
-                       vmlist_modify_unlock(vma->vm_mm);
+                       spin_unlock(&vma->vm_mm->page_table_lock);
                        current->mm->total_vm += pages;
                        if (vma->vm_flags & VM_LOCKED) {
                                current->mm->locked_vm += pages;
index 06ad9ec63490c852d79d6161005bbc63091b8ba6..60f8350a0d0217fe6c86a55bb851e6eab0a003cb 100644 (file)
--- a/mm/numa.c
+++ b/mm/numa.c
 
 int numnodes = 1;      /* Initialized for UMA platforms */
 
-#ifndef CONFIG_DISCONTIGMEM
-
 static bootmem_data_t contig_bootmem_data;
 pg_data_t contig_page_data = { bdata: &contig_bootmem_data };
 
+#ifndef CONFIG_DISCONTIGMEM
+
 /*
  * This is meant to be invoked by platforms whose physical memory starts
  * at a considerably higher value than 0. Examples are Super-H, ARM, m68k.
@@ -25,7 +25,7 @@ void __init free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap,
        unsigned long *zones_size, unsigned long zone_start_paddr, 
        unsigned long *zholes_size)
 {
-       free_area_init_core(0, NODE_DATA(0), &mem_map, zones_size, 
+       free_area_init_core(0, &contig_page_data, &mem_map, zones_size, 
                                zone_start_paddr, zholes_size, pmap);
 }
 
@@ -33,7 +33,11 @@ void __init free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap,
 
 struct page * alloc_pages_node(int nid, int gfp_mask, unsigned long order)
 {
+#ifdef CONFIG_NUMA
        return __alloc_pages(NODE_DATA(nid)->node_zonelists + gfp_mask, order);
+#else
+       return alloc_pages(gfp_mask, order);
+#endif
 }
 
 #ifdef CONFIG_DISCONTIGMEM
@@ -42,13 +46,12 @@ struct page * alloc_pages_node(int nid, int gfp_mask, unsigned long order)
 
 static spinlock_t node_lock = SPIN_LOCK_UNLOCKED;
 
-void show_free_areas_node(int nid)
+void show_free_areas_node(pg_data_t *pgdat)
 {
        unsigned long flags;
 
        spin_lock_irqsave(&node_lock, flags);
-       printk("Memory information for node %d:\n", nid);
-       show_free_areas_core(nid);
+       show_free_areas_core(pgdat);
        spin_unlock_irqrestore(&node_lock, flags);
 }
 
@@ -79,6 +82,12 @@ void __init free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap,
        memset(pgdat->valid_addr_bitmap, 0, size);
 }
 
+static struct page * alloc_pages_pgdat(pg_data_t *pgdat, int gfp_mask,
+       unsigned long order)
+{
+       return __alloc_pages(pgdat->node_zonelists + gfp_mask, order);
+}
+
 /*
  * This can be refined. Currently, tries to do round robin, instead
  * should do concentratic circle search, starting from current node.
@@ -86,33 +95,34 @@ void __init free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap,
 struct page * alloc_pages(int gfp_mask, unsigned long order)
 {
        struct page *ret = 0;
-       int startnode, tnode;
+       pg_data_t *start, *temp;
 #ifndef CONFIG_NUMA
        unsigned long flags;
-       static int nextnid = 0;
+       static pg_data_t *next = 0;
 #endif
 
        if (order >= MAX_ORDER)
                return NULL;
 #ifdef CONFIG_NUMA
-       tnode = numa_node_id();
+       temp = NODE_DATA(numa_node_id());
 #else
        spin_lock_irqsave(&node_lock, flags);
-       tnode = nextnid;
-       nextnid++;
-       if (nextnid == numnodes)
-               nextnid = 0;
+       if (!next) next = pgdat_list;
+       temp = next;
+       next = next->node_next;
        spin_unlock_irqrestore(&node_lock, flags);
 #endif
-       startnode = tnode;
-       while (tnode < numnodes) {
-               if ((ret = alloc_pages_node(tnode++, gfp_mask, order)))
+       start = temp;
+       while (temp) {
+               if ((ret = alloc_pages_pgdat(temp, gfp_mask, order)))
                        return(ret);
+               temp = temp->node_next;
        }
-       tnode = 0;
-       while (tnode != startnode) {
-               if ((ret = alloc_pages_node(tnode++, gfp_mask, order)))
+       temp = pgdat_list;
+       while (temp != start) {
+               if ((ret = alloc_pages_pgdat(temp, gfp_mask, order)))
                        return(ret);
+               temp = temp->node_next;
        }
        return(0);
 }
index 3846af8fed05e2f8c9d4bb3049443e1447430e75..0a8aa7cf85e009f7609e693593a261859071109c 100644 (file)
 #include <linux/pagemap.h>
 #include <linux/bootmem.h>
 
-/* Use NUMNODES instead of numnodes for better code inside kernel APIs */
-#ifndef CONFIG_DISCONTIGMEM
-#define NUMNODES 1
-#else
-#define NUMNODES numnodes
-#endif
-
 int nr_swap_pages;
 int nr_active_pages;
 int nr_inactive_dirty_pages;
@@ -588,12 +581,14 @@ unsigned int nr_free_pages (void)
 {
        unsigned int sum;
        zone_t *zone;
-       int i;
+       pg_data_t *pgdat = pgdat_list;
 
        sum = 0;
-       for (i = 0; i < NUMNODES; i++)
-               for (zone = NODE_DATA(i)->node_zones; zone < NODE_DATA(i)->node_zones + MAX_NR_ZONES; zone++)
+       while (pgdat) {
+               for (zone = pgdat->node_zones; zone < pgdat->node_zones + MAX_NR_ZONES; zone++)
                        sum += zone->free_pages;
+               pgdat = pgdat->node_next;
+       }
        return sum;
 }
 
@@ -604,12 +599,14 @@ unsigned int nr_inactive_clean_pages (void)
 {
        unsigned int sum;
        zone_t *zone;
-       int i;
+       pg_data_t *pgdat = pgdat_list;
 
        sum = 0;
-       for (i = 0; i < NUMNODES; i++)
-               for (zone = NODE_DATA(i)->node_zones; zone < NODE_DATA(i)->node_zones + MAX_NR_ZONES; zone++)
+       while (pgdat) {
+               for (zone = pgdat->node_zones; zone < pgdat->node_zones + MAX_NR_ZONES; zone++)
                        sum += zone->inactive_clean_pages;
+               pgdat = pgdat->node_next;
+       }
        return sum;
 }
 
@@ -644,11 +641,13 @@ unsigned int nr_free_buffer_pages (void)
 #if CONFIG_HIGHMEM
 unsigned int nr_free_highpages (void)
 {
-       int i;
+       pg_data_t *pgdat = pgdat_list;
        unsigned int pages = 0;
 
-       for (i = 0; i < NUMNODES; i++)
-               pages += NODE_DATA(i)->node_zones[ZONE_HIGHMEM].free_pages;
+       while (pgdat) {
+               pages += pgdat->node_zones[ZONE_HIGHMEM].free_pages;
+               pgdat = pgdat->node_next;
+       }
        return pages;
 }
 #endif
@@ -658,7 +657,7 @@ unsigned int nr_free_highpages (void)
  * We also calculate the percentage fragmentation. We do this by counting the
  * memory on each free list with the exception of the first item on the list.
  */
-void show_free_areas_core(int nid)
+void show_free_areas_core(pg_data_t *pgdat)
 {
        unsigned long order;
        unsigned type;
@@ -678,7 +677,7 @@ void show_free_areas_core(int nid)
 
        for (type = 0; type < MAX_NR_ZONES; type++) {
                struct list_head *head, *curr;
-               zone_t *zone = NODE_DATA(nid)->node_zones + type;
+               zone_t *zone = pgdat->node_zones + type;
                unsigned long nr, total, flags;
 
                total = 0;
@@ -710,7 +709,7 @@ void show_free_areas_core(int nid)
 
 void show_free_areas(void)
 {
-       show_free_areas_core(0);
+       show_free_areas_core(pgdat_list);
 }
 
 /*
@@ -907,7 +906,7 @@ void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
 
 void __init free_area_init(unsigned long *zones_size)
 {
-       free_area_init_core(0, NODE_DATA(0), &mem_map, zones_size, 0, 0, 0);
+       free_area_init_core(0, &contig_page_data, &mem_map, zones_size, 0, 0, 0);
 }
 
 static int __init setup_mem_frac(char *str)
index fa4cb133e99e1da5372298ac4a75247dc64599ef..4cad5deab84cf9a27a0885b8dc85f29be3ef8cab 100644 (file)
@@ -315,12 +315,12 @@ static void unuse_process(struct mm_struct * mm,
         */
        if (!mm)
                return;
-       vmlist_access_lock(mm);
+       spin_lock(&mm->page_table_lock);
        for (vma = mm->mmap; vma; vma = vma->vm_next) {
                pgd_t * pgd = pgd_offset(mm, vma->vm_start);
                unuse_vma(vma, pgd, entry, page);
        }
-       vmlist_access_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
        return;
 }
 
index ba745d8a963b1ec2ff99cd87a2ae6ca972b08693..26fd18455896717de36540d67d2ff31fbea455de 100644 (file)
@@ -172,7 +172,7 @@ drop_pte:
                pte_clear(page_table);
                mm->rss--;
                flush_tlb_page(vma, address);
-               vmlist_access_unlock(mm);
+               spin_unlock(&mm->page_table_lock);
                error = swapout(page, file);
                UnlockPage(page);
                if (file) fput(file);
@@ -205,7 +205,7 @@ drop_pte:
        mm->rss--;
        set_pte(page_table, swp_entry_to_pte(entry));
        flush_tlb_page(vma, address);
-       vmlist_access_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
 
        /* OK, do a physical asynchronous write to swap.  */
        rw_swap_page(WRITE, page, 0);
@@ -341,7 +341,7 @@ static int swap_out_mm(struct mm_struct * mm, int gfp_mask)
         * Find the proper vm-area after freezing the vma chain 
         * and ptes.
         */
-       vmlist_access_lock(mm);
+       spin_lock(&mm->page_table_lock);
        vma = find_vma(mm, address);
        if (vma) {
                if (address < vma->vm_start)
@@ -364,7 +364,7 @@ static int swap_out_mm(struct mm_struct * mm, int gfp_mask)
        mm->swap_cnt = 0;
 
 out_unlock:
-       vmlist_access_unlock(mm);
+       spin_unlock(&mm->page_table_lock);
 
        /* We didn't find anything for the process */
        return 0;
index 2670528b32fb2a6275e9a2ab42ba82beed47c604..b8e5d733305295110c3b6218d85b452480393fea 100644 (file)
@@ -3,7 +3,7 @@
 #
 # 19971130     Now in an own category to make correct compilation of the 
 #              AX.25 stuff easier...
-#              Joerg Reuter DL1BKE <jreuter@poboxes.com>
+#              Joerg Reuter DL1BKE <jreuter@yaina.de>
 # 19980129     Moved to net/ax25/Config.in, sourcing device drivers.
 
 mainmenu_option next_comment
index fc8910f2dee6006be0efe9cd377c548246d9f45f..02874c103e237516a95a5bb37704cecfc344dc16 100644 (file)
@@ -1193,7 +1193,7 @@ static int ax25_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
         */
        if (sk->zapped) {
                /* check if we can remove this feature. It is broken. */
-               printk(KERN_WARNING "ax25_connect(): %s uses autobind, please contact jreuter@poboxes.com\n",
+               printk(KERN_WARNING "ax25_connect(): %s uses autobind, please contact jreuter@yaina.de\n",
                        current->comm);
                if ((err = ax25_rt_autobind(sk->protinfo.ax25, &fsa->fsa_ax25.sax25_call)) < 0)
                        return err;
index 4641228235be9e628df0a0bb3dfbd769ddfdf5ab..3354206dfb97749ab8f2b9dfa92d0b6de71406d0 100644 (file)
@@ -89,10 +89,8 @@ static int ax25_ds_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int framet
                        ax25_dama_on(ax25);
 
                        /* according to DK4EG´s spec we are required to
-                        * send a RR RESPONSE FINAL NR=0. Please mail
-                        * <jreuter@poboxes.com> if this causes problems
-                        * with the TheNetNode DAMA Master implementation.
-                        */ 
+                        * send a RR RESPONSE FINAL NR=0. 
+                        */
 
                        ax25_std_enquiry_response(ax25);
                        break;
index d60c980d99dc31936bd4fac13f4d4dbe0e9288e2..62dc2890a07a75ca45d77d46f5f8417913ceaaac 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/errno.h>
-#include <linux/config.h>
 #include <linux/init.h>
 #include <net/dst.h>
 #include <net/arp.h>
index 9fdc84fb510a46b4274eb13da45cbddeb3d328cd..5957514aac349a13931dc8e8915a82a168350166 100644 (file)
@@ -1490,7 +1490,7 @@ out:
 /*
  *     Perform a file control on a socket file descriptor.
  *
- *     Doesn't aquire a fd lock, because no network fcntl
+ *     Doesn't acquire a fd lock, because no network fcntl
  *     function sleeps currently.
  */
 
index 7eb578a60b63ff8b00769eda11c91e3d0d94e412..a295ecaf7ce33ee75330e15f47092f47837051a7 100644 (file)
@@ -159,7 +159,7 @@ rpcauth_insert_credcache(struct rpc_auth *auth, struct rpc_cred *cred)
 {
        int             nr;
 
-       nr = (cred->cr_uid % RPC_CREDCACHE_NR);
+       nr = (cred->cr_uid & RPC_CREDCACHE_MASK);
        spin_lock(&rpc_credcache_lock);
        cred->cr_next = auth->au_credcache[nr];
        auth->au_credcache[nr] = cred;
@@ -178,7 +178,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, int taskflags)
        int             nr = 0;
 
        if (!(taskflags & RPC_TASK_ROOTCREDS))
-               nr = current->uid % RPC_CREDCACHE_NR;
+               nr = current->uid & RPC_CREDCACHE_MASK;
 
        if (time_before(auth->au_nextgc, jiffies))
                rpcauth_gc_credcache(auth);
@@ -218,7 +218,7 @@ rpcauth_remove_credcache(struct rpc_auth *auth, struct rpc_cred *cred)
        struct rpc_cred **q, *cr;
        int             nr;
 
-       nr = (cred->cr_uid % RPC_CREDCACHE_NR);
+       nr = (cred->cr_uid & RPC_CREDCACHE_MASK);
        spin_lock(&rpc_credcache_lock);
        q = &auth->au_credcache[nr];
        while ((cr = *q) != NULL) {
index d2e645acd26b4a1dbc0883bb1d491aed1d8fcff5..a9e42721a2c5457134efcdcde69ed6b36a0fe313 100644 (file)
@@ -54,6 +54,7 @@ nul_create_cred(int flags)
                return NULL;
        cred->cr_count = 0;
        cred->cr_flags = RPCAUTH_CRED_UPTODATE;
+       cred->cr_uid = current->uid;
 
        return cred;
 }