]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.9 2.3.9
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:25:56 +0000 (15:25 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:25:56 +0000 (15:25 -0500)
66 files changed:
arch/arm/kernel/dec21285.c
arch/arm/kernel/entry-common.S
arch/mips/arc/console.c
arch/mips/arc/memory.c
arch/mips/arc/printf.c
arch/mips/baget/balo_supp.S
arch/mips/baget/prom/init.c
arch/mips/baget/setup.c
arch/mips/dec/prom/cmdline.c
arch/mips/dec/prom/identify.c
arch/mips/dec/prom/init.c
arch/mips/dec/prom/memory.c
arch/mips/dec/serial.c
arch/mips/kernel/r2300_misc.S
arch/mips/kernel/time.c
arch/mips/sgi/kernel/indy_int.c
drivers/block/icside.c
drivers/char/dz.c
drivers/char/vino.c
drivers/i2o/i2o_config.c
drivers/i2o/i2o_core.c
drivers/i2o/i2o_lan.c
drivers/i2o/i2o_pci.c
drivers/i2o/i2o_proc.c
drivers/net/cycx_drv.c
drivers/net/irda/irtty.c
drivers/sbus/char/aurora.c
drivers/scsi/aic7xxx_proc.c
drivers/sgi/char/graphics_syms.c
drivers/sgi/char/newport.c
drivers/sound/cmpci.c
drivers/sound/sb_ess.c
drivers/tc/tcsyms.c
drivers/usb/acm.c
drivers/usb/audio.c
drivers/usb/cpia.c
drivers/usb/hub.c
drivers/usb/mouse.c
drivers/usb/usb.c
drivers/usb/usb_scsi.c
drivers/usb/usb_scsi.h
fs/buffer.c
fs/lockd/host.c
fs/nfs/dir.c
fs/smbfs/inode.c
include/asm-arm/arch-ebsa285/irq.h
include/asm-arm/arch-ebsa285/memory.h
include/asm-mips/io.h
include/asm-mips/keyboard.h
include/asm-ppc/mmu.h
include/asm-ppc/ptrace.h
include/linux/cyclomx.h
include/linux/pagemap.h
include/net/dn_fib.h
include/net/dn_raw.h
init/main.c
ipc/msg.c
ipc/sem.c
ipc/shm.c
kernel/ksyms.c
mm/filemap.c
mm/swapfile.c
net/decnet/dn_nsp_out.c
net/decnet/dn_timer.c
net/socket.c
net/sunrpc/xprt.c

index c4103abee3b145c30ec7e155e0fe540ef35190cc..80cef0b23ec80ae835ec4f52deebca583a351a7b 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 1998 Russell King, Phil Blundell
  */
+#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
index 2fc0fdddc3e6ecdc220797f8fdf6e802c10fecd1..7dbc7ff95bb3eda6cf9ff1e7f4c1a2f653623b38 100644 (file)
@@ -1,3 +1,4 @@
+#include <linux/config.h>
 /*============================================================================
  * All exits to user mode from the kernel go through this code.
  */
index 53635bfc567b366c5d80a0a4a0ad7d1cf6210613..47f2bd07d0ade4cb03e829bc033fa549b8a33895 100644 (file)
@@ -6,6 +6,7 @@
  *
  * $Id: console.c,v 1.2 1999/06/12 18:42:38 ulfc Exp $
  */
+#include <linux/config.h>
 #include <linux/init.h>
 #include <asm/sgialib.h>
 #include <asm/bcache.h>
index d235a627b95b82f1bb14d5125cf33b6ce09d78ce..66244bcc4706b9aae1c6cdd58c210cb7cfa4f93a 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/swap.h>
-#include <linux/config.h>
 
 #include <asm/sgialib.h>
 #include <asm/page.h>
index ec1191133f2a3f1c084d9c0c164f93d4fe48def4..bc4f84e6b40d136a5302d443e537ee6fcf6adf7c 100644 (file)
@@ -6,6 +6,7 @@
  *
  * $Id: printf.c,v 1.2 1999/06/12 18:42:38 ulfc Exp $
  */
+#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 
index 6b79d22d3f4900d0b5da757c766c91fe4c711fe8..1c57539a550c2f2a3c1ca9de1b6b80eadf898cc0 100644 (file)
@@ -4,7 +4,6 @@
  * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
  */
 
-#include <linux/config.h>
 #include <asm/asm.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
index e5c100dea1f0cc0479300fbf2cdbd7b5fa2fdeae..a590328126704a843754c53b71af2d81adf6db90 100644 (file)
@@ -6,7 +6,6 @@
  * $Id$
  */
 #include <linux/init.h>
-#include <linux/config.h>
 #include <asm/bootinfo.h>
 
 char arcs_cmdline[CL_SIZE];
index de5c5763d18361826b31d0fea4d917119ed8f404..7ebc1f51035cbb710e854e6c45c438da9fb48395 100644 (file)
@@ -5,7 +5,6 @@
  * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
  *
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
index 31d6ec318ede1971be88d35a7b43f185fc3f809a..c5f8e06e9c493b7805db040fff265ce6d23d68d0 100644 (file)
@@ -7,7 +7,6 @@
  */
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/config.h>
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
index 65d7b5abfa17361ec3662da28d38b8793baf5e90..b8c6a1e1e9af7b0a838d6b13e1551bddccb24434 100644 (file)
@@ -6,7 +6,6 @@
  * $Id: $
  */
 #include <linux/init.h>
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 
index 2cb9da66c58d997fae70c83be71656c5e1003d48..193bbbc6c01439fbb31d211b269ffb6ac19e4555 100644 (file)
@@ -6,7 +6,6 @@
  * $Id: $
  */
 #include <linux/init.h>
-#include <linux/config.h>
 #include "prom.h"
 
 /*
index de80c34e8c7268f12ae0fc6e3eaf1ec257f71de6..dbf2c6246cf91d6d66d2da9e71c9048175969621 100644 (file)
@@ -7,7 +7,6 @@
  */
 #include <asm/addrspace.h>
 #include <linux/init.h>
-#include <linux/config.h>
 #include <linux/string.h>
 #include "prom.h"
 
index fcf324199a30710ff697b5ccf0a245b1be8f0634..ad348c6d1f448109e484ea43ffeb6325b8ba8696 100644 (file)
@@ -16,6 +16,7 @@
  *      console device I strongly recommend to use only one.
  */
 
+#include <linux/config.h>
 #include <asm/init.h>
 #include <asm/dec/machtype.h>
 
index c8a742135626134fe3cfd0a628f6ab3a4e71b2ad..de55efb4ed260d30a6bb1850f73add92f642637f 100644 (file)
@@ -10,8 +10,6 @@
  * Copyright (c) 1998 Harald Koerfgen
  * Copyright (c) 1998 Gleb Raiko & Vladimir Roganov
  */
-#include <linux/config.h>
-
 #include <asm/asm.h>
 #include <asm/current.h>
 #include <asm/bootinfo.h>
index 601b8ab5fbc9ab1831ff4a1c7f2583e9e4ebe8a7..6f3e94049ad55f9233b238eef907e328b8929a48 100644 (file)
@@ -6,6 +6,7 @@
  * This file contains the time handling details for PC-style clocks as
  * found in some MIPS systems.
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/sched.h>
index 06f896563add7626fde48657b6d04c52f38e941b..0c34351c61c8aacfd02ada13239411947f2aace8 100644 (file)
@@ -9,9 +9,7 @@
  *                    - Indigo2 changes
  *                    - Interrupt handling fixes
  */
-#include <linux/config.h>
 #include <linux/init.h>
-
 #include <linux/errno.h>
 #include <linux/kernel_stat.h>
 #include <linux/signal.h>
index 299bce7a69dd825eeb72e25f59c4fd630bbd24b0..0d29761eec33e8f4dc073fabc3ea095a3b90a164 100644 (file)
@@ -10,6 +10,7 @@
  *  22-May-1999        RMK     Added support for V6 DMA
  */
 
+#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/module.h>
 #include <linux/ioport.h>
index c26a448e85202cad16018324f7a6031719cf83fd..3bfb89ff952caaedd73044461a27664f01e82c75 100644 (file)
@@ -24,6 +24,7 @@
 #define MOD_DEC_USE_COUNT
 #endif
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/init.h> 
index 79627c29314b22150c60d2db3c3ea56fb8090c0b..1da4b894ed4653913eabd2c7c281e1e7e3bd5175 100644 (file)
@@ -9,7 +9,6 @@
  * some more code.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
index c3c644883343c7831cf917a060ef62565c860ad9..8fd93bff96ead49f20c4d3f0235cef6655230a2b 100644 (file)
@@ -14,7 +14,6 @@
  *     2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
index 3a3f1fe946ffbad10a6ff53b77c986833714deb5..7945c79612c1102c641197ab0c8d1046257e91a4 100644 (file)
@@ -19,7 +19,6 @@
  *     
  */
  
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
index 1ebbe0b49fafe3875b335379b990c0388405dd48..f15b7476e8122b475988b737834f651dbf8f6290 100644 (file)
@@ -25,6 +25,7 @@
  *                     - code/test for other LAN classes
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 
 #include <linux/netdevice.h>
index 596d9f953fde3946a4baa1055b4ad103f219c498..196d58c858236470bf6bcb914d8b4f797ddbf7a0 100644 (file)
@@ -12,7 +12,6 @@
  *     2 of the License, or (at your option) any later version.
  */
  
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
index ce38b391495ffb39483a34a0ab8b2a6c47680d18..cdadc9cdcba3a7d4669cc5ae3abb9037f47f612f 100644 (file)
@@ -38,7 +38,6 @@
 #define FMT_U64_HEX "0x%08x%08x"
 #define U64_VAL(pu64) *((u32*)(pu64)+1), *((u32*)(pu64))
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/i2o.h>
index e75552e48ca137e33cd2ab7baf664af0723573ef..7f803c63dd6d9b3ca0fca87f3a359b3a8586cdf4 100644 (file)
@@ -39,7 +39,6 @@
 * Aug  8, 1998 Arnaldo         Initial version.
 */
 
-#include <linux/config.h>
 #ifdef MODULE
 #ifdef MODVERSIONS
 #include <linux/modversions.h>
index ad8d2dc0ef10483589e733ac54afa96033a54c02..751d98ec7b05c02a944794843c1d016be3277ec1 100644 (file)
@@ -24,7 +24,6 @@
  *     
  ********************************************************************/    
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <asm/uaccess.h>
 #include <linux/kernel.h>
index 607b0f230c7c3ff4e8741329765b20ea9676616c..fde6f7649b0fa322ed1e8dde8cf59dd13969682e 100644 (file)
@@ -45,7 +45,6 @@
 #include <linux/interrupt.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
-#include <linux/config.h>
 #include <linux/major.h>
 #include <linux/string.h>
 #include <linux/fcntl.h>
index 3314514f4f5f8f9b592a2bbb7e473c7d4c24967a..a986c5e805d65103275643d7279eddd9dbe570a6 100644 (file)
@@ -29,6 +29,8 @@
  *  $Id: aic7xxx_proc.c,v 4.1 1997/06/97 08:23:42 deang Exp $
  *-M*************************************************************************/
 
+#include <linux/config.h>
+
 #define        BLS     (&aic7xxx_buffer[size])
 #define HDRB \
 "             < 2K      2K+     4K+     8K+    16K+    32K+    64K+   128K+"
index 59c457bc91643155b2f34ac00273ad398251c196..727909b4d85065437772ca693269cecef9889a69 100644 (file)
@@ -8,7 +8,6 @@
  */
 
 #define __NO_VERSION__
-#include <linux/config.h>
 #include <linux/module.h>
 
 /* extern int rrm_command (unsigned int cmd, void *arg);
index 023a228c2d2fd4573ec36d66164d9cc776c256f7..ae201cf19c7d4d4119598490f1fd8f4d6b44cbc1 100644 (file)
@@ -12,7 +12,6 @@
 #include <asm/ng1.h>
 #include <asm/uaccess.h>
 #include <asm/newport.h>
-#include <linux/config.h>
 #include <linux/module.h>
 
 struct newport_regs *npregs;
index f4befd5a3ee6c6db42fb5d41f1dd2b4d8caff435..c6f4f45c692e9fa9f062e868830101f7462f5797 100644 (file)
@@ -62,6 +62,7 @@
 
 /*****************************************************************************/
       
+#include <linux/config.h>
 #include <linux/version.h>
 #include <linux/module.h>
 #include <linux/string.h>
index c6eb5c8d5e2aa950f0b27cafda113e488dc3c6aa..3f55b74cf777a5c8f8e1277bc71a1624e160b95b 100644 (file)
  * ES1946      yes             This is a PCI chip; not handled by this driver
  */
 
+#include <linux/config.h>
 #include <linux/delay.h>
 
 #include "sound_config.h"
index 37cbd364a0e1e891a1c05a454586375a64bb3cb5..88af39ec5f7b8d8623f18d7305fcb67a8f7191da 100644 (file)
@@ -3,7 +3,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <asm/dec/tc.h>
 
index 10c837d5a28ea8c54a71b8835da34382c4b2a9a3..d5acef82f543330c5910a84fa86008eabff255dd 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <linux/malloc.h>
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include <asm/spinlock.h>
index 9743ec89e4e233b8126692740b9dcd174347799e..abbb73c4f0297a5378db13417f4c3ae1d15b67f6 100644 (file)
@@ -3,7 +3,6 @@
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/sched.h>
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include "usb.h"
index 2402d3425ea396aa52e228fc3972f9e7c202a1a3..ba89884a4520ca59b6b814571a75ae170c74b969 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/videodev.h>
 #include <linux/vmalloc.h>
 #include <linux/wrapper.h>
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include <asm/spinlock.h>
index 0a1ec1f011b26c05a53efb7bc00d226ff60313dd..20ff104279cacdc0736632683c4496b38735e842 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/list.h>
 #include <linux/malloc.h>
 #include <linux/smp_lock.h>
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include <asm/spinlock.h>
index a79c10a070ec9cce5c6e1cb3e903af2c008cf217..7ebb03be46f8a1ab8d2727e4a8793283cd2fd69e 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <linux/malloc.h>
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include <asm/spinlock.h>
index 4be88f74ebfd27731aa9b727b26095bf510ba057..bbce88b64c9b0323b7fa45237bddd41907211a94 100644 (file)
@@ -36,7 +36,6 @@
  * 6           wLength         2       Count           Bytes for data
  */
 
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/bitops.h>
 #include <linux/malloc.h>
index 1a3e16b257eeab79ebbf15919692976f113725f6..5701d26710f20599c227523d2cf98be022e8751e 100644 (file)
@@ -25,6 +25,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
index 58367d852bd8401aeb1af80e05142a77909d2b5e..3e6386f4f1e35297a541643084ca48415a3c4216 100644 (file)
@@ -11,6 +11,8 @@
  *
  */
 
+#include <linux/config.h>
+
 #define USB_SCSI "usbscsi: "
 
 extern int usbscsi_debug;
index f5a4aabd6ebdcdec2269631804238f19d8b60f80..108b385eaa4e4409badefe4a5ba9e769839bd719 100644 (file)
@@ -78,6 +78,7 @@ static int nr_buffers_type[NR_LIST] = {0,};
 static struct buffer_head * unused_list = NULL;
 static int nr_unused_buffer_heads = 0;
 static spinlock_t unused_list_lock = SPIN_LOCK_UNLOCKED;
+static DECLARE_WAIT_QUEUE_HEAD(buffer_wait);
 
 struct bh_free_head {
        struct buffer_head *list;
@@ -85,8 +86,6 @@ struct bh_free_head {
 };
 static struct bh_free_head free_list[NR_SIZES];
 
-static DECLARE_WAIT_QUEUE_HEAD(buffer_wait);
-
 static kmem_cache_t *bh_cachep;
 
 static int grow_buffers(int size);
@@ -904,7 +903,6 @@ void __brelse(struct buffer_head * buf)
 
        if (atomic_read(&buf->b_count)) {
                atomic_dec(&buf->b_count);
-               wake_up(&buffer_wait);
                return;
        }
        printk("VFS: brelse: Trying to free free buffer\n");
@@ -923,7 +921,6 @@ void __bforget(struct buffer_head * buf)
        if (atomic_read(&buf->b_count) != 1 || buffer_locked(buf)) {
                touch_buffer(buf);
                atomic_dec(&buf->b_count);
-               wake_up(&buffer_wait);
        } else {
                atomic_set(&buf->b_count, 0);
                buf->b_state = 0;
@@ -1837,9 +1834,16 @@ void __init buffer_init(unsigned long memory_size)
           for something that is really too small */
 
        do {
+               unsigned long tmp;
+
                nr_hash = (PAGE_SIZE << order) / sizeof(struct buffer_head *);
                bh_hash_mask = (nr_hash - 1);
-               bh_hash_shift = (PAGE_SHIFT + order);
+
+               tmp = nr_hash;
+               bh_hash_shift = 0;
+               while((tmp >>= 1UL) != 0UL)
+                       bh_hash_shift++;
+
                hash_table = (struct buffer_head **)
                    __get_free_pages(GFP_ATOMIC, order);
        } while (hash_table == NULL && --order > 0);
@@ -2070,7 +2074,6 @@ int bdflush(void * unused)
                                                --written;
                                } else
                                        ll_rw_block(WRITE, 1, &bh);
-                               wake_up(&buffer_wait);
                                atomic_dec(&bh->b_count);
                                goto repeat;
                        }
index e8b208f652361495eec82e83fca1816e5153229d..02cfb07f4129ba3365ef7c8da5c097a4626937ff 100644 (file)
@@ -140,6 +140,7 @@ nlm_lookup_host(struct svc_client *clnt, struct sockaddr_in *sin,
        host->h_nextrebind = jiffies + NLM_HOST_REBIND;
        host->h_expires    = jiffies + NLM_HOST_EXPIRE;
        host->h_count      = 1;
+       init_waitqueue_head(&host->h_gracewait);
        host->h_state      = 0;                 /* pseudo NSM state */
        host->h_nsmstate   = 0;                 /* real NSM state */
        host->h_exportent  = clnt;
index 4a55e2779ae179acfa6174791feed7bdae113b9f..31d76e5c601118c93432a19333b42e9fd7031ace 100644 (file)
@@ -884,6 +884,8 @@ static int nfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
        nfs_flush_dircache(dir);
        error = nfs_proc_mkdir(NFS_DSERVER(dentry), NFS_FH(dentry->d_parent),
                                dentry->d_name.name, &sattr, &fhandle, &fattr);
+       if (!error)
+               dir->i_nlink++;
        return error;
 }
 
@@ -909,8 +911,8 @@ dentry->d_inode->i_count, dentry->d_inode->i_nlink);
        /* Update i_nlink and invalidate dentry. */
        if (!error) {
                d_drop(dentry);
-               if (dentry->d_inode->i_nlink)
-                       dentry->d_inode->i_nlink --;
+               if (dir->i_nlink)
+                       dir->i_nlink--;
        }
 
        return error;
