summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-05-23 01:51:32 -0500
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-05-23 01:51:32 -0500
commit3a5012936397f012b585a286f310df017f9a3ce5 (patch)
tree62bffa26a5e1588b0fc48a348d814ea383a445d7 /include/linux
parentd74cacef5c59db1efedf574e3c9fa8391dcc3cd9 (diff)
parentd0f0cde199764cb083b3617c3739f45b1a73052d (diff)
Merge tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5
into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.isdn
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/atapi.h65
-rw-r--r--include/linux/bfs_fs.h25
-rw-r--r--include/linux/bfs_fs_i.h21
-rw-r--r--include/linux/bfs_fs_sb.h25
-rw-r--r--include/linux/bitops.h43
-rw-r--r--include/linux/blk.h21
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/coda_linux.h3
-rw-r--r--include/linux/fs.h53
-rw-r--r--include/linux/futex.h4
-rw-r--r--include/linux/ide.h27
-rw-r--r--include/linux/init.h3
-rw-r--r--include/linux/interrupt.h8
-rw-r--r--include/linux/jiffies.h30
-rw-r--r--include/linux/namei.h56
-rw-r--r--include/linux/netfilter.h21
-rw-r--r--include/linux/nfs_fs.h4
-rw-r--r--include/linux/page-flags.h7
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/quota.h26
-rw-r--r--include/linux/reboot.h9
-rw-r--r--include/linux/reiserfs_fs.h7
-rw-r--r--include/linux/sched.h12
-rw-r--r--include/linux/seq_file.h2
-rw-r--r--include/linux/smp.h8
-rw-r--r--include/linux/suspend.h67
-rw-r--r--include/linux/swap.h4
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/timer.h19
-rw-r--r--include/linux/tqueue.h2
-rw-r--r--include/linux/usb.h13
-rw-r--r--include/linux/uts.h4
32 files changed, 355 insertions, 237 deletions
diff --git a/include/linux/atapi.h b/include/linux/atapi.h
new file mode 100644
index 000000000000..6a6e2e36a6ff
--- /dev/null
+++ b/include/linux/atapi.h
@@ -0,0 +1,65 @@
+/**** vi:set ts=8 sts=8 sw=8:************************************************
+ *
+ * Copyright (C) 2002 Marcin Dalecki <martin@dalecki.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ */
+
+/*
+ * With each packet command, we allocate a buffer.
+ * This is used for several packet
+ * commands (Not for READ/WRITE commands).
+ */
+#define IDEFLOPPY_PC_BUFFER_SIZE 256
+#define IDETAPE_PC_BUFFER_SIZE 256
+
+/* This struct get's shared between different drivers.
+ */
+struct atapi_packet_command {
+ u8 c[12]; /* Actual packet bytes */
+ char *buffer; /* Data buffer */
+ int buffer_size; /* Size of our data buffer */
+ char *current_position; /* Pointer into the above buffer */
+ int request_transfer; /* Bytes to transfer */
+ int actually_transferred; /* Bytes actually transferred */
+
+ unsigned long flags; /* Status/Action bit flags: long for set_bit */
+
+ /* FIXME: the following is ugly as hell, but the only way we can start
+ * actually to unify the code.
+ */
+ /* driver specific data. */
+ /* floppy/tape */
+ int retries; /* On each retry, we increment retries */
+ int error; /* Error code */
+ char *b_data; /* Pointer which runs on the buffers */
+ unsigned int b_count; /* Missing/Available data on the current buffer */
+ u8 pc_buffer[IDEFLOPPY_PC_BUFFER_SIZE]; /* Temporary buffer */
+ /* Called when this packet command is completed */
+ void (*callback) (struct ata_device *, struct request *);
+
+ /* only tape */
+ struct bio *bio;
+
+ /* only scsi */
+ struct {
+ unsigned int b_count; /* Bytes transferred from current entry */
+ struct scatterlist *sg; /* Scatter gather table */
+ struct scsi_cmnd *scsi_cmd; /* SCSI command */
+ void (*done)(struct scsi_cmnd *); /* Scsi completion routine */
+ unsigned long timeout; /* Command timeout */
+ } s;
+};
+
+
+extern void atapi_discard_data(struct ata_device *drive, unsigned int bcount);
+extern void atapi_write_zeros(struct ata_device *drive, unsigned int bcount);
+
+extern void atapi_init_pc(struct atapi_packet_command *pc);
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h
index 0c6349eec459..f7f0913cd110 100644
--- a/include/linux/bfs_fs.h
+++ b/include/linux/bfs_fs.h
@@ -6,9 +6,6 @@
#ifndef _LINUX_BFS_FS_H
#define _LINUX_BFS_FS_H
-#include <linux/bfs_fs_i.h>
-#include <linux/bfs_fs_sb.h>
-
#define BFS_BSIZE_BITS 9
#define BFS_BSIZE (1<<BFS_BSIZE_BITS)
@@ -79,26 +76,4 @@ struct bfs_super_block {
#define BFS_UNCLEAN(bfs_sb, sb) \
((bfs_sb->s_from != -1) && (bfs_sb->s_to != -1) && !(sb->s_flags & MS_RDONLY))
-#ifdef __KERNEL__
-
-/* file.c */
-extern struct inode_operations bfs_file_inops;
-extern struct file_operations bfs_file_operations;
-extern struct address_space_operations bfs_aops;
-
-/* dir.c */
-extern struct inode_operations bfs_dir_inops;
-extern struct file_operations bfs_dir_operations;
-
-static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
-{
- return sb->u.generic_sbp;
-}
-
-static inline struct bfs_inode_info *BFS_I(struct inode *inode)
-{
- return list_entry(inode, struct bfs_inode_info, vfs_inode);
-}
-
-#endif /* __KERNEL__ */
#endif /* _LINUX_BFS_FS_H */
diff --git a/include/linux/bfs_fs_i.h b/include/linux/bfs_fs_i.h
deleted file mode 100644
index 5a85f1dc143f..000000000000
--- a/include/linux/bfs_fs_i.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * include/linux/bfs_fs_i.h
- * Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
- */
-
-#ifndef _LINUX_BFS_FS_I
-#define _LINUX_BFS_FS_I
-
-#include <linux/fs.h>
-
-/*
- * BFS file system in-core inode info
- */
-struct bfs_inode_info {
- unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
- unsigned long i_sblock;
- unsigned long i_eblock;
- struct inode vfs_inode;
-};
-
-#endif /* _LINUX_BFS_FS_I */
diff --git a/include/linux/bfs_fs_sb.h b/include/linux/bfs_fs_sb.h
deleted file mode 100644
index efdc30ec7241..000000000000
--- a/include/linux/bfs_fs_sb.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * include/linux/bfs_fs_sb.h
- * Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
- */
-
-#ifndef _LINUX_BFS_FS_SB
-#define _LINUX_BFS_FS_SB
-
-/*
- * BFS file system in-core superblock info
- */
-struct bfs_sb_info {
- unsigned long si_blocks;
- unsigned long si_freeb;
- unsigned long si_freei;
- unsigned long si_lf_ioff;
- unsigned long si_lf_sblk;
- unsigned long si_lf_eblk;
- unsigned long si_lasti;
- char * si_imap;
- struct buffer_head * si_sbh; /* buffer header w/superblock */
- struct bfs_super_block * si_bfs_sb; /* superblock in si_sbh->b_data */
-};
-
-#endif /* _LINUX_BFS_FS_SB */
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index b155b779696b..39f3b34a75d5 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -1,6 +1,6 @@
#ifndef _LINUX_BITOPS_H
#define _LINUX_BITOPS_H
-
+#include <asm/bitops.h>
/*
* ffs: find first bit set. This is defined the same way as
@@ -38,6 +38,47 @@ static inline int generic_ffs(int x)
}
/*
+ * fls: find last bit set.
+ */
+
+extern __inline__ int generic_fls(int x)
+{
+ int r = 32;
+
+ if (!x)
+ return 0;
+ if (!(x & 0xffff0000)) {
+ x <<= 16;
+ r -= 16;
+ }
+ if (!(x & 0xff000000)) {
+ x <<= 8;
+ r -= 8;
+ }
+ if (!(x & 0xf0000000)) {
+ x <<= 4;
+ r -= 4;
+ }
+ if (!(x & 0xc0000000)) {
+ x <<= 2;
+ r -= 2;
+ }
+ if (!(x & 0x80000000)) {
+ x <<= 1;
+ r -= 1;
+ }
+ return r;
+}
+
+extern __inline__ int get_bitmask_order(unsigned int count)
+{
+ int order;
+
+ order = fls(count);
+ return order; /* We could be slightly more clever with -1 here... */
+}
+
+/*
* hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word
*/
diff --git a/include/linux/blk.h b/include/linux/blk.h
index 62d37b2b4c17..290e30367b8e 100644
--- a/include/linux/blk.h
+++ b/include/linux/blk.h
@@ -313,22 +313,11 @@ static void (*DEVICE_INTR)(void) = NULL;
#define SET_INTR(x) (DEVICE_INTR = (x))
-#ifdef DEVICE_INTR
-#define CLEAR_INTR SET_INTR(NULL)
-#else
-#define CLEAR_INTR
-#endif
-
-#define INIT_REQUEST \
- if (QUEUE_EMPTY) { \
- CLEAR_INTR; \
- return; \
- } \
- if (major(CURRENT->rq_dev) != MAJOR_NR) \
- panic(DEVICE_NAME ": request list destroyed"); \
- if (!CURRENT->bio) \
- panic(DEVICE_NAME ": no bio"); \
-
+# ifdef DEVICE_INTR
+# define CLEAR_INTR SET_INTR(NULL)
+# else
+# define CLEAR_INTR
+# endif
#endif /* !defined(IDE_DRIVER) */
/*
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ac373e6a2454..32729e1e3c5b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -303,7 +303,6 @@ extern void blk_recount_segments(request_queue_t *, struct bio *);
extern inline int blk_phys_contig_segment(request_queue_t *q, struct bio *, struct bio *);
extern inline int blk_hw_contig_segment(request_queue_t *q, struct bio *, struct bio *);
extern int block_ioctl(struct block_device *, unsigned int, unsigned long);
-extern int ll_10byte_cmd_build(request_queue_t *, struct request *);
/*
* get ready for proper ref counting
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index ff5363b19923..0847c29a9175 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -40,7 +40,8 @@ int coda_flush(struct file *f);
int coda_release(struct inode *i, struct file *f);
int coda_permission(struct inode *inode, int mask);
int coda_revalidate_inode(struct dentry *);
-int coda_notify_change(struct dentry *, struct iattr *);
+int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *);
+int coda_setattr(struct dentry *, struct iattr *);
int coda_isnullfid(ViceFid *fid);
/* global variables */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ab0a05dc8e26..95cd02771592 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -27,6 +27,7 @@
#include <asm/atomic.h>
struct poll_table_struct;
+struct nameidata;
/*
@@ -605,16 +606,6 @@ extern void kill_fasync(struct fasync_struct **, int, int);
/* only for net: no internal synchronization */
extern void __kill_fasync(struct fasync_struct *, int, int);
-struct nameidata {
- struct dentry *dentry;
- struct vfsmount *mnt;
- struct qstr last;
- unsigned int flags;
- int last_type;
- struct dentry *old_dentry;
- struct vfsmount *old_mnt;
-};
-
/*
* Umount options
*/
@@ -707,9 +698,6 @@ extern int vfs_rmdir(struct inode *, struct dentry *);
extern int vfs_unlink(struct inode *, struct dentry *);
extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
-extern struct dentry *lock_rename(struct dentry *, struct dentry *);
-extern void unlock_rename(struct dentry *, struct dentry *);
-
/*
* File types
*/
@@ -781,9 +769,8 @@ struct inode_operations {
int (*follow_link) (struct dentry *, struct nameidata *);
void (*truncate) (struct inode *);
int (*permission) (struct inode *, int);
- int (*revalidate) (struct dentry *);
int (*setattr) (struct dentry *, struct iattr *);
- int (*getattr) (struct dentry *, struct iattr *);
+ int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
int (*setxattr) (struct dentry *, const char *, void *, size_t, int);
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
@@ -1168,25 +1155,6 @@ extern ino_t find_inode_number(struct dentry *, struct qstr *);
#include <linux/err.h>
/*
- * The bitmask for a lookup event:
- * - follow links at the end
- * - require a directory
- * - ending slashes ok even for nonexistent files
- * - internal "there are more path compnents" flag
- * - locked when lookup done with dcache_lock held
- */
-#define LOOKUP_FOLLOW (1)
-#define LOOKUP_DIRECTORY (2)
-#define LOOKUP_CONTINUE (4)
-#define LOOKUP_PARENT (16)
-#define LOOKUP_NOALT (32)
-
-/*
- * Type of the last component on LOOKUP_PARENT
- */
-enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
-
-/*
* "descriptor" for what we're up to with a read for sendfile().
* This allows us to use the same read code yet
* have multiple different users of the data that
@@ -1207,19 +1175,6 @@ 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 int FASTCALL(__user_walk(const char *, unsigned, struct nameidata *));
-extern int FASTCALL(path_init(const char *, unsigned, struct nameidata *));
-extern int FASTCALL(path_walk(const char *, struct nameidata *));
-extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
-extern int FASTCALL(link_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_len(const char *, struct dentry *, int);
-extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
-#define user_path_walk(name,nd) __user_walk(name, LOOKUP_FOLLOW, nd)
-#define user_path_walk_link(name,nd) __user_walk(name, 0, nd)
-
extern void inode_init_once(struct inode *);
extern void iput(struct inode *);
extern void force_delete(struct inode *);
@@ -1283,6 +1238,7 @@ extern int vfs_follow_link(struct nameidata *, const char *);
extern int page_readlink(struct dentry *, char *, int);
extern int page_follow_link(struct dentry *, struct nameidata *);
extern struct inode_operations page_symlink_inode_operations;
+extern void generic_fillattr(struct inode *, struct kstat *);
extern int vfs_readdir(struct file *, filldir_t, void *);
@@ -1296,6 +1252,9 @@ extern void drop_super(struct super_block *sb);
extern kdev_t ROOT_DEV;
extern char root_device_name[];
+extern int dcache_dir_open(struct inode *, struct file *);
+extern int dcache_dir_close(struct inode *, struct file *);
+extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
extern int dcache_readdir(struct file *, void *, filldir_t);
extern int simple_statfs(struct super_block *, struct statfs *);
extern struct dentry *simple_lookup(struct inode *, struct dentry *);
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 5ebcc879b4c0..d913c30590df 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -2,7 +2,7 @@
#define _LINUX_FUTEX_H
/* Second argument to futex syscall */
-#define FUTEX_UP (0)
-#define FUTEX_DOWN (1)
+#define FUTEX_WAIT (0)
+#define FUTEX_WAKE (1)
#endif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index a66146efd024..16b7c97aff33 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -40,9 +40,6 @@
/* Right now this is only needed by a promise controlled.
*/
-#ifndef DISK_RECOVERY_TIME /* off=0; on=access_delay_time */
-# define DISK_RECOVERY_TIME 0 /* for hardware that needs it */
-#endif
#ifndef OK_TO_RESET_CONTROLLER /* 1 needed for good error recovery */
# define OK_TO_RESET_CONTROLLER 0 /* 0 for use with AH2372A/B interface */
#endif
@@ -202,7 +199,8 @@ typedef enum {
ide_cmd646,
ide_cy82c693,
ide_pmac,
- ide_etrax100
+ ide_etrax100,
+ ide_acorn
} hwif_chipset_t;
@@ -447,6 +445,7 @@ struct ata_channel {
* between differen queues sharing the same irq line.
*/
spinlock_t *lock;
+ unsigned long *active; /* active processing request */
ide_startstop_t (*handler)(struct ata_device *, struct request *); /* irq handler, if active */
struct timer_list timer; /* failsafe timer */
@@ -454,7 +453,6 @@ struct ata_channel {
unsigned long poll_timeout; /* timeout value during polled operations */
struct ata_device *drive; /* last serviced drive */
- unsigned long active; /* active processing request */
ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
hw_regs_t hw; /* hardware info */
@@ -547,10 +545,6 @@ struct ata_channel {
unsigned slow : 1; /* flag: slow data port */
unsigned io_32bit : 1; /* 0=16-bit, 1=32-bit */
unsigned char bus_state; /* power state of the IDE bus */
-
-#if (DISK_RECOVERY_TIME > 0)
- unsigned long last_time; /* time when previous rq was done */
-#endif
};
/*
@@ -642,7 +636,7 @@ extern int noautodma;
#define LOCAL_END_REQUEST /* Don't generate end_request in blk.h */
#include <linux/blk.h>
-extern int __ide_end_request(struct ata_device *, struct request *, int, int);
+extern int __ide_end_request(struct ata_device *, struct request *, int, unsigned int);
extern int ide_end_request(struct ata_device *drive, struct request *, int);
/*
@@ -784,11 +778,9 @@ void ide_init_subdrivers (void);
extern struct block_device_operations ide_fops[];
-#ifdef CONFIG_BLK_DEV_IDE
/* Probe for devices attached to the systems host controllers.
*/
-extern int ideprobe_init (void);
-#endif
+extern int ideprobe_init(void);
#ifdef CONFIG_BLK_DEV_IDEDISK
extern int idedisk_init (void);
#endif
@@ -863,6 +855,15 @@ static inline void udma_irq_lost(struct ata_device *drive)
#ifdef CONFIG_BLK_DEV_IDEDMA
+void udma_pci_enable(struct ata_device *drive, int on, int verbose);
+int udma_pci_start(struct ata_device *drive, struct request *rq);
+int udma_pci_stop(struct ata_device *drive);
+int udma_pci_read(struct ata_device *drive, struct request *rq);
+int udma_pci_write(struct ata_device *drive, struct request *rq);
+int udma_pci_irq_status(struct ata_device *drive);
+void udma_pci_timeout(struct ata_device *drive);
+void udma_pci_irq_lost(struct ata_device *);
+
extern int udma_new_table(struct ata_channel *, struct request *);
extern void udma_destroy_table(struct ata_channel *);
extern void udma_print(struct ata_device *);
diff --git a/include/linux/init.h b/include/linux/init.h
index 142ec2f3aa68..ca7e75f37883 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -169,6 +169,9 @@ typedef void (*__cleanup_module_func_t)(void);
#endif
+/* Data marked not to be saved by software_suspend() */
+#define __nosavedata __attribute__ ((__section__ (".data.nosave")))
+
#ifdef CONFIG_HOTPLUG
#define __devinit
#define __devinitdata
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 67bce357a7a1..90446b0d75e5 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -124,14 +124,6 @@ enum
TASKLET_STATE_RUN /* Tasklet is running (SMP only) */
};
-struct tasklet_head
-{
- struct tasklet_struct *list;
-} __attribute__ ((__aligned__(SMP_CACHE_BYTES)));
-
-extern struct tasklet_head tasklet_vec[NR_CPUS];
-extern struct tasklet_head tasklet_hi_vec[NR_CPUS];
-
#ifdef CONFIG_SMP
static inline int tasklet_trylock(struct tasklet_struct *t)
{
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
new file mode 100644
index 000000000000..a33b2bcfc625
--- /dev/null
+++ b/include/linux/jiffies.h
@@ -0,0 +1,30 @@
+#ifndef _LINUX_JIFFIES_H
+#define _LINUX_JIFFIES_H
+
+/*
+ * The 64-bit value is not volatile - you MUST NOT read it
+ * without holding read_lock_irq(&xtime_lock)
+ */
+extern u64 jiffies_64;
+extern unsigned long volatile jiffies;
+
+/*
+ * These inlines deal with timer wrapping correctly. You are
+ * strongly encouraged to use them
+ * 1. Because people otherwise forget
+ * 2. Because if the timer wrap changes in future you wont have to
+ * alter your driver code.
+ *
+ * time_after(a,b) returns true if the time a is after time b.
+ *
+ * Do this with "<0" and ">=0" to only test the sign of the result. A
+ * good compiler would generate better code (and a really good compiler
+ * wouldn't care). Gcc is currently neither.
+ */
+#define time_after(a,b) ((long)(b) - (long)(a) < 0)
+#define time_before(a,b) time_after(b,a)
+
+#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
+#define time_before_eq(a,b) time_after_eq(b,a)
+
+#endif
diff --git a/include/linux/namei.h b/include/linux/namei.h
new file mode 100644
index 000000000000..2c789cf0d4fc
--- /dev/null
+++ b/include/linux/namei.h
@@ -0,0 +1,56 @@
+#ifndef _LINUX_NAMEI_H
+#define _LINUX_NAMEI_H
+
+struct vfsmount;
+
+struct nameidata {
+ struct dentry *dentry;
+ struct vfsmount *mnt;
+ struct qstr last;
+ unsigned int flags;
+ int last_type;
+ struct dentry *old_dentry;
+ struct vfsmount *old_mnt;
+};
+
+/*
+ * Type of the last component on LOOKUP_PARENT
+ */
+enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
+
+/*
+ * The bitmask for a lookup event:
+ * - follow links at the end
+ * - require a directory
+ * - ending slashes ok even for nonexistent files
+ * - internal "there are more path compnents" flag
+ * - locked when lookup done with dcache_lock held
+ */
+#define LOOKUP_FOLLOW 1
+#define LOOKUP_DIRECTORY 2
+#define LOOKUP_CONTINUE 4
+#define LOOKUP_PARENT 16
+#define LOOKUP_NOALT 32
+
+
+extern int FASTCALL(__user_walk(const char *, unsigned, struct nameidata *));
+#define user_path_walk(name,nd) \
+ __user_walk(name, LOOKUP_FOLLOW, nd)
+#define user_path_walk_link(name,nd) \
+ __user_walk(name, 0, nd)
+extern int FASTCALL(path_init(const char *, unsigned, struct nameidata *));
+extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
+extern int FASTCALL(path_walk(const char *, struct nameidata *));
+extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
+extern void path_release(struct nameidata *);
+
+extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
+extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
+
+extern int follow_down(struct vfsmount **, struct dentry **);
+extern int follow_up(struct vfsmount **, struct dentry **);
+
+extern struct dentry *lock_rename(struct dentry *, struct dentry *);
+extern void unlock_rename(struct dentry *, struct dentry *);
+
+#endif /* _LINUX_NAMEI_H */
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 46c2b72e33f3..5899abd26a44 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -158,26 +158,5 @@ extern void nf_invalidate_cache(int pf);
#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb)
#endif /*CONFIG_NETFILTER*/
-/* From arch/i386/kernel/smp.c:
- *
- * Why isn't this somewhere standard ??
- *
- * Maybe because this procedure is horribly buggy, and does
- * not deserve to live. Think about signedness issues for five
- * seconds to see why. - Linus
- */
-
-/* Two signed, return a signed. */
-#define SMAX(a,b) ((ssize_t)(a)>(ssize_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
-#define SMIN(a,b) ((ssize_t)(a)<(ssize_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
-
-/* Two unsigned, return an unsigned. */
-#define UMAX(a,b) ((size_t)(a)>(size_t)(b) ? (size_t)(a) : (size_t)(b))
-#define UMIN(a,b) ((size_t)(a)<(size_t)(b) ? (size_t)(a) : (size_t)(b))
-
-/* Two unsigned, return a signed. */
-#define SUMAX(a,b) ((size_t)(a)>(size_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
-#define SUMIN(a,b) ((size_t)(a)<(size_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
#endif /*__KERNEL__*/
-
#endif /*__LINUX_NETFILTER_H*/
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index a8a2259a8343..027986b2f336 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -234,12 +234,12 @@ extern int nfs_inode_is_stale(struct inode *, struct nfs_fh *,
extern struct inode *nfs_fhget(struct dentry *, struct nfs_fh *,
struct nfs_fattr *);
extern int __nfs_refresh_inode(struct inode *, struct nfs_fattr *);
-extern int nfs_revalidate(struct dentry *);
+extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
extern int nfs_permission(struct inode *, int);
extern int nfs_open(struct inode *, struct file *);
extern int nfs_release(struct inode *, struct file *);
extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
-extern int nfs_notify_change(struct dentry *, struct iattr *);
+extern int nfs_setattr(struct dentry *, struct iattr *);
/*
* linux/fs/nfs/file.c
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 52b7117c4f64..23d6e6208432 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -64,6 +64,7 @@
#define PG_private 12 /* Has something at ->private */
#define PG_writeback 13 /* Page is under writeback */
+#define PG_nosave 15 /* Used for system suspend/resume */
/*
* Global page accounting. One instance per CPU.
@@ -207,6 +208,12 @@ extern void get_page_state(struct page_state *ret);
ret; \
})
+#define PageNosave(page) test_bit(PG_nosave, &(page)->flags)
+#define SetPageNosave(page) set_bit(PG_nosave, &(page)->flags)
+#define TestSetPageNosave(page) test_and_set_bit(PG_nosave, &(page)->flags)
+#define ClearPageNosave(page) clear_bit(PG_nosave, &(page)->flags)
+#define TestClearPageNosave(page) test_and_clear_bit(PG_nosave, &(page)->flags)
+
/*
* The PageSwapCache predicate doesn't use a PG_flag at this time,
* but it may again do so one day.
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index bebaee7edb52..67a697940471 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1551,6 +1551,7 @@
#define PCI_VENDOR_ID_ALTIMA 0x173b
#define PCI_DEVICE_ID_ALTIMA_AC1000 0x03e8
+#define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea
#define PCI_VENDOR_ID_SYMPHONY 0x1c1c
#define PCI_DEVICE_ID_SYMPHONY_101 0x0001
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 0a36a5e59caf..1a9d178c57bc 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -184,20 +184,22 @@ extern inline void mark_info_dirty(struct mem_dqinfo *info)
#define sb_dqopt(sb) (&(sb)->s_dquot)
-extern int nr_dquots, nr_free_dquots;
-
-struct dqstats {
- __u32 lookups;
- __u32 drops;
- __u32 reads;
- __u32 writes;
- __u32 cache_hits;
- __u32 allocated_dquots;
- __u32 free_dquots;
- __u32 syncs;
+/*
+ * Statistics about disc quota.
+ */
+enum {
+ DQSTATS_LOOKUPS,
+ DQSTATS_DROPS,
+ DQSTATS_READS,
+ DQSTATS_WRITES,
+ DQSTATS_CACHE_HITS,
+ DQSTATS_ALLOCATED,
+ DQSTATS_FREE,
+ DQSTATS_SYNCS,
+ DQSTATS_SIZE
};
-extern struct dqstats dqstats;
+extern __u32 dqstats_array[DQSTATS_SIZE];
#define NR_DQHASH 43 /* Just an arbitrary number */
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 5f128a952550..4c8b4276c957 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -20,6 +20,7 @@
* CAD_OFF Ctrl-Alt-Del sequence sends SIGINT to init task.
* POWER_OFF Stop OS and remove all power from system, if possible.
* RESTART2 Restart system using given command string.
+ * SW_SUSPEND Suspend system using Software Suspend if compiled in
*/
#define LINUX_REBOOT_CMD_RESTART 0x01234567
@@ -28,6 +29,7 @@
#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000
#define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC
#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4
+#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2
#ifdef __KERNEL__
@@ -46,6 +48,13 @@ extern void machine_restart(char *cmd);
extern void machine_halt(void);
extern void machine_power_off(void);
+/*
+ * Architecture-independent suspend facility
+ */
+
+extern void software_suspend(void);
+extern unsigned char software_suspend_enabled;
+
#endif
#endif /* _LINUX_REBOOT_H */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 173279f6ff0a..abe55b91a328 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1342,6 +1342,13 @@ struct virtual_node
struct virtual_item * vn_vi; /* array of items (including a new one, excluding item to be deleted) */
};
+/* used by directory items when creating virtual nodes */
+struct direntry_uarea {
+ int flags;
+ __u16 entry_count;
+ __u16 entry_sizes[1];
+} __attribute__ ((__packed__)) ;
+
/***************************************************************************/
/* TREE BALANCE */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2ad9171a66b7..743b1aea2aca 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -13,6 +13,7 @@ extern unsigned long event;
#include <linux/types.h>
#include <linux/times.h>
#include <linux/timex.h>
+#include <linux/jiffies.h>
#include <linux/rbtree.h>
#include <linux/thread_info.h>
@@ -388,6 +389,11 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_FLUSHER 0x00004000 /* responsible for disk writeback */
#define PF_RADIX_TREE 0x00008000 /* debug: performing radix tree alloc */
+#define PF_FREEZE 0x00010000 /* this task should be frozen for suspend */
+#define PF_IOTHREAD 0x00020000 /* this thread is needed for doing I/O to swap */
+#define PF_KERNTHREAD 0x00040000 /* this thread is a kernel thread that cannot be sent signals to */
+#define PF_FROZEN 0x00080000 /* frozen for system suspend */
+
/*
* Ptrace flags
*/
@@ -476,12 +482,6 @@ extern void free_uid(struct user_struct *);
#include <asm/current.h>
-/*
- * The 64-bit value is not volatile - you MUST NOT read it
- * without holding read_lock_irq(&xtime_lock)
- */
-extern u64 jiffies_64;
-extern unsigned long volatile jiffies;
extern unsigned long itimer_ticks;
extern unsigned long itimer_next;
extern void do_timer(struct pt_regs *);
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index a1b29efb0666..ab12d2608f53 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -58,5 +58,7 @@ static inline int seq_puts(struct seq_file *m, const char *s)
int seq_printf(struct seq_file *, const char *, ...)
__attribute__ ((format (printf,2,3)));
+int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
+int single_release(struct inode *, struct file *);
#endif
#endif
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 85c6273694c9..b61435d369c8 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -96,5 +96,9 @@ static inline void smp_send_reschedule_all(void) { }
#define per_cpu(var, cpu) var
#define this_cpu(var) var
-#endif
-#endif
+#endif /* !SMP */
+
+#define get_cpu() ({ preempt_disable(); smp_processor_id(); })
+#define put_cpu() preempt_enable()
+
+#endif /* __LINUX_SMP_H */
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
new file mode 100644
index 000000000000..3ede8ad27270
--- /dev/null
+++ b/include/linux/suspend.h
@@ -0,0 +1,67 @@
+#ifndef _LINUX_SWSUSP_H
+#define _LINUX_SWSUSP_H
+
+#include <asm/suspend.h>
+#include <linux/swap.h>
+#include <linux/notifier.h>
+#include <linux/config.h>
+
+extern unsigned char software_suspend_enabled;
+
+#define NORESUME 1
+#define RESUME_SPECIFIED 2
+
+#ifdef CONFIG_SOFTWARE_SUSPEND
+/* page backup entry */
+typedef struct pbe {
+ unsigned long address; /* address of the copy */
+ unsigned long orig_address; /* original address of page */
+ swp_entry_t swap_address;
+ swp_entry_t dummy; /* we need scratch space at
+ * end of page (see link, diskpage)
+ */
+} suspend_pagedir_t;
+
+#define SWAP_FILENAME_MAXLENGTH 32
+
+struct suspend_header {
+ __u32 version_code;
+ unsigned long num_physpages;
+ char machine[8];
+ char version[20];
+ int num_cpus;
+ int page_size;
+ unsigned long suspend_pagedir;
+ unsigned int num_pbes;
+ struct swap_location {
+ char filename[SWAP_FILENAME_MAXLENGTH];
+ } swap_location[MAX_SWAPFILES];
+};
+
+#define SUSPEND_PD_PAGES(x) (((x)*sizeof(struct pbe))/PAGE_SIZE+1)
+
+extern struct tq_struct suspend_tq;
+
+/* mm/vmscan.c */
+extern int shrink_mem(void);
+
+/* kernel/suspend.c */
+extern void software_suspend(void);
+extern void software_resume(void);
+extern int resume_setup(char *str);
+
+extern int register_suspend_notifier(struct notifier_block *);
+extern int unregister_suspend_notifier(struct notifier_block *);
+extern void refrigerator(unsigned long);
+
+#else
+#define software_suspend() do { } while(0)
+#define software_resume() do { } while(0)
+#define register_suspend_notifier(a) do { } while(0)
+#define unregister_suspend_notifier(a) do { } while(0)
+#define refrigerator(a) do { BUG(); } while(0)
+#define freeze_processes() do { panic("You need CONFIG_SOFTWARE_SUSPEND to do sleeps."); } while(0)
+#define thaw_processes() do { } while(0)
+#endif
+
+#endif /* _LINUX_SWSUSP_H */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 3a376842c21c..3d87e4334851 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -102,12 +102,8 @@ extern unsigned long totalhigh_pages;
extern unsigned int nr_free_pages(void);
extern unsigned int nr_free_buffer_pages(void);
extern unsigned int nr_free_pagecache_pages(void);
-extern unsigned long nr_buffermem_pages(void);
extern int nr_active_pages;
extern int nr_inactive_pages;
-extern atomic_t nr_async_pages;
-extern atomic_t buffermem_pages;
-extern spinlock_t pagecache_lock;
extern void __remove_inode_page(struct page *);
/* Incomplete types for prototype declarations: */
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 2f25df04d925..373d20b4c4a7 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -544,6 +544,7 @@ enum
FS_LEASES=13, /* int: leases enabled */
FS_DIR_NOTIFY=14, /* int: directory notification enabled */
FS_LEASE_TIME=15, /* int: maximum time to wait for a lease break */
+ FS_DQSTATS=16, /* int: disc quota suage statistics */
};
/* CTL_DEBUG names: */
diff --git a/include/linux/timer.h b/include/linux/timer.h
index c4f01ada5975..d6f0ce5f8740 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -52,23 +52,4 @@ static inline int timer_pending (const struct timer_list * timer)
return timer->list.next != NULL;
}
-/*
- * These inlines deal with timer wrapping correctly. You are
- * strongly encouraged to use them
- * 1. Because people otherwise forget
- * 2. Because if the timer wrap changes in future you wont have to
- * alter your driver code.
- *
- * time_after(a,b) returns true if the time a is after time b.
- *
- * Do this with "<0" and ">=0" to only test the sign of the result. A
- * good compiler would generate better code (and a really good compiler
- * wouldn't care). Gcc is currently neither.
- */
-#define time_after(a,b) ((long)(b) - (long)(a) < 0)
-#define time_before(a,b) time_after(b,a)
-
-#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
-#define time_before_eq(a,b) time_after_eq(b,a)
-
#endif
diff --git a/include/linux/tqueue.h b/include/linux/tqueue.h
index 5c518e91a8be..516108dcdbbf 100644
--- a/include/linux/tqueue.h
+++ b/include/linux/tqueue.h
@@ -66,7 +66,7 @@ typedef struct list_head task_queue;
#define DECLARE_TASK_QUEUE(q) LIST_HEAD(q)
#define TQ_ACTIVE(q) (!list_empty(&q))
-extern task_queue tq_timer, tq_immediate, tq_disk;
+extern task_queue tq_timer, tq_immediate, tq_disk, tq_bdflush;
/*
* To implement your own list of active bottom halfs, use the following
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 7a62399fd5e8..8e8f953ed2c7 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -767,7 +767,6 @@ typedef void (*usb_complete_t)(struct urb *);
/**
* struct urb - USB Request Block
* @urb_list: For use by current owner of the URB.
- * @next: Used to link ISO requests into rings.
* @pipe: Holds endpoint number, direction, type, and max packet size.
* Create these values with the eight macros available;
* usb_{snd,rcv}TYPEpipe(dev,endpoint), where the type is "ctrl"
@@ -827,7 +826,7 @@ typedef void (*usb_complete_t)(struct urb *);
*
* Initialization:
*
- * All URBs submitted must initialize dev, pipe, next (may be null),
+ * All URBs submitted must initialize dev, pipe,
* transfer_flags (may be zero), complete, timeout (may be zero).
* The USB_ASYNC_UNLINK transfer flag affects later invocations of
* the usb_unlink_urb() routine.
@@ -873,7 +872,9 @@ typedef void (*usb_complete_t)(struct urb *);
* the quality of service is only "best effort". Callers provide specially
* allocated URBs, with number_of_packets worth of iso_frame_desc structures
* at the end. Each such packet is an individual ISO transfer. Isochronous
- * URBs are normally submitted with urb->next fields set up as a ring, so
+ * URBs are normally queued (no flag like USB_BULK_QUEUE is needed) so that
+ * transfers are at least double buffered, and then explicitly resubmitted
+ * in completion handlers, so
* that data (such as audio or video) streams at as constant a rate as the
* host controller scheduler can support.
*
@@ -891,14 +892,15 @@ typedef void (*usb_complete_t)(struct urb *);
* When completion callback is invoked for non-isochronous URBs, the
* actual_length field tells how many bytes were transferred.
*
- * For interrupt and isochronous URBs, the URB provided to the callback
+ * For interrupt URBs, the URB provided to the callback
* function is still "owned" by the USB core subsystem unless the status
* indicates that the URB has been unlinked. Completion handlers should
* not modify such URBs until they have been unlinked.
*
* ISO transfer status is reported in the status and actual_length fields
* of the iso_frame_desc array, and the number of errors is reported in
- * error_count.
+ * error_count. Completion callbacks for ISO transfers will normally
+ * (re)submit URBs to ensure a constant transfer rate.
*/
struct urb
{
@@ -906,7 +908,6 @@ struct urb
atomic_t count; /* reference count of the URB */
void *hcpriv; /* private data for host controller */
struct list_head urb_list; /* list pointer to all active urbs */
- struct urb *next; /* (in) pointer to next URB */
struct usb_device *dev; /* (in) pointer to associated device */
unsigned int pipe; /* (in) pipe information */
int status; /* (return) non-ISO status */
diff --git a/include/linux/uts.h b/include/linux/uts.h
index 39e09ae10135..73eb1ed36ec4 100644
--- a/include/linux/uts.h
+++ b/include/linux/uts.h
@@ -8,10 +8,6 @@
#define UTS_SYSNAME "Linux"
#endif
-#ifndef UTS_MACHINE
-#define UTS_MACHINE "unknown"
-#endif
-
#ifndef UTS_NODENAME
#define UTS_NODENAME "(none)" /* set by sethostname() */
#endif