diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-11-23 00:51:36 -0600 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-11-23 00:51:36 -0600 |
| commit | a0ba1862e1d82f696919e8852e47f00498e2c903 (patch) | |
| tree | 16b136537bc29e46db0edbcb1a38d2049d5391b4 /include/linux | |
| parent | 9a10f221ec3c60fddf05878238e72eb66c5d56eb (diff) | |
| parent | cebce9d8beb7493d5c82035db854a475f6a1ae66 (diff) | |
Merge tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5
into tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5.isdn
Diffstat (limited to 'include/linux')
38 files changed, 443 insertions, 416 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 698a9a3b5dbc..5d5eaeb07738 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -419,6 +419,12 @@ int acpi_pci_irq_init (void); #endif /*CONFIG_ACPI_PCI*/ +#ifdef CONFIG_ACPI_EC + +int ec_read(u8 addr, u8 *val); +int ec_write(u8 addr, u8 val); + +#endif /*CONFIG_ACPI_EC*/ #ifdef CONFIG_ACPI diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index f250d4da587c..ad1d8a935d21 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h @@ -61,6 +61,7 @@ enum chipset_type { VIA_APOLLO_PRO, VIA_APOLLO_KX133, VIA_APOLLO_KT133, + VIA_APOLLO_KT400, SIS_GENERIC, AMD_GENERIC, AMD_IRONGATE, diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 94c93c9c5f66..55218964e7ef 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -17,6 +17,8 @@ enum bdi_state { BDI_pdflush, /* A pdflush thread is working this device */ BDI_write_congested, /* The write queue is getting full */ BDI_read_congested, /* The read queue is getting full */ + BDI_write_active, /* There are one or more queued writes */ + BDI_read_active, /* There are one or more queued reads */ BDI_unused, /* Available bits start here */ }; @@ -42,4 +44,14 @@ static inline int bdi_write_congested(struct backing_dev_info *bdi) return test_bit(BDI_write_congested, &bdi->state); } +static inline int bdi_read_active(struct backing_dev_info *bdi) +{ + return test_bit(BDI_read_active, &bdi->state); +} + +static inline int bdi_write_active(struct backing_dev_info *bdi) +{ + return test_bit(BDI_write_active, &bdi->state); +} + #endif /* _LINUX_BACKING_DEV_H */ diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d9b416ebc966..6730edd230e0 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -321,6 +321,7 @@ extern int scsi_cmd_ioctl(struct block_device *, unsigned int, unsigned long); extern void blk_start_queue(request_queue_t *q); extern void blk_stop_queue(request_queue_t *q); extern void __blk_stop_queue(request_queue_t *q); +extern void __blk_run_queue(request_queue_t *q); static inline request_queue_t *bdev_get_queue(struct block_device *bdev) { diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 8587dd6f7146..4e7a9bbf99dd 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -190,6 +190,9 @@ sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); int generic_commit_write(struct file *, struct page *, unsigned, unsigned); int block_truncate_page(struct address_space *, loff_t, get_block_t *); int file_fsync(struct file *, struct dentry *, int); +int nobh_prepare_write(struct page*, unsigned, unsigned, get_block_t*); +int nobh_commit_write(struct file *, struct page *, unsigned, unsigned); +int nobh_truncate_page(struct address_space *, loff_t); #define OSYNC_METADATA (1<<0) #define OSYNC_DATA (1<<1) diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index defce1be68ce..0e3f73f7a73e 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h @@ -47,13 +47,13 @@ int venus_close(struct super_block *sb, struct ViceFid *fid, int flags, int venus_open(struct super_block *sb, struct ViceFid *fid, int flags, struct file **f); int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid, - const char *name, int length, - struct ViceFid *newfid, struct coda_vattr *attrs); + const char *name, int length, + struct ViceFid *newfid, struct coda_vattr *attrs); int venus_create(struct super_block *sb, struct ViceFid *dirfid, - const char *name, int length, int excl, int mode, int rdev, - struct ViceFid *newfid, struct coda_vattr *attrs) ; + const char *name, int length, int excl, int mode, dev_t rdev, + struct ViceFid *newfid, struct coda_vattr *attrs) ; int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid, - const char *name, int length); + const char *name, int length); int venus_remove(struct super_block *sb, struct ViceFid *dirfid, const char *name, int length); int venus_readlink(struct super_block *sb, struct ViceFid *fid, diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a5aa299cf92c..a8f8d2a31936 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -5,7 +5,7 @@ * (C) 2002 Dominik Brodowski <linux@brodo.de> * * - * $Id: cpufreq.h,v 1.27 2002/10/08 14:54:23 db Exp $ + * $Id: cpufreq.h,v 1.29 2002/11/11 15:35:47 db Exp $ * * 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 @@ -104,7 +104,7 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu * CPUFREQ DRIVER INTERFACE * *********************************************************************/ -typedef void (*cpufreq_policy_t) (struct cpufreq_policy *policy); +typedef int (*cpufreq_policy_t) (struct cpufreq_policy *policy); struct cpufreq_driver { /* needed by all drivers */ @@ -116,7 +116,7 @@ struct cpufreq_driver { #endif /* 2.4. compatible API */ #ifdef CONFIG_CPU_FREQ_24_API - unsigned int cpu_min_freq; + unsigned int cpu_min_freq[NR_CPUS]; unsigned int cpu_cur_freq[NR_CPUS]; #endif }; @@ -205,19 +205,19 @@ enum { CPU_NR_FREQ = 3, }; -#define CTL_CPU_VARS_SPEED_MAX { \ +#define CTL_CPU_VARS_SPEED_MAX(cpunr) { \ .ctl_name = CPU_NR_FREQ_MAX, \ - .data = &cpu_max_freq, \ + .data = &cpu_max_freq[cpunr], \ .procname = "speed-max", \ - .maxlen = sizeof(cpu_max_freq),\ + .maxlen = sizeof(cpu_max_freq[cpunr]),\ .mode = 0444, \ .proc_handler = proc_dointvec, } -#define CTL_CPU_VARS_SPEED_MIN { \ +#define CTL_CPU_VARS_SPEED_MIN(cpunr) { \ .ctl_name = CPU_NR_FREQ_MIN, \ - .data = &cpu_min_freq, \ + .data = &cpu_min_freq[cpunr], \ .procname = "speed-min", \ - .maxlen = sizeof(cpu_min_freq),\ + .maxlen = sizeof(cpu_min_freq[cpunr]),\ .mode = 0444, \ .proc_handler = proc_dointvec, } @@ -230,8 +230,8 @@ enum { .extra1 = (void*) (cpunr), } #define CTL_TABLE_CPU_VARS(cpunr) static ctl_table ctl_cpu_vars_##cpunr[] = {\ - CTL_CPU_VARS_SPEED_MAX, \ - CTL_CPU_VARS_SPEED_MIN, \ + CTL_CPU_VARS_SPEED_MAX(cpunr), \ + CTL_CPU_VARS_SPEED_MIN(cpunr), \ CTL_CPU_VARS_SPEED(cpunr), \ { .ctl_name = 0, }, } diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 7fab3c0435ac..960e54133e29 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -29,7 +29,7 @@ #define CRYPTO_ALG_TYPE_MASK 0x000000ff #define CRYPTO_ALG_TYPE_CIPHER 0x00000001 #define CRYPTO_ALG_TYPE_DIGEST 0x00000002 -#define CRYPTO_ALG_TYPE_COMP 0x00000004 +#define CRYPTO_ALG_TYPE_COMPRESS 0x00000004 /* @@ -144,6 +144,9 @@ struct digest_tfm { void (*dit_final)(struct crypto_tfm *tfm, u8 *out); void (*dit_digest)(struct crypto_tfm *tfm, struct scatterlist *sg, unsigned int nsg, u8 *out); +#ifdef CONFIG_CRYPTO_HMAC + void *dit_hmac_block; +#endif }; struct compress_tfm { @@ -196,12 +199,7 @@ static inline const char *crypto_tfm_alg_name(struct crypto_tfm *tfm) static inline const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm) { - struct crypto_alg *alg = tfm->__crt_alg; - - if (alg->cra_module) - return alg->cra_module->name; - else - return NULL; + return module_name(tfm->__crt_alg->cra_module); } static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) @@ -211,16 +209,19 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) static inline unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_min_keysize; } static inline unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_max_keysize; } static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_ivsize; } @@ -231,6 +232,7 @@ static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST); return tfm->__crt_alg->cra_digest.dia_digestsize; } @@ -304,13 +306,13 @@ static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm, static inline void crypto_comp_compress(struct crypto_tfm *tfm) { - BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP); + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS); tfm->crt_compress.cot_compress(tfm); } static inline void crypto_comp_decompress(struct crypto_tfm *tfm) { - BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP); + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS); tfm->crt_compress.cot_decompress(tfm); } diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 3a80e6e7beb7..535ca54d1d37 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -160,10 +160,15 @@ extern rwlock_t dparent_lock; * timeouts or autofs deletes). */ +static __inline__ void __d_drop(struct dentry * dentry) +{ + list_del_init(&dentry->d_hash); +} + static __inline__ void d_drop(struct dentry * dentry) { spin_lock(&dcache_lock); - list_del_init(&dentry->d_hash); + __d_drop(dentry); spin_unlock(&dcache_lock); } diff --git a/include/linux/device.h b/include/linux/device.h index 6ce7d11cc8f9..a88c4c7a3433 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -64,14 +64,10 @@ struct device_class; struct bus_type { char * name; - struct rw_semaphore rwsem; - atomic_t refcount; - u32 present; struct subsystem subsys; struct subsystem drvsubsys; struct subsystem devsubsys; - struct list_head node; struct list_head devices; struct list_head drivers; @@ -88,11 +84,6 @@ extern void bus_unregister(struct bus_type * bus); extern struct bus_type * get_bus(struct bus_type * bus); extern void put_bus(struct bus_type * bus); -extern int bus_for_each_dev(struct bus_type * bus, void * data, - int (*callback)(struct device * dev, void * data)); -extern int bus_for_each_drv(struct bus_type * bus, void * data, - int (*callback)(struct device_driver * drv, void * data)); - /* driverfs interface for exporting bus attributes */ @@ -117,10 +108,7 @@ struct device_driver { struct bus_type * bus; struct device_class * devclass; - rwlock_t lock; - atomic_t refcount; - u32 present; - + struct semaphore unload_sem; struct kobject kobj; struct list_head bus_list; struct list_head class_list; @@ -131,8 +119,6 @@ struct device_driver { void (*shutdown) (struct device * dev); int (*suspend) (struct device * dev, u32 state, u32 level); int (*resume) (struct device * dev, u32 level); - - void (*release) (struct device_driver * drv); }; @@ -141,10 +127,6 @@ extern void driver_unregister(struct device_driver * drv); extern struct device_driver * get_driver(struct device_driver * drv); extern void put_driver(struct device_driver * drv); -extern void remove_driver(struct device_driver * drv); - -extern int driver_for_each_dev(struct device_driver * drv, void * data, - int (*callback)(struct device * dev, void * data)); /* driverfs interface for exporting driver attributes */ @@ -171,19 +153,12 @@ extern void driver_remove_file(struct device_driver *, struct driver_attribute * */ struct device_class { char * name; - struct rw_semaphore rwsem; - - atomic_t refcount; - u32 present; - u32 devnum; struct subsystem subsys; struct subsystem devsubsys; struct subsystem drvsubsys; - struct list_head node; struct list_head drivers; - struct list_head intf_list; int (*add_device)(struct device *); void (*remove_device)(struct device *); @@ -233,7 +208,6 @@ struct device_interface { struct device_class * devclass; struct kobject kobj; - struct list_head node; struct list_head devices; u32 devnum; @@ -279,12 +253,6 @@ struct device { char name[DEVICE_NAME_SIZE]; /* descriptive ascii string */ char bus_id[BUS_ID_SIZE]; /* position on parent bus */ - spinlock_t lock; /* lock for the device to ensure two - different layers don't access it at - the same time. */ - atomic_t refcount; /* refcount to make sure the device - * persists for the right amount of time */ - struct bus_type * bus; /* type of bus device is on */ struct device_driver *driver; /* which driver has allocated this device */ @@ -296,7 +264,6 @@ struct device { void *platform_data; /* Platform specific data (e.g. ACPI, BIOS data relevant to device) */ - enum device_state state; u32 power_state; /* Current operating state. In ACPI-speak, this is D0-D3, D0 being fully functional, and D3 @@ -369,24 +336,6 @@ extern int (*platform_notify)(struct device * dev); extern int (*platform_notify_remove)(struct device * dev); -static inline int device_present(struct device * dev) -{ - return (dev && (dev->state == DEVICE_INITIALIZED || dev->state == DEVICE_REGISTERED)); -} - -/* device and bus locking helpers. - * - * FIXME: Is there anything else we need to do? - */ -static inline void lock_device(struct device * dev) -{ - spin_lock(&dev->lock); -} - -static inline void unlock_device(struct device * dev) -{ - spin_unlock(&dev->lock); -} /** * get_device - atomically increment the reference count for the device. @@ -438,9 +387,9 @@ extern void device_resume(u32 level); extern void device_shutdown(void); -/* drivrs/base/firmware.c */ +/* drivers/base/firmware.c */ extern int firmware_register(struct subsystem *); -extern void firmware_uregister(struct subsystem *); +extern void firmware_unregister(struct subsystem *); /* debugging and troubleshooting/diagnostic helpers. */ #ifdef DEBUG diff --git a/include/linux/elf.h b/include/linux/elf.h index 0fc8629ac459..fb984d1d55f4 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h @@ -200,6 +200,10 @@ typedef struct { #define ELF64_R_SYM(i) ((i) >> 32) #define ELF64_R_TYPE(i) ((i) & 0xffffffff) +#define R_ARM_NONE 0 +#define R_ARM_PC24 1 +#define R_ARM_ABS32 2 + #define R_386_NONE 0 #define R_386_32 1 #define R_386_PC32 2 @@ -413,6 +417,37 @@ typedef struct { /* Keep this the last entry. */ #define R_PPC_NUM 37 +/* s390 relocations defined by the ABIs */ +#define R_390_NONE 0 /* No reloc. */ +#define R_390_8 1 /* Direct 8 bit. */ +#define R_390_12 2 /* Direct 12 bit. */ +#define R_390_16 3 /* Direct 16 bit. */ +#define R_390_32 4 /* Direct 32 bit. */ +#define R_390_PC32 5 /* PC relative 32 bit. */ +#define R_390_GOT12 6 /* 12 bit GOT offset. */ +#define R_390_GOT32 7 /* 32 bit GOT offset. */ +#define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ +#define R_390_COPY 9 /* Copy symbol at runtime. */ +#define R_390_GLOB_DAT 10 /* Create GOT entry. */ +#define R_390_JMP_SLOT 11 /* Create PLT entry. */ +#define R_390_RELATIVE 12 /* Adjust by program base. */ +#define R_390_GOTOFF 13 /* 32 bit offset to GOT. */ +#define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ +#define R_390_GOT16 15 /* 16 bit GOT offset. */ +#define R_390_PC16 16 /* PC relative 16 bit. */ +#define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ +#define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ +#define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ +#define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ +#define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ +#define R_390_64 22 /* Direct 64 bit. */ +#define R_390_PC64 23 /* PC relative 64 bit. */ +#define R_390_GOT64 24 /* 64 bit GOT offset. */ +#define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ +#define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ +/* Keep this the last entry. */ +#define R_390_NUM 27 + /* Legal values for e_flags field of Elf64_Ehdr. */ #define EF_ALPHA_32BIT 1 /* All addresses are below 2GB */ diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 0d008cfb99a8..d701ba88c688 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h @@ -308,6 +308,7 @@ struct ext2_inode { #define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */ #define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */ #define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */ +#define EXT2_MOUNT_NOBH 0x0100 /* No buffer_heads */ #define EXT2_MOUNT_NO_UID32 0x0200 /* Disable 32-bit UIDs */ #define EXT2_MOUNT_XATTR_USER 0x4000 /* Extended user attributes */ #define EXT2_MOUNT_POSIX_ACL 0x8000 /* POSIX Access Control Lists */ diff --git a/include/linux/fs.h b/include/linux/fs.h index 400a5674083b..f39d21e5bcd9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -285,9 +285,6 @@ struct address_space_operations { /* Write back some dirty pages from this mapping. */ int (*writepages)(struct address_space *, struct writeback_control *); - /* Perform a writeback as a memory-freeing operation. */ - int (*vm_writeback)(struct page *, struct writeback_control *); - /* Set a page dirty */ int (*set_page_dirty)(struct page *page); @@ -362,7 +359,6 @@ struct inode { struct list_head i_dentry; unsigned long i_ino; atomic_t i_count; - dev_t i_dev; umode_t i_mode; unsigned int i_nlink; uid_t i_uid; @@ -578,7 +574,7 @@ extern int posix_lock_file(struct file *, struct file_lock *); extern void posix_block_lock(struct file_lock *, struct file_lock *); extern void posix_unblock_lock(struct file *, struct file_lock *); extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); -extern int __get_lease(struct inode *inode, unsigned int flags); +extern int __break_lease(struct inode *inode, unsigned int flags); extern void lease_get_mtime(struct inode *, struct timespec *time); extern int lock_may_read(struct inode *, loff_t start, unsigned long count); extern int lock_may_write(struct inode *, loff_t start, unsigned long count); @@ -773,7 +769,7 @@ struct inode_operations { int (*symlink) (struct inode *,struct dentry *,const char *); int (*mkdir) (struct inode *,struct dentry *,int); int (*rmdir) (struct inode *,struct dentry *); - int (*mknod) (struct inode *,struct dentry *,int,int); + int (*mknod) (struct inode *,struct dentry *,int,dev_t); int (*rename) (struct inode *, struct dentry *, struct inode *, struct dentry *); int (*readlink) (struct dentry *, char *,int); @@ -782,7 +778,7 @@ struct inode_operations { int (*permission) (struct inode *, int); int (*setattr) (struct dentry *, struct iattr *); int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); - int (*setxattr) (struct dentry *, const char *, void *, size_t, int); + int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); ssize_t (*listxattr) (struct dentry *, char *, size_t); int (*removexattr) (struct dentry *, const char *); @@ -1052,10 +1048,10 @@ static inline int locks_verify_truncate(struct inode *inode, return 0; } -static inline int get_lease(struct inode *inode, unsigned int mode) +static inline int break_lease(struct inode *inode, unsigned int mode) { - if (inode->i_flock && (inode->i_flock->fl_flags & FL_LEASE)) - return __get_lease(inode, mode); + if (inode->i_flock) + return __break_lease(inode, mode); return 0; } @@ -1089,6 +1085,8 @@ extern int blkdev_open(struct inode *, struct file *); extern int blkdev_close(struct inode *, struct file *); extern struct file_operations def_blk_fops; extern struct address_space_operations def_blk_aops; +extern struct file_operations def_chr_fops; +extern struct file_operations bad_sock_fops; extern struct file_operations def_fifo_fops; extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); @@ -1109,7 +1107,7 @@ extern inline const char *bdevname(struct block_device *bdev) } extern const char * cdevname(kdev_t); extern const char * kdevname(kdev_t); -extern void init_special_inode(struct inode *, umode_t, int); +extern void init_special_inode(struct inode *, umode_t, dev_t); /* Invalid inode operations -- fs/bad_inode.c */ extern void make_bad_inode(struct inode *); @@ -1255,9 +1253,6 @@ extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); extern int generic_file_open(struct inode * inode, struct file * filp); -extern int generic_vm_writeback(struct page *page, - struct writeback_control *wbc); - static inline void do_generic_file_read(struct file * filp, loff_t *ppos, read_descriptor_t * desc, read_actor_t actor) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 21023d2807e8..7a0681b9e880 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -3,11 +3,13 @@ #define _LINUX_INTERRUPT_H #include <linux/config.h> +#include <linux/linkage.h> #include <linux/bitops.h> #include <asm/atomic.h> #include <asm/hardirq.h> #include <asm/ptrace.h> #include <asm/softirq.h> +#include <asm/system.h> struct irqaction { void (*handler)(int, void *, struct pt_regs *); diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index 89ed92acf87a..958cab16d8a7 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h @@ -8,7 +8,7 @@ * For licensing information, see the file 'LICENCE' in the * jffs2 directory. * - * $Id: jffs2.h,v 1.24 2002/05/20 14:56:37 dwmw2 Exp $ + * $Id: jffs2.h,v 1.25 2002/08/20 21:37:27 dwmw2 Exp $ * */ @@ -68,30 +68,65 @@ compression type */ +/* These can go once we've made sure we've caught all uses without + byteswapping */ + +typedef struct { + uint32_t v32; +} __attribute__((packed)) jint32_t; + +typedef struct { + uint16_t v16; +} __attribute__((packed)) jint16_t; + +#define JFFS2_NATIVE_ENDIAN + +#if defined(JFFS2_NATIVE_ENDIAN) +#define cpu_to_je16(x) ((jint16_t){x}) +#define cpu_to_je32(x) ((jint32_t){x}) + +#define je16_to_cpu(x) ((x).v16) +#define je32_to_cpu(x) ((x).v32) +#elif defined(JFFS2_BIG_ENDIAN) +#define cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)}) +#define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) + +#define je16_to_cpu(x) (be16_to_cpu(x.v16)) +#define je32_to_cpu(x) (be32_to_cpu(x.v32)) +#elif defined(JFFS2_LITTLE_ENDIAN) +#define cpu_to_je16(x) ((jint16_t){cpu_to_le16(x)}) +#define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) + +#define je16_to_cpu(x) (le16_to_cpu(x.v16)) +#define je32_to_cpu(x) (le32_to_cpu(x.v32)) +#else +#error wibble +#endif + struct jffs2_unknown_node { /* All start like this */ - uint16_t magic; - uint16_t nodetype; - uint32_t totlen; /* So we can skip over nodes we don't grok */ - uint32_t hdr_crc; + jint16_t magic; + jint16_t nodetype; + jint32_t totlen; /* So we can skip over nodes we don't grok */ + jint32_t hdr_crc; } __attribute__((packed)); struct jffs2_raw_dirent { - uint16_t magic; - uint16_t nodetype; /* == JFFS_NODETYPE_DIRENT */ - uint32_t totlen; - uint32_t hdr_crc; - uint32_t pino; - uint32_t version; - uint32_t ino; /* == zero for unlink */ - uint32_t mctime; + jint16_t magic; + jint16_t nodetype; /* == JFFS_NODETYPE_DIRENT */ + jint32_t totlen; + jint32_t hdr_crc; + jint32_t pino; + jint32_t version; + jint32_t ino; /* == zero for unlink */ + jint32_t mctime; uint8_t nsize; uint8_t type; uint8_t unused[2]; - uint32_t node_crc; - uint32_t name_crc; + jint32_t node_crc; + jint32_t name_crc; uint8_t name[0]; } __attribute__((packed)); @@ -103,27 +138,27 @@ struct jffs2_raw_dirent */ struct jffs2_raw_inode { - uint16_t magic; /* A constant magic number. */ - uint16_t nodetype; /* == JFFS_NODETYPE_INODE */ - uint32_t totlen; /* Total length of this node (inc data, etc.) */ - uint32_t hdr_crc; - uint32_t ino; /* Inode number. */ - uint32_t version; /* Version number. */ - uint32_t mode; /* The file's type or mode. */ - uint16_t uid; /* The file's owner. */ - uint16_t gid; /* The file's group. */ - uint32_t isize; /* Total resultant size of this inode (used for truncations) */ - uint32_t atime; /* Last access time. */ - uint32_t mtime; /* Last modification time. */ - uint32_t ctime; /* Change time. */ - uint32_t offset; /* Where to begin to write. */ - uint32_t csize; /* (Compressed) data size */ - uint32_t dsize; /* Size of the node's data. (after decompression) */ + jint16_t magic; /* A constant magic number. */ + jint16_t nodetype; /* == JFFS_NODETYPE_INODE */ + jint32_t totlen; /* Total length of this node (inc data, etc.) */ + jint32_t hdr_crc; + jint32_t ino; /* Inode number. */ + jint32_t version; /* Version number. */ + jint32_t mode; /* The file's type or mode. */ + jint16_t uid; /* The file's owner. */ + jint16_t gid; /* The file's group. */ + jint32_t isize; /* Total resultant size of this inode (used for truncations) */ + jint32_t atime; /* Last access time. */ + jint32_t mtime; /* Last modification time. */ + jint32_t ctime; /* Change time. */ + jint32_t offset; /* Where to begin to write. */ + jint32_t csize; /* (Compressed) data size */ + jint32_t dsize; /* Size of the node's data. (after decompression) */ uint8_t compr; /* Compression algorithm used */ uint8_t usercompr; /* Compression algorithm requested by the user */ - uint16_t flags; /* See JFFS2_INO_FLAG_* */ - uint32_t data_crc; /* CRC for the (compressed) data. */ - uint32_t node_crc; /* CRC for the raw inode (excluding data) */ + jint16_t flags; /* See JFFS2_INO_FLAG_* */ + jint32_t data_crc; /* CRC for the (compressed) data. */ + jint32_t node_crc; /* CRC for the raw inode (excluding data) */ // uint8_t data[dsize]; } __attribute__((packed)); diff --git a/include/linux/jffs2_fs_i.h b/include/linux/jffs2_fs_i.h index 03530b6065d9..db91aa6c0322 100644 --- a/include/linux/jffs2_fs_i.h +++ b/include/linux/jffs2_fs_i.h @@ -1,9 +1,10 @@ -/* $Id: jffs2_fs_i.h,v 1.12 2002/03/06 13:59:21 dwmw2 Exp $ */ +/* $Id: jffs2_fs_i.h,v 1.15 2002/11/12 09:42:49 dwmw2 Exp $ */ #ifndef _JFFS2_FS_I #define _JFFS2_FS_I #include <linux/version.h> +#include <linux/rbtree.h> struct jffs2_inode_info { /* We need an internal semaphore similar to inode->i_sem. @@ -18,7 +19,7 @@ struct jffs2_inode_info { uint32_t highest_version; /* List of data fragments which make up the file */ - struct jffs2_node_frag *fraglist; + struct rb_root fragtree; /* There may be one datanode which isn't referenced by any of the above fragments, if it contains a metadata update but no actual diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h index 611aa1b5b129..7cfabbd614cb 100644 --- a/include/linux/jffs2_fs_sb.h +++ b/include/linux/jffs2_fs_sb.h @@ -1,4 +1,4 @@ -/* $Id: jffs2_fs_sb.h,v 1.32 2002/07/23 14:35:34 dwmw2 Exp $ */ +/* $Id: jffs2_fs_sb.h,v 1.35 2002/11/12 09:42:18 dwmw2 Exp $ */ #ifndef _JFFS2_FS_SB #define _JFFS2_FS_SB @@ -21,6 +21,8 @@ struct jffs2_sb_info { struct mtd_info *mtd; uint32_t highest_ino; + uint32_t checked_ino; + unsigned int flags; struct task_struct *gc_task; /* GC task struct */ @@ -38,10 +40,12 @@ struct jffs2_sb_info { uint32_t flash_size; uint32_t used_size; uint32_t dirty_size; + uint32_t wasted_size; uint32_t free_size; uint32_t erasing_size; uint32_t bad_size; uint32_t sector_size; + uint32_t unchecked_size; uint32_t nr_free_blocks; uint32_t nr_erasing_blocks; diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 52226e6e158a..dcba85045308 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -1,163 +1,47 @@ -/* kallsyms headers - Copyright 2000 Keith Owens <kaos@ocs.com.au> - - This file is part of the Linux modutils. It is exported to kernel - space so debuggers can access the kallsyms data. - - The kallsyms data contains all the non-stack symbols from a kernel - or a module. The kernel symbols are held between __start___kallsyms - and __stop___kallsyms. The symbols for a module are accessed via - the struct module chain which is based at module_list. - - 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. - - 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. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/* Rewritten and vastly simplified by Rusty Russell for in-kernel + * module loader: + * Copyright 2002 Rusty Russell <rusty@rustcorp.com.au> IBM Corporation */ +#ifndef _LINUX_KALLSYMS_H +#define _LINUX_KALLSYMS_H -#ident "$Id: linux-2.4.9-kallsyms.patch,v 1.8 2002/02/11 18:34:53 arjanv Exp $" - -#ifndef MODUTILS_KALLSYMS_H -#define MODUTILS_KALLSYMS_H 1 - -/* Have to (re)define these ElfW entries here because external kallsyms - * code does not have access to modutils/include/obj.h. This code is - * included from user spaces tools (modutils) and kernel, they need - * different includes. - */ - -#ifndef ELFCLASS32 -#ifdef __KERNEL__ -#include <linux/elf.h> -#else /* __KERNEL__ */ -#include <elf.h> -#endif /* __KERNEL__ */ -#endif /* ELFCLASS32 */ - -#ifndef ELFCLASSM -#define ELFCLASSM ELF_CLASS -#endif - -#ifndef ElfW -# if ELFCLASSM == ELFCLASS32 -# define ElfW(x) Elf32_ ## x -# define ELFW(x) ELF32_ ## x -# else -# define ElfW(x) Elf64_ ## x -# define ELFW(x) ELF64_ ## x -# endif -#endif - -/* Format of data in the kallsyms section. - * Most of the fields are small numbers but the total size and all - * offsets can be large so use the 32/64 bit types for these fields. - * - * Do not use sizeof() on these structures, modutils may be using extra - * fields. Instead use the size fields in the header to access the - * other bits of data. - */ - -struct kallsyms_header { - int size; /* Size of this header */ - ElfW(Word) total_size; /* Total size of kallsyms data */ - int sections; /* Number of section entries */ - ElfW(Off) section_off; /* Offset to first section entry */ - int section_size; /* Size of one section entry */ - int symbols; /* Number of symbol entries */ - ElfW(Off) symbol_off; /* Offset to first symbol entry */ - int symbol_size; /* Size of one symbol entry */ - ElfW(Off) string_off; /* Offset to first string */ - ElfW(Addr) start; /* Start address of first section */ - ElfW(Addr) end; /* End address of last section */ -}; - -struct kallsyms_section { - ElfW(Addr) start; /* Start address of section */ - ElfW(Word) size; /* Size of this section */ - ElfW(Off) name_off; /* Offset to section name */ - ElfW(Word) flags; /* Flags from section */ -}; - -struct kallsyms_symbol { - ElfW(Off) section_off; /* Offset to section that owns this symbol */ - ElfW(Addr) symbol_addr; /* Address of symbol */ - ElfW(Off) name_off; /* Offset to symbol name */ -}; - -#define KALLSYMS_SEC_NAME "__kallsyms" -#define KALLSYMS_IDX 2 /* obj_kallsyms creates kallsyms as section 2 */ - -#define kallsyms_next_sec(h,s) \ - ((s) = (struct kallsyms_section *)((char *)(s) + (h)->section_size)) -#define kallsyms_next_sym(h,s) \ - ((s) = (struct kallsyms_symbol *)((char *)(s) + (h)->symbol_size)) +#include <linux/config.h> #ifdef CONFIG_KALLSYMS +/* Lookup an address. modname is set to NULL if it's in the kernel. */ +const char *kallsyms_lookup(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset, + char **modname); -int kallsyms_symbol_to_address( - const char *name, /* Name to lookup */ - unsigned long *token, /* Which module to start with */ - const char **mod_name, /* Set to module name or "kernel" */ - unsigned long *mod_start, /* Set to start address of module */ - unsigned long *mod_end, /* Set to end address of module */ - const char **sec_name, /* Set to section name */ - unsigned long *sec_start, /* Set to start address of section */ - unsigned long *sec_end, /* Set to end address of section */ - const char **sym_name, /* Set to full symbol name */ - unsigned long *sym_start, /* Set to start address of symbol */ - unsigned long *sym_end /* Set to end address of symbol */ - ); +/* Replace "%s" in format with address, if found */ +extern void __print_symbol(const char *fmt, unsigned long address); -int kallsyms_address_to_symbol( - unsigned long address, /* Address to lookup */ - const char **mod_name, /* Set to module name */ - unsigned long *mod_start, /* Set to start address of module */ - unsigned long *mod_end, /* Set to end address of module */ - const char **sec_name, /* Set to section name */ - unsigned long *sec_start, /* Set to start address of section */ - unsigned long *sec_end, /* Set to end address of section */ - const char **sym_name, /* Set to full symbol name */ - unsigned long *sym_start, /* Set to start address of symbol */ - unsigned long *sym_end /* Set to end address of symbol */ - ); +#else /* !CONFIG_KALLSYMS */ -int kallsyms_sections(void *token, - int (*callback)(void *, /* token */ - const char *, /* module name */ - const char *, /* section name */ - ElfW(Addr), /* Section start */ - ElfW(Addr), /* Section end */ - ElfW(Word) /* Section flags */ - ) - ); +static inline const char *kallsyms_lookup(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset, + char **modname) +{ + return NULL; +} -#else +/* Stupid that this does nothing, but I didn't create this mess. */ +#define __print_symbol(fmt, addr) +#endif /*CONFIG_KALLSYMS*/ -static inline int kallsyms_address_to_symbol( - unsigned long address, /* Address to lookup */ - const char **mod_name, /* Set to module name */ - unsigned long *mod_start, /* Set to start address of module */ - unsigned long *mod_end, /* Set to end address of module */ - const char **sec_name, /* Set to section name */ - unsigned long *sec_start, /* Set to start address of section */ - unsigned long *sec_end, /* Set to end address of section */ - const char **sym_name, /* Set to full symbol name */ - unsigned long *sym_start, /* Set to start address of symbol */ - unsigned long *sym_end /* Set to end address of symbol */ - ) +/* This macro allows us to keep printk typechecking */ +static void __check_printsym_format(const char *fmt, ...) +__attribute__((format(printf,1,2))); +static inline void __check_printsym_format(const char *fmt, ...) { - return -ESRCH; } -#endif +#define print_symbol(fmt, addr) \ +do { \ + __check_printsym_format(fmt, ""); \ + __print_symbol(fmt, addr); \ +} while(0) -#endif /* kallsyms.h */ +#endif /*_LINUX_KALLSYMS_H*/ diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 40de16d0a227..7b3157a78f7e 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -24,6 +24,10 @@ struct kobject { }; extern void kobject_init(struct kobject *); +extern void kobject_cleanup(struct kobject *); + +extern int kobject_add(struct kobject *); +extern void kobject_del(struct kobject *); extern int kobject_register(struct kobject *); extern void kobject_unregister(struct kobject *); diff --git a/include/linux/meye.h b/include/linux/meye.h index b6146960823a..367cfeb69528 100644 --- a/include/linux/meye.h +++ b/include/linux/meye.h @@ -1,7 +1,9 @@ /* * Motion Eye video4linux driver for Sony Vaio PictureBook * - * Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve + * Copyright (C) 2001-2002 Stelian Pop <stelian@popies.net> + * + * Copyright (C) 2001-2002 Alcôve <www.alcove.com> * * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> * diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 3e004bc2ff63..f286bf9aeefd 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -84,6 +84,8 @@ struct zone { atomic_t refill_counter; unsigned long nr_active; unsigned long nr_inactive; + int all_unreclaimable; /* All pages pinned */ + unsigned long pages_scanned; /* since last reclaim */ ZONE_PADDING(_pad2_) @@ -203,6 +205,7 @@ memclass(struct zone *pgzone, struct zone *classzone) void get_zone_counts(unsigned long *active, unsigned long *inactive); void build_all_zonelists(void); +void wakeup_kswapd(struct zone *zone); /** * for_each_pgdat - helper macro to iterate over all nodes diff --git a/include/linux/module.h b/include/linux/module.h index ff026ad568d1..927341a26c0e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -14,6 +14,8 @@ #include <linux/compiler.h> #include <linux/cache.h> #include <linux/kmod.h> +#include <linux/elf.h> + #include <asm/module.h> #include <asm/uaccess.h> /* For struct exception_table_entry */ @@ -26,10 +28,7 @@ #define MODULE_AUTHOR(name) #define MODULE_DESCRIPTION(desc) #define MODULE_SUPPORTED_DEVICE(name) -#define MODULE_GENERIC_TABLE(gtype,name) -#define MODULE_DEVICE_TABLE(type,name) #define MODULE_PARM_DESC(var,desc) -#define print_symbol(format, addr) #define print_modules() #define MODULE_NAME_LEN (64 - sizeof(unsigned long)) @@ -40,28 +39,27 @@ struct kernel_symbol }; #ifdef MODULE + +#define MODULE_GENERIC_TABLE(gtype,name) \ +static const unsigned long __module_##gtype##_size \ + __attribute__ ((unused)) = sizeof(struct gtype##_id); \ +static const struct gtype##_id * __module_##gtype##_table \ + __attribute__ ((unused)) = name + /* This is magically filled in by the linker, but THIS_MODULE must be a constant so it works in initializers. */ extern struct module __this_module; #define THIS_MODULE (&__this_module) -#else -#define THIS_MODULE ((struct module *)0) -#endif -#ifdef CONFIG_MODULES -/* Get/put a kernel symbol (calls must be symmetric) */ -void *__symbol_get(const char *symbol); -void *__symbol_get_gpl(const char *symbol); -#define symbol_get(x) ((typeof(&x))(__symbol_get(#x))) +#else /* !MODULE */ -/* For every exported symbol, place a struct in the __ksymtab section */ -#define EXPORT_SYMBOL(sym) \ - const struct kernel_symbol __ksymtab_##sym \ - __attribute__((section("__ksymtab"))) \ - = { (unsigned long)&sym, #sym } +#define MODULE_GENERIC_TABLE(gtype,name) +#define THIS_MODULE ((struct module *)0) -#define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym) -#define EXPORT_SYMBOL_GPL(sym) EXPORT_SYMBOL(sym) +#endif + +#define MODULE_DEVICE_TABLE(type,name) \ + MODULE_GENERIC_TABLE(type##_device,name) struct kernel_symbol_group { @@ -83,6 +81,22 @@ struct exception_table const struct exception_table_entry *entry; }; + +#ifdef CONFIG_MODULES +/* Get/put a kernel symbol (calls must be symmetric) */ +void *__symbol_get(const char *symbol); +void *__symbol_get_gpl(const char *symbol); +#define symbol_get(x) ((typeof(&x))(__symbol_get(#x))) + +/* For every exported symbol, place a struct in the __ksymtab section */ +#define EXPORT_SYMBOL(sym) \ + const struct kernel_symbol __ksymtab_##sym \ + __attribute__((section("__ksymtab"))) \ + = { (unsigned long)&sym, #sym } + +#define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym) +#define EXPORT_SYMBOL_GPL(sym) EXPORT_SYMBOL(sym) + struct module_ref { atomic_t count; @@ -137,6 +151,13 @@ struct module void (*exit)(void); #endif +#ifdef CONFIG_KALLSYMS + /* We keep the symbol and string tables for kallsyms. */ + Elf_Sym *symtab; + unsigned long num_syms; + char *strtab; +#endif + /* The command line arguments (may be mangled). People like keeping pointers to this stuff */ char args[0]; @@ -211,6 +232,12 @@ do { \ } \ } while(0) +/* For kallsyms to ask for address resolution. NULL means not found. */ +const char *module_address_lookup(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset, + char **modname); + #else /* !CONFIG_MODULES... */ #define EXPORT_SYMBOL(sym) #define EXPORT_SYMBOL_GPL(sym) @@ -227,6 +254,15 @@ do { \ #define module_name(mod) "kernel" #define __unsafe(mod) + +/* For kallsyms to ask for address resolution. NULL means not found. */ +static inline const char *module_address_lookup(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset, + char **modname) +{ + return NULL; +} #endif /* CONFIG_MODULES */ /* For archs to search exception tables */ @@ -279,6 +315,14 @@ extern int module_dummy_usage; #define cleanup_module(voidarg) __exitfn(void) #endif +/* + * The exception and symbol tables, and the lock + * to protect them. + */ +extern spinlock_t modlist_lock; +extern struct list_head extables; +extern struct list_head symbols; + /* Use symbol_get and symbol_put instead. You'll thank me. */ #define HAVE_INTER_MODULE extern void inter_module_register(const char *, struct module *, const void *); diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index b9063ac5a2c5..0f07bda8a7cf 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h @@ -6,7 +6,9 @@ #include <linux/config.h> #include <linux/netfilter.h> +#if defined(__KERNEL__) && defined(CONFIG_NETFILTER) #include <asm/atomic.h> +#endif /* Bridge Hooks */ /* After promisc drops, checksum checks. */ @@ -23,6 +25,8 @@ #define NF_BR_BROUTING 5 #define NF_BR_NUMHOOKS 6 +#ifdef __KERNEL__ + #define BRNF_PKT_TYPE 0x01 #define BRNF_BRIDGED_DNAT 0x02 #define BRNF_DONT_TAKE_PARENT 0x04 @@ -38,6 +42,7 @@ enum nf_br_hook_priorities { NF_BR_PRI_LAST = INT_MAX, }; +#ifdef CONFIG_NETFILTER static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb) { @@ -57,5 +62,7 @@ struct bridge_skb_cb { __u32 ipv4; } daddr; }; +#endif /* CONFIG_NETFILTER */ +#endif /* __KERNEL__ */ #endif diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 6a0e792fb795..69346c394563 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -110,8 +110,8 @@ extern int init_netlink(void); extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len)); extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); -extern void netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, - __u32 group, int allocation); +extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, + __u32 group, int allocation); extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); extern int netlink_register_notifier(struct notifier_block *nb); extern int netlink_unregister_notifier(struct notifier_block *nb); diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index d6f510d638d0..8d15e17c0b94 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -118,8 +118,8 @@ struct nfs_inode { * mtime != read_cache_mtime */ unsigned long read_cache_jiffies; - __u64 read_cache_ctime; - __u64 read_cache_mtime; + struct timespec read_cache_ctime; + struct timespec read_cache_mtime; __u64 read_cache_isize; unsigned long attrtimeo; unsigned long attrtimeo_timestamp; @@ -416,20 +416,6 @@ nfs_fileid_to_ino_t(u64 fileid) return ino; } -static inline time_t -nfs_time_to_secs(__u64 time) -{ - return (time_t)(time >> 32); -} - - -static inline u32 -nfs_time_to_nsecs(__u64 time) -{ - return time & 0xffffffff; -} - - /* NFS root */ extern void * nfs_root_data(void); diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 4bb5125056e7..970ffa785f78 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -6,8 +6,8 @@ struct nfs_fattr { unsigned short valid; /* which fields are valid */ __u64 pre_size; /* pre_op_attr.size */ - __u64 pre_mtime; /* pre_op_attr.mtime */ - __u64 pre_ctime; /* pre_op_attr.ctime */ + struct timespec pre_mtime; /* pre_op_attr.mtime */ + struct timespec pre_ctime; /* pre_op_attr.ctime */ enum nfs_ftype type; /* always use NFSv2 types */ __u32 mode; __u32 nlink; @@ -32,9 +32,9 @@ struct nfs_fattr { } nfs4; } fsid_u; __u64 fileid; - __u64 atime; - __u64 mtime; - __u64 ctime; + struct timespec atime; + struct timespec mtime; + struct timespec ctime; __u64 change_attr; /* NFSv4 change attribute */ __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ unsigned long timestamp; @@ -219,7 +219,7 @@ struct nfs3_sattrargs { struct nfs_fh * fh; struct iattr * sattr; unsigned int guard; - __u64 guardtime; + struct timespec guardtime; }; struct nfs3_diropargs { @@ -398,6 +398,7 @@ struct nfs4_lookup { }; struct nfs4_open { + struct nfs4_client * op_client_state; /* request */ u32 op_share_access; /* request */ u32 op_opentype; /* request */ u32 op_createmode; /* request */ @@ -472,6 +473,7 @@ struct nfs4_setclientid { char sc_netid[4]; /* request */ char sc_uaddr[24]; /* request */ u32 sc_cb_ident; /* request */ + struct nfs4_client * sc_state; /* response */ }; struct nfs4_write { @@ -504,8 +506,10 @@ struct nfs4_op { struct nfs4_readlink readlink; struct nfs4_remove remove; struct nfs4_rename rename; + struct nfs4_client * renew; struct nfs4_setattr setattr; struct nfs4_setclientid setclientid; + struct nfs4_client * setclientid_confirm; struct nfs4_write write; } u; }; diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 4238cb04ad90..8359679908ab 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h @@ -173,6 +173,9 @@ struct nfsd4_read { stateid_t rd_stateid; /* request */ u64 rd_offset; /* request */ u32 rd_length; /* request */ + struct iovec rd_iov[RPCSVC_MAXPAGES]; + int rd_vlen; + struct svc_rqst *rd_rqstp; /* response */ struct svc_fh * rd_fhp; /* response */ }; @@ -249,7 +252,9 @@ struct nfsd4_write { u64 wr_offset; /* request */ u32 wr_stable_how; /* request */ u32 wr_buflen; /* request */ - char * wr_buf; /* request */ + struct iovec wr_vec[RPCSVC_MAXPAGES]; /* request */ + int wr_vlen; + u32 wr_bytes_written; /* response */ u32 wr_how_written; /* response */ nfs4_verifier wr_verifier; /* response */ @@ -288,6 +293,14 @@ struct nfsd4_compoundargs { /* scratch variables for XDR decode */ u32 * p; u32 * end; + struct page ** pagelist; + int pagelen; + u32 tmp[8]; + u32 * tmpp; + struct tmpbuf { + struct tmpbuf *next; + void *buf; + } *to_free; u32 taglen; char * tag; @@ -301,6 +314,8 @@ struct nfsd4_compoundres { /* scratch variables for XDR encode */ u32 * p; u32 * end; + struct xdr_buf * xbuf; + struct svc_rqst * rqstp; u32 taglen; char * tag; diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 44480d80952f..f02449871c07 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -70,6 +70,7 @@ #define PG_chainlock 15 /* lock bit for ->pte_chain */ #define PG_direct 16 /* ->pte_chain points directly at pte */ +#define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ /* * Global page accounting. One instance per CPU. Only unsigned longs are @@ -233,6 +234,10 @@ extern void get_full_page_state(struct page_state *ret); #define ClearPageDirect(page) clear_bit(PG_direct, &(page)->flags) #define TestClearPageDirect(page) test_and_clear_bit(PG_direct, &(page)->flags) +#define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) +#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) +#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(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/pagevec.h b/include/linux/pagevec.h index dbfa3ab99699..2a332eed3d82 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h @@ -21,7 +21,6 @@ void __pagevec_release_nonlru(struct pagevec *pvec); void __pagevec_free(struct pagevec *pvec); void __pagevec_lru_add(struct pagevec *pvec); void __pagevec_lru_add_active(struct pagevec *pvec); -void pagevec_deactivate_inactive(struct pagevec *pvec); void pagevec_strip(struct pagevec *pvec); unsigned int pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, pgoff_t start, unsigned int nr_pages); diff --git a/include/linux/pci.h b/include/linux/pci.h index 7206acd7870b..30c4a9dbc855 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -517,21 +517,6 @@ void pcibios_update_resource(struct pci_dev *, struct resource *, void pcibios_update_irq(struct pci_dev *, int irq); void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *); -/* Backward compatibility, don't use in new code! */ - -int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned char *val); -int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned short *val); -int pcibios_read_config_dword (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned int *val); -int pcibios_write_config_byte (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned char val); -int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned short val); -int pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned int val); - /* Generic PCI functions used internally */ int pci_bus_exists(const struct list_head *list, int nr); @@ -616,8 +601,8 @@ int pci_enable_wake(struct pci_dev *dev, u32 state, int enable); /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ -void pbus_assign_resources(struct pci_bus *bus); -void pbus_size_bridges(struct pci_bus *bus); +void pci_bus_assign_resources(struct pci_bus *bus); +void pci_bus_size_bridges(struct pci_bus *bus); int pci_claim_resource(struct pci_dev *, int); void pci_assign_unassigned_resources(void); void pdev_enable_device(struct pci_dev *); @@ -668,8 +653,6 @@ extern struct pci_dev *isa_bridge; static inline int pci_present(void) { return 0; } #define _PCI_NOP(o,s,t) \ - static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \ - { return PCIBIOS_FUNC_NOT_SUPPORTED; } \ static inline int pci_##o##_config_##s (struct pci_dev *dev, int where, t val) \ { return PCIBIOS_FUNC_NOT_SUPPORTED; } #define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \ diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 44c84141a6b4..f8890c70fa89 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1018,6 +1018,7 @@ #define PCI_DEVICE_ID_VIA_8361 0x3112 #define PCI_DEVICE_ID_VIA_8233A 0x3147 #define PCI_DEVICE_ID_VIA_8235 0x3177 +#define PCI_DEVICE_ID_VIA_8377_0 0x3189 #define PCI_DEVICE_ID_VIA_86C100A 0x6100 #define PCI_DEVICE_ID_VIA_8231 0x8231 #define PCI_DEVICE_ID_VIA_8231_4 0x8235 diff --git a/include/linux/sched.h b/include/linux/sched.h index 9c9717dd1cc1..facb0f80d0a8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -46,10 +46,11 @@ struct exec_domain; #define CLONE_NEWNS 0x00020000 /* New namespace group? */ #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ -#define CLONE_SETTID 0x00100000 /* write the TID back to userspace */ -#define CLONE_CLEARTID 0x00200000 /* clear the userspace TID */ -#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */ -#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ +#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ +#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ +#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */ +#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ +#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ /* * List of flags we want to share for kernel threads, @@ -149,7 +150,7 @@ extern void show_stack(unsigned long *stack); extern void show_regs(struct pt_regs *); void io_schedule(void); -void io_schedule_timeout(long timeout); +long io_schedule_timeout(long timeout); extern void cpu_init (void); extern void trap_init(void); @@ -332,7 +333,8 @@ struct task_struct { wait_queue_head_t wait_chldexit; /* for wait4() */ struct completion *vfork_done; /* for vfork() */ - int *user_tid; /* for CLONE_CLEARTID */ + int *set_child_tid; /* CLONE_CHILD_SETTID */ + int *clear_child_tid; /* CLONE_CHILD_CLEARTID */ unsigned long rt_priority; unsigned long it_real_value, it_prof_value, it_virt_value; @@ -524,36 +526,6 @@ 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); -/* - * Re-calculate pending state from the set of locally pending - * signals, globally pending signals, and blocked signals. - */ -static inline int has_pending_signals(sigset_t *signal, sigset_t *blocked) -{ - unsigned long ready; - long i; - - switch (_NSIG_WORDS) { - default: - for (i = _NSIG_WORDS, ready = 0; --i >= 0 ;) - ready |= signal->sig[i] &~ blocked->sig[i]; - break; - - case 4: ready = signal->sig[3] &~ blocked->sig[3]; - ready |= signal->sig[2] &~ blocked->sig[2]; - ready |= signal->sig[1] &~ blocked->sig[1]; - ready |= signal->sig[0] &~ blocked->sig[0]; - break; - - case 2: ready = signal->sig[1] &~ blocked->sig[1]; - ready |= signal->sig[0] &~ blocked->sig[0]; - break; - - case 1: ready = signal->sig[0] &~ blocked->sig[0]; - } - return ready != 0; -} - /* True if we are on the alternate signal stack. */ static inline int on_sig_stack(unsigned long sp) @@ -615,7 +587,7 @@ extern void daemonize(void); extern task_t *child_reaper; extern int do_execve(char *, char **, char **, struct pt_regs *); -extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *); +extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *); #ifdef CONFIG_SMP extern void wait_task_inactive(task_t * p); @@ -639,30 +611,6 @@ extern void kick_if_running(task_t * p); add_parent(p, (p)->parent); \ } while (0) -static inline struct task_struct *eldest_child(struct task_struct *p) -{ - if (list_empty(&p->children)) return NULL; - return list_entry(p->children.next,struct task_struct,sibling); -} - -static inline struct task_struct *youngest_child(struct task_struct *p) -{ - if (list_empty(&p->children)) return NULL; - return list_entry(p->children.prev,struct task_struct,sibling); -} - -static inline struct task_struct *older_sibling(struct task_struct *p) -{ - if (p->sibling.prev==&p->parent->children) return NULL; - return list_entry(p->sibling.prev,struct task_struct,sibling); -} - -static inline struct task_struct *younger_sibling(struct task_struct *p) -{ - if (p->sibling.next==&p->parent->children) return NULL; - return list_entry(p->sibling.next,struct task_struct,sibling); -} - #define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks) #define prev_task(p) list_entry((p)->tasks.prev, struct task_struct, tasks) diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 8828b98b3029..7581d3fd846d 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h @@ -1,7 +1,9 @@ /* * Sony Programmable I/O Control Device driver for VAIO * - * Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve + * Copyright (C) 2001-2002 Stelian Pop <stelian@popies.net> + * + * Copyright (C) 2001-2002 Alcôve <www.alcove.com> * * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> * @@ -85,6 +87,10 @@ #define SONYPI_EVENT_JOGDIAL_VFAST_UP 47 #define SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED 48 #define SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED 49 +#define SONYPI_EVENT_ZOOM_PRESSED 50 +#define SONYPI_EVENT_THUMBPHRASE_PRESSED 51 +#define SONYPI_EVENT_MEYE_FACE 52 +#define SONYPI_EVENT_MEYE_OPPOSITE 53 /* get/set brightness */ #define SONYPI_IOCGBRT _IOR('v', 0, __u8) diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 0233988f40b4..74c5260b2343 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -155,6 +155,93 @@ typedef size_t (*skb_read_actor_t)(skb_reader_t *desc, void *to, size_t len); extern void xdr_partial_copy_from_skb(struct xdr_buf *, unsigned int, skb_reader_t *, skb_read_actor_t); +/* + * Provide some simple tools for XDR buffer overflow-checking etc. + */ +struct xdr_stream { + uint32_t *p; /* start of available buffer */ + struct xdr_buf *buf; /* XDR buffer to read/write */ + + uint32_t *end; /* end of available buffer space */ + struct iovec *iov; /* pointer to the current iovec */ +}; + +/* + * Initialize an xdr_stream for encoding data. + * + * Note: at the moment the RPC client only passes the length of our + * scratch buffer in the xdr_buf's header iovec. Previously this + * meant we needed to call xdr_adjust_iovec() after encoding the + * data. With the new scheme, the xdr_stream manages the details + * of the buffer length, and takes care of adjusting the iovec + * length for us. + */ +static inline void +xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) +{ + struct iovec *iov = buf->head; + + xdr->buf = buf; + xdr->iov = iov; + xdr->end = (uint32_t *)((char *)iov->iov_base + iov->iov_len); + buf->len = iov->iov_len = (char *)p - (char *)iov->iov_base; + xdr->p = p; +} + +/* + * Check that we have enough buffer space to encode 'nbytes' more + * bytes of data. If so, update the total xdr_buf length, and + * adjust the length of the current iovec. + */ +static inline uint32_t * +xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes) +{ + uint32_t *p = xdr->p; + uint32_t *q; + + /* align nbytes on the next 32-bit boundary */ + nbytes += 3; + nbytes &= ~3; + q = p + (nbytes >> 2); + if (unlikely(q > xdr->end || q < p)) + return NULL; + xdr->p = q; + xdr->iov->iov_len += nbytes; + xdr->buf->len += nbytes; + return p; +} + +/* + * Initialize an xdr_stream for decoding data. + */ +static inline void +xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) +{ + struct iovec *iov = buf->head; + xdr->buf = buf; + xdr->iov = iov; + xdr->p = p; + xdr->end = (uint32_t *)((char *)iov->iov_base + iov->iov_len); +} + +/* + * Check if the input buffer is long enough to enable us to decode + * 'nbytes' more bytes of data starting at the current position. + * If so return the current pointer, then update the current + * position. + */ +static inline uint32_t * +xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) +{ + uint32_t *p = xdr->p; + uint32_t *q = p + XDR_QUADLEN(nbytes); + + if (unlikely(q > xdr->end || q < p)) + return NULL; + xdr->p = q; + return p; +} + #endif /* __KERNEL__ */ #endif /* _SUNRPC_XDR_H_ */ diff --git a/include/linux/udf_fs_i.h b/include/linux/udf_fs_i.h index f297d528aded..186a5a47b50b 100644 --- a/include/linux/udf_fs_i.h +++ b/include/linux/udf_fs_i.h @@ -43,10 +43,7 @@ typedef struct struct udf_inode_info { - long i_umtime; - long i_uctime; - long i_crtime; - long i_ucrtime; + struct timespec i_crtime; /* Physical address of inode */ lb_addr i_location; __u64 i_unique; diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h index e898136bf947..b73cebba5551 100644 --- a/include/linux/udf_fs_sb.h +++ b/include/linux/udf_fs_sb.h @@ -97,7 +97,7 @@ struct udf_sb_info uid_t s_uid; /* Root Info */ - time_t s_recordtime; + struct timespec s_recordtime; /* Fileset Info */ __u16 s_serialnum; diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p index 99e6eefa8229..7034b7eb6b16 100644 --- a/include/linux/umsdos_fs.p +++ b/include/linux/umsdos_fs.p @@ -82,7 +82,7 @@ int UMSDOS_mkdir (struct inode *dir, int UMSDOS_mknod (struct inode *dir, struct dentry *dentry, int mode, - int rdev); + dev_t rdev); int UMSDOS_rmdir (struct inode *dir,struct dentry *dentry); int UMSDOS_unlink (struct inode *dir, struct dentry *dentry); int UMSDOS_rename (struct inode *old_dir, diff --git a/include/linux/umsdos_fs_i.h b/include/linux/umsdos_fs_i.h index 0edfb1d541a4..f4c992b44cd2 100644 --- a/include/linux/umsdos_fs_i.h +++ b/include/linux/umsdos_fs_i.h @@ -50,9 +50,9 @@ struct dir_locking_info { struct umsdos_inode_info { struct msdos_inode_info msdos_info; struct dir_locking_info dir_info; - int i_patched; /* Inode has been patched */ - int i_is_hlink; /* Resolved hardlink inode? */ - off_t pos; /* Entry offset in the emd_owner file */ + int i_patched; /* Inode has been patched */ + int i_is_hlink; /* Resolved hardlink inode? */ + off_t pos; /* Entry offset in the emd_owner file */ }; #endif |