index 627186cae2a761f9a8f941a097cb213303e22b45..cf35398233c2d751737196df5163d8e44400636d 100644 (file)
@@ -6,9 +6,7 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
-
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
index d8f0ab21d8a0629a2ffd67b41478141bc2c30ab1..ca1a55cdb4ae65dd654e485c27f19a23a9540766 100644 (file)
@@ -10,6 +10,7 @@
  *  26-Jan-1999        PJB     Don't use IACK on CATS
  *  16-Mar-1999        RMK     Added autodetect of ISA PICs
  */
+#include <linux/config.h>
 #include <asm/hardware.h>
 #include <asm/dec21285.h>
 #include <asm/irq.h>
index 745750e3be21ebc41cc477d3ab548707a4ed3e7d..a03cea6396725d8321cfac5a7cd47af64c1f6da6 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef __ASM_ARCH_MMU_H
 #define __ASM_ARCH_MMU_H
 
+#include <linux/config.h>
+
 #if defined(CONFIG_HOST_FOOTBRIDGE)
 
 /*
index 7d97af3f6028b3eeb6c333a4173c20be1571fb0e..103ed6dd183b64fa3b2fbf670ade855ade430299 100644 (file)
@@ -6,8 +6,6 @@
  */
 #undef CONF_SLOWDOWN_IO
 
-#include <linux/config.h>
-
 #include <asm/mipsconfig.h>
 #include <asm/addrspace.h>
 
index ab9467784dedc0de961d38ccf1be334e79b23384..0cd00b7b816bf73ec6d21fcd2db56ceada188c67 100644 (file)
@@ -12,7 +12,6 @@
 
 #ifdef __KERNEL__
 
-#include <linux/config.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <asm/bootinfo.h>
index 7355f3c8dc0ca398ef6bafdbb94f43ae3f5ed85a..81dadd22a4e7fa87c1060b6e30ec281544bf2ade 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef _PPC_MMU_H_
 #define _PPC_MMU_H_
 
+#include <linux/config.h>
+
 #ifndef __ASSEMBLY__
 /* Hardware Page Table Entry */
 typedef struct _PTE {
index 167c9aa60313d84ca8f0e73d7a040a6f7063e56e..a37b96a0c660b1a67c570a41119c954916684a2f 100644 (file)
@@ -17,6 +17,8 @@
  * the PT_* values below.  This simplifies arch/ppc/kernel/ptrace.c.
  */
 
+#include <linux/config.h>
+
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_PPC64
 #define PPC_REG unsigned long /*long*/
index 721056e32b10a9aadaba7f1904edfd9983c425a5..aaf4a917d0e06b88fa573b7ca87f26fafd936656 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef        _CYCLOMX_H
 #define        _CYCLOMX_H
 
+#include <linux/config.h>
 #include <linux/wanrouter.h>
 #include <asm/spinlock.h>
 
index 3b7272caafe5dffbb1133307d3f4e60fe041fb6c..33a969a9835fd6373f7bab6f582f7074510b26ea 100644 (file)
@@ -39,11 +39,14 @@ static inline unsigned long page_address(struct page * page)
  */
 #define page_cache_entry(x)    (mem_map + MAP_NR(x))
 
-#define PAGE_HASH_BITS 16
+extern unsigned int page_hash_bits;
+#define PAGE_HASH_BITS (page_hash_bits)
 #define PAGE_HASH_SIZE (1 << PAGE_HASH_BITS)
 
 extern atomic_t page_cache_size; /* # of pages currently in the hash table */
-extern struct page * page_hash_table[PAGE_HASH_SIZE];
+extern struct page **page_hash_table;
+
+extern void page_cache_init(unsigned long);
 
 /*
  * We use a power-of-two hash table to avoid a modulus,
index 22d227278701d190e395d29f969fd1c1aa7b0713..d8118449c8ffee4e71a668e9db09335a08a074a2 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _NET_DN_FIB_H
 #define _NET_DN_FIB_H
 
+#include <linux/config.h>
+
 #ifdef CONFIG_DECNET_ROUTER
 
 
index a4502d29c5f95ebf3c6cd6790c58a720c6379dd0..8232ddf4ec13c7f0a0147778ac7d3246bfa26a6c 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _NET_DN_RAW_H
 #define _NET_DN_RAW_H
 
+#include <linux/config.h>
+
 #ifdef CONFIG_DECNET_RAW
 
 extern struct proto_ops dn_raw_proto_ops;
index 7057b9d2b0a1591031befdbeafa1e9675cec125e..4b8581cf06a9da4bf0f6129c22fa6105c84d49d7 100644 (file)
@@ -1186,6 +1186,7 @@ asmlinkage void __init start_kernel(void)
        dcache_init();
        vma_init();
        buffer_init(memory_end-memory_start);
+       page_cache_init(memory_end-memory_start);
        signals_init();
        inode_init();
        file_table_init();
index 1c9f3bd0682936d1d8dc0adb663dca2adff627fe..86e5a9f26fcd530629a3533039419a80e69be178 100644 (file)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -11,6 +11,7 @@
  * /proc/sysvipc/msg support (c) 1999 Dragos Acostachioaie <dragos@iname.com>
  */
 
+#include <linux/config.h>
 #include <linux/malloc.h>
 #include <linux/msg.h>
 #include <linux/interrupt.h>
index 7c4d0de44fdc1e9321a8941216503370e1bb709b..5a48748a2a8ec1dfb6c4f4979fc70b5413a97490 100644 (file)
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -52,6 +52,7 @@
  * /proc/sysvipc/sem support (c) 1999 Dragos Acostachioaie <dragos@iname.com>
  */
 
+#include <linux/config.h>
 #include <linux/malloc.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
index 8a1ded7c8098fffc61f37ca733ec140ce808ee6e..36380c533f234cddd20988a8df9bb41fd5adcf19 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -8,6 +8,7 @@
  * /proc/sysvipc/shm support (c) 1999 Dragos Acostachioaie <dragos@iname.com>
  */
 
+#include <linux/config.h>
 #include <linux/malloc.h>
 #include <linux/shm.h>
 #include <linux/swap.h>
index 1c0ba5f26f6f2174ae514c02f9ba1de49f69c794..04fd2517aa383e70aee8242d0edcc3501be29584 100644 (file)
@@ -171,6 +171,8 @@ EXPORT_SYMBOL(block_flushpage);
 EXPORT_SYMBOL(generic_file_read);
 EXPORT_SYMBOL(generic_file_write);
 EXPORT_SYMBOL(generic_file_mmap);
+EXPORT_SYMBOL(page_hash_bits);
+EXPORT_SYMBOL(page_hash_table);
 EXPORT_SYMBOL(file_lock_table);
 EXPORT_SYMBOL(posix_lock_file);
 EXPORT_SYMBOL(posix_test_lock);
index f2cb29a78d8c399ed6599536c16f16bc883435f5..ed5b6d34c7a526acf0c779b0488207db7c8fc116 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/file.h>
 #include <linux/swapctl.h>
 #include <linux/slab.h>
+#include <linux/init.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -35,7 +36,8 @@
  */
 
 atomic_t page_cache_size = ATOMIC_INIT(0);
-struct page * page_hash_table[PAGE_HASH_SIZE];
+unsigned int page_hash_bits;
+struct page **page_hash_table;
 
 spinlock_t pagecache_lock = SPIN_LOCK_UNLOCKED;
 
@@ -1915,3 +1917,30 @@ void put_cached_page(unsigned long addr)
                        page_count(page));
        page_cache_release(page);
 }
+
+void __init page_cache_init(unsigned long memory_size)
+{
+       unsigned long htable_size, order;
+
+       htable_size = memory_size >> PAGE_SHIFT;
+       htable_size *= sizeof(struct page *);
+       for(order = 0; (PAGE_SIZE << order) < htable_size; order++)
+               ;
+
+       do {
+               unsigned long tmp = (PAGE_SIZE << order) / sizeof(struct page *);
+
+               page_hash_bits = 0;
+               while((tmp >>= 1UL) != 0UL)
+                       page_hash_bits++;
+
+               page_hash_table = (struct page **)
+                       __get_free_pages(GFP_ATOMIC, order);
+       } while(page_hash_table == NULL && --order > 0);
+
+       printk("Page-cache hash table entries: %d (order: %ld, %ld bytes)\n",
+              (1 << page_hash_bits), order, (PAGE_SIZE << order));
+       if (!page_hash_table)
+               panic("Failed to allocate page hash table\n");
+       memset(page_hash_table, 0, PAGE_HASH_SIZE * sizeof(struct page *));
+}
index a4a523ef25cb0ce182d067f23a6f40324c262dbe..ce18f34f5d4ef1bb8674cfce4651f331ef375205 100644 (file)
@@ -5,7 +5,6 @@
  *  Swap reorganised 29.12.95, Stephen Tweedie
  */
 
-#include <linux/config.h>
 #include <linux/malloc.h>
 #include <linux/smp_lock.h>
 #include <linux/kernel_stat.h>
index b4211e91b833bb83d58cb1dd62cd56ae04a1f9ad..97801e3e5c6f6d5318478517a8a3bf2f3dae07ef 100644 (file)
@@ -34,7 +34,6 @@
     GNU General Public License for more details.
 *******************************************************************************/
 
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
index 8cfeaee705287a65d9ebbee6550e3db4eb021da0..05f18c5a567154adf79e01a4ac8fe34b7d8aae51 100644 (file)
@@ -13,7 +13,6 @@
  *                               timer idea.
  *       Steve Whitehouse      : Added checks for sk->sock_readers
  */
-#include <linux/config.h>
 #include <linux/net.h>
 #include <linux/socket.h>
 #include <linux/skbuff.h>
index 41499da0816633fa3cdf706d4f944a2ed49aefcd..9a34b7580e6754224e68588fa7e44d8a08ef0b95 100644 (file)
@@ -950,7 +950,6 @@ asmlinkage int sys_sendto(int fd, void * buff, size_t len, unsigned flags,
        struct msghdr msg;
        struct iovec iov;
        
-       lock_kernel();
        sock = sockfd_lookup(fd, &err);
        if (!sock)
                goto out;
@@ -977,7 +976,6 @@ asmlinkage int sys_sendto(int fd, void * buff, size_t len, unsigned flags,
 out_put:               
        sockfd_put(sock);
 out:
-       unlock_kernel();
        return err;
 }
 
@@ -1005,7 +1003,6 @@ asmlinkage int sys_recvfrom(int fd, void * ubuf, size_t size, unsigned flags,
        char address[MAX_SOCK_ADDR];
        int err,err2;
 
-       lock_kernel();
        sock = sockfd_lookup(fd, &err);
        if (!sock)
                goto out;
@@ -1030,7 +1027,6 @@ asmlinkage int sys_recvfrom(int fd, void * ubuf, size_t size, unsigned flags,
        }
        sockfd_put(sock);                       
 out:
-       unlock_kernel();
        return err;
 }
 
@@ -1123,8 +1119,6 @@ asmlinkage int sys_sendmsg(int fd, struct msghdr *msg, unsigned flags)
        struct msghdr msg_sys;
        int err, ctl_len, iov_size, total_len;
        
-       lock_kernel();
-
        err = -EFAULT;
        if (copy_from_user(&msg_sys,msg,sizeof(struct msghdr)))
                goto out; 
@@ -1194,7 +1188,6 @@ out_freeiov:
 out_put:
        sockfd_put(sock);
 out:       
-       unlock_kernel();
        return err;
 }
 
@@ -1218,7 +1211,6 @@ asmlinkage int sys_recvmsg(int fd, struct msghdr *msg, unsigned int flags)
        struct sockaddr *uaddr;
        int *uaddr_len;
        
-       lock_kernel();
        err=-EFAULT;
        if (copy_from_user(&msg_sys,msg,sizeof(struct msghdr)))
                goto out;
@@ -1282,7 +1274,6 @@ out_freeiov:
 out_put:
        sockfd_put(sock);
 out:
-       unlock_kernel();
        return err;
 }
 
index ae10c3342e9e9728d1fad463ddba1e19eb192f92..0f2922dfd5817c227da94ab4dc74c71404ed7c23 100644 (file)
@@ -42,7 +42,6 @@
 #define __KERNEL_SYSCALLS__
 
 #include <linux/version.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/malloc.h>
 #include <linux/sched.h>