summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-06-22 22:01:51 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-22 22:01:51 -0700
commit2e7f53ec14475d56559bcdd07acfb737b7bff1e9 (patch)
tree964fee6f7bfc40bae796fe137e293c6831103919 /include/linux
parent5cb7db89366c7c64c5476bec0a2939c7c75af4c9 (diff)
parent8514206eb4e65262f50d6f18293dc3175ab05693 (diff)
Merge home.transmeta.com:/home/torvalds/v2.5/xfs
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h4
-rw-r--r--include/linux/bitops.h2
-rw-r--r--include/linux/coda_psdev.h2
-rw-r--r--include/linux/efs_fs.h2
-rw-r--r--include/linux/ext3_fs.h2
-rw-r--r--include/linux/ext3_fs_i.h2
-rw-r--r--include/linux/firmware.h19
-rw-r--r--include/linux/fs.h8
-rw-r--r--include/linux/gfp.h2
-rw-r--r--include/linux/highmem.h2
-rw-r--r--include/linux/hugetlb.h23
-rw-r--r--include/linux/input.h1
-rw-r--r--include/linux/isdn.h2
-rw-r--r--include/linux/isdn_ppp.h3
-rw-r--r--include/linux/loop.h13
-rw-r--r--include/linux/msdos_fs.h2
-rw-r--r--include/linux/mtd/blktrans.h17
-rw-r--r--include/linux/mtd/doc2000.h4
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/linux/netfilter_arp.h3
-rw-r--r--include/linux/nfsd/nfsd.h2
-rw-r--r--include/linux/nfsd/xdr.h2
-rw-r--r--include/linux/nfsd/xdr3.h2
-rw-r--r--include/linux/pci.h46
-rw-r--r--include/linux/pci_ids.h7
-rw-r--r--include/linux/pnp.h127
-rw-r--r--include/linux/sched.h16
-rw-r--r--include/linux/sem.h4
-rw-r--r--include/linux/serio.h1
-rw-r--r--include/linux/skbuff.h23
-rw-r--r--include/linux/smbno.h4
-rw-r--r--include/linux/spinlock.h9
-rw-r--r--include/linux/statfs.h22
-rw-r--r--include/linux/sysdev.h1
-rw-r--r--include/linux/time.h3
-rw-r--r--include/linux/timex.h2
-rw-r--r--include/linux/vfs.h2
37 files changed, 234 insertions, 160 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index d2711ab6b024..8528f26c4a95 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -403,8 +403,8 @@ int acpi_pci_irq_init (void);
struct acpi_pci_driver {
struct acpi_pci_driver *next;
- int (*add)(acpi_handle *handle);
- void (*remove)(acpi_handle *handle);
+ int (*add)(acpi_handle handle);
+ void (*remove)(acpi_handle handle);
};
int acpi_pci_register_driver(struct acpi_pci_driver *driver);
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index b7487acd00cb..c23ac5fc0a53 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -108,7 +108,7 @@ static inline unsigned int generic_hweight8(unsigned int w)
return (res & 0x0F) + ((res >> 4) & 0x0F);
}
-static inline unsigned long generic_hweight64(u64 w)
+static inline unsigned long generic_hweight64(__u64 w)
{
#if BITS_PER_LONG < 64
return generic_hweight32((unsigned int)(w >> 32)) +
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 5c3fefddd4f7..e355bcacac17 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -73,7 +73,7 @@ int venus_pioctl(struct super_block *sb, struct ViceFid *fid,
unsigned int cmd, struct PioctlData *data);
int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb);
int venus_fsync(struct super_block *sb, struct ViceFid *fid);
-int venus_statfs(struct super_block *sb, struct statfs *sfs);
+int venus_statfs(struct super_block *sb, struct kstatfs *sfs);
/* messages between coda filesystem in kernel and Venus */
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
index 808df8727891..c78e9c2a7b3a 100644
--- a/include/linux/efs_fs.h
+++ b/include/linux/efs_fs.h
@@ -41,7 +41,7 @@ extern struct file_operations efs_dir_operations;
extern struct address_space_operations efs_symlink_aops;
extern int efs_fill_super(struct super_block *, void *, int);
-extern int efs_statfs(struct super_block *, struct statfs *);
+extern int efs_statfs(struct super_block *, struct kstatfs *);
extern void efs_read_inode(struct inode *);
extern efs_block_t efs_map_block(struct inode *, efs_block_t);
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index a7f6c48a5ab9..62f37c1a17ba 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -764,7 +764,7 @@ extern void ext3_write_super (struct super_block *);
extern void ext3_write_super_lockfs (struct super_block *);
extern void ext3_unlockfs (struct super_block *);
extern int ext3_remount (struct super_block *, int *, char *);
-extern int ext3_statfs (struct super_block *, struct statfs *);
+extern int ext3_statfs (struct super_block *, struct kstatfs *);
#define ext3_std_error(sb, errno) \
do { \
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h
index 02021676dd74..1a6a6c5922f7 100644
--- a/include/linux/ext3_fs_i.h
+++ b/include/linux/ext3_fs_i.h
@@ -66,7 +66,7 @@ struct ext3_inode_info {
struct posix_acl *i_acl;
struct posix_acl *i_default_acl;
#endif
-
+
struct list_head i_orphan; /* unlinked but open inodes */
/*
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
new file mode 100644
index 000000000000..93dd77eb7869
--- /dev/null
+++ b/include/linux/firmware.h
@@ -0,0 +1,19 @@
+#ifndef _LINUX_FIRMWARE_H
+#define _LINUX_FIRMWARE_H
+#include <linux/module.h>
+#include <linux/types.h>
+#define FIRMWARE_NAME_MAX 30
+struct firmware {
+ size_t size;
+ u8 *data;
+};
+int request_firmware(const struct firmware **fw, const char *name,
+ struct device *device);
+int request_firmware_nowait(
+ struct module *module,
+ const char *name, struct device *device, void *context,
+ void (*cont)(const struct firmware *fw, void *context));
+
+void release_firmware(const struct firmware *fw);
+void register_firmware(const char *name, const u8 *data, size_t size);
+#endif
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0f79ec6c6949..c3bda88631bc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -25,7 +25,7 @@ struct iovec;
struct nameidata;
struct pipe_inode_info;
struct poll_table_struct;
-struct statfs;
+struct kstatfs;
struct vm_area_struct;
struct vfsmount;
@@ -781,7 +781,7 @@ struct super_operations {
int (*sync_fs)(struct super_block *sb, int wait);
void (*write_super_lockfs) (struct super_block *);
void (*unlockfs) (struct super_block *);
- int (*statfs) (struct super_block *, struct statfs *);
+ int (*statfs) (struct super_block *, struct kstatfs *);
int (*remount_fs) (struct super_block *, int *, char *);
void (*clear_inode) (struct inode *);
void (*umount_begin) (struct super_block *);
@@ -960,7 +960,7 @@ extern struct vfsmount *kern_mount(struct file_system_type *);
extern int may_umount(struct vfsmount *);
extern long do_mount(char *, char *, char *, unsigned long, void *);
-extern int vfs_statfs(struct super_block *, struct statfs *);
+extern int vfs_statfs(struct super_block *, struct kstatfs *);
/* Return value for VFS lock functions - tells locks.c to lock conventionally
* REALLY kosha for root NFS and nfs_lock
@@ -1278,7 +1278,7 @@ 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_getattr(struct vfsmount *, struct dentry *, struct kstat *);
-extern int simple_statfs(struct super_block *, struct statfs *);
+extern int simple_statfs(struct super_block *, struct kstatfs *);
extern int simple_link(struct dentry *, struct inode *, struct dentry *);
extern int simple_unlink(struct inode *, struct dentry *);
extern int simple_rmdir(struct inode *, struct dentry *);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index be82baa340fa..aa3705a9a21e 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -7,7 +7,7 @@
/*
* GFP bitmasks..
*/
-/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low four bits) */
+/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */
#define __GFP_DMA 0x01
#define __GFP_HIGHMEM 0x02
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 4cd2f596e705..2c9139a94f8f 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -3,6 +3,8 @@
#include <linux/config.h>
#include <linux/fs.h>
+#include <linux/mm.h>
+
#include <asm/cacheflush.h>
#ifdef CONFIG_HIGHMEM
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 266762203a70..edc512ee628f 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -73,11 +73,28 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
#ifdef CONFIG_HUGETLBFS
struct hugetlbfs_config {
- uid_t uid;
- gid_t gid;
- umode_t mode;
+ uid_t uid;
+ gid_t gid;
+ umode_t mode;
+ long nr_blocks;
+ long nr_inodes;
};
+struct hugetlbfs_sb_info {
+ long max_blocks; /* blocks allowed */
+ long free_blocks; /* blocks free */
+ long max_inodes; /* inodes allowed */
+ long free_inodes; /* inodes free */
+ spinlock_t stat_lock;
+};
+
+static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
+{
+ return sb->s_fs_info;
+}
+
+#define PSEUDO_DIRENT_SIZE 20
+
extern struct file_operations hugetlbfs_file_operations;
extern struct vm_operations_struct hugetlb_vm_ops;
struct file *hugetlb_zero_setup(size_t);
diff --git a/include/linux/input.h b/include/linux/input.h
index 20dfaad9fe4f..da49f7ee0f18 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -358,6 +358,7 @@ struct input_absinfo {
#define BTN_EXTRA 0x114
#define BTN_FORWARD 0x115
#define BTN_BACK 0x116
+#define BTN_TASK 0x117
#define BTN_JOYSTICK 0x120
#define BTN_TRIGGER 0x120
diff --git a/include/linux/isdn.h b/include/linux/isdn.h
index fe4e4f154b1c..ecd0f5394e9e 100644
--- a/include/linux/isdn.h
+++ b/include/linux/isdn.h
@@ -283,7 +283,7 @@ typedef struct atemu {
#endif
int mdmcmdl; /* Length of Modem-Commandbuffer */
int pluscount; /* Counter for +++ sequence */
- int lastplus; /* Timestamp of last + */
+ unsigned long lastplus; /* Timestamp of last + */
char mdmcmd[255]; /* Modem-Commandbuffer */
unsigned int charge; /* Charge units of current connection */
} atemu;
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h
index 669822e2868a..c32f338a5a28 100644
--- a/include/linux/isdn_ppp.h
+++ b/include/linux/isdn_ppp.h
@@ -95,7 +95,8 @@ struct isdn_ppp_resetparams {
* check the original include for more information
*/
struct isdn_ppp_compressor {
- struct isdn_ppp_compressor *next, *prev;
+ struct module *owner;
+ struct list_head list;
int num; /* CCP compression protocol number */
void *(*alloc) (struct isdn_ppp_comp_data *);
diff --git a/include/linux/loop.h b/include/linux/loop.h
index 6f78f33cbac9..424ddff9b70a 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -14,6 +14,9 @@
#define LO_KEY_SIZE 32
#ifdef __KERNEL__
+#include <linux/bio.h>
+#include <linux/blk.h>
+#include <linux/spinlock.h>
/* Possible states of device */
enum {
@@ -22,18 +25,20 @@ enum {
Lo_rundown,
};
+struct loop_func_table;
+
struct loop_device {
int lo_number;
int lo_refcnt;
int lo_offset;
- int lo_encrypt_type;
- int lo_encrypt_key_size;
int lo_flags;
int (*transfer)(struct loop_device *, int cmd,
char *raw_buf, char *loop_buf, int size,
sector_t real_block);
char lo_name[LO_NAME_SIZE];
char lo_encrypt_key[LO_KEY_SIZE];
+ int lo_encrypt_key_size;
+ struct loop_func_table *lo_encryption;
__u32 lo_init[2];
uid_t lo_key_owner; /* Who set the key */
int (*ioctl)(struct loop_device *, int cmd,
@@ -129,9 +134,7 @@ struct loop_func_table {
/* release is called from loop_unregister_transfer or clr_fd */
int (*release)(struct loop_device *);
int (*ioctl)(struct loop_device *, int cmd, unsigned long arg);
- /* lock and unlock manage the module use counts */
- void (*lock)(struct loop_device *);
- void (*unlock)(struct loop_device *);
+ struct module *owner;
};
int loop_register_transfer(struct loop_func_table *funcs);
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 0555d7d08894..4268ed112436 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -270,7 +270,7 @@ extern void fat_clear_inode(struct inode *inode);
extern void fat_put_super(struct super_block *sb);
int fat_fill_super(struct super_block *sb, void *data, int silent,
struct inode_operations *fs_dir_inode_ops, int isvfat);
-extern int fat_statfs(struct super_block *sb, struct statfs *buf);
+extern int fat_statfs(struct super_block *sb, struct kstatfs *buf);
extern void fat_write_inode(struct inode *inode, int wait);
extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h
index ab9639b36e25..4ebc2e5a16e2 100644
--- a/include/linux/mtd/blktrans.h
+++ b/include/linux/mtd/blktrans.h
@@ -1,5 +1,5 @@
/*
- * $Id: blktrans.h,v 1.4 2003/05/21 01:01:32 dwmw2 Exp $
+ * $Id: blktrans.h,v 1.5 2003/06/23 12:00:08 dwmw2 Exp $
*
* (C) 2003 David Woodhouse <dwmw2@infradead.org>
*
@@ -12,6 +12,7 @@
#include <asm/semaphore.h>
+struct hd_geometry;
struct mtd_info;
struct mtd_blktrans_ops;
struct file;
@@ -42,17 +43,13 @@ struct mtd_blktrans_ops {
int (*writesect)(struct mtd_blktrans_dev *dev,
unsigned long block, char *buffer);
- /* HDIO_GETGEO and HDIO_GETGEO_BIG are the only non-private
- ioctls which are expected to be passed through */
- int (*ioctl)(struct mtd_blktrans_dev *dev,
- struct inode * inode, struct file * file,
- unsigned int cmd, unsigned long arg);
+ /* Block layer ioctls */
+ int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
+ int (*flush)(struct mtd_blktrans_dev *dev);
/* Called with mtd_table_mutex held; no race with add/remove */
- int (*open)(struct mtd_blktrans_dev *dev,
- struct inode *i, struct file *f);
- int (*release)(struct mtd_blktrans_dev *dev,
- struct inode *i, struct file *f);
+ int (*open)(struct mtd_blktrans_dev *dev);
+ int (*release)(struct mtd_blktrans_dev *dev);
/* Called on {de,}registration and on subsequent addition/removal
of devices, with mtd_table_mutex held. */
diff --git a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h
index c224985990b9..64465a963442 100644
--- a/include/linux/mtd/doc2000.h
+++ b/include/linux/mtd/doc2000.h
@@ -2,7 +2,7 @@
/* Linux driver for Disk-On-Chip 2000 */
/* (c) 1999 Machine Vision Holdings, Inc. */
/* Author: David Woodhouse <dwmw2@mvhi.com> */
-/* $Id: doc2000.h,v 1.16 2003/05/23 11:29:33 dwmw2 Exp $ */
+/* $Id: doc2000.h,v 1.17 2003/06/12 01:20:46 gerg Exp $ */
#ifndef __MTD_DOC2000_H__
#define __MTD_DOC2000_H__
@@ -44,7 +44,7 @@
#define DoC_Mplus_AccessStatus 0x1008
#define DoC_Mplus_DeviceSelect 0x1008
#define DoC_Mplus_Configuration 0x100a
-#define DoC_Mplus_OutputControl 0x1002
+#define DoC_Mplus_OutputControl 0x100c
#define DoC_Mplus_FlashControl 0x1020
#define DoC_Mplus_FlashSelect 0x1022
#define DoC_Mplus_FlashCmd 0x1024
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7bed3d24a2ea..fba9b5ddec1e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -195,8 +195,14 @@ struct hh_cache
int hh_len; /* length of header */
int (*hh_output)(struct sk_buff *skb);
rwlock_t hh_lock;
+
/* cached hardware header; allow for machine alignment needs. */
- unsigned long hh_data[16/sizeof(unsigned long)];
+#define HH_DATA_MOD 16
+#define HH_DATA_OFF(__len) \
+ (HH_DATA_MOD - ((__len) & (HH_DATA_MOD - 1)))
+#define HH_DATA_ALIGN(__len) \
+ (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
+ unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER)];
};
/* These flag bits are private to the generic network queueing
diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h
index 4f460b3b0cba..a3f8977f7f12 100644
--- a/include/linux/netfilter_arp.h
+++ b/include/linux/netfilter_arp.h
@@ -14,6 +14,7 @@
/* ARP Hooks */
#define NF_ARP_IN 0
#define NF_ARP_OUT 1
-#define NF_ARP_NUMHOOKS 2
+#define NF_ARP_FORWARD 2
+#define NF_ARP_NUMHOOKS 3
#endif /* __LINUX_ARP_NETFILTER_H */
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 6c936cc67ec1..667e7f223a10 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -113,7 +113,7 @@ int nfsd_truncate(struct svc_rqst *, struct svc_fh *,
int nfsd_readdir(struct svc_rqst *, struct svc_fh *,
loff_t *, struct readdir_cd *, encode_dent_fn);
int nfsd_statfs(struct svc_rqst *, struct svc_fh *,
- struct statfs *);
+ struct kstatfs *);
int nfsd_notify_change(struct inode *, struct iattr *);
int nfsd_permission(struct svc_export *, struct dentry *, int);
diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h
index 970474550bb9..0164bd1fc109 100644
--- a/include/linux/nfsd/xdr.h
+++ b/include/linux/nfsd/xdr.h
@@ -113,7 +113,7 @@ struct nfsd_readdirres {
};
struct nfsd_statfsres {
- struct statfs stats;
+ struct kstatfs stats;
};
/*
diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h
index df2de40faa23..1240afe79da9 100644
--- a/include/linux/nfsd/xdr3.h
+++ b/include/linux/nfsd/xdr3.h
@@ -176,7 +176,7 @@ struct nfsd3_readdirres {
struct nfsd3_fsstatres {
__u32 status;
- struct statfs stats;
+ struct kstatfs stats;
__u32 invarsec;
};
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 1983191d32c8..0a2ecb5fd9e7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -486,6 +486,13 @@ struct pci_ops {
int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val);
};
+struct pci_raw_ops {
+ int (*read)(int dom, int bus, int dev, int func, int reg, int len, u32 *val);
+ int (*write)(int dom, int bus, int dev, int func, int reg, int len, u32 val);
+};
+
+extern struct pci_raw_ops *raw_pci_ops;
+
struct pci_bus_region {
unsigned long start;
unsigned long end;
@@ -549,8 +556,8 @@ char *pci_class_name(u32 class);
void pci_read_bridge_bases(struct pci_bus *child);
struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res);
int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge);
-extern struct pci_dev *pci_get_dev(struct pci_dev *dev);
-extern void pci_put_dev(struct pci_dev *dev);
+extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
+extern void pci_dev_put(struct pci_dev *dev);
extern void pci_remove_bus_device(struct pci_dev *dev);
@@ -566,6 +573,10 @@ struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
int pci_find_capability (struct pci_dev *dev, int cap);
struct pci_bus * pci_find_next_bus(const struct pci_bus *from);
+struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from);
+struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device,
+ unsigned int ss_vendor, unsigned int ss_device,
+ struct pci_dev *from);
int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val);
int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val);
int pci_bus_read_config_dword (struct pci_bus *bus, unsigned int devfn, int where, u32 *val);
@@ -688,6 +699,13 @@ static inline struct pci_dev *pci_find_subsys(unsigned int vendor, unsigned int
unsigned int ss_vendor, unsigned int ss_device, const struct pci_dev *from)
{ return NULL; }
+static inline struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from)
+{ return NULL; }
+
+static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device,
+unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from)
+{ return NULL; }
+
static inline void pci_set_master(struct pci_dev *dev) { }
static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
static inline void pci_disable_device(struct pci_dev *dev) { }
@@ -743,6 +761,20 @@ static inline int pci_module_init(struct pci_driver *drv)
return rc;
}
+/*
+ * PCI domain support. Sometimes called PCI segment (eg by ACPI),
+ * a PCI domain is defined to be a set of PCI busses which share
+ * configuration space.
+ */
+#ifndef CONFIG_PCI_DOMAINS
+static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
+static inline int pci_name_bus(char *name, struct pci_bus *bus)
+{
+ sprintf(name, "%02x", bus->number);
+ return 0;
+}
+#endif
+
#endif /* !CONFIG_PCI */
/* these helpers provide future and backwards compatibility
@@ -800,15 +832,5 @@ extern int pci_pci_problems;
#define PCIPCI_VSFX 16
#define PCIPCI_ALIMAGIK 32
-/*
- * PCI domain support. Sometimes called PCI segment (eg by ACPI),
- * a PCI domain is defined to be a set of PCI busses which share
- * configuration space.
- */
-
-#ifndef CONFIG_PCI_DOMAINS
-static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
-#endif
-
#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9b51d57947f1..5a5d32aabc0c 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -549,6 +549,7 @@
#define PCI_DEVICE_ID_SI_601 0x0601
#define PCI_DEVICE_ID_SI_620 0x0620
#define PCI_DEVICE_ID_SI_630 0x0630
+#define PCI_DEVICE_ID_SI_633 0x0633
#define PCI_DEVICE_ID_SI_635 0x0635
#define PCI_DEVICE_ID_SI_640 0x0640
#define PCI_DEVICE_ID_SI_645 0x0645
@@ -559,6 +560,7 @@
#define PCI_DEVICE_ID_SI_652 0x0652
#define PCI_DEVICE_ID_SI_655 0x0655
#define PCI_DEVICE_ID_SI_730 0x0730
+#define PCI_DEVICE_ID_SI_733 0x0733
#define PCI_DEVICE_ID_SI_630_VGA 0x6300
#define PCI_DEVICE_ID_SI_730_VGA 0x7300
#define PCI_DEVICE_ID_SI_735 0x0735
@@ -579,7 +581,10 @@
#define PCI_DEVICE_ID_SI_5513 0x5513
#define PCI_DEVICE_ID_SI_5518 0x5518
#define PCI_DEVICE_ID_SI_5571 0x5571
+#define PCI_DEVICE_ID_SI_5581 0x5581
+#define PCI_DEVICE_ID_SI_5582 0x5582
#define PCI_DEVICE_ID_SI_5591 0x5591
+#define PCI_DEVICE_ID_SI_5596 0x5596
#define PCI_DEVICE_ID_SI_5597 0x5597
#define PCI_DEVICE_ID_SI_5598 0x5598
#define PCI_DEVICE_ID_SI_5600 0x5600
@@ -602,6 +607,8 @@
#define PCI_DEVICE_ID_HP_DIVA_TOSCA1 0x1049
#define PCI_DEVICE_ID_HP_DIVA_TOSCA2 0x104A
#define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B
+#define PCI_DEVICE_ID_HP_REO_SBA 0x10f0
+#define PCI_DEVICE_ID_HP_REO_IOC 0x10f1
#define PCI_DEVICE_ID_HP_VISUALIZE_FXE 0x108b
#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223
#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index d0249ab40676..348bb52a716e 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -102,22 +102,13 @@ struct pnp_mem {
#define PNP_RES_PRIORITY_FUNCTIONAL 2
#define PNP_RES_PRIORITY_INVALID 65535
-struct pnp_resources {
+struct pnp_option {
unsigned short priority; /* priority */
struct pnp_port *port; /* first port */
struct pnp_irq *irq; /* first IRQ */
struct pnp_dma *dma; /* first DMA */
struct pnp_mem *mem; /* first memory resource */
- struct pnp_dev *dev; /* parent */
- struct pnp_resources *dep; /* dependent resources */
-};
-
-struct pnp_rule_table {
- int depnum;
- struct pnp_port *port[PNP_MAX_PORT];
- struct pnp_irq *irq[PNP_MAX_IRQ];
- struct pnp_dma *dma[PNP_MAX_DMA];
- struct pnp_mem *mem[PNP_MAX_MEM];
+ struct pnp_option *next; /* used to chain dependent resources */
};
struct pnp_resource_table {
@@ -187,8 +178,6 @@ static inline void pnp_set_card_drvdata (struct pnp_card_link *pcard, void *data
struct pnp_dev {
struct device dev; /* Driver Model device interface */
unsigned char number; /* used as an index, must be unique */
- int active;
- int capabilities;
int status;
struct list_head global_list; /* node in global list of devices */
@@ -201,11 +190,13 @@ struct pnp_dev {
struct pnp_driver * driver;
struct pnp_card_link * card_link;
- struct pnp_id * id; /* supported EISA IDs*/
- struct pnp_resource_table res; /* contains the currently chosen resources */
- struct pnp_resources * possible; /* a list of possible resources */
- struct pnp_rule_table * rule; /* the current possible resource set */
- int config_mode; /* flags that determine how the device's resources should be configured */
+ struct pnp_id * id; /* supported EISA IDs*/
+
+ int active;
+ int capabilities;
+ struct pnp_option * independent;
+ struct pnp_option * dependent;
+ struct pnp_resource_table res;
void * protocol_data; /* Used to store protocol specific data */
unsigned short regs; /* ISAPnP: supported registers */
@@ -252,11 +243,9 @@ struct pnp_fixup {
void (*quirk_function)(struct pnp_dev *dev); /* fixup function */
};
-/* config modes */
-#define PNP_CONFIG_AUTO 0x0001 /* Use the Resource Configuration Engine to determine resource settings */
-#define PNP_CONFIG_MANUAL 0x0002 /* the config has been manually specified */
-#define PNP_CONFIG_FORCE 0x0004 /* disables validity checking */
-#define PNP_CONFIG_INVALID 0x0008 /* If this flag is set, the pnp layer will refuse to activate the device */
+/* config parameters */
+#define PNP_CONFIG_NORMAL 0x0001
+#define PNP_CONFIG_FORCE 0x0002 /* disables validity checking */
/* capabilities */
#define PNP_READ 0x0001
@@ -271,7 +260,7 @@ struct pnp_fixup {
((dev)->capabilities & PNP_WRITE))
#define pnp_can_disable(dev) (((dev)->protocol) && ((dev)->protocol->disable) && \
((dev)->capabilities & PNP_DISABLE))
-#define pnp_can_configure(dev) ((!(dev)->active) && ((dev)->config_mode & PNP_CONFIG_AUTO) && \
+#define pnp_can_configure(dev) ((!(dev)->active) && \
((dev)->capabilities & PNP_CONFIGURABLE))
#ifdef CONFIG_ISAPNP
@@ -383,7 +372,7 @@ struct pnp_protocol {
#if defined(CONFIG_PNP)
-/* core */
+/* device management */
int pnp_register_protocol(struct pnp_protocol *protocol);
void pnp_unregister_protocol(struct pnp_protocol *protocol);
int pnp_add_device(struct pnp_dev *dev);
@@ -392,7 +381,7 @@ int pnp_device_attach(struct pnp_dev *pnp_dev);
void pnp_device_detach(struct pnp_dev *pnp_dev);
extern struct list_head pnp_global;
-/* card */
+/* multidevice card support */
int pnp_add_card(struct pnp_card *card);
void pnp_remove_card(struct pnp_card *card);
int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev);
@@ -404,41 +393,35 @@ int pnp_register_card_driver(struct pnp_card_driver * drv);
void pnp_unregister_card_driver(struct pnp_card_driver * drv);
extern struct list_head pnp_cards;
-/* resource */
-struct pnp_resources * pnp_build_resource(struct pnp_dev *dev, int dependent);
-struct pnp_resources * pnp_find_resources(struct pnp_dev *dev, int depnum);
-int pnp_get_max_depnum(struct pnp_dev *dev);
-int pnp_add_irq_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data);
-int pnp_add_dma_resource(struct pnp_dev *dev, int depnum, struct pnp_dma *data);
-int pnp_add_port_resource(struct pnp_dev *dev, int depnum, struct pnp_port *data);
-int pnp_add_mem_resource(struct pnp_dev *dev, int depnum, struct pnp_mem *data);
-void pnp_init_resource_table(struct pnp_resource_table *table);
-int pnp_generate_rule(struct pnp_dev * dev, int depnum, struct pnp_rule_table * rule);
-
-/* manager */
+/* resource management */
+struct pnp_option * pnp_register_independent_option(struct pnp_dev *dev);
+struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int priority);
+int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data);
+int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data);
+int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data);
+int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data);
+void pnp_init_resources(struct pnp_resource_table *table);
+int pnp_assign_resources(struct pnp_dev *dev, int depnum);
+int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode);
+int pnp_auto_config_dev(struct pnp_dev *dev);
+int pnp_validate_config(struct pnp_dev *dev);
int pnp_activate_dev(struct pnp_dev *dev);
int pnp_disable_dev(struct pnp_dev *dev);
void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size);
-int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode);
-int pnp_auto_config_dev(struct pnp_dev *dev);
-
-/* driver */
-int compare_pnp_id(struct pnp_id * pos, const char * id);
-int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev);
-int pnp_register_driver(struct pnp_driver *drv);
-void pnp_unregister_driver(struct pnp_driver *drv);
-/* support */
+/* protocol helpers */
int pnp_is_active(struct pnp_dev * dev);
unsigned char * pnp_parse_current_resources(unsigned char * p, unsigned char * end, struct pnp_resource_table * res);
unsigned char * pnp_parse_possible_resources(unsigned char * p, unsigned char * end, struct pnp_dev * dev);
unsigned char * pnp_write_resources(unsigned char * p, unsigned char * end, struct pnp_resource_table * res);
+int compare_pnp_id(struct pnp_id * pos, const char * id);
+int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev);
+int pnp_register_driver(struct pnp_driver *drv);
+void pnp_unregister_driver(struct pnp_driver *drv);
#else
-/* just in case anyone decides to call these without PnP Support Enabled */
-
-/* core */
+/* device management */
static inline int pnp_register_protocol(struct pnp_protocol *protocol) { return -ENODEV; }
static inline void pnp_unregister_protocol(struct pnp_protocol *protocol) { }
static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; }
@@ -447,7 +430,7 @@ static inline void pnp_remove_device(struct pnp_dev *dev) { }
static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; }
static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { ; }
-/* card */
+/* multidevice card support */
static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; }
static inline void pnp_remove_card(struct pnp_card *card) { ; }
static inline int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev) { return -ENODEV; }
@@ -458,35 +441,31 @@ static inline void pnp_release_card_device(struct pnp_dev * dev) { ; }
static inline int pnp_register_card_driver(struct pnp_card_driver * drv) { return -ENODEV; }
static inline void pnp_unregister_card_driver(struct pnp_card_driver * drv) { ; }
-/* resource */
-static inline struct pnp_resources * pnp_build_resource(struct pnp_dev *dev, int dependent) { return NULL; }
-static inline struct pnp_resources * pnp_find_resources(struct pnp_dev *dev, int depnum) { return NULL; }
-static inline int pnp_get_max_depnum(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_add_irq_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; }
-static inline int pnp_add_dma_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; }
-static inline int pnp_add_port_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; }
-static inline int pnp_add_mem_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; }
-static inline void pnp_init_resource_table(struct pnp_resource_table *table) { ; }
-static inline int pnp_generate_rule(struct pnp_dev * dev, int depnum, struct pnp_rule_table * rule) { return -ENODEV; }
-
-/* manager */
-static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { ; }
+/* resource management */
+static inline struct pnp_option * pnp_register_independent_option(struct pnp_dev *dev) { return NULL; }
+static inline struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int priority) { return NULL; }
+static inline int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) { return -ENODEV; }
+static inline int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; }
+static inline int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data) { return -ENODEV; }
+static inline int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data) { return -ENODEV; }
+static inline void pnp_init_resources(struct pnp_resource_table *table) { }
+static inline int pnp_assign_resources(struct pnp_dev *dev, int depnum) { return -ENODEV; }
static inline int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) { return -ENODEV; }
static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; }
+static inline int pnp_validate_config(struct pnp_dev *dev) { return -ENODEV; }
+static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
+static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
+static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { }
-/* driver */
-static inline int compare_pnp_id(struct list_head * id_list, const char * id) { return -ENODEV; }
-static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; }
-static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; }
-
-/* support */
-static inline int pnp_is_active(struct pnp_dev * dev) { return -ENODEV; }
+/* protocol helpers */
+static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
static inline unsigned char * pnp_parse_current_resources(unsigned char * p, unsigned char * end, struct pnp_resource_table * res) { return NULL; }
static inline unsigned char * pnp_parse_possible_resources(unsigned char * p, unsigned char * end, struct pnp_dev * dev) { return NULL; }
static inline unsigned char * pnp_write_resources(unsigned char * p, unsigned char * end, struct pnp_resource_table * res) { return NULL; }
+static inline int compare_pnp_id(struct pnp_id * pos, const char * id) { return -ENODEV; }
+static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; }
+static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; }
+static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; }
#endif /* CONFIG_PNP */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d313e2ccbf42..ca97376901b0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -148,10 +148,15 @@ extern void sched_init(void);
extern void init_idle(task_t *idle, int cpu);
extern void show_state(void);
-extern void show_trace(unsigned long *stack);
-extern void show_stack(unsigned long *stack);
extern void show_regs(struct pt_regs *);
+/*
+ * TASK is a pointer to the task whose backtrace we want to see (or NULL for current
+ * task), SP is the stack pointer of the first frame that should be shown in the back
+ * trace (or NULL if the entire call-chain of the task should be shown).
+ */
+extern void show_stack(struct task_struct *task, unsigned long *sp);
+
void io_schedule(void);
long io_schedule_timeout(long timeout);
@@ -478,9 +483,12 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_LESS_THROTTLE 0x01000000 /* Throttle me less: I clena memory */
#ifdef CONFIG_SMP
-extern void set_cpus_allowed(task_t *p, unsigned long new_mask);
+extern int set_cpus_allowed(task_t *p, unsigned long new_mask);
#else
-# define set_cpus_allowed(p, new_mask) do { } while (0)
+static inline int set_cpus_allowed(task_t *p, unsigned long new_mask)
+{
+ return 0;
+}
#endif
#ifdef CONFIG_NUMA
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 38a64f8ea69b..2821bc07f647 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -128,13 +128,11 @@ struct sem_undo {
struct sem_undo_list {
atomic_t refcnt;
spinlock_t lock;
- volatile unsigned long add_count;
struct sem_undo *proc_list;
};
struct sysv_sem {
struct sem_undo_list *undo_list;
- struct sem_queue *sleep_list;
};
asmlinkage long sys_semget (key_t key, int nsems, int semflg);
@@ -143,6 +141,8 @@ asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg);
asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops,
unsigned nsops, const struct timespec __user *timeout);
+void exit_sem(struct task_struct *p);
+
#endif /* __KERNEL__ */
#endif /* _LINUX_SEM_H */
diff --git a/include/linux/serio.h b/include/linux/serio.h
index ae1a7f9bde2b..f1c67ff70f2a 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -26,7 +26,6 @@ struct serio {
void *driver;
char *name;
char *phys;
- int number;
unsigned short idbus;
unsigned short idvendor;
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 3398f0a283db..57af37850a4e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -803,12 +803,9 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i, struct page *p
skb_shinfo(skb)->nr_frags = i+1;
}
-#define SKB_PAGE_ASSERT(skb) do { if (skb_shinfo(skb)->nr_frags) \
- BUG(); } while (0)
-#define SKB_FRAG_ASSERT(skb) do { if (skb_shinfo(skb)->frag_list) \
- BUG(); } while (0)
-#define SKB_LINEAR_ASSERT(skb) do { if (skb_is_nonlinear(skb)) \
- BUG(); } while (0)
+#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
+#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list)
+#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb))
/*
* Add data to an sk_buff
@@ -837,7 +834,7 @@ static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
SKB_LINEAR_ASSERT(skb);
skb->tail += len;
skb->len += len;
- if (skb->tail>skb->end)
+ if (unlikely(skb->tail>skb->end))
skb_over_panic(skb, len, current_text_addr());
return tmp;
}
@@ -862,7 +859,7 @@ static inline unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data -= len;
skb->len += len;
- if (skb->data<skb->head)
+ if (unlikely(skb->data<skb->head))
skb_under_panic(skb, len, current_text_addr());
return skb->data;
}
@@ -870,8 +867,7 @@ static inline unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
static inline char *__skb_pull(struct sk_buff *skb, unsigned int len)
{
skb->len -= len;
- if (skb->len < skb->data_len)
- BUG();
+ BUG_ON(skb->len < skb->data_len);
return skb->data += len;
}
@@ -1137,8 +1133,7 @@ static inline int __deprecated skb_linearize(struct sk_buff *skb, int gfp)
static inline void *kmap_skb_frag(const skb_frag_t *frag)
{
#ifdef CONFIG_HIGHMEM
- if (in_irq())
- BUG();
+ BUG_ON(in_irq());
local_bh_disable();
#endif
@@ -1154,9 +1149,9 @@ static inline void kunmap_skb_frag(void *vaddr)
}
#define skb_queue_walk(queue, skb) \
- for (skb = (queue)->next; \
+ for (skb = (queue)->next, prefetch(skb->next); \
(skb != (struct sk_buff *)(queue)); \
- skb = skb->next)
+ skb = skb->next, prefetch(skb->next))
extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
diff --git a/include/linux/smbno.h b/include/linux/smbno.h
index c202e2d6cb80..f99e02d9ffe2 100644
--- a/include/linux/smbno.h
+++ b/include/linux/smbno.h
@@ -347,8 +347,8 @@
#define SMB_MODE_NO_CHANGE 0xFFFFFFFF
#define SMB_UID_NO_CHANGE 0xFFFFFFFF
#define SMB_GID_NO_CHANGE 0xFFFFFFFF
-#define SMB_TIME_NO_CHANGE 0xFFFFFFFFFFFFFFFF
-#define SMB_SIZE_NO_CHANGE 0xFFFFFFFFFFFFFFFF
+#define SMB_TIME_NO_CHANGE 0xFFFFFFFFFFFFFFFFULL
+#define SMB_SIZE_NO_CHANGE 0xFFFFFFFFFFFFFFFFULL
/* UNIX filetype mappings. */
#define UNIX_TYPE_FILE 0
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 148ea9d43873..4e2c1973ae67 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -146,13 +146,8 @@ typedef struct {
/*
* gcc versions before ~2.95 have a nasty bug with empty initializers.
*/
-#if (__GNUC__ > 2)
- typedef struct { } spinlock_t;
- #define SPIN_LOCK_UNLOCKED (spinlock_t) { }
-#else
- typedef struct { int gcc_is_buggy; } spinlock_t;
- #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
-#endif
+typedef struct { } spinlock_t;
+#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
/*
* If CONFIG_SMP is unset, declare the _raw_* definitions as nops
diff --git a/include/linux/statfs.h b/include/linux/statfs.h
new file mode 100644
index 000000000000..ad83a2bdb821
--- /dev/null
+++ b/include/linux/statfs.h
@@ -0,0 +1,22 @@
+#ifndef _LINUX_STATFS_H
+#define _LINUX_STATFS_H
+
+#include <linux/types.h>
+
+#include <asm/statfs.h>
+
+struct kstatfs {
+ long f_type;
+ long f_bsize;
+ sector_t f_blocks;
+ sector_t f_bfree;
+ sector_t f_bavail;
+ sector_t f_files;
+ sector_t f_ffree;
+ __kernel_fsid_t f_fsid;
+ long f_namelen;
+ long f_frsize;
+ long f_spare[5];
+};
+
+#endif
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h
index 614200d60389..4bc3e22b5104 100644
--- a/include/linux/sysdev.h
+++ b/include/linux/sysdev.h
@@ -72,7 +72,6 @@ struct sys_device {
u32 id;
struct sysdev_class * cls;
struct kobject kobj;
- struct list_head entry;
};
extern int sys_device_register(struct sys_device *);
diff --git a/include/linux/time.h b/include/linux/time.h
index 12d0a89a4ee9..e739d8128253 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -130,7 +130,8 @@ static __inline__ unsigned long
timeval_to_jiffies(struct timeval *value)
{
unsigned long sec = value->tv_sec;
- long usec = value->tv_usec + TICK_USEC - 1;
+ long usec = value->tv_usec
+ + ((TICK_NSEC + 1000UL/2) / 1000UL) - 1;
if (sec >= MAX_SEC_IN_JIFFIES){
sec = MAX_SEC_IN_JIFFIES;
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 593cdf411500..2b1665d57ad0 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -176,7 +176,7 @@
#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
/* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */
-#define TICK_USEC ((TICK_NSEC + 1000UL/2) / 1000UL)
+#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)
/* TICK_USEC_TO_NSEC is the time between ticks in nsec assuming real ACTHZ and */
/* a value TUSEC for TICK_USEC (can be set bij adjtimex) */
diff --git a/include/linux/vfs.h b/include/linux/vfs.h
index b3a58657d766..e701d0541405 100644
--- a/include/linux/vfs.h
+++ b/include/linux/vfs.h
@@ -1,6 +1,6 @@
#ifndef _LINUX_VFS_H
#define _LINUX_VFS_H
-#include <asm/statfs.h>
+#include <linux/statfs.h>
#endif