summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/arcdevice.h19
-rw-r--r--include/linux/coda_linux.h2
-rw-r--r--include/linux/com20020.h33
-rw-r--r--include/linux/dcache.h12
-rw-r--r--include/linux/file.h28
-rw-r--r--include/linux/filter.h2
-rw-r--r--include/linux/fs.h67
-rw-r--r--include/linux/fs_struct.h12
-rw-r--r--include/linux/hdlcdrv.h3
-rw-r--r--include/linux/i2o.h37
-rw-r--r--include/linux/if_ether.h2
-rw-r--r--include/linux/if_pppox.h136
-rw-r--r--include/linux/input.h2
-rw-r--r--include/linux/mm.h23
-rw-r--r--include/linux/module.h11
-rw-r--r--include/linux/mount.h22
-rw-r--r--include/linux/net.h3
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack.h7
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_core.h8
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h6
-rw-r--r--include/linux/nfs_fs.h4
-rw-r--r--include/linux/nfsd/export.h1
-rw-r--r--include/linux/ntfs_fs_sb.h3
-rw-r--r--include/linux/pagemap.h1
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/pipe_fs_i.h1
-rw-r--r--include/linux/ppp_channel.h2
-rw-r--r--include/linux/proc_fs.h2
-rw-r--r--include/linux/quotaops.h4
-rw-r--r--include/linux/sched.h46
-rw-r--r--include/linux/socket.h3
-rw-r--r--include/linux/string.h62
-rw-r--r--include/linux/swap.h17
-rw-r--r--include/linux/timer.h15
-rw-r--r--include/linux/usb.h56
36 files changed, 442 insertions, 213 deletions
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index 777f5f8ee..b5a9999a5 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -72,7 +72,8 @@
#define D_TX 256 /* show tx packets */
#define D_RX 512 /* show rx packets */
#define D_SKB 1024 /* show skb's */
-#define D_TIMING 2048 /* show time needed to copy buffers to card */
+#define D_SKB_SIZE 2048 /* show skb sizes */
+#define D_TIMING 4096 /* show time needed to copy buffers to card */
#ifndef ARCNET_DEBUG_MAX
#define ARCNET_DEBUG_MAX (~0) /* enable ALL debug messages */
@@ -174,6 +175,13 @@ extern int arcnet_debug;
#define NORMALconf 0x00 /* 1-249 byte packets */
#define EXTconf 0x08 /* 250-504 byte packets */
+/* card feature flags, set during auto-detection.
+ * (currently only used by com20020pci)
+ */
+#define ARC_IS_5MBIT 1 /* card default speed is 5MBit */
+#define ARC_CAN_10MBIT 2 /* card uses COM20022, supporting 10MBit,
+ but default is 2.5MBit. */
+
/* information needed to define an encapsulation driver */
struct ArcProto {
@@ -227,8 +235,10 @@ struct arcnet_local {
uint8_t config, /* current value of CONFIG register */
timeout, /* Extended timeout for COM20020 */
backplane, /* Backplane flag for COM20020 */
- clock, /* COM20020 clock speed flag */
- setup, /* Contents of setup register */
+ clockp, /* COM20020 clock divider */
+ clockm, /* COM20020 clock multiplier flag */
+ setup, /* Contents of setup1 register */
+ setup2, /* Contents of setup2 register */
intmask; /* current value of INTMASK register */
uint8_t default_proto[256]; /* default encap to use for each host */
int cur_tx, /* buffer used by current transmit, or -1 */
@@ -236,7 +246,8 @@ struct arcnet_local {
cur_rx; /* current receive buffer */
int lastload_dest, /* can last loaded packet be acked? */
lasttrans_dest; /* can last TX'd packet be acked? */
- int basename_len; /* name length without suffix ('arc0e' -> 4) */
+ char *card_name; /* card ident string */
+ int card_flags; /* special card features */
/*
* Buffer management: an ARCnet card has 4 x 512-byte buffers, each of
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 21f5bad13..08ccef4c4 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -102,7 +102,7 @@ void coda_sysctl_clean(void);
if (coda_debug & mask) { \
printk("(%s,l. %d): ", __FUNCTION__, __LINE__); \
printk(format, ## a); } \
-} while (0) ;
+} while (0)
#define ENTRY \
if(coda_print_entry) printk("Process %d entered %s\n",current->pid,__FUNCTION__)
diff --git a/include/linux/com20020.h b/include/linux/com20020.h
index b386bf34d..89cefc2ba 100644
--- a/include/linux/com20020.h
+++ b/include/linux/com20020.h
@@ -29,6 +29,7 @@
int com20020_check(struct net_device *dev);
int com20020_found(struct net_device *dev, int shared);
+void com20020_remove(struct net_device *dev);
/* The number of low I/O ports used by the card. */
#define ARCNET_TOTAL_SIZE 9
@@ -41,8 +42,10 @@ int com20020_found(struct net_device *dev, int shared);
#define _ADDR_HI (ioaddr+2) /* control registers for IO-mapped memory */
#define _ADDR_LO (ioaddr+3)
#define _MEMDATA (ioaddr+4) /* data port for IO-mapped memory */
+#define _SUBADR (ioaddr+5) /* the extended port _XREG refers to */
#define _CONFIG (ioaddr+6) /* configuration register */
-#define _SETUP (ioaddr+7) /* setup register */
+#define _XREG (ioaddr+7) /* extra registers (indexed by _CONFIG
+ or _SUBADR) */
/* in the ADDR_HI register */
#define RDDATAflag 0x80 /* next access is a read (not a write) */
@@ -57,10 +60,28 @@ int com20020_found(struct net_device *dev, int shared);
/* in SETUP register */
#define PROMISCset 0x10 /* enable RCV_ALL */
-#define REGTENTID (lp->config &= ~3);
-#define REGNID (lp->config = (lp->config&~2)|1);
-#define REGSETUP (lp->config = (lp->config&~1)|2);
-#define REGNXTID (lp->config |= 3);
+/* COM2002x */
+#define SUB_TENTATIVE 0 /* tentative node ID */
+#define SUB_NODE 1 /* node ID */
+#define SUB_SETUP1 2 /* various options */
+#define SUB_TEST 3 /* test/diag register */
+
+/* COM20022 only */
+#define SUB_SETUP2 4 /* sundry options */
+#define SUB_BUSCTL 5 /* bus control options */
+#define SUB_DMACOUNT 6 /* DMA count options */
+
+#define SET_SUBADR(x) do { \
+ if ((x) < 4) \
+ { \
+ lp->config = (lp->config & ~0x03) | (x); \
+ SETCONF; \
+ } \
+ else \
+ { \
+ outb(x, _SUBADR); \
+ } \
+} while (0)
#undef ARCRESET
#undef ASTATUS
@@ -80,6 +101,6 @@ int com20020_found(struct net_device *dev, int shared);
#define ACOMMAND(cmd) outb((cmd),_COMMAND)
#define AINTMASK(msk) outb((msk),_INTMASK)
-#define SETCONF(cfg) outb(cfg, _CONFIG)
+#define SETCONF outb(lp->config, _CONFIG)
#endif /* __COM20020_H */
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 9ed7e0726..7eccee7b9 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -61,8 +61,7 @@ struct dentry {
unsigned int d_flags;
struct inode * d_inode; /* Where the name belongs to - NULL is negative */
struct dentry * d_parent; /* parent directory */
- struct dentry * d_mounts; /* mount information */
- struct dentry * d_covers;
+ struct list_head d_vfsmnt;
struct list_head d_hash; /* lookup hash list */
struct list_head d_lru; /* d_count = 0 LRU list */
struct list_head d_child; /* child of parent list */
@@ -151,18 +150,18 @@ extern int d_invalidate(struct dentry *);
#define shrink_dcache() prune_dcache(0)
struct zone_struct;
/* dcache memory management */
-extern int shrink_dcache_memory(int, unsigned int, struct zone_struct *);
+extern int shrink_dcache_memory(int, unsigned int);
extern void prune_dcache(int);
/* icache memory management (defined in linux/fs/inode.c) */
-extern int shrink_icache_memory(int, int, struct zone_struct *);
+extern int shrink_icache_memory(int, int);
extern void prune_icache(int);
/* only used at mount-time */
extern struct dentry * d_alloc_root(struct inode *);
/* test whether root is busy without destroying dcache */
-extern int is_root_busy(struct dentry *);
+extern int d_active_refs(struct dentry *);
/* test whether we have any submounts in a subdir tree */
extern int have_submounts(struct dentry *);
@@ -235,10 +234,9 @@ static __inline__ int d_unhashed(struct dentry *dentry)
extern void dput(struct dentry *);
-/* MOUNT_REWRITE: replace with the check for d_vfsmnt */
static __inline__ int d_mountpoint(struct dentry *dentry)
{
- return dentry != dentry->d_mounts;
+ return !list_empty(&dentry->d_vfsmnt);
}
diff --git a/include/linux/file.h b/include/linux/file.h
index a6998496c..8ac96f574 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -7,23 +7,19 @@
extern void _fput(struct file *);
-/*
- * Check whether the specified task has the fd open. Since the task
- * may not have a files_struct, we must test for p->files != NULL.
- */
-extern inline struct file * fcheck_task(struct task_struct *p, unsigned int fd)
+static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
{
struct file * file = NULL;
- if (fd < p->files->max_fds)
- file = p->files->fd[fd];
+ if (fd < files->max_fds)
+ file = files->fd[fd];
return file;
}
/*
* Check whether the specified fd has an open file.
*/
-extern inline struct file * fcheck(unsigned int fd)
+static inline struct file * fcheck(unsigned int fd)
{
struct file * file = NULL;
struct files_struct *files = current->files;
@@ -33,7 +29,7 @@ extern inline struct file * fcheck(unsigned int fd)
return file;
}
-extern inline struct file * frip(struct files_struct *files, unsigned int fd)
+static inline struct file * frip(struct files_struct *files, unsigned int fd)
{
struct file * file = NULL;
@@ -42,7 +38,7 @@ extern inline struct file * frip(struct files_struct *files, unsigned int fd)
return file;
}
-extern inline struct file * fget(unsigned int fd)
+static inline struct file * fget(unsigned int fd)
{
struct file * file = NULL;
struct files_struct *files = current->files;
@@ -58,10 +54,10 @@ extern inline struct file * fget(unsigned int fd)
/*
* 23/12/1998 Marcin Dalecki <dalecki@cs.net.pl>:
*
- * Since those functions where calling other functions, it was compleatly
- * bogous to make them all "extern inline".
+ * Since those functions where calling other functions, it was completely
+ * bogus to make them all "extern inline".
*
- * The removal of this pseudo optimization saved me scandaleous:
+ * The removal of this pseudo optimization saved me scandalous:
*
* 3756 (i386 arch)
*
@@ -71,7 +67,7 @@ extern inline struct file * fget(unsigned int fd)
* I suspect there are many other similar "optimizations" across the
* kernel...
*/
-extern inline void fput(struct file * file)
+static inline void fput(struct file * file)
{
if (atomic_dec_and_test(&file->f_count))
_fput(file);
@@ -88,7 +84,7 @@ extern void put_filp(struct file *);
* fput() the struct file we are about to overwrite in this case.
*/
-extern inline void fd_install(unsigned int fd, struct file * file)
+static inline void fd_install(unsigned int fd, struct file * file)
{
struct files_struct *files = current->files;
struct file * result;
@@ -100,4 +96,6 @@ extern inline void fd_install(unsigned int fd, struct file * file)
fput(result);
}
+void put_files_struct(struct files_struct *fs);
+
#endif /* __LINUX_FILE_H */
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 58ad8b1bc..ae1a1ebed 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -38,7 +38,7 @@ struct sk_filter
struct sock_filter insns[0];
};
-extern __inline__ unsigned int sk_filter_len(struct sk_filter *fp)
+static inline unsigned int sk_filter_len(struct sk_filter *fp)
{
return fp->len*sizeof(struct sock_filter) + sizeof(*fp);
}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3f135fa01..4eb593aba 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -20,6 +20,7 @@
#include <linux/stat.h>
#include <linux/cache.h>
#include <linux/stddef.h>
+#include <linux/string.h>
#include <asm/atomic.h>
#include <asm/bitops.h>
@@ -78,7 +79,11 @@ extern int max_super_blocks, nr_super_blocks;
#define FS_NO_PRELIM 4 /* prevent preloading of dentries, even if
* FS_NO_DCACHE is not set.
*/
-
+#define FS_SINGLE 8 /*
+ * Filesystem that can have only one superblock;
+ * kernel-wide vfsmnt is kept in ->kern_mnt.
+ */
+#define FS_NOMOUNT 16 /* Never mount from userland */
/*
* These are the fs-independent mount-flags: up to 16 flags are supported
*/
@@ -173,7 +178,6 @@ extern int max_super_blocks, nr_super_blocks;
#ifdef __KERNEL__
-#include <linux/string.h>
#include <asm/semaphore.h>
#include <asm/byteorder.h>
@@ -251,7 +255,7 @@ void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long offset);
-#define touch_buffer(bh) set_bit(PG_referenced, &bh->b_page->flags)
+#define touch_buffer(bh) SetPageReferenced(bh->b_page)
#include <linux/pipe_fs_i.h>
@@ -338,8 +342,8 @@ struct page;
struct address_space;
struct address_space_operations {
- int (*writepage)(struct file *, struct dentry *, struct page *);
- int (*readpage)(struct dentry *, struct page *);
+ int (*writepage)(struct file *, struct page *);
+ int (*readpage)(struct file *, struct page *);
int (*sync_page)(struct page *);
int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
@@ -625,6 +629,7 @@ struct super_block {
struct list_head s_files;
struct block_device *s_bdev;
+ struct list_head s_mounts; /* vfsmount(s) of this one */
struct quota_mount_options s_dquot; /* Diskquota specific options */
union {
@@ -769,6 +774,7 @@ struct file_system_type {
int fs_flags;
struct super_block *(*read_super) (struct super_block *, void *, int);
struct module *owner;
+ struct vfsmount *kern_mnt; /* For kernel mount, if it's FS_SINGLE fs */
struct file_system_type * next;
};
@@ -785,16 +791,11 @@ struct file_system_type var = { \
extern int register_filesystem(struct file_system_type *);
extern int unregister_filesystem(struct file_system_type *);
+extern struct vfsmount *kern_mount(struct file_system_type *);
+extern void kern_umount(struct vfsmount *);
+extern int may_umount(struct vfsmount *);
-static inline int vfs_statfs(struct super_block *sb, struct statfs *buf)
-{
- if (!sb)
- return -ENODEV;
- if (!sb->s_op || !sb->s_op->statfs)
- return -ENOSYS;
- memset(buf, 0, sizeof(struct statfs));
- return sb->s_op->statfs(sb, buf);
-}
+extern int vfs_statfs(struct super_block *, struct statfs *);
/* Return value for VFS lock functions - tells locks.c to lock conventionally
* REALLY kosha for root NFS and nfs_lock
@@ -821,7 +822,7 @@ static inline int locks_verify_locked(struct inode *inode)
return 0;
}
-extern inline int locks_verify_area(int read_write, struct inode *inode,
+static inline int locks_verify_area(int read_write, struct inode *inode,
struct file *filp, loff_t offset,
size_t count)
{
@@ -830,7 +831,7 @@ extern inline int locks_verify_area(int read_write, struct inode *inode,
return 0;
}
-extern inline int locks_verify_truncate(struct inode *inode,
+static inline int locks_verify_truncate(struct inode *inode,
struct file *filp,
loff_t size)
{
@@ -898,7 +899,6 @@ extern struct file_operations write_pipe_fops;
extern struct file_operations rdwr_pipe_fops;
extern int fs_may_remount_ro(struct super_block *);
-extern int fs_may_mount(kdev_t);
extern int try_to_free_buffers(struct page *);
extern void refile_buffer(struct buffer_head * buf);
@@ -912,7 +912,7 @@ extern void refile_buffer(struct buffer_head * buf);
/*
* 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)
+static inline void mark_buffer_uptodate(struct buffer_head * bh, int on)
{
if (on)
set_bit(BH_Uptodate, &bh->b_state);
@@ -922,12 +922,12 @@ extern inline void mark_buffer_uptodate(struct buffer_head * bh, int on)
#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)
+static inline void __mark_buffer_clean(struct buffer_head *bh)
{
refile_buffer(bh);
}
-extern inline void mark_buffer_clean(struct buffer_head * bh)
+static inline void mark_buffer_clean(struct buffer_head * bh)
{
if (atomic_set_buffer_clean(bh))
__mark_buffer_clean(bh);
@@ -935,12 +935,12 @@ extern inline void mark_buffer_clean(struct buffer_head * bh)
#define atomic_set_buffer_protected(bh) test_and_set_bit(BH_Protected, &(bh)->b_state)
-extern inline void __mark_buffer_protected(struct buffer_head *bh)
+static inline void __mark_buffer_protected(struct buffer_head *bh)
{
refile_buffer(bh);
}
-extern inline void mark_buffer_protected(struct buffer_head * bh)
+static inline void mark_buffer_protected(struct buffer_head * bh)
{
if (!atomic_set_buffer_protected(bh))
__mark_buffer_protected(bh);
@@ -968,7 +968,6 @@ extern int notify_change(struct dentry *, struct iattr *);
extern int permission(struct inode *, int);
extern int get_write_access(struct inode *);
extern void put_write_access(struct inode *);
-extern struct dentry * do_mknod(const char *, int, dev_t);
extern int do_pipe(int *);
extern int open_namei(const char *, int, int, struct nameidata *);
@@ -1031,14 +1030,16 @@ typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, u
/* needed for stackable file system support */
extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
-extern struct dentry * lookup_dentry(const char *, unsigned int);
-extern int walk_init(const char *, unsigned, struct nameidata *);
-extern int walk_name(const char *, struct nameidata *);
+extern int __user_walk(const char *, unsigned, struct nameidata *);
+extern int path_init(const char *, unsigned, struct nameidata *);
+extern int path_walk(const char *, struct nameidata *);
+extern void path_release(struct nameidata *);
+extern int follow_down(struct vfsmount **, struct dentry **);
+extern int follow_up(struct vfsmount **, struct dentry **);
extern struct dentry * lookup_one(const char *, struct dentry *);
-extern struct dentry * __namei(const char *, unsigned int);
-
-#define namei(pathname) __namei(pathname, LOOKUP_FOLLOW)
-#define lnamei(pathname) __namei(pathname, 0)
+extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
+#define user_path_walk(name,nd) __user_walk(name, LOOKUP_FOLLOW|LOOKUP_POSITIVE, nd)
+#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd)
extern void iput(struct inode *);
extern struct inode * igrab(struct inode *);
@@ -1064,13 +1065,13 @@ extern struct buffer_head * getblk(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 *);
-extern inline void brelse(struct buffer_head *buf)
+static inline void brelse(struct buffer_head *buf)
{
if (buf)
__brelse(buf);
}
extern void __bforget(struct buffer_head *);
-extern inline void bforget(struct buffer_head *buf)
+static inline void bforget(struct buffer_head *buf)
{
if (buf)
__bforget(buf);
@@ -1083,7 +1084,6 @@ extern void wakeup_bdflush(int wait);
extern int brw_page(int, struct page *, kdev_t, int [], int);
-typedef int (*writepage_t)(struct file *, struct page *, unsigned long, unsigned long, const char *);
typedef int (get_block_t)(struct inode*,long,struct buffer_head*,int);
/* Generic buffer handling for block filesystems.. */
@@ -1119,7 +1119,6 @@ extern int vfs_readdir(struct file *, filldir_t, void *);
extern struct super_block *get_super(kdev_t);
struct super_block *get_empty_super(void);
-void remove_vfsmnt(kdev_t dev);
extern void put_super(kdev_t);
unsigned long generate_cluster(kdev_t, int b[], int);
unsigned long generate_cluster_swab32(kdev_t, int b[], int);
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
index e9c32f386..53f9c44f7 100644
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -31,8 +31,10 @@ static inline void set_fs_root(struct fs_struct *fs,
struct vfsmount *old_rootmnt = fs->rootmnt;
fs->rootmnt = mntget(mnt);
fs->root = dget(dentry);
- dput(old_root);
- mntput(old_rootmnt);
+ if (old_root) {
+ dput(old_root);
+ mntput(old_rootmnt);
+ }
}
/*
@@ -48,8 +50,10 @@ static inline void set_fs_pwd(struct fs_struct *fs,
struct vfsmount *old_pwdmnt = fs->pwdmnt;
fs->pwdmnt = mntget(mnt);
fs->pwd = dget(dentry);
- dput(old_pwd);
- mntput(old_pwdmnt);
+ if (old_pwd) {
+ dput(old_pwd);
+ mntput(old_pwdmnt);
+ }
}
struct fs_struct *copy_fs_struct(struct fs_struct *old);
diff --git a/include/linux/hdlcdrv.h b/include/linux/hdlcdrv.h
index c4d398e94..a882aaea5 100644
--- a/include/linux/hdlcdrv.h
+++ b/include/linux/hdlcdrv.h
@@ -109,7 +109,6 @@ struct hdlcdrv_ioctl {
#include <linux/spinlock.h>
#define HDLCDRV_MAGIC 0x5ac6e778
-#define HDLCDRV_IFNAMELEN 6
#define HDLCDRV_HDLCBUFFER 32 /* should be a power of 2 for speed reasons */
#define HDLCDRV_BITBUFFER 256 /* should be a power of 2 for speed reasons */
#undef HDLCDRV_LOOPBACK /* define for HDLC debugging purposes */
@@ -182,8 +181,6 @@ struct hdlcdrv_ops {
struct hdlcdrv_state {
int magic;
- char ifname[HDLCDRV_IFNAMELEN];
-
const struct hdlcdrv_ops *ops;
struct {
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index f55c5de88..c15faa66f 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -142,7 +142,6 @@ struct i2o_controller
void (*bus_disable)(struct i2o_controller *c);
void *page_frame; /* Message buffers */
- int inbound_size; /* Inbound queue size */
};
/*
@@ -304,8 +303,6 @@ extern int i2o_query_table(int, struct i2o_controller *, int, int, int, void *,
extern int i2o_clear_table(struct i2o_controller *, int, int);
extern int i2o_row_add_table(struct i2o_controller *, int, int, int, void *,
int);
-extern int i2o_row_delete_table(struct i2o_controller *, int, int, int, void *,
- int);
extern int i2o_issue_params(int, struct i2o_controller *, int, void *,
int, void *, int);
@@ -401,13 +398,12 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define I2O_PRIVATE_MSG 0xFF
-/*
- * Init Outbound Q status
- */
-#define I2O_CMD_OUTBOUND_INIT_IN_PROGRESS 0x01
-#define I2O_CMD_OUTBOUND_INIT_REJECTED 0x02
-#define I2O_CMD_OUTBOUND_INIT_FAILED 0x03
-#define I2O_CMD_OUTBOUND_INIT_COMPLETE 0x04
+/* Command status values */
+
+#define I2O_CMD_IN_PROGRESS 0x01
+#define I2O_CMD_REJECTED 0x02
+#define I2O_CMD_FAILED 0x03
+#define I2O_CMD_COMPLETED 0x04
/* I2O API function return values */
@@ -490,6 +486,25 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define I2O_DSC_DEVICE_BUSY 0x001B
#define I2O_DSC_DEVICE_NOT_AVAILABLE 0x001C
+/* FailureStatusCodes, Table 3-3 Message Failure Codes */
+
+#define I2O_FSC_TRANSPORT_SERVICE_SUSPENDED 0x81
+#define I2O_FSC_TRANSPORT_SERVICE_TERMINATED 0x82
+#define I2O_FSC_TRANSPORT_CONGESTION 0x83
+#define I2O_FSC_TRANSPORT_FAILURE 0x84
+#define I2O_FSC_TRANSPORT_STATE_ERROR 0x85
+#define I2O_FSC_TRANSPORT_TIME_OUT 0x86
+#define I2O_FSC_TRANSPORT_ROUTING_FAILURE 0x87
+#define I2O_FSC_TRANSPORT_INVALID_VERSION 0x88
+#define I2O_FSC_TRANSPORT_INVALID_OFFSET 0x89
+#define I2O_FSC_TRANSPORT_INVALID_MSG_FLAGS 0x8A
+#define I2O_FSC_TRANSPORT_FRAME_TOO_SMALL 0x8B
+#define I2O_FSC_TRANSPORT_FRAME_TOO_LARGE 0x8C
+#define I2O_FSC_TRANSPORT_INVALID_TARGET_ID 0x8D
+#define I2O_FSC_TRANSPORT_INVALID_INITIATOR_ID 0x8E
+#define I2O_FSC_TRANSPORT_INVALID_INITIATOR_CONTEXT 0x8F
+#define I2O_FSC_TRANSPORT_UNKNOWN_FAILURE 0xFF
+
/* Device Claim Types */
#define I2O_CLAIM_PRIMARY 0x01000000
#define I2O_CLAIM_MANAGEMENT 0x02000000
@@ -526,7 +541,7 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define MSG_64BIT_CNTXT 0x0200
#define MSG_MULTI_TRANS 0x1000
#define MSG_FAIL 0x2000
-#define MSG_LAST 0x4000
+#define MSG_FINAL 0x4000
#define MSG_REPLY 0x8000
/* minimum size msg */
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index 18bde1113..67ded69e1 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -56,6 +56,8 @@
#define ETH_P_AARP 0x80F3 /* Appletalk AARP */
#define ETH_P_IPX 0x8137 /* IPX over DIX */
#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
+#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
+#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
/*
* Non DIX types. Won't clash for 1500 types.
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
new file mode 100644
index 000000000..873a7d9d6
--- /dev/null
+++ b/include/linux/if_pppox.h
@@ -0,0 +1,136 @@
+/***************************************************************************
+ * Linux PPP over X - Generic PPP transport layer sockets
+ * Linux PPP over Ethernet (PPPoE) Socket Implementation (RFC 2516)
+ *
+ * This file supplies definitions required by the PPP over Ethernet driver
+ * (pppox.c). All version information wrt this file is located in pppox.c
+ *
+ * License:
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef __LINUX_IF_PPPOX_H
+#define __LINUX_IF_PPPOX_H
+
+#include <linux/if_ether.h>
+#include <linux/if.h>
+
+#include <asm/types.h>
+#include <asm/byteorder.h>
+#ifdef __KERNEL__
+#include <linux/netdevice.h>
+#include <linux/sched.h>
+#include <asm/semaphore.h>
+#include <linux/ppp_channel.h>
+#endif /* __KERNEL__ */
+
+/* For user-space programs to pick up these definitions
+ * which they wouldn't get otherwise without defining __KERNEL__
+ */
+#ifndef AF_PPPOX
+#define AF_PPPOX 24
+#define PF_PPPOX AF_PPPOX
+#endif /* !(AF_PPPOX) */
+
+/************************************************************************
+ * PPPoE addressing definition
+ */
+typedef __u16 sid_t;
+struct pppoe_addr{
+ sid_t sid; /* Session identifier */
+ unsigned char remote[ETH_ALEN]; /* Remote address */
+ char dev[IFNAMSIZ]; /* Local device to use */
+};
+
+/************************************************************************
+ * Protocols supported by AF_PPPOX
+ */
+#define PX_PROTO_OE 0 /* Currently just PPPoE */
+#define PX_MAX_PROTO 1
+
+struct sockaddr_pppox {
+ sa_family_t sa_family; /* address family, AF_PPPOX */
+ unsigned int sa_protocol; /* protocol identifier */
+ union{
+ struct pppoe_addr pppoe;
+ }sa_addr;
+}__attribute__ ((packed));
+
+
+/*********************************************************************
+ *
+ * ioctl interface for defining forwarding of connections
+ *
+ ********************************************************************/
+
+#define PPPOEIOCSFWD _IOW(0xB1 ,0, sizeof(struct sockaddr_pppox))
+#define PPPOEIOCDFWD _IO(0xB1 ,1)
+/*#define PPPOEIOCGFWD _IOWR(0xB1,2, sizeof(struct sockaddr_pppox))*/
+
+/* Codes to identify message types */
+#define PADI_CODE 0x09
+#define PADO_CODE 0x07
+#define PADR_CODE 0x19
+#define PADS_CODE 0x65
+#define PADT_CODE 0xa7
+struct pppoe_tag {
+ __u16 tag_type;
+ __u16 tag_len;
+ char tag_data[0];
+} __attribute ((packed));
+
+/* Tag identifiers */
+#define PTT_EOL __constant_htons(0x0000)
+#define PTT_SRV_NAME __constant_htons(0x0101)
+#define PTT_AC_NAME __constant_htons(0x0102)
+#define PTT_HOST_UNIQ __constant_htons(0x0103)
+#define PTT_AC_COOKIE __constant_htons(0x0104)
+#define PTT_VENDOR __constant_htons(0x0105)
+#define PTT_RELAY_SID __constant_htons(0x0110)
+#define PTT_SRV_ERR __constant_htons(0x0201)
+#define PTT_SYS_ERR __constant_htons(0x0202)
+#define PTT_GEN_ERR __constant_htons(0x0203)
+
+struct pppoe_hdr {
+ __u8 ver : 4;
+ __u8 type : 4;
+ __u8 code;
+ __u16 sid;
+ __u16 length;
+ struct pppoe_tag tag[0];
+} __attribute__ ((packed));
+
+#ifdef __KERNEL__
+
+struct pppox_proto {
+ int (*create)(struct socket *sock);
+ int (*ioctl)(struct socket *sock, unsigned int cmd,
+ unsigned long arg);
+};
+
+extern int register_pppox_proto(int proto_num, struct pppox_proto *pp);
+extern void unregister_pppox_proto(int proto_num);
+extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
+extern int pppox_channel_ioctl(struct ppp_channel *pc, unsigned int cmd,
+ unsigned long arg);
+
+/* PPPoE socket states */
+enum {
+ PPPOX_NONE = 0, /* initial state */
+ PPPOX_CONNECTED = 1, /* connection established ==TCP_ESTABLISHED */
+ PPPOX_BOUND = 2, /* bound to ppp device */
+ PPPOX_RELAY = 4, /* forwarding is enabled */
+ PPPOX_DEAD = 8
+};
+
+extern struct ppp_channel_ops pppoe_chan_ops;
+
+extern void pppox_proto_init(struct net_proto *np);
+
+#endif /* __KERNEL__ */
+
+#endif /* !(__LINUX_IF_PPPOX_H) */
diff --git a/include/linux/input.h b/include/linux/input.h
index 17f6c046f..d43d1e5a7 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -416,7 +416,7 @@ struct input_id {
#include <linux/devfs_fs_kernel.h>
#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
-#define BIT(x) (1<<((x)%BITS_PER_LONG))
+#define BIT(x) (1UL<<((x)%BITS_PER_LONG))
#define LONG(x) ((x)/BITS_PER_LONG)
struct input_dev {
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 278eb959b..337ff6182 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -173,7 +173,7 @@ typedef struct page {
#define PG_slab 8
#define PG_swap_cache 9
#define PG_skip 10
-#define PG_swap_entry 11
+#define PG_unused_03 11
#define PG_highmem 12
/* bits 21-30 unused */
#define PG_reserved 31
@@ -196,7 +196,11 @@ typedef struct page {
#define SetPageError(page) set_bit(PG_error, &(page)->flags)
#define ClearPageError(page) clear_bit(PG_error, &(page)->flags)
#define PageReferenced(page) test_bit(PG_referenced, &(page)->flags)
+#define SetPageReferenced(page) set_bit(PG_referenced, &(page)->flags)
+#define PageTestandClearReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags)
#define PageDecrAfter(page) test_bit(PG_decr_after, &(page)->flags)
+#define SetPageDecrAfter(page) set_bit(PG_decr_after, &(page)->flags)
+#define PageTestandClearDecrAfter(page) test_and_clear_bit(PG_decr_after, &(page)->flags)
#define PageSlab(page) test_bit(PG_slab, &(page)->flags)
#define PageSwapCache(page) test_bit(PG_swap_cache, &(page)->flags)
#define PageReserved(page) test_bit(PG_reserved, &(page)->flags)
@@ -210,9 +214,6 @@ typedef struct page {
#define PageClearSwapCache(page) clear_bit(PG_swap_cache, &(page)->flags)
#define PageTestandClearSwapCache(page) test_and_clear_bit(PG_swap_cache, &(page)->flags)
-#define PageSwapEntry(page) test_bit(PG_swap_entry, &(page)->flags)
-#define SetPageSwapEntry(page) set_bit(PG_swap_entry, &(page)->flags)
-#define ClearPageSwapEntry(page) clear_bit(PG_swap_entry, &(page)->flags)
#ifdef CONFIG_HIGHMEM
#define PageHighMem(page) test_bit(PG_highmem, &(page)->flags)
@@ -312,7 +313,7 @@ extern struct page * FASTCALL(__alloc_pages(zonelist_t *zonelist, unsigned long
extern struct page * alloc_pages_node(int nid, int gfp_mask, unsigned long order);
#ifndef CONFIG_DISCONTIGMEM
-extern inline struct page * alloc_pages(int gfp_mask, unsigned long order)
+static inline struct page * alloc_pages(int gfp_mask, unsigned long order)
{
/* temporary check. */
if (contig_page_data.node_zonelists[gfp_mask].gfp_mask != (gfp_mask))
@@ -331,7 +332,7 @@ extern struct page * alloc_pages(int gfp_mask, unsigned long order);
#define alloc_page(gfp_mask) \
alloc_pages(gfp_mask, 0)
-extern inline unsigned long __get_free_pages (int gfp_mask, unsigned long order)
+static inline unsigned long __get_free_pages (int gfp_mask, unsigned long order)
{
struct page * page;
@@ -347,7 +348,7 @@ extern inline unsigned long __get_free_pages (int gfp_mask, unsigned long order)
#define __get_dma_pages(gfp_mask, order) \
__get_free_pages((gfp_mask) | GFP_DMA,(order))
-extern inline unsigned long get_zeroed_page(int gfp_mask)
+static inline unsigned long get_zeroed_page(int gfp_mask)
{
unsigned long page;
@@ -367,7 +368,7 @@ extern inline unsigned long get_zeroed_page(int gfp_mask)
*/
extern void FASTCALL(__free_pages_ok(struct page * page, unsigned long order));
-extern inline void __free_pages(struct page *page, unsigned long order)
+static inline void __free_pages(struct page *page, unsigned long order)
{
if (!put_page_testzero(page))
return;
@@ -376,7 +377,7 @@ extern inline void __free_pages(struct page *page, unsigned long order)
#define __free_page(page) __free_pages(page, 0)
-extern inline void free_pages(unsigned long addr, unsigned long order)
+static inline void free_pages(unsigned long addr, unsigned long order)
{
unsigned long map_nr;
@@ -433,7 +434,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
unsigned long len, unsigned long prot,
unsigned long flag, unsigned long pgoff);
-extern inline unsigned long do_mmap(struct file *file, unsigned long addr,
+static inline unsigned long do_mmap(struct file *file, unsigned long addr,
unsigned long len, unsigned long prot,
unsigned long flag, unsigned long offset)
{
@@ -454,7 +455,7 @@ struct zone_t;
/* filemap.c */
extern void remove_inode_page(struct page *);
extern unsigned long page_unuse(struct page *);
-extern int shrink_mmap(int, int, zone_t *);
+extern int shrink_mmap(int, int);
extern void truncate_inode_pages(struct address_space *, loff_t);
/* generic vm_area_ops exported for stackable file systems */
diff --git a/include/linux/module.h b/include/linux/module.h
index 7507d6add..39d3e5560 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -190,6 +190,17 @@ const char __module_parm_desc_##var[] \
__attribute__((section(".modinfo"))) = \
"parm_desc_" __MODULE_STRING(var) "=" desc
+/*
+ * MODULE_DEVICE_TABLE exports information about devices
+ * currently supported by this module. A device type, such as PCI,
+ * is a C-like identifier passed as the first arg to this macro.
+ * The second macro arg is the variable containing the device
+ * information being made public.
+ *
+ * The following is a list of known device types (arg 1),
+ * and the C types which are to be passed as arg 2.
+ * pci - struct pci_device_id - List of PCI ids supported by this module
+ */
#define MODULE_DEVICE_TABLE(type,name) \
const struct type##_device_id * __module_##type##_device_table = name
/* not put to .modinfo section to avoid section type conflicts */
diff --git a/include/linux/mount.h b/include/linux/mount.h
index ddd2cad4d..fcec95647 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -10,24 +10,40 @@
*/
#ifndef _LINUX_MOUNT_H
#define _LINUX_MOUNT_H
+#ifdef __KERNEL__
struct vfsmount
{
- kdev_t mnt_dev; /* Device this applies to */
+ struct dentry *mnt_mountpoint; /* dentry of mountpoint */
+ struct dentry *mnt_root; /* root of the mounted tree */
+ struct vfsmount *mnt_parent; /* fs we are mounted on */
+ struct list_head mnt_instances; /* other vfsmounts of the same fs */
+ struct list_head mnt_clash; /* those who are mounted on (other */
+ /* instances) of the same dentry */
+ struct super_block *mnt_sb; /* pointer to superblock */
+ struct list_head mnt_mounts; /* list of children, anchored here */
+ struct list_head mnt_child; /* and going through their mnt_child */
+ atomic_t mnt_count;
+
char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
char *mnt_dirname; /* Name of directory mounted on */
- struct super_block *mnt_sb; /* pointer to superblock */
struct list_head mnt_list;
};
-/* MOUNT_REWRITE: fill these */
static inline struct vfsmount *mntget(struct vfsmount *mnt)
{
+ if (mnt)
+ atomic_inc(&mnt->mnt_count);
return mnt;
}
static inline void mntput(struct vfsmount *mnt)
{
+ if (mnt) {
+ if (atomic_dec_and_test(&mnt->mnt_count))
+ BUG();
+ }
}
+#endif
#endif /* _LINUX_MOUNT_H */
diff --git a/include/linux/net.h b/include/linux/net.h
index 16d0859cc..2a122307b 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -18,6 +18,7 @@
#ifndef _LINUX_NET_H
#define _LINUX_NET_H
+#include <linux/config.h>
#include <linux/socket.h>
#include <linux/wait.h>
@@ -141,7 +142,7 @@ extern int net_ratelimit(void);
extern unsigned long net_random(void);
extern void net_srandom(unsigned long);
-#ifndef __SMP__
+#ifndef CONFIG_SMP
#define SOCKOPS_WRAPPED(name) name
#define SOCKOPS_WRAP(name, fam)
#else
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index bb19b0807..b2e1ac568 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -210,7 +210,7 @@ struct net_device
* (i.e. as seen by users in the "Space.c" file). It is the name
* the interface.
*/
- char *name;
+ char name[IFNAMSIZ];
/*
* I/O specific fields
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index 178eb4c06..1836dda48 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -51,7 +51,10 @@ enum ip_conntrack_status {
IPS_EXPECTED = 0x01,
/* We've seen packets both ways: bit 1 set. Can be set, not unset. */
- IPS_SEEN_REPLY = 0x02
+ IPS_SEEN_REPLY = 0x02,
+
+ /* Packet seen leaving box: bit 2 set. Can be set, not unset. */
+ IPS_CONFIRMED = 0x04
};
struct ip_conntrack_expect
@@ -88,7 +91,7 @@ struct ip_conntrack
struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX];
/* Have we seen traffic both ways yet? (bitset) */
- unsigned int status;
+ volatile unsigned int status;
/* Timer function; drops refcnt when it goes off. */
struct timer_list timeout;
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h
index 9cb49afaf..4631db1ee 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_core.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h
@@ -20,8 +20,9 @@ extern struct ip_conntrack_protocol *find_proto(u_int8_t protocol);
extern struct ip_conntrack_protocol *__find_proto(u_int8_t protocol);
extern struct list_head protocol_list;
-/* Returns TRUE if it dealt with ICMP, and filled in skb->nfct */
-int icmp_error_track(struct sk_buff *skb);
+/* Returns conntrack if it dealt with ICMP, and filled in skb->nfct */
+extern struct ip_conntrack *icmp_error_track(struct sk_buff *skb,
+ enum ip_conntrack_info *ctinfo);
extern int get_tuple(const struct iphdr *iph, size_t len,
struct ip_conntrack_tuple *tuple,
struct ip_conntrack_protocol *protocol);
@@ -31,6 +32,9 @@ struct ip_conntrack_tuple_hash *
ip_conntrack_find_get(const struct ip_conntrack_tuple *tuple,
const struct ip_conntrack *ignored_conntrack);
+/* Confirm a connection */
+void ip_conntrack_confirm(struct ip_conntrack *ct);
+
extern unsigned int ip_conntrack_htable_size;
extern struct list_head *ip_conntrack_hash;
extern struct list_head expect_list;
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 20361b064..a2431cd72 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -346,6 +346,9 @@ struct ipt_match
unsigned int matchinfosize,
unsigned int hook_mask);
+ /* Called when entry of this type deleted. */
+ void (*destroy)(void *matchinfo, unsigned int matchinfosize);
+
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct module *me;
};
@@ -375,6 +378,9 @@ struct ipt_target
unsigned int targinfosize,
unsigned int hook_mask);
+ /* Called when entry of this type deleted. */
+ void (*destroy)(void *targinfo, unsigned int targinfosize);
+
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct module *me;
};
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 653e6045b..0c84b76c4 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -175,7 +175,7 @@ extern int nfs_lock(struct file *, int, struct file_lock *);
/*
* linux/fs/nfs/write.c
*/
-extern int nfs_writepage(struct file *file, struct dentry *, struct page *);
+extern int nfs_writepage(struct file *file, struct page *);
extern int nfs_flush_incompatible(struct file *file, struct page *page);
extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
/*
@@ -232,7 +232,7 @@ nfs_wb_file(struct inode *inode, struct file *file)
/*
* linux/fs/nfs/read.c
*/
-extern int nfs_readpage(struct dentry *, struct page *);
+extern int nfs_readpage(struct file *, struct page *);
extern int nfs_pagein_inode(struct inode *, unsigned long, unsigned int);
extern int nfs_pagein_timeout(struct inode *);
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 45f6dd0e0..06a21296f 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -62,6 +62,7 @@ struct svc_export {
struct svc_export * ex_parent;
struct svc_client * ex_client;
int ex_flags;
+ struct vfsmount * ex_mnt;
struct dentry * ex_dentry;
kdev_t ex_dev;
ino_t ex_ino;
diff --git a/include/linux/ntfs_fs_sb.h b/include/linux/ntfs_fs_sb.h
index 898ef7105..4b958337f 100644
--- a/include/linux/ntfs_fs_sb.h
+++ b/include/linux/ntfs_fs_sb.h
@@ -15,7 +15,10 @@ struct ntfs_sb_info{
ntfs_u32 at_standard_information;
ntfs_u32 at_attribute_list;
ntfs_u32 at_file_name;
+ ntfs_u32 at_volume_version;
ntfs_u32 at_security_descriptor;
+ ntfs_u32 at_volume_name;
+ ntfs_u32 at_volume_information;
ntfs_u32 at_data;
ntfs_u32 at_index_root;
ntfs_u32 at_index_allocation;
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 813dd78ea..a88cbc9b8 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -80,6 +80,7 @@ extern void lock_page(struct page *page);
extern void __add_page_to_hash_queue(struct page * page, struct page **p);
extern void add_to_page_cache(struct page * page, struct address_space *mapping, unsigned long index);
+extern void add_to_page_cache_locked(struct page * page, struct address_space *mapping, unsigned long index);
extern inline void add_page_to_hash_queue(struct page * page, struct inode * inode, unsigned long index)
{
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index e5c5b723b..bfdf6c03a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -333,6 +333,7 @@
#define PCI_DEVICE_ID_SI_5571 0x5571
#define PCI_DEVICE_ID_SI_5591 0x5591
#define PCI_DEVICE_ID_SI_5597 0x5597
+#define PCI_DEVICE_ID_SI_5598 0x5598
#define PCI_DEVICE_ID_SI_5600 0x5600
#define PCI_DEVICE_ID_SI_6306 0x6306
#define PCI_DEVICE_ID_SI_6326 0x6326
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index dfcba46fe..52a9d5b5a 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_PIPE_FS_I_H
#define _LINUX_PIPE_FS_I_H
+#define PIPEFS_MAGIC 0x50495045
struct pipe_inode_info {
wait_queue_head_t wait;
char *base;
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h
index fc39f2658..037c989ff 100644
--- a/include/linux/ppp_channel.h
+++ b/include/linux/ppp_channel.h
@@ -22,6 +22,7 @@
#include <linux/list.h>
#include <linux/skbuff.h>
#include <linux/poll.h>
+#include <asm/atomic.h>
struct ppp_channel;
@@ -31,6 +32,7 @@ struct ppp_channel_ops {
int (*start_xmit)(struct ppp_channel *, struct sk_buff *);
/* Handle an ioctl call that has come in via /dev/ppp. */
int (*ioctl)(struct ppp_channel *, unsigned int, unsigned long);
+
};
struct ppp_channel {
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index f92195a3e..b7621b293 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -96,7 +96,7 @@ extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
struct proc_dir_entry *parent);
extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
-extern struct super_block *proc_super_blocks;
+extern struct vfsmount *proc_mnt;
extern struct super_block *proc_read_super(struct super_block *,void *,int);
extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_entry *);
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 14ad1b7ca..3506c1ce1 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -14,6 +14,8 @@
#if defined(CONFIG_QUOTA)
+#include <linux/smp_lock.h>
+
/*
* declaration of quota_function calls in kernel.
*/
@@ -94,8 +96,10 @@ extern __inline__ int DQUOT_TRANSFER(struct dentry *dentry, struct iattr *iattr)
int error = -EDQUOT;
if (dentry->d_inode->i_sb->dq_op) {
+ lock_kernel();
dentry->d_inode->i_sb->dq_op->initialize(dentry->d_inode, -1);
error = dentry->d_inode->i_sb->dq_op->transfer(dentry, iattr);
+ unlock_kernel();
} else {
error = notify_change(dentry, iattr);
}
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d249961e3..2bfe015dd 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -203,7 +203,7 @@ struct mm_struct {
unsigned long start_code, end_code, start_data, end_data;
unsigned long start_brk, brk, start_stack;
unsigned long arg_start, arg_end, env_start, env_end;
- unsigned long min_flt, maj_flt, rss, total_vm, locked_vm;
+ unsigned long rss, total_vm, locked_vm;
unsigned long def_flags;
unsigned long cpu_vm_mask;
unsigned long swap_cnt; /* number of pages to swap on next pass */
@@ -225,7 +225,7 @@ struct mm_struct {
0, 0, 0, 0, \
0, 0, 0, \
0, 0, 0, 0, \
- 0, 0, 0, 0, 0, \
+ 0, 0, 0, \
0, 0, 0, 0, NULL }
struct signal_struct {
@@ -310,7 +310,6 @@ struct task_struct {
/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
int swappable:1;
- int hog:1;
/* process credentials */
uid_t uid,euid,suid,fsuid;
gid_t gid,egid,sgid,fsgid;
@@ -346,8 +345,8 @@ struct task_struct {
/* Thread group tracking */
u32 parent_exec_id;
u32 self_exec_id;
-/* Protection of fields allocatio/deallocation */
- struct semaphore exit_sem;
+/* Protection of (de-)allocation: mm, files, fs, tty */
+ spinlock_t alloc_lock;
};
/*
@@ -418,7 +417,7 @@ struct task_struct {
blocked: {{0}}, \
sigqueue: NULL, \
sigqueue_tail: &tsk.sigqueue, \
- exit_sem: __MUTEX_INITIALIZER(tsk.exit_sem) \
+ alloc_lock: SPIN_LOCK_UNLOCKED \
}
@@ -442,7 +441,7 @@ extern struct task_struct *pidhash[PIDHASH_SZ];
#define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1))
-extern __inline__ void hash_pid(struct task_struct *p)
+static inline void hash_pid(struct task_struct *p)
{
struct task_struct **htable = &pidhash[pid_hashfn(p->pid)];
@@ -452,14 +451,14 @@ extern __inline__ void hash_pid(struct task_struct *p)
p->pidhash_pprev = htable;
}
-extern __inline__ void unhash_pid(struct task_struct *p)
+static inline void unhash_pid(struct task_struct *p)
{
if(p->pidhash_next)
p->pidhash_next->pidhash_pprev = p->pidhash_pprev;
*p->pidhash_pprev = p->pidhash_next;
}
-extern __inline__ struct task_struct *find_task_by_pid(int pid)
+static inline struct task_struct *find_task_by_pid(int pid)
{
struct task_struct *p, **htable = &pidhash[pid_hashfn(pid)];
@@ -527,7 +526,7 @@ extern int kill_proc(pid_t, int, int);
extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *);
extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
-extern inline int signal_pending(struct task_struct *p)
+static inline int signal_pending(struct task_struct *p)
{
return (p->sigpending != 0);
}
@@ -595,7 +594,7 @@ extern void free_irq(unsigned int, void *);
* These will be removed, but in the mean time, when the SECURE_NOROOT
* flag is set, uids don't grant privilege.
*/
-extern inline int suser(void)
+static inline int suser(void)
{
if (!issecure(SECURE_NOROOT) && current->euid == 0) {
current->flags |= PF_SUPERPRIV;
@@ -604,7 +603,7 @@ extern inline int suser(void)
return 0;
}
-extern inline int fsuser(void)
+static inline int fsuser(void)
{
if (!issecure(SECURE_NOROOT) && current->fsuid == 0) {
current->flags |= PF_SUPERPRIV;
@@ -619,7 +618,7 @@ extern inline int fsuser(void)
* fsuser(). See include/linux/capability.h for defined capabilities.
*/
-extern inline int capable(int cap)
+static inline int capable(int cap)
{
#if 1 /* ok now */
if (cap_raised(current->cap_effective, cap))
@@ -709,7 +708,7 @@ extern void daemonize(void);
extern int do_execve(char *, char **, char **, struct pt_regs *);
extern int do_fork(unsigned long, unsigned long, struct pt_regs *);
-extern inline void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
+static inline void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
{
unsigned long flags;
@@ -718,7 +717,7 @@ extern inline void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
wq_write_unlock_irqrestore(&q->lock, flags);
}
-extern inline void add_wait_queue_exclusive(wait_queue_head_t *q,
+static inline void add_wait_queue_exclusive(wait_queue_head_t *q,
wait_queue_t * wait)
{
unsigned long flags;
@@ -728,7 +727,7 @@ extern inline void add_wait_queue_exclusive(wait_queue_head_t *q,
wq_write_unlock_irqrestore(&q->lock, flags);
}
-extern inline void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
+static inline void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
{
unsigned long flags;
@@ -822,12 +821,12 @@ static inline void del_from_runqueue(struct task_struct * p)
p->run_list.next = NULL;
}
-extern inline int task_on_runqueue(struct task_struct *p)
+static inline int task_on_runqueue(struct task_struct *p)
{
return (p->run_list.next != NULL);
}
-extern inline void unhash_process(struct task_struct *p)
+static inline void unhash_process(struct task_struct *p)
{
if (task_on_runqueue(p)) BUG();
write_lock_irq(&tasklist_lock);
@@ -837,19 +836,14 @@ extern inline void unhash_process(struct task_struct *p)
write_unlock_irq(&tasklist_lock);
}
-static inline int task_lock(struct task_struct *p)
+static inline void task_lock(struct task_struct *p)
{
- down(&p->exit_sem);
- if (p->p_pptr)
- return 1;
- /* He's dead, Jim. You take his wallet, I'll take the tricorder... */
- up(&p->exit_sem);
- return 0;
+ spin_lock(&p->alloc_lock);
}
static inline void task_unlock(struct task_struct *p)
{
- up(&p->exit_sem);
+ spin_unlock(&p->alloc_lock);
}
#endif /* __KERNEL__ */
diff --git a/include/linux/socket.h b/include/linux/socket.h
index e5d06dde0..3401ce5df 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -155,6 +155,7 @@ struct ucred {
#define AF_ATMSVC 20 /* ATM SVCs */
#define AF_SNA 22 /* Linux SNA Project (nutters!) */
#define AF_IRDA 23 /* IRDA sockets */
+#define AF_PPPOX 24 /* PPPoX sockets */
#define AF_MAX 32 /* For now.. */
/* Protocol families, same as address families. */
@@ -183,7 +184,7 @@ struct ucred {
#define PF_ATMSVC AF_ATMSVC
#define PF_SNA AF_SNA
#define PF_IRDA AF_IRDA
-
+#define PF_PPPOX AF_PPPOX
#define PF_MAX AF_MAX
/* Maximum queue length specifiable by listen. */
diff --git a/include/linux/string.h b/include/linux/string.h
index 88eb21c28..e23d4989e 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -9,34 +9,72 @@ extern "C" {
#endif
extern char * ___strtok;
+extern char * strpbrk(const char *,const char *);
+extern char * strtok(char *,const char *);
+extern char * strsep(char **,const char *);
+extern __kernel_size_t strspn(const char *,const char *);
+
+
+/*
+ * Include machine specific inline routines
+ */
+#include <asm/string.h>
+
+#ifndef __HAVE_ARCH_STRCPY
extern char * strcpy(char *,const char *);
+#endif
+#ifndef __HAVE_ARCH_STRNCPY
extern char * strncpy(char *,const char *, __kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_STRCAT
extern char * strcat(char *, const char *);
+#endif
+#ifndef __HAVE_ARCH_STRNCAT
extern char * strncat(char *, const char *, __kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_STRCMP
+extern int strcmp(const char *,const char *);
+#endif
+#ifndef __HAVE_ARCH_STRNCMP
+extern int strncmp(const char *,const char *,__kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_STRNICMP
+extern int strnicmp(const char *, const char *, __kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_STRCHR
extern char * strchr(const char *,int);
+#endif
+#ifndef __HAVE_ARCH_STRRCHR
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 *);
+#endif
+#ifndef __HAVE_ARCH_STRSTR
extern char * strstr(const char *,const char *);
+#endif
+#ifndef __HAVE_ARCH_STRLEN
extern __kernel_size_t strlen(const char *);
+#endif
+#ifndef __HAVE_ARCH_STRNLEN
extern __kernel_size_t strnlen(const char *,__kernel_size_t);
-extern __kernel_size_t strspn(const char *,const char *);
-extern int strcmp(const char *,const char *);
-extern int strncmp(const char *,const char *,__kernel_size_t);
-extern int strnicmp(const char *, const char *, __kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_MEMSET
extern void * memset(void *,int,__kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_MEMCPY
extern void * memcpy(void *,const void *,__kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_MEMMOVE
extern void * memmove(void *,const void *,__kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_MEMSCAN
extern void * memscan(void *,int,__kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_MEMCMP
extern int memcmp(const void *,const void *,__kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_MEMCHR
extern void * memchr(const void *,int,__kernel_size_t);
-
-/*
- * Include machine specific inline routines
- */
-#include <asm/string.h>
+#endif
#ifdef __cplusplus
}
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 5d5f97cdb..9226ce0a5 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -80,14 +80,13 @@ struct sysinfo;
struct zone_t;
/* linux/ipc/shm.c */
-extern int shm_swap (int, int, zone_t *);
+extern int shm_swap(int, int);
/* linux/mm/swap.c */
-extern void swap_setup (void);
+extern void swap_setup(void);
/* linux/mm/vmscan.c */
-extern int try_to_free_pages(unsigned int gfp_mask, zone_t *zone);
-extern int swap_out(unsigned int gfp_mask, int priority);
+extern int try_to_free_pages(unsigned int gfp_mask);
/* linux/mm/page_io.c */
extern void rw_swap_page(int, struct page *, int);
@@ -121,7 +120,6 @@ extern void get_swaphandle_info(swp_entry_t, unsigned long *, kdev_t *,
struct inode **);
extern int swap_duplicate(swp_entry_t);
extern int swap_count(struct page *);
-extern swp_entry_t acquire_swap_entry(struct page *page);
extern int valid_swaphandles(swp_entry_t, unsigned long *);
#define get_swap_page() __get_swap_page(1)
extern void __swap_free(swp_entry_t, unsigned short);
@@ -173,13 +171,18 @@ do { \
spin_unlock(&pagemap_lru_lock); \
} while (0)
+#define __lru_cache_del(page) \
+do { \
+ list_del(&(page)->lru); \
+ nr_lru_pages--; \
+} while (0)
+
#define lru_cache_del(page) \
do { \
if (!PageLocked(page)) \
BUG(); \
spin_lock(&pagemap_lru_lock); \
- list_del(&(page)->lru); \
- nr_lru_pages--; \
+ __lru_cache_del(page); \
spin_unlock(&pagemap_lru_lock); \
} while (0)
diff --git a/include/linux/timer.h b/include/linux/timer.h
index e6eb00da0..2de8050ea 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -2,6 +2,7 @@
#define _LINUX_TIMER_H
#include <linux/config.h>
+#include <linux/list.h>
/*
* Old-style timers. Please don't use for any new code.
@@ -47,8 +48,7 @@ extern struct timer_struct timer_table[32];
* to distinguish between the different invocations.
*/
struct timer_list {
- struct timer_list *next; /* MUST be first element */
- struct timer_list *prev;
+ struct list_head list;
unsigned long expires;
unsigned long data;
void (*function)(unsigned long);
@@ -56,7 +56,7 @@ struct timer_list {
};
extern void add_timer(struct timer_list * timer);
-extern int del_timer(struct timer_list * timer);
+extern int del_timer(struct timer_list * timer);
/*
* mod_timer is a more efficient way to update the expire field of an
@@ -67,18 +67,17 @@ int mod_timer(struct timer_list *timer, unsigned long expires);
extern void it_real_fn(unsigned long);
-extern inline void init_timer(struct timer_list * timer)
+static inline void init_timer(struct timer_list * timer)
{
- timer->next = NULL;
- timer->prev = NULL;
+ timer->list.next = timer->list.prev = NULL;
#ifdef CONFIG_SMP
timer->running = 0;
#endif
}
-extern inline int timer_pending(const struct timer_list * timer)
+static inline int timer_pending (const struct timer_list * timer)
{
- return timer->prev != NULL;
+ return timer->list.next != NULL;
}
#ifdef CONFIG_SMP
diff --git a/include/linux/usb.h b/include/linux/usb.h
index e67e96bdc..a7c8fb324 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -82,18 +82,19 @@
#define USB_PID_OUT 0xe1
#define USB_PID_ACK 0xd2
#define USB_PID_DATA0 0xc3
-#define USB_PID_UNDEF_4 0xb4
+#define USB_PID_PING 0xb4 /* USB 2.0 */
#define USB_PID_SOF 0xa5
-#define USB_PID_UNDEF_6 0x96
-#define USB_PID_UNDEF_7 0x87
-#define USB_PID_UNDEF_8 0x78
+#define USB_PID_NYET 0x96 /* USB 2.0 */
+#define USB_PID_DATA2 0x87 /* USB 2.0 */
+#define USB_PID_SPLIT 0x78 /* USB 2.0 */
#define USB_PID_IN 0x69
#define USB_PID_NAK 0x5a
#define USB_PID_DATA1 0x4b
-#define USB_PID_PREAMBLE 0x3c
+#define USB_PID_PREAMBLE 0x3c /* Token mode */
+#define USB_PID_ERR 0x3c /* USB 2.0: handshake mode */
#define USB_PID_SETUP 0x2d
#define USB_PID_STALL 0x1e
-#define USB_PID_UNDEF_F 0x0f
+#define USB_PID_MDATA 0x0f /* USB 2.0 */
/*
* Standard requests
@@ -134,43 +135,6 @@
#define USB_MAJOR 180
-/* for 2.2-kernels */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
-
-static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
-{
- __list_add(new, head->prev, head);
-}
-#define LIST_HEAD_INIT(name) { &(name), &(name) }
-
-typedef struct wait_queue wait_queue_t;
-
-typedef struct wait_queue *wait_queue_head_t;
-#define DECLARE_WAITQUEUE(wait, current) \
- struct wait_queue wait = { current, NULL }
-#define DECLARE_WAIT_QUEUE_HEAD(wait)\
- wait_queue_head_t wait
-
-#define init_waitqueue_head(x) *x=NULL
-#define init_MUTEX(x) *(x)=MUTEX
-#define DECLARE_MUTEX(name) struct semaphore name=MUTEX
-#define DECLARE_MUTEX_LOCKED(name) struct semaphore name=MUTEX_LOCKED
-
-
-#define __set_current_state(state_value) \
- do { current->state = state_value; } while (0)
-#ifdef CONFIG_SMP
-#define set_current_state(state_value) \
- set_mb(current->state, state_value)
-#else
-#define set_current_state(state_value) \
- __set_current_state(state_value)
-#endif
-
-#endif // 2.2.x
-
-
static __inline__ void wait_ms(unsigned int ms)
{
if(!in_interrupt()) {
@@ -594,12 +558,6 @@ extern void usb_release_bandwidth(struct usb_device *, int);
extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout);
-extern int usb_request_irq(struct usb_device *, unsigned int, usb_device_irq, int, void *, void **);
-extern int usb_release_irq(struct usb_device *dev, void *handle, unsigned int pipe);
-
-extern void *usb_request_bulk(struct usb_device *, unsigned int, usb_device_irq, void *, int, void *);
-extern int usb_terminate_bulk(struct usb_device *, void *);
-
extern void usb_init_root_hub(struct usb_device *dev);
extern int usb_root_hub_string(int id, int serial, char *type, __u8 *data, int len);
extern void usb_connect(struct usb_device *dev);