*
* Copyright (C) 1998 Russell King, Phil Blundell
*/
+#include <linux/config.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/pci.h>
+#include <linux/config.h>
/*============================================================================
* All exits to user mode from the kernel go through this code.
*/
*
* $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>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/swap.h>
-#include <linux/config.h>
#include <asm/sgialib.h>
#include <asm/page.h>
*
* $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>
* Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
*/
-#include <linux/config.h>
#include <asm/asm.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>
* $Id$
*/
#include <linux/init.h>
-#include <linux/config.h>
#include <asm/bootinfo.h>
char arcs_cmdline[CL_SIZE];
* Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
*
*/
-#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
*/
#include <linux/init.h>
#include <linux/kernel.h>
-#include <linux/config.h>
#include <linux/string.h>
#include <asm/bootinfo.h>
* $Id: $
*/
#include <linux/init.h>
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/string.h>
* $Id: $
*/
#include <linux/init.h>
-#include <linux/config.h>
#include "prom.h"
/*
*/
#include <asm/addrspace.h>
#include <linux/init.h>
-#include <linux/config.h>
#include <linux/string.h>
#include "prom.h"
* console device I strongly recommend to use only one.
*/
+#include <linux/config.h>
#include <asm/init.h>
#include <asm/dec/machtype.h>
* 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>
* 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>
* - 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>
* 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>
#define MOD_DEC_USE_COUNT
#endif
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
* some more code.
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
* 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>
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
* - code/test for other LAN classes
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/netdevice.h>
* 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>
#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>
* Aug 8, 1998 Arnaldo Initial version.
*/
-#include <linux/config.h>
#ifdef MODULE
#ifdef MODVERSIONS
#include <linux/modversions.h>
*
********************************************************************/
-#include <linux/config.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <linux/kernel.h>
#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>
* $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+"
*/
#define __NO_VERSION__
-#include <linux/config.h>
#include <linux/module.h>
/* extern int rrm_command (unsigned int cmd, void *arg);
#include <asm/ng1.h>
#include <asm/uaccess.h>
#include <asm/newport.h>
-#include <linux/config.h>
#include <linux/module.h>
struct newport_regs *npregs;
/*****************************************************************************/
+#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/string.h>
* ES1946 yes This is a PCI chip; not handled by this driver
*/
+#include <linux/config.h>
#include <linux/delay.h>
#include "sound_config.h"
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <asm/dec/tc.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/malloc.h>
-#include <linux/config.h>
#include <linux/module.h>
#include <asm/spinlock.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/sched.h>
-#include <linux/config.h>
#include <linux/module.h>
#include "usb.h"
#include <linux/videodev.h>
#include <linux/vmalloc.h>
#include <linux/wrapper.h>
-#include <linux/config.h>
#include <linux/module.h>
#include <asm/spinlock.h>
#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>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/malloc.h>
-#include <linux/config.h>
#include <linux/module.h>
#include <asm/spinlock.h>
* 6 wLength 2 Count Bytes for data
*/
-#include <linux/config.h>
#include <linux/string.h>
#include <linux/bitops.h>
#include <linux/malloc.h>
*
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
*
*/
+#include <linux/config.h>
+
#define USB_SCSI "usbscsi: "
extern int usbscsi_debug;
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;
};
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);
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");
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;
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);
--written;
} else
ll_rw_block(WRITE, 1, &bh);
- wake_up(&buffer_wait);
atomic_dec(&bh->b_count);
goto repeat;
}
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;
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;
}
/* 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;
*
*/
-#include <linux/config.h>
#include <linux/module.h>
-
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
* 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>
#ifndef __ASM_ARCH_MMU_H
#define __ASM_ARCH_MMU_H
+#include <linux/config.h>
+
#if defined(CONFIG_HOST_FOOTBRIDGE)
/*
*/
#undef CONF_SLOWDOWN_IO
-#include <linux/config.h>
-
#include <asm/mipsconfig.h>
#include <asm/addrspace.h>
#ifdef __KERNEL__
-#include <linux/config.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <asm/bootinfo.h>
#ifndef _PPC_MMU_H_
#define _PPC_MMU_H_
+#include <linux/config.h>
+
#ifndef __ASSEMBLY__
/* Hardware Page Table Entry */
typedef struct _PTE {
* 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*/
#ifndef _CYCLOMX_H
#define _CYCLOMX_H
+#include <linux/config.h>
#include <linux/wanrouter.h>
#include <asm/spinlock.h>
*/
#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,
#ifndef _NET_DN_FIB_H
#define _NET_DN_FIB_H
+#include <linux/config.h>
+
#ifdef CONFIG_DECNET_ROUTER
#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;
dcache_init();
vma_init();
buffer_init(memory_end-memory_start);
+ page_cache_init(memory_end-memory_start);
signals_init();
inode_init();
file_table_init();
* /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>
* /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>
* /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>
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);
#include <linux/file.h>
#include <linux/swapctl.h>
#include <linux/slab.h>
+#include <linux/init.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
*/
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;
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 *));
+}
* 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>
GNU General Public License for more details.
*******************************************************************************/
-#include <linux/config.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
* 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>
struct msghdr msg;
struct iovec iov;
- lock_kernel();
sock = sockfd_lookup(fd, &err);
if (!sock)
goto out;
out_put:
sockfd_put(sock);
out:
- unlock_kernel();
return err;
}
char address[MAX_SOCK_ADDR];
int err,err2;
- lock_kernel();
sock = sockfd_lookup(fd, &err);
if (!sock)
goto out;
}
sockfd_put(sock);
out:
- unlock_kernel();
return err;
}
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;
out_put:
sockfd_put(sock);
out:
- unlock_kernel();
return err;
}
struct sockaddr *uaddr;
int *uaddr_len;
- lock_kernel();
err=-EFAULT;
if (copy_from_user(&msg_sys,msg,sizeof(struct msghdr)))
goto out;
out_put:
sockfd_put(sock);
out:
- unlock_kernel();
return err;
}
#define __KERNEL_SYSCALLS__
#include <linux/version.h>
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/malloc.h>
#include <linux/sched.h>