summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
commitaba344fdfed81b2c03d6114c54cfd73a486aa10b (patch)
treed032d8430bf1234c3ecc6f6330d6de6e887e5963 /include
parent40c138bfc6d37dbff5339f84575db1e3cec6e34e (diff)
Merge with Linux 2.3.9.
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-ebsa285/irq.h1
-rw-r--r--include/asm-arm/arch-ebsa285/memory.h2
-rw-r--r--include/asm-ppc/hardirq.h2
-rw-r--r--include/asm-ppc/hydra.h14
-rw-r--r--include/asm-ppc/ide.h32
-rw-r--r--include/asm-ppc/irq.h1
-rw-r--r--include/asm-ppc/keyboard.h8
-rw-r--r--include/asm-ppc/machdep.h6
-rw-r--r--include/asm-ppc/page.h13
-rw-r--r--include/asm-ppc/processor.h5
-rw-r--r--include/asm-ppc/ptrace.h32
-rw-r--r--include/asm-ppc/softirq.h12
-rw-r--r--include/asm-ppc/spinlock.h28
-rw-r--r--include/asm-ppc/unistd.h10
-rw-r--r--include/linux/binfmts.h2
-rw-r--r--include/linux/cyclomx.h1
-rw-r--r--include/linux/epcaconfig.h5
-rw-r--r--include/linux/ext2_fs.h3
-rw-r--r--include/linux/file.h25
-rw-r--r--include/linux/fs.h108
-rw-r--r--include/linux/ide.h3
-rw-r--r--include/linux/iso_fs.h22
-rw-r--r--include/linux/minix_fs.h2
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/pagemap.h7
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/string.h1
-rw-r--r--include/linux/swap.h2
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/sysv_fs.h12
-rw-r--r--include/linux/timer.h2
-rw-r--r--include/linux/ufs_fs.h11
-rw-r--r--include/net/dn_fib.h2
-rw-r--r--include/net/dn_raw.h2
34 files changed, 209 insertions, 177 deletions
diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h
index d8f0ab21d..ca1a55cdb 100644
--- a/include/asm-arm/arch-ebsa285/irq.h
+++ b/include/asm-arm/arch-ebsa285/irq.h
@@ -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>
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h
index 745750e3b..a03cea639 100644
--- a/include/asm-arm/arch-ebsa285/memory.h
+++ b/include/asm-arm/arch-ebsa285/memory.h
@@ -15,6 +15,8 @@
#ifndef __ASM_ARCH_MMU_H
#define __ASM_ARCH_MMU_H
+#include <linux/config.h>
+
#if defined(CONFIG_HOST_FOOTBRIDGE)
/*
diff --git a/include/asm-ppc/hardirq.h b/include/asm-ppc/hardirq.h
index cb195c5f7..ac5ac69fc 100644
--- a/include/asm-ppc/hardirq.h
+++ b/include/asm-ppc/hardirq.h
@@ -1,6 +1,8 @@
#ifndef __ASM_HARDIRQ_H
#define __ASM_HARDIRQ_H
+#include <asm/smp.h>
+
extern unsigned int ppc_local_irq_count[NR_CPUS];
/*
diff --git a/include/asm-ppc/hydra.h b/include/asm-ppc/hydra.h
index 2f6303350..68a814b5b 100644
--- a/include/asm-ppc/hydra.h
+++ b/include/asm-ppc/hydra.h
@@ -85,13 +85,13 @@ extern volatile struct Hydra *Hydra;
#define HYDRA_INT_VIA 9
#define HYDRA_INT_ADB 10
#define HYDRA_INT_ADB_NMI 11
-#define HYDRA_INT_EXT1 12
-#define HYDRA_INT_EXT2 13
-#define HYDRA_INT_EXT3 14
-#define HYDRA_INT_EXT4 15
-#define HYDRA_INT_EXT5 16
-#define HYDRA_INT_EXT6 17
-#define HYDRA_INT_EXT7 18
+#define HYDRA_INT_EXT1 12 /* PCI IRQW */
+#define HYDRA_INT_EXT2 13 /* PCI IRQX */
+#define HYDRA_INT_EXT3 14 /* PCI IRQY */
+#define HYDRA_INT_EXT4 15 /* PCI IRQZ */
+#define HYDRA_INT_EXT5 16 /* IDE Primay/Secondary */
+#define HYDRA_INT_EXT6 17 /* IDE Secondary */
+#define HYDRA_INT_EXT7 18 /* Power Off Request */
#define HYDRA_INT_SPARE 19
extern int hydra_init(void);
diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h
index 39d48b6d1..4bca472e1 100644
--- a/include/asm-ppc/ide.h
+++ b/include/asm-ppc/ide.h
@@ -1,8 +1,7 @@
/*
* linux/include/asm-ppc/ide.h
*
- * Copyright (C) 1994-1996 Linus Torvalds & authors
- */
+ * Copyright (C) 1994-1996 Linus Torvalds & authors */
/*
* This file contains the ppc architecture specific IDE code.
@@ -42,11 +41,11 @@ struct ide_machdep_calls {
void (*outsw)(ide_ioreg_t port, void *buf, int ns);
int (*default_irq)(ide_ioreg_t base);
ide_ioreg_t (*default_io_base)(int index);
- int (*check_region)(ide_ioreg_t from, unsigned int extent);
- void (*request_region)(ide_ioreg_t from,
+ int (*ide_check_region)(ide_ioreg_t from, unsigned int extent);
+ void (*ide_request_region)(ide_ioreg_t from,
unsigned int extent,
const char *name);
- void (*release_region)(ide_ioreg_t from,
+ void (*ide_release_region)(ide_ioreg_t from,
unsigned int extent);
void (*fix_driveid)(struct hd_driveid *id);
void (*ide_init_hwif)(hw_regs_t *hw,
@@ -59,7 +58,6 @@ struct ide_machdep_calls {
extern struct ide_machdep_calls ppc_ide_md;
-void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq);
void ide_insw(ide_ioreg_t port, void *buf, int ns);
void ide_outsw(ide_ioreg_t port, void *buf, int ns);
void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
@@ -97,6 +95,14 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index)
return -1;
}
+static __inline__ void ide_init_hwif_ports(hw_regs_t *hw,
+ ide_ioreg_t data_port,
+ ide_ioreg_t ctrl_port, int *irq)
+{
+ if (ppc_ide_md.ide_init_hwif != NULL)
+ ppc_ide_md.ide_init_hwif(hw, data_port, ctrl_port, irq);
+}
+
static __inline__ void ide_init_default_hwifs(void)
{
#ifdef __DO_I_NEED_THIS
@@ -113,22 +119,22 @@ static __inline__ void ide_init_default_hwifs(void)
static __inline__ int ide_check_region (ide_ioreg_t from, unsigned int extent)
{
- if ( ppc_ide_md.check_region )
- return ppc_ide_md.check_region(from, extent);
+ if ( ppc_ide_md.ide_check_region )
+ return ppc_ide_md.ide_check_region(from, extent);
else
return -1;
}
static __inline__ void ide_request_region (ide_ioreg_t from, unsigned int extent, const char *name)
{
- if ( ppc_ide_md.request_region )
- ppc_ide_md.request_region(from, extent, name);
+ if ( ppc_ide_md.ide_request_region )
+ ppc_ide_md.ide_request_region(from, extent, name);
}
static __inline__ void ide_release_region (ide_ioreg_t from, unsigned int extent)
{
- if ( ppc_ide_md.release_region )
- ppc_ide_md.release_region(from, extent);
+ if ( ppc_ide_md.ide_release_region )
+ ppc_ide_md.ide_release_region(from, extent);
}
static __inline__ void ide_fix_driveid (struct hd_driveid *id)
@@ -137,6 +143,7 @@ static __inline__ void ide_fix_driveid (struct hd_driveid *id)
ppc_ide_md.fix_driveid(id);
}
+#if 0 /* inb/outb from io.h is OK now -- paulus */
#undef inb
#define inb(port) in_8((unsigned char *)((port) + ppc_ide_md.io_base))
#undef inb_p
@@ -147,6 +154,7 @@ static __inline__ void ide_fix_driveid (struct hd_driveid *id)
out_8((unsigned char *)((port) + ppc_ide_md.io_base), (val) )
#undef outb_p
#define outb_p(val, port) outb(val, port)
+#endif
typedef union {
unsigned all : 8; /* all of the bits together */
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
index 3a32490b5..537f402f8 100644
--- a/include/asm-ppc/irq.h
+++ b/include/asm-ppc/irq.h
@@ -6,6 +6,7 @@
#include <asm/machdep.h> /* ppc_md */
extern void disable_irq(unsigned int);
+extern void disable_irq_nosync(unsigned int);
extern void enable_irq(unsigned int);
#ifndef CONFIG_8xx
diff --git a/include/asm-ppc/keyboard.h b/include/asm-ppc/keyboard.h
index 0f618fbae..8629dc527 100644
--- a/include/asm-ppc/keyboard.h
+++ b/include/asm-ppc/keyboard.h
@@ -61,13 +61,9 @@ static inline void kbd_init_hw(void)
ppc_md.kbd_init_hw();
}
-#define kbd_sysrq_xlate (ppc_md.kbd_sysrq_xlate)
+#define kbd_sysrq_xlate (ppc_md.ppc_kbd_sysrq_xlate)
-#ifdef CONFIG_MAC_KEYBOARD
-# define SYSRQ_KEY 0x69
-#else
-# define SYSRQ_KEY 0x54
-#endif
+extern unsigned long SYSRQ_KEY;
#endif /* CONFIG_APUS */
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h
index 78f35e285..b47f36983 100644
--- a/include/asm-ppc/machdep.h
+++ b/include/asm-ppc/machdep.h
@@ -35,6 +35,10 @@ struct machdep_calls {
unsigned long (*get_rtc_time)(void);
void (*calibrate_decr)(void);
+ void (*heartbeat)(void);
+ unsigned long heartbeat_reset;
+ unsigned long heartbeat_count;
+
unsigned char (*nvram_read_val)(int addr);
void (*nvram_write_val)(int addr, unsigned char val);
@@ -49,7 +53,7 @@ struct machdep_calls {
void (*kbd_leds)(unsigned char leds);
void (*kbd_init_hw)(void);
#ifdef CONFIG_MAGIC_SYSRQ
- unsigned char *kbd_sysrq_xlate;
+ unsigned char *ppc_kbd_sysrq_xlate;
#endif
/* PCI interfaces */
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 12e576e85..70b710d77 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -14,6 +14,19 @@
#ifndef __ASSEMBLY__
#ifdef __KERNEL__
+#ifdef CONFIG_XMON
+#define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ xmon(0); \
+} while (0)
+#else
+#define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ __asm__ __volatile__(".long 0x0"); \
+}
+#endif
+#define PAGE_BUG(page) do { BUG(); } while (0)
+
#define STRICT_MM_TYPECHECKS
#ifdef STRICT_MM_TYPECHECKS
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index d46d46c3f..22f3e39f1 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -208,6 +208,11 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
void release_thread(struct task_struct *);
/*
+ * Create a new kernel thread.
+ */
+extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
+
+/*
* Bus types
*/
#define EISA_bus 0
diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h
index 7ec33806a..a37b96a0c 100644
--- a/include/asm-ppc/ptrace.h
+++ b/include/asm-ppc/ptrace.h
@@ -21,25 +21,25 @@
#ifndef __ASSEMBLY__
#ifdef CONFIG_PPC64
-#define REG unsigned long /*long*/
+#define PPC_REG unsigned long /*long*/
#else
-#define REG unsigned long
+#define PPC_REG unsigned long
#endif
struct pt_regs {
- REG gpr[32];
- REG nip;
- REG msr;
- REG orig_gpr3; /* Used for restarting system calls */
- REG ctr;
- REG link;
- REG xer;
- REG ccr;
- REG mq; /* 601 only (not used at present) */
- /* Used on APUS to hold IPL value. */
- REG trap; /* Reason for being here */
- REG dar; /* Fault registers */
- REG dsisr;
- REG result; /* Result of a system call */
+ PPC_REG gpr[32];
+ PPC_REG nip;
+ PPC_REG msr;
+ PPC_REG orig_gpr3; /* Used for restarting system calls */
+ PPC_REG ctr;
+ PPC_REG link;
+ PPC_REG xer;
+ PPC_REG ccr;
+ PPC_REG mq; /* 601 only (not used at present) */
+ /* Used on APUS to hold IPL value. */
+ PPC_REG trap; /* Reason for being here */
+ PPC_REG dar; /* Fault registers */
+ PPC_REG dsisr;
+ PPC_REG result; /* Result of a system call */
};
#endif
diff --git a/include/asm-ppc/softirq.h b/include/asm-ppc/softirq.h
index 373de2356..73946f206 100644
--- a/include/asm-ppc/softirq.h
+++ b/include/asm-ppc/softirq.h
@@ -4,11 +4,11 @@
#include <asm/atomic.h>
#include <asm/hardirq.h>
-extern unsigned int ppc_local_bh_count[NR_CPUS];
-
#define get_active_bhs() (bh_mask & bh_active)
#define clear_active_bhs(x) atomic_clear_mask((x),&bh_active)
+extern unsigned int ppc_local_bh_count[NR_CPUS];
+
extern inline void init_bh(int nr, void (*routine)(void))
{
bh_base[nr] = routine;
@@ -20,7 +20,7 @@ extern inline void remove_bh(int nr)
{
bh_mask &= ~(1 << nr);
wmb();
- bh_base[nr] = NULL;
+ bh_base[nr] = 0;
}
extern inline void mark_bh(int nr)
@@ -55,7 +55,8 @@ static inline void end_bh_atomic(void)
static inline int softirq_trylock(int cpu)
{
if (!test_and_set_bit(0,&global_bh_count)) {
- if (atomic_read(&global_bh_lock) == 0) {
+ if (atomic_read(&global_bh_lock) &&
+ ppc_local_bh_count[cpu] == 0) {
++ppc_local_bh_count[cpu];
return 1;
}
@@ -91,6 +92,9 @@ extern inline void end_bh_atomic(void)
#endif /* SMP */
+#define local_bh_disable() (ppc_local_bh_count[smp_processor_id()]++)
+#define local_bh_enable() (ppc_local_bh_count[smp_processor_id()]--)
+
/*
* These use a mask count to correctly handle
* nested disable/enable calls
diff --git a/include/asm-ppc/spinlock.h b/include/asm-ppc/spinlock.h
index afaf5ebb3..8332d34a7 100644
--- a/include/asm-ppc/spinlock.h
+++ b/include/asm-ppc/spinlock.h
@@ -2,7 +2,6 @@
#define __ASM_SPINLOCK_H
#ifndef __SMP__
-
/*
* Your basic spinlocks, allowing only a single CPU anywhere
*
@@ -18,14 +17,16 @@
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) do { } while(0)
-#define spin_trylock(lock) do { } while(0)
+#define spin_trylock(lock) (1)
#define spin_unlock_wait(lock) do { } while(0)
#define spin_unlock(lock) do { } while(0)
#define spin_lock_irq(lock) cli()
#define spin_unlock_irq(lock) sti()
-
+#define spin_lock_bh(lock) local_bh_disable()
+#define spin_unlock_bh(lock) local_bh_enable()
#define spin_lock_irqsave(lock, flags) \
do { save_flags(flags); cli(); } while (0)
+
#define spin_unlock_irqrestore(lock, flags) \
restore_flags(flags)
@@ -57,6 +58,10 @@
#define read_unlock_irq(lock) sti()
#define write_lock_irq(lock) cli()
#define write_unlock_irq(lock) sti()
+#define read_lock_bh(lock) local_bh_disable()
+#define read_unlock_bh(lock) local_bh_enable()
+#define write_lock_bh(lock) local_bh_disable()
+#define write_unlock_bh(lock) local_bh_enable()
#define read_lock_irqsave(lock, flags) \
do { save_flags(flags); cli(); } while (0)
@@ -94,8 +99,11 @@ extern int spin_trylock(spinlock_t *lock);
#define spin_lock_irq(lock) \
do { __cli(); spin_lock(lock); } while (0)
+#define spin_lock_bh(___lk) do { local_bh_disable(); spin_lock(___lk); } while(0)
+
#define spin_unlock_irq(lock) \
do { spin_unlock(lock); __sti(); } while (0)
+#define spin_unlock_bh(___lk) do { spin_unlock(___lk); local_bh_enable(); } while(0)
#define spin_lock_irqsave(lock, flags) \
do { __save_flags(flags); __cli(); spin_lock(lock); } while (0)
@@ -132,10 +140,13 @@ extern void _write_unlock(rwlock_t *rw);
#define read_unlock(rw) _read_unlock(rw)
#define read_lock_irq(lock) do { __cli(); read_lock(lock); } while (0)
+#define read_lock_bh(lock) do { local_bh_disable(); read_lock(lock); } while (0)
#define read_unlock_irq(lock) do { read_unlock(lock); __sti(); } while (0)
+#define read_unlock_bh(lock) do { read_unlock(lock); local_bh_enable(); } while (0)
#define write_lock_irq(lock) do { __cli(); write_lock(lock); } while (0)
+#define write_lock_bh(lock) do { local_bh_disable(); write_lock(lock); } while(0)
#define write_unlock_irq(lock) do { write_unlock(lock); __sti(); } while (0)
-
+#define write_unlock_bh(lock) do { write_unlock(lock); local_bh_enable(); } while(0)
#define read_lock_irqsave(lock, flags) \
do { __save_flags(flags); __cli(); read_lock(lock); } while (0)
#define read_unlock_irqrestore(lock, flags) \
@@ -147,12 +158,3 @@ extern void _write_unlock(rwlock_t *rw);
#endif /* SMP */
#endif /* __ASM_SPINLOCK_H */
-
-
-
-
-
-
-
-
-
diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h
index bc96d7fef..38372df08 100644
--- a/include/asm-ppc/unistd.h
+++ b/include/asm-ppc/unistd.h
@@ -378,16 +378,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
*/
/*
- * Create a new kernel thread.
- */
-extern long __kernel_thread(unsigned long, int (*)(void *), void *);
-
-static inline long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
-{
- return __kernel_thread(flags | CLONE_VM, fn, arg);
-}
-
-/*
* System call prototypes.
*/
#define __NR__exit __NR_exit
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index dd4ef3603..7ada54246 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -21,7 +21,6 @@ struct linux_binprm{
unsigned long page[MAX_ARG_PAGES];
unsigned long p; /* current top of mem */
int sh_bang;
- int java; /* Java binary, prevent recursive invocation */
struct dentry * dentry;
int e_uid, e_gid;
kernel_cap_t cap_inheritable, cap_permitted, cap_effective;
@@ -56,7 +55,6 @@ extern int init_irix_binfmt(void);
extern int init_aout_binfmt(void);
extern int init_aout32_binfmt(void);
extern int init_script_binfmt(void);
-extern int init_java_binfmt(void);
extern int init_em86_binfmt(void);
extern int init_misc_binfmt(void);
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h
index 721056e32..aaf4a917d 100644
--- a/include/linux/cyclomx.h
+++ b/include/linux/cyclomx.h
@@ -21,6 +21,7 @@
#ifndef _CYCLOMX_H
#define _CYCLOMX_H
+#include <linux/config.h>
#include <linux/wanrouter.h>
#include <asm/spinlock.h>
diff --git a/include/linux/epcaconfig.h b/include/linux/epcaconfig.h
index c840c6735..55dec0670 100644
--- a/include/linux/epcaconfig.h
+++ b/include/linux/epcaconfig.h
@@ -1,8 +1,7 @@
-#define NUMCARDS 1
-#define NBDEVS 2
+#define NUMCARDS 0
+#define NBDEVS 0
struct board_info static_boards[NUMCARDS]={
- { ENABLED, 0, OFF, 2, (unchar*) 0x320, (unchar*) 0xd0000 },
};
/* DO NOT HAND EDIT THIS FILE! */
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index f0eba99c1..1ed6fe5e1 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -553,7 +553,8 @@ extern unsigned long ext2_count_free_inodes (struct super_block *);
extern void ext2_check_inodes_bitmap (struct super_block *);
/* inode.c */
-extern int ext2_bmap (struct inode *, int);
+extern long ext2_bmap (struct inode *, long);
+extern int ext2_get_block (struct inode *, long, struct buffer_head *, int);
extern struct buffer_head * ext2_getblk (struct inode *, long, int, int *);
extern int ext2_getblk_block (struct inode *, long, int, int *, int *);
diff --git a/include/linux/file.h b/include/linux/file.h
index 0125f9087..5efa99296 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -26,18 +26,27 @@ extern inline struct file * fcheck_task(struct task_struct *p, unsigned int fd)
extern inline struct file * fcheck(unsigned int fd)
{
struct file * file = NULL;
+ struct files_struct *files = current->files;
- if (fd < current->files->max_fds)
- file = current->files->fd[fd];
+ read_lock(&files->file_lock);
+ if (fd < files->max_fds)
+ file = files->fd[fd];
+ read_unlock(&files->file_lock);
return file;
}
extern inline struct file * fget(unsigned int fd)
{
- struct file * file = fcheck(fd);
+ struct file * file = NULL;
+ struct files_struct *files = current->files;
- if (file)
- file->f_count++;
+ read_lock(&files->file_lock);
+ if (fd < files->max_fds) {
+ file = files->fd[fd];
+ if (file)
+ atomic_inc(&file->f_count);
+ }
+ read_unlock(&files->file_lock);
return file;
}
@@ -46,7 +55,11 @@ extern inline struct file * fget(unsigned int fd)
*/
extern inline void fd_install(unsigned int fd, struct file * file)
{
- current->files->fd[fd] = file;
+ struct files_struct *files = current->files;
+
+ write_lock(&files->file_lock);
+ files->fd[fd] = file;
+ write_unlock(&files->file_lock);
}
/*
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8afa183f9..fd26410eb 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -188,51 +188,50 @@ typedef char buffer_block[BLOCK_SIZE];
#define BH_Dirty 1 /* 1 if the buffer is dirty */
#define BH_Lock 2 /* 1 if the buffer is locked */
#define BH_Req 3 /* 0 if the buffer has been invalidated */
+#define BH_Mapped 4 /* 1 if the buffer has a disk mapping */
+#define BH_New 5 /* 1 if the buffer is new and not yet written out */
#define BH_Protected 6 /* 1 if the buffer is protected */
+
/*
* Try to keep the most commonly used fields in single cache lines (16
* bytes) to improve performance. This ordering should be
* particularly beneficial on 32-bit processors.
*
* We use the first 16 bytes for the data which is used in searches
- * over the block hash lists (ie. getblk(), find_buffer() and
- * friends).
+ * over the block hash lists (ie. getblk() and friends).
*
* The second 16 bytes we use for lru buffer scans, as used by
* sync_buffers() and refill_freelist(). -- sct
*/
struct buffer_head {
/* First cache line: */
- struct buffer_head * b_next; /* Hash queue list */
+ struct buffer_head *b_next; /* Hash queue list */
unsigned long b_blocknr; /* block number */
- unsigned long b_size; /* block size */
+ unsigned short b_size; /* block size */
+ unsigned short b_list; /* List that this buffer appears */
kdev_t b_dev; /* device (B_FREE = free) */
+
+ atomic_t b_count; /* users using this block */
kdev_t b_rdev; /* Real device */
- unsigned long b_rsector; /* Real buffer location on disk */
- struct buffer_head * b_this_page; /* circular list of buffers in one page */
unsigned long b_state; /* buffer state bitmap (see above) */
- struct buffer_head * b_next_free;
- unsigned int b_count; /* users using this block */
-
- /* Non-performance-critical data follows. */
- char * b_data; /* pointer to data block (1024 bytes) */
- unsigned int b_list; /* List that this buffer appears */
- unsigned long b_flushtime; /* Time when this (dirty) buffer
- * should be written */
- wait_queue_head_t b_wait;
- struct buffer_head ** b_pprev; /* doubly linked list of hash-queue */
- struct buffer_head * b_prev_free; /* doubly linked list of buffers */
- struct buffer_head * b_reqnext; /* request queue */
+ unsigned long b_flushtime; /* Time when (dirty) buffer should be written */
- /*
- * I/O completion
- */
- void (*b_end_io)(struct buffer_head *bh, int uptodate);
+ struct buffer_head *b_next_free;/* lru/free list linkage */
+ struct buffer_head *b_prev_free;/* doubly linked list of buffers */
+ struct buffer_head *b_this_page;/* circular list of buffers in one page */
+ struct buffer_head *b_reqnext; /* request queue */
+
+ struct buffer_head **b_pprev; /* doubly linked list of hash-queue */
+ char *b_data; /* pointer to data block (1024 bytes) */
+ void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
void *b_dev_id;
+
+ unsigned long b_rsector; /* Real buffer location on disk */
+ wait_queue_head_t b_wait;
};
typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
-void init_buffer(struct buffer_head *, kdev_t, int, bh_end_io_t *, void *);
+void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
#define __buffer_state(bh, state) (((bh)->b_state & (1UL << BH_##state)) != 0)
@@ -240,6 +239,8 @@ void init_buffer(struct buffer_head *, kdev_t, int, bh_end_io_t *, void *);
#define buffer_dirty(bh) __buffer_state(bh,Dirty)
#define buffer_locked(bh) __buffer_state(bh,Lock)
#define buffer_req(bh) __buffer_state(bh,Req)
+#define buffer_mapped(bh) __buffer_state(bh,Mapped)
+#define buffer_new(bh) __buffer_state(bh,New)
#define buffer_protected(bh) __buffer_state(bh,Protected)
#define buffer_page(bh) (mem_map + MAP_NR((bh)->b_data))
@@ -402,9 +403,10 @@ struct file {
struct file *f_next, **f_pprev;
struct dentry *f_dentry;
struct file_operations *f_op;
+ atomic_t f_count;
+ unsigned int f_flags;
mode_t f_mode;
loff_t f_pos;
- unsigned int f_count, f_flags;
unsigned long f_reada, f_ramax, f_raend, f_ralen, f_rawin;
struct fown_struct f_owner;
unsigned int f_uid, f_gid;
@@ -598,13 +600,19 @@ struct inode_operations {
struct dentry * (*follow_link) (struct dentry *, struct dentry *, unsigned int);
/*
* the order of these functions within the VFS template has been
- * changed because SMP locking has changed: from now on all bmap,
+ * changed because SMP locking has changed: from now on all get_block,
* readpage, writepage and flushpage functions are supposed to do
* whatever locking they need to get proper SMP operation - for
* now in most cases this means a lock/unlock_kernel at entry/exit.
* [The new order is also slightly more logical :)]
*/
- int (*bmap) (struct inode *,int);
+ /*
+ * Generic block allocator exported by the lowlevel fs. All metadata
+ * details are handled by the lowlevel fs, all 'logical data content'
+ * details are handled by the highlevel block layer.
+ */
+ int (*get_block) (struct inode *, long, struct buffer_head *, int);
+
int (*readpage) (struct file *, struct page *);
int (*writepage) (struct file *, struct page *);
int (*flushpage) (struct inode *, struct page *, unsigned long);
@@ -741,23 +749,38 @@ extern struct file *inuse_filps;
extern int try_to_free_buffers(struct page *);
extern void refile_buffer(struct buffer_head * buf);
-extern int buffermem;
+extern atomic_t buffermem;
#define BUF_CLEAN 0
#define BUF_LOCKED 1 /* Buffers scheduled for write */
#define BUF_DIRTY 2 /* Dirty buffers, not yet scheduled for write */
#define NR_LIST 3
-void mark_buffer_uptodate(struct buffer_head *, int);
+/*
+ * This is called by bh->b_end_io() handlers when I/O has completed.
+ */
+extern inline void mark_buffer_uptodate(struct buffer_head * bh, int on)
+{
+ if (on)
+ set_bit(BH_Uptodate, &bh->b_state);
+ else
+ clear_bit(BH_Uptodate, &bh->b_state);
+}
+
+#define atomic_set_buffer_clean(bh) test_and_clear_bit(BH_Dirty, &(bh)->b_state)
+
+extern inline void __mark_buffer_clean(struct buffer_head *bh)
+{
+ refile_buffer(bh);
+}
extern inline void mark_buffer_clean(struct buffer_head * bh)
{
- if (test_and_clear_bit(BH_Dirty, &bh->b_state))
- refile_buffer(bh);
+ if (atomic_set_buffer_clean(bh))
+ __mark_buffer_clean(bh);
}
extern void FASTCALL(__mark_buffer_dirty(struct buffer_head *bh, int flag));
-extern void FASTCALL(__atomic_mark_buffer_dirty(struct buffer_head *bh, int flag));
#define atomic_set_buffer_dirty(bh) test_and_set_bit(BH_Dirty, &(bh)->b_state)
@@ -767,20 +790,6 @@ extern inline void mark_buffer_dirty(struct buffer_head * bh, int flag)
__mark_buffer_dirty(bh, flag);
}
-/*
- * SMP-safe version of the above - does synchronization with
- * other users of buffer-cache data structures.
- *
- * since we test-set the dirty bit in a CPU-atomic way we also
- * have optimized the common 'redirtying' case away completely.
- */
-extern inline void atomic_mark_buffer_dirty(struct buffer_head * bh, int flag)
-{
- if (!atomic_set_buffer_dirty(bh))
- __atomic_mark_buffer_dirty(bh, flag);
-}
-
-
extern void balance_dirty(kdev_t);
extern int check_disk_change(kdev_t);
extern int invalidate_inodes(struct super_block *);
@@ -847,7 +856,6 @@ extern void remove_inode_hash(struct inode *);
extern struct file * get_empty_filp(void);
extern struct buffer_head * get_hash_table(kdev_t, int, int);
extern struct buffer_head * getblk(kdev_t, int, int);
-extern struct buffer_head * find_buffer(kdev_t, int, int);
extern void ll_rw_block(int, int, struct buffer_head * bh[]);
extern int is_read_only(kdev_t);
extern void __brelse(struct buffer_head *);
@@ -869,13 +877,12 @@ extern struct buffer_head * breada(kdev_t, int, int, unsigned int, unsigned int)
extern int brw_page(int, struct page *, kdev_t, int [], int, int);
-typedef long (*writepage_t)(struct file *, struct page *, unsigned long, unsigned long, const char *);
-typedef int (*fs_getblock_t)(struct inode *, long, int, int *, int *);
+typedef int (*writepage_t)(struct file *, struct page *, unsigned long, unsigned long, const char *);
/* Generic buffer handling for block filesystems.. */
extern int block_read_full_page(struct file *, struct page *);
-extern int block_write_full_page (struct file *, struct page *, fs_getblock_t);
-extern int block_write_partial_page (struct file *, struct page *, unsigned long, unsigned long, const char *, fs_getblock_t);
+extern int block_write_full_page (struct file *, struct page *);
+extern int block_write_partial_page (struct file *, struct page *, unsigned long, unsigned long, const char *);
extern int block_flushpage(struct inode *, struct page *, unsigned long);
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
@@ -889,7 +896,6 @@ unsigned long generate_cluster(kdev_t, int b[], int);
unsigned long generate_cluster_swab32(kdev_t, int b[], int);
extern kdev_t ROOT_DEV;
-extern void show_buffers(void);
extern void mount_root(void);
#ifdef CONFIG_BLK_DEV_INITRD
diff --git a/include/linux/ide.h b/include/linux/ide.h
index c0b5ed929..0ef994528 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -463,6 +463,8 @@ typedef struct {
#ifdef CONFIG_PROC_FS
void proc_ide_create(void);
void proc_ide_destroy(void);
+void destroy_proc_ide_drives(ide_hwif_t *);
+void create_proc_ide_interfaces(void);
void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void *data);
void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p);
read_proc_t proc_ide_read_capacity;
@@ -757,6 +759,7 @@ void ide_init_subdrivers (void);
#ifndef _IDE_C
extern struct file_operations ide_fops[];
+extern ide_proc_entry_t generic_subdriver_entries[];
#endif
#ifdef _IDE_C
diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h
index 0fcb4b822..e5b3a3d7b 100644
--- a/include/linux/iso_fs.h
+++ b/include/linux/iso_fs.h
@@ -184,26 +184,10 @@ extern int find_rock_ridge_relocation(struct iso_directory_record *, struct inod
int get_joliet_filename(struct iso_directory_record *, struct inode *, unsigned char *);
int get_acorn_filename(struct iso_directory_record *, char *, struct inode *);
-/* The stuff that follows may be totally unneeded. I have not checked to see
- which prototypes we are still using. */
-
-extern int isofs_open(struct inode * inode, struct file * filp);
-extern void isofs_release(struct inode * inode, struct file * filp);
-extern struct dentry *isofs_lookup(struct inode * dir, struct dentry *);
-extern unsigned long isofs_count_free_inodes(struct super_block *sb);
-extern int isofs_new_block(int dev);
-extern int isofs_free_block(int dev, int block);
-extern int isofs_bmap(struct inode *,int);
-
-extern void isofs_put_super(struct super_block *);
-extern struct super_block *isofs_read_super(struct super_block *,void *,int);
+extern struct dentry *isofs_lookup(struct inode *, struct dentry *);
+extern int isofs_get_block(struct inode *, long, struct buffer_head *, int);
+extern int isofs_bmap(struct inode *, int);
extern int init_iso9660_fs(void);
-extern void isofs_read_inode(struct inode *);
-extern void isofs_put_inode(struct inode *);
-extern int isofs_statfs(struct super_block *, struct statfs *, int);
-
-extern int isofs_lseek(struct inode *, struct file *, off_t, int);
-extern int isofs_read(struct inode *, struct file *, char *, int);
extern int isofs_lookup_grandparent(struct inode *, int);
extern struct inode_operations isofs_file_inode_operations;
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h
index 0b41889bd..b730d20a3 100644
--- a/include/linux/minix_fs.h
+++ b/include/linux/minix_fs.h
@@ -110,7 +110,7 @@ extern unsigned long minix_count_free_blocks(struct super_block *sb);
extern int minix_bmap(struct inode *,int);
extern struct buffer_head * minix_getblk(struct inode *, int, int);
-extern int minix_getblk_block (struct inode *, long, int, int *, int *);
+extern int minix_get_block(struct inode *, long, struct buffer_head *, int);
extern struct buffer_head * minix_bread(struct inode *, int, int);
extern void minix_truncate(struct inode *);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b41ff492c..f41fc2743 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -148,7 +148,7 @@ typedef struct page {
#define PG_uptodate 3
#define PG_free_after 4
#define PG_decr_after 5
-#define PG_swap_unlock_after 6
+#define PG_free_swap_after 6
#define PG_DMA 7
#define PG_Slab 8
#define PG_swap_cache 9
@@ -182,7 +182,7 @@ if (!test_and_clear_bit(PG_locked, &(page)->flags)) { \
#define PageReferenced(page) (test_bit(PG_referenced, &(page)->flags))
#define PageFreeAfter(page) (test_bit(PG_free_after, &(page)->flags))
#define PageDecrAfter(page) (test_bit(PG_decr_after, &(page)->flags))
-#define PageSwapUnlockAfter(page) (test_bit(PG_swap_unlock_after, &(page)->flags))
+#define PageSwapUnlockAfter(page) (test_bit(PG_free_swap_after, &(page)->flags))
#define PageDMA(page) (test_bit(PG_DMA, &(page)->flags))
#define PageSlab(page) (test_bit(PG_Slab, &(page)->flags))
#define PageSwapCache(page) (test_bit(PG_swap_cache, &(page)->flags))
@@ -420,7 +420,7 @@ static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * m
extern struct vm_area_struct *find_extend_vma(struct task_struct *tsk, unsigned long addr);
-#define buffer_under_min() ((buffermem >> PAGE_SHIFT) * 100 < \
+#define buffer_under_min() ((atomic_read(&buffermem) >> PAGE_SHIFT) * 100 < \
buffer_mem.min_percent * num_physpages)
#define pgcache_under_min() (atomic_read(&page_cache_size) * 100 < \
page_cache.min_percent * num_physpages)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 3b7272caa..33a969a98 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -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,
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 10a074449..cc49b927c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -130,6 +130,7 @@ asmlinkage void schedule(void);
*/
struct files_struct {
atomic_t count;
+ rwlock_t file_lock;
int max_fds;
struct file ** fd; /* current fd array */
fd_set close_on_exec;
@@ -138,6 +139,7 @@ struct files_struct {
#define INIT_FILES { \
ATOMIC_INIT(1), \
+ RW_LOCK_UNLOCKED, \
NR_OPEN, \
&init_fd_array[0], \
{ { 0, } }, \
diff --git a/include/linux/string.h b/include/linux/string.h
index 1b3fa4e51..6c9147718 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -20,6 +20,7 @@ extern char * strchr(const char *,int);
extern char * strrchr(const char *,int);
extern char * strpbrk(const char *,const char *);
extern char * strtok(char *,const char *);
+extern char * strsep(char **,const char *);
extern char * strstr(const char *,const char *);
extern __kernel_size_t strlen(const char *);
extern __kernel_size_t strnlen(const char *,__kernel_size_t);
diff --git a/include/linux/swap.h b/include/linux/swap.h
index e95a3881a..fa4177914 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -67,7 +67,7 @@ extern int nr_free_pages;
extern atomic_t nr_async_pages;
extern struct inode swapper_inode;
extern atomic_t page_cache_size;
-extern int buffermem;
+extern atomic_t buffermem;
/* Incomplete types for prototype declarations: */
struct task_struct;
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index b5b46b7f1..5d9eedc1d 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -82,8 +82,6 @@ enum
KERN_PANIC=15, /* int: panic timeout */
KERN_REALROOTDEV=16, /* real root device to mount after initrd */
- KERN_JAVA_INTERPRETER=19, /* path to Java(tm) interpreter */
- KERN_JAVA_APPLETVIEWER=20, /* path to Java(tm) appletviewer */
KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
KERN_PRINTK=23, /* struct: control printk logging parameters */
diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h
index d8c6eef5c..cf9cab749 100644
--- a/include/linux/sysv_fs.h
+++ b/include/linux/sysv_fs.h
@@ -384,25 +384,15 @@ extern int sysv_new_block(struct super_block * sb);
extern void sysv_free_block(struct super_block * sb, unsigned int block);
extern unsigned long sysv_count_free_blocks(struct super_block *sb);
-extern int sysv_bmap(struct inode *,int);
-
extern struct buffer_head * sysv_getblk(struct inode *, unsigned int, int);
-extern int sysv_getblk_block(struct inode *, long, int, int *, int *);
+extern int sysv_get_block(struct inode *, long, struct buffer_head *, int);
extern struct buffer_head * sysv_file_bread(struct inode *, int, int);
-extern ssize_t sysv_file_read(struct file *, char *, size_t, loff_t *);
extern void sysv_truncate(struct inode *);
-extern void sysv_put_super(struct super_block *);
-extern struct super_block *sysv_read_super(struct super_block *,void *,int);
extern int init_sysv_fs(void);
-extern void sysv_write_super(struct super_block *);
-extern void sysv_read_inode(struct inode *);
-extern int sysv_notify_change(struct dentry *, struct iattr *);
extern void sysv_write_inode(struct inode *);
-extern int sysv_statfs(struct super_block *, struct statfs *, int);
extern int sysv_sync_inode(struct inode *);
extern int sysv_sync_file(struct file *, struct dentry *);
-extern int sysv_mmap(struct file *, struct vm_area_struct *);
extern struct inode_operations sysv_file_inode_operations;
extern struct inode_operations sysv_file_inode_operations_with_bmap;
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 56f39893e..796749fdb 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -71,7 +71,7 @@ extern inline void init_timer(struct timer_list * timer)
timer->prev = NULL;
}
-extern inline int timer_pending(struct timer_list * timer)
+extern inline int timer_pending(const struct timer_list * timer)
{
return timer->prev != NULL;
}
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 2124c7e57..d938298a3 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -111,13 +111,14 @@
#define UFS_MOUNT_ONERROR_UMOUNT 0x00000004
#define UFS_MOUNT_ONERROR_REPAIR 0x00000008
-#define UFS_MOUNT_UFSTYPE 0x000003F0
+#define UFS_MOUNT_UFSTYPE 0x000007F0
#define UFS_MOUNT_UFSTYPE_OLD 0x00000010
#define UFS_MOUNT_UFSTYPE_44BSD 0x00000020
#define UFS_MOUNT_UFSTYPE_SUN 0x00000040
#define UFS_MOUNT_UFSTYPE_NEXTSTEP 0x00000080
-#define UFS_MOUNT_UFSTYPE_OPENSTEP 0x00000100
-#define UFS_MOUNT_UFSTYPE_SUNx86 0x00000200
+#define UFS_MOUNT_UFSTYPE_NEXTSTEP_CD 0x00000100
+#define UFS_MOUNT_UFSTYPE_OPENSTEP 0x00000200
+#define UFS_MOUNT_UFSTYPE_SUNx86 0x00000400
#define ufs_clear_opt(o,opt) o &= ~UFS_MOUNT_##opt
#define ufs_set_opt(o,opt) o |= UFS_MOUNT_##opt
@@ -529,7 +530,7 @@ extern void ufs_free_inode (struct inode *inode);
extern struct inode * ufs_new_inode (const struct inode *, int, int *);
/* inode.c */
-extern int ufs_bmap (struct inode *, int);
+extern int ufs_frag_map (struct inode *, int);
extern void ufs_read_inode (struct inode *);
extern void ufs_put_inode (struct inode *);
extern void ufs_write_inode (struct inode *);
@@ -537,7 +538,7 @@ extern int ufs_sync_inode (struct inode *);
extern void ufs_write_inode (struct inode *);
extern void ufs_delete_inode (struct inode *);
extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *);
-extern int ufs_getfrag_block (struct inode *, long, int, int *, int *);
+extern int ufs_getfrag_block (struct inode *, long, struct buffer_head *, int);
extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *);
/* namei.c */
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
index 22d227278..d8118449c 100644
--- a/include/net/dn_fib.h
+++ b/include/net/dn_fib.h
@@ -1,6 +1,8 @@
#ifndef _NET_DN_FIB_H
#define _NET_DN_FIB_H
+#include <linux/config.h>
+
#ifdef CONFIG_DECNET_ROUTER
diff --git a/include/net/dn_raw.h b/include/net/dn_raw.h
index a4502d29c..8232ddf4e 100644
--- a/include/net/dn_raw.h
+++ b/include/net/dn_raw.h
@@ -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;