diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-20 02:43:55 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-20 02:43:55 -0700 |
| commit | 178f53128d0286ab532701268e6bf72631f6cb61 (patch) | |
| tree | 7a275603723cc61b27df918995cf0b9a73f31fd4 /include/linux | |
| parent | 9969beedd6fd8812658bc312a252596f219a1f29 (diff) | |
| parent | a8ff88031f2af02480cff92ed41e18a2d51b11b3 (diff) | |
Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include/linux')
33 files changed, 244 insertions, 86 deletions
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 51a69e389eae..0d59e6d76830 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h @@ -32,7 +32,8 @@ typedef enum fe_type { FE_QPSK, FE_QAM, - FE_OFDM + FE_OFDM, + FE_ATSC } fe_type_t; @@ -59,6 +60,8 @@ typedef enum fe_caps { FE_CAN_BANDWIDTH_AUTO = 0x40000, FE_CAN_GUARD_INTERVAL_AUTO = 0x80000, FE_CAN_HIERARCHY_AUTO = 0x100000, + FE_CAN_8VSB = 0x200000, + FE_CAN_16VSB = 0x400000, FE_NEEDS_BENDING = 0x20000000, // frontend requires frequency bending FE_CAN_RECOVER = 0x40000000, // frontend can recover from a cable unplug automatically FE_CAN_MUTE_TS = 0x80000000 // frontend can stop spurious TS data output diff --git a/include/linux/dvb/osd.h b/include/linux/dvb/osd.h index cdaff25eccc3..d236deac80f1 100644 --- a/include/linux/dvb/osd.h +++ b/include/linux/dvb/osd.h @@ -94,6 +94,7 @@ typedef enum { OSD_Text, // (x0,y0,size,color,text) OSD_SetWindow, // (x0) set window with number 0<x0<8 as current OSD_MoveWindow, // move current window to (x0, y0) + OSD_OpenRaw, // Open other types of OSD windows } OSD_Command; typedef struct osd_cmd_s { @@ -106,8 +107,39 @@ typedef struct osd_cmd_s { void __user *data; } osd_cmd_t; +/* OSD_OpenRaw: set 'color' to desired window type */ +typedef enum { + OSD_BITMAP1, /* 1 bit bitmap */ + OSD_BITMAP2, /* 2 bit bitmap */ + OSD_BITMAP4, /* 4 bit bitmap */ + OSD_BITMAP8, /* 8 bit bitmap */ + OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */ + OSD_BITMAP2HR, /* 2 bit bitmap half resolution */ + OSD_BITMAP4HR, /* 4 bit bitmap half resolution */ + OSD_BITMAP8HR, /* 8 bit bitmap half resolution */ + OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */ + OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */ + OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */ + OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */ + OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */ + OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */ + OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */ + OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */ + OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/ + OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */ + OSD_VIDEONSIZE, /* Full Size MPEG Video Display */ + OSD_CURSOR /* Cursor */ +} osd_raw_window_t; + +typedef struct osd_cap_s { + int cmd; +#define OSD_CAP_MEMSIZE 1 /* memory size */ + long val; +} osd_cap_t; + #define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t) +#define OSD_GET_CAPABILITY _IOR('o', 161, osd_cap_t) #endif diff --git a/include/linux/edd.h b/include/linux/edd.h index 5f93881106fa..242600817a8d 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h @@ -37,14 +37,18 @@ #define EDDEXTSIZE 8 /* change these if you muck with the structures */ #define EDDPARMSIZE 74 #define CHECKEXTENSIONSPRESENT 0x41 +#define EXTENDEDREAD 0x42 #define GETDEVICEPARAMETERS 0x48 #define LEGACYGETDEVICEPARAMETERS 0x08 #define EDDMAGIC1 0x55AA #define EDDMAGIC2 0xAA55 +#define FIXEDDISKSUBSET 0x0001 +#define GET_DEVICE_PARAMETERS_SUPPORTED 0x0007 #define READ_SECTORS 0x02 /* int13 AH=0x02 is READ_SECTORS command */ #define EDD_MBR_SIG_OFFSET 0x1B8 /* offset of signature in the MBR */ +#define EDD_DEV_ADDR_PACKET_LEN 0x10 /* for int13 fn42 */ #define EDD_MBR_SIG_BUF 0x290 /* addr in boot params */ #define EDD_MBR_SIG_MAX 16 /* max number of signatures to store */ #define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF diff --git a/include/linux/fs.h b/include/linux/fs.h index 6768655fd11d..4a9463c662ed 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -633,6 +633,9 @@ struct file_lock_operations { struct lock_manager_operations { int (*fl_compare_owner)(struct file_lock *, struct file_lock *); void (*fl_notify)(struct file_lock *); /* unblock callback */ + void (*fl_copy_lock)(struct file_lock *, struct file_lock *); + void (*fl_release_private)(struct file_lock *); + void (*fl_break)(struct file_lock *); }; /* that will die - we need it for nfs_lock_info */ @@ -698,6 +701,8 @@ extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); extern int __break_lease(struct inode *inode, unsigned int flags); extern void lease_get_mtime(struct inode *, struct timespec *time); +extern int setlease(struct file *, long, struct file_lock **); +extern void remove_lease(struct file_lock *); 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); extern void steal_locks(fl_owner_t from); @@ -1270,8 +1275,8 @@ extern int bd_claim(struct block_device *, void *); extern void bd_release(struct block_device *); /* fs/char_dev.c */ -extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, char *); -extern int register_chrdev_region(dev_t, unsigned, char *); +extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); +extern int register_chrdev_region(dev_t, unsigned, const char *); extern int register_chrdev(unsigned int, const char *, struct file_operations *); extern int unregister_chrdev(unsigned int, const char *); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 749992dc71b7..0692f7778f4f 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -129,13 +129,14 @@ struct gendisk { /* * Macros to operate on percpu disk statistics: - * Since writes to disk_stats are serialised through the queue_lock, - * smp_processor_id() should be enough to get to the per_cpu versions - * of statistics counters + * + * The __ variants should only be called in critical sections. The full + * variants disable/enable preemption. */ #ifdef CONFIG_SMP -#define disk_stat_add(gendiskp, field, addnd) \ +#define __disk_stat_add(gendiskp, field, addnd) \ (per_cpu_ptr(gendiskp->dkstats, smp_processor_id())->field += addnd) + #define disk_stat_read(gendiskp, field) \ ({ \ typeof(gendiskp->dkstats->field) res = 0; \ @@ -159,7 +160,8 @@ static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { } #else -#define disk_stat_add(gendiskp, field, addnd) (gendiskp->dkstats.field += addnd) +#define __disk_stat_add(gendiskp, field, addnd) \ + (gendiskp->dkstats.field += addnd) #define disk_stat_read(gendiskp, field) (gendiskp->dkstats.field) static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { @@ -167,8 +169,21 @@ static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { } #endif -#define disk_stat_inc(gendiskp, field) disk_stat_add(gendiskp, field, 1) +#define disk_stat_add(gendiskp, field, addnd) \ + do { \ + preempt_disable(); \ + __disk_stat_add(gendiskp, field, addnd); \ + preempt_enable(); \ + } while (0) + +#define __disk_stat_dec(gendiskp, field) __disk_stat_add(gendiskp, field, -1) #define disk_stat_dec(gendiskp, field) disk_stat_add(gendiskp, field, -1) + +#define __disk_stat_inc(gendiskp, field) __disk_stat_add(gendiskp, field, 1) +#define disk_stat_inc(gendiskp, field) disk_stat_add(gendiskp, field, 1) + +#define __disk_stat_sub(gendiskp, field, subnd) \ + __disk_stat_add(gendiskp, field, -subnd) #define disk_stat_sub(gendiskp, field, subnd) \ disk_stat_add(gendiskp, field, -subnd) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index caac24868d85..bd2735bdca6b 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -568,7 +568,7 @@ union i2c_smbus_data { static unsigned short var[I2C_CLIENT_MAX_OPTS] = I2C_CLIENT_DEFAULTS; \ static unsigned int var##_num; \ /*MODULE_PARM(var,I2C_CLIENT_MODPARM);*/ \ - module_param_array(var, short, var##_num, 0); \ + module_param_array(var, short, &var##_num, 0); \ MODULE_PARM_DESC(var,desc) /* This is the one you want to use in your own modules */ diff --git a/include/linux/idr.h b/include/linux/idr.h index 1b0c1e6d1e2d..ca3b7e462576 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -9,7 +9,7 @@ * tables. */ #include <linux/types.h> -#include <asm/bitops.h> +#include <linux/bitops.h> #if BITS_PER_LONG == 32 # define IDR_BITS 5 diff --git a/include/linux/lockd/debug.h b/include/linux/lockd/debug.h index 5b6961d739d4..34b2b7f33c3b 100644 --- a/include/linux/lockd/debug.h +++ b/include/linux/lockd/debug.h @@ -45,4 +45,13 @@ #define NLMDBG_ALL 0x7fff +/* + * Support for printing NLM cookies in dprintk() + */ +#ifdef RPC_DEBUG +struct nlm_cookie; +/* Call this function with the BKL held (it uses a static buffer) */ +extern const char *nlmdbg_cookie2a(const struct nlm_cookie *); +#endif + #endif /* LINUX_LOCKD_DEBUG_H */ diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index ef14dbd2a67c..d7a5cc4cfa97 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h @@ -13,10 +13,9 @@ #include <linux/nfs.h> #include <linux/sunrpc/xdr.h> +#define NLM_MAXCOOKIELEN 32 #define NLM_MAXSTRLEN 1024 -#define QUADLEN(len) (((len) + 3) >> 2) - #define nlm_granted __constant_htonl(NLM_LCK_GRANTED) #define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED) #define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS) @@ -33,13 +32,14 @@ struct nlm_lock { }; /* - * NLM cookies. Technically they can be 1K, Nobody uses over 8 bytes - * however. + * NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes. + * FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to + * 32 bytes. */ struct nlm_cookie { - unsigned char data[8]; + unsigned char data[NLM_MAXCOOKIELEN]; unsigned int len; }; diff --git a/include/linux/mm.h b/include/linux/mm.h index 158ee1c501f0..1538a9dd4f62 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -758,8 +758,15 @@ extern struct vm_area_struct *find_extend_vma(struct mm_struct *mm, unsigned lon extern struct page * vmalloc_to_page(void *addr); extern struct page * follow_page(struct mm_struct *mm, unsigned long address, int write); -extern int remap_page_range(struct vm_area_struct *vma, unsigned long from, - unsigned long to, unsigned long size, pgprot_t prot); +int remap_pfn_range(struct vm_area_struct *, unsigned long, + unsigned long, unsigned long, pgprot_t); + +static inline __deprecated /* since 25 Sept 2004 -- wli */ +int remap_page_range(struct vm_area_struct *vma, unsigned long uvaddr, + unsigned long paddr, unsigned long size, pgprot_t prot) +{ + return remap_pfn_range(vma, uvaddr, paddr >> PAGE_SHIFT, size, prot); +} #ifdef CONFIG_PROC_FS void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); diff --git a/include/linux/module.h b/include/linux/module.h index e5d2d6112f4b..f557855b02dd 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -141,11 +141,9 @@ extern struct module __this_module; customizations, eg "rh3" or "rusty1". Using this automatically adds a checksum of the .c files and the - local headers to the end. Use MODULE_VERSION("") if you want just - this. Macro includes room for this. + local headers in "srcversion". */ -#define MODULE_VERSION(_version) \ - MODULE_INFO(version, _version "\0xxxxxxxxxxxxxxxxxxxxxxxx") +#define MODULE_VERSION(_version) MODULE_INFO(version, _version) /* Given an address, look for it in the exception tables */ const struct exception_table_entry *search_exception_tables(unsigned long add); diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 7a145cd86c40..4e6e7a51d74f 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -129,16 +129,16 @@ extern int param_set_invbool(const char *val, struct kernel_param *kp); extern int param_get_invbool(char *buffer, struct kernel_param *kp); #define param_check_invbool(name, p) __param_check(name, p, int) -/* Comma-separated array: num is set to number they actually specified. */ -#define module_param_array_named(name, array, type, num, perm) \ +/* Comma-separated array: *nump is set to number they actually specified. */ +#define module_param_array_named(name, array, type, nump, perm) \ static struct kparam_array __param_arr_##name \ - = { ARRAY_SIZE(array), &num, param_set_##type, param_get_##type,\ + = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\ sizeof(array[0]), array }; \ module_param_call(name, param_array_set, param_array_get, \ &__param_arr_##name, perm) -#define module_param_array(name, type, num, perm) \ - module_param_array_named(name, name, type, num, perm) +#define module_param_array(name, type, nump, perm) \ + module_param_array_named(name, name, type, nump, perm) extern int param_array_set(const char *val, struct kernel_param *kp); extern int param_array_get(char *buffer, struct kernel_param *kp); diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index d35fe747bd94..d6097bfc6715 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h @@ -87,8 +87,8 @@ #define FAT_FSINFO_SIG1 0x41615252 #define FAT_FSINFO_SIG2 0x61417272 -#define IS_FSINFO(x) (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1 \ - && CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2) +#define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ + && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) /* * ioctl commands @@ -232,8 +232,6 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) extern int fat_access(struct super_block *sb, int nr, int new_value); extern int __fat_access(struct super_block *sb, int nr, int new_value); extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys); -extern void fat_cache_init(struct super_block *sb); -extern void fat_cache_add(struct inode *inode, int f_clu, int d_clu); extern void fat_cache_inval_inode(struct inode *inode); extern int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus); @@ -244,9 +242,6 @@ extern struct file_operations fat_dir_operations; extern int fat_search_long(struct inode *inode, const unsigned char *name, int name_len, int anycase, loff_t *spos, loff_t *lpos); -extern int fat_readdir(struct file *filp, void *dirent, filldir_t filldir); -extern int fat_dir_ioctl(struct inode * inode, struct file * filp, - unsigned int cmd, unsigned long arg); extern int fat_add_entries(struct inode *dir, int slots, struct buffer_head **bh, struct msdos_dir_entry **de, loff_t *i_pos); extern int fat_new_dir(struct inode *dir, struct inode *parent, int is_vfat); @@ -264,19 +259,13 @@ extern int fat_get_block(struct inode *inode, sector_t iblock, extern void fat_truncate(struct inode *inode); /* fat/inode.c */ -extern void fat_hash_init(void); extern void fat_attach(struct inode *inode, loff_t i_pos); extern void fat_detach(struct inode *inode); extern struct inode *fat_iget(struct super_block *sb, loff_t i_pos); extern struct inode *fat_build_inode(struct super_block *sb, struct msdos_dir_entry *de, loff_t i_pos, int *res); -extern void fat_delete_inode(struct inode *inode); -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 kstatfs *buf); -extern int fat_write_inode(struct inode *inode, int wait); extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); /* fat/misc.c */ diff --git a/include/linux/msdos_fs_i.h b/include/linux/msdos_fs_i.h index f2383d22a831..b50018cf7e3d 100644 --- a/include/linux/msdos_fs_i.h +++ b/include/linux/msdos_fs_i.h @@ -7,10 +7,14 @@ * MS-DOS file system inode data in memory */ +#define FAT_CACHE_VALID 0 /* special case for valid cache */ + struct msdos_inode_info { - /* cache of lastest accessed cluster */ - int file_cluster; /* cluster number in the file. */ - int disk_cluster; /* cluster number on disk. */ + spinlock_t cache_lru_lock; + struct list_head cache_lru; + int nr_caches; + /* for avoiding the race between fat_free() and fat_get_cluster() */ + unsigned int cache_valid_id; loff_t mmu_private; int i_start; /* first cluster or 0 */ @@ -18,7 +22,7 @@ struct msdos_inode_info { int i_attrs; /* unused attribute bits */ int i_ctime_ms; /* unused change time in milliseconds */ loff_t i_pos; /* on-disk position of directory entry or 0 */ - struct list_head i_fat_hash; /* hash by i_location */ + struct hlist_node i_fat_hash; /* hash by i_location */ struct inode vfs_inode; }; diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h index c79a172225d3..3310996efbcc 100644 --- a/include/linux/msdos_fs_sb.h +++ b/include/linux/msdos_fs_sb.h @@ -26,14 +26,9 @@ struct fat_mount_options { nocase:1; /* Does this need case conversion? 0=need case conversion*/ }; -#define FAT_CACHE_NR 8 /* number of FAT cache */ - -struct fat_cache { - int start_cluster; /* first cluster of the chain. */ - int file_cluster; /* cluster number in the file. */ - int disk_cluster; /* cluster number on disk. */ - struct fat_cache *next; /* next cache entry */ -}; +#define FAT_HASH_BITS 8 +#define FAT_HASH_SIZE (1UL << FAT_HASH_BITS) +#define FAT_HASH_MASK (FAT_HASH_SIZE-1) struct msdos_sb_info { unsigned short sec_per_clus; /* sectors/cluster */ @@ -58,8 +53,8 @@ struct msdos_sb_info { int dir_per_block; /* dir entries per block */ int dir_per_block_bits; /* log2(dir_per_block) */ - spinlock_t cache_lock; - struct fat_cache cache_array[FAT_CACHE_NR], *cache; + spinlock_t inode_hash_lock; + struct hlist_head inode_hashtable[FAT_HASH_SIZE]; }; #endif diff --git a/include/linux/mtd/gen_probe.h b/include/linux/mtd/gen_probe.h index 2d66b33f805d..f6208098660c 100644 --- a/include/linux/mtd/gen_probe.h +++ b/include/linux/mtd/gen_probe.h @@ -10,7 +10,7 @@ #include <linux/mtd/flashchip.h> #include <linux/mtd/map.h> #include <linux/mtd/cfi.h> -#include <asm/bitops.h> +#include <linux/bitops.h> struct chip_probe { char *name; diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 010a623c3bdf..9472745b6510 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -697,8 +697,12 @@ extern int netdev_nit; static inline int netif_rx_ni(struct sk_buff *skb) { int err = netif_rx(skb); + + preempt_disable(); if (softirq_pending(smp_processor_id())) do_softirq(); + preempt_enable(); + return err; } diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 96974ab10f27..5ca8a8d8ccdf 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h @@ -35,6 +35,7 @@ #define NFS4_FH_VOL_RENAME 0x0008 #define NFS4_OPEN_RESULT_CONFIRM 0x0002 +#define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004 #define NFS4_SHARE_ACCESS_READ 0x0001 #define NFS4_SHARE_ACCESS_WRITE 0x0002 diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 97d84c887853..a56399b985a4 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h @@ -38,6 +38,7 @@ #define _NFSD4_STATE_H #include <linux/list.h> +#include <linux/kref.h> #include <linux/sunrpc/clnt.h> #define NFS4_OPAQUE_LIMIT 1024 @@ -168,6 +169,7 @@ struct nfs4_replay { * reaped by laundramat thread after lease period. */ struct nfs4_stateowner { + struct kref so_ref; struct list_head so_idhash; /* hash by so_id */ struct list_head so_strhash; /* hash by op_name */ struct list_head so_perclient; /* nfs4_client->cl_perclient */ @@ -248,4 +250,18 @@ extern void nfs4_lock_state(void); extern void nfs4_unlock_state(void); extern int nfs4_in_grace(void); extern int nfs4_check_open_reclaim(clientid_t *clid); +extern void nfs4_free_stateowner(struct kref *kref); + +static inline void +nfs4_put_stateowner(struct nfs4_stateowner *so) +{ + kref_put(&so->so_ref, nfs4_free_stateowner); +} + +static inline void +nfs4_get_stateowner(struct nfs4_stateowner *so) +{ + kref_get(&so->so_ref); +} + #endif /* NFSD4_STATE_H */ diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index bf94561ca623..d629b5e55d90 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h @@ -116,6 +116,7 @@ struct nfsd4_link { }; struct nfsd4_lock_denied { + clientid_t ld_clientid; struct nfs4_stateowner *ld_sop; u64 ld_start; u64 ld_length; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d6e4a6ef3eb5..f2cdec811f1f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -569,6 +569,7 @@ #define PCI_DEVICE_ID_NEC_PCX2 0x0046 /* PowerVR */ #define PCI_DEVICE_ID_NEC_NILE4 0x005a #define PCI_DEVICE_ID_NEC_VRC5476 0x009b +#define PCI_DEVICE_ID_NEC_VRC4173 0x00a5 #define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6 #define PCI_DEVICE_ID_NEC_PC9821CS01 0x800c /* PC-9821-CS01 */ #define PCI_DEVICE_ID_NEC_PC9821NRB06 0x800d /* PC-9821NR-B06 */ diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index ec4910e37c65..e7c08acbe796 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -4,6 +4,26 @@ #include <linux/spinlock.h> #include <linux/list.h> +/* POSIX.1b interval timer structure. */ +struct k_itimer { + struct list_head list; /* free/ allocate list */ + spinlock_t it_lock; + clockid_t it_clock; /* which timer type */ + timer_t it_id; /* timer id */ + int it_overrun; /* overrun on pending signal */ + int it_overrun_last; /* overrun on last delivered signal */ + int it_requeue_pending; /* waiting to requeue this timer */ + int it_sigev_notify; /* notify word of sigevent struct */ + int it_sigev_signo; /* signo word of sigevent struct */ + sigval_t it_sigev_value; /* value word of sigevent struct */ + unsigned long it_incr; /* interval specified in jiffies */ + struct task_struct *it_process; /* process to send signal to */ + struct timer_list it_timer; + struct sigqueue *sigq; /* signal queue entry. */ + struct list_head abs_timer_entry; /* clock abs_timer_list */ + struct timespec wall_to_prev; /* wall_to_monotonic used when set */ +}; + struct k_clock_abs { struct list_head list; spinlock_t lock; @@ -13,9 +33,10 @@ struct k_clock { struct k_clock_abs *abs_struct; int (*clock_set) (struct timespec * tp); int (*clock_get) (struct timespec * tp); - int (*nsleep) (int flags, - struct timespec * new_setting, - struct itimerspec * old_setting); + int (*timer_create) (int which_clock, struct sigevent __user *timer_event_spec, + timer_t __user * created_timer_id); + int (*nsleep) (int which_clock, int flags, + struct timespec * t); int (*timer_set) (struct k_itimer * timr, int flags, struct itimerspec * new_setting, struct itimerspec * old_setting); @@ -23,6 +44,17 @@ struct k_clock { void (*timer_get) (struct k_itimer * timr, struct itimerspec * cur_setting); }; + +void register_posix_clock(int clock_id, struct k_clock *new_clock); + +/* Error handlers for timer_create, nanosleep and settime */ +int do_posix_clock_notimer_create(int which_clock, + struct sigevent __user *time_event_spec, + timer_t __user *created_timer_id); + +int do_posix_clock_nonanosleep(int which_clock, int flags, struct timespec * t); +int do_posix_clock_nosettime(struct timespec *tp); + struct now_struct { unsigned long jiffies; }; @@ -42,3 +74,4 @@ struct now_struct { } \ }while (0) #endif + diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 3ae0c6e140af..4b7cc4fe366d 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h @@ -113,8 +113,7 @@ struct rb_root }; #define RB_ROOT (struct rb_root) { NULL, } -#define rb_entry(ptr, type, member) \ - ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) +#define rb_entry(ptr, type, member) container_of(ptr, type, member) extern void rb_insert_color(struct rb_node *, struct rb_root *); extern void rb_erase(struct rb_node *, struct rb_root *); diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 891418bb525a..ba465f763066 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h @@ -467,6 +467,7 @@ enum reiserfs_mount_options { REISERFS_TEST2, REISERFS_TEST3, REISERFS_TEST4, + REISERFS_UNSUPPORTED_OPT, }; #define reiserfs_r5_hash(s) (REISERFS_SB(s)->s_mount_opt & (1 << FORCE_R5_HASH)) diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index ac4528ead16e..9bb86160c2f2 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -698,6 +698,7 @@ enum TCA_XSTATS, TCA_RATE, TCA_FCNT, + TCA_STATS2, __TCA_MAX }; diff --git a/include/linux/sched.h b/include/linux/sched.h index c8f981f108d4..04c8d47e8654 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -218,7 +218,7 @@ struct mm_struct { struct rw_semaphore mmap_sem; spinlock_t page_table_lock; /* Protects task page tables and mm->rss */ - struct list_head mmlist; /* List of all active mm's. These are globally strung + struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung * together off init_mm.mmlist, and are protected * by mmlist_lock */ @@ -252,8 +252,6 @@ struct mm_struct { struct kioctx default_kioctx; }; -extern int mmlist_nr; - struct sighand_struct { atomic_t count; struct k_sigaction action[_NSIG]; @@ -377,26 +375,6 @@ typedef struct prio_array prio_array_t; struct backing_dev_info; struct reclaim_state; -/* POSIX.1b interval timer structure. */ -struct k_itimer { - struct list_head list; /* free/ allocate list */ - spinlock_t it_lock; - clockid_t it_clock; /* which timer type */ - timer_t it_id; /* timer id */ - int it_overrun; /* overrun on pending signal */ - int it_overrun_last; /* overrun on last delivered signal */ - int it_requeue_pending; /* waiting to requeue this timer */ - int it_sigev_notify; /* notify word of sigevent struct */ - int it_sigev_signo; /* signo word of sigevent struct */ - sigval_t it_sigev_value; /* value word of sigevent struct */ - unsigned long it_incr; /* interval specified in jiffies */ - struct task_struct *it_process; /* process to send signal to */ - struct timer_list it_timer; - struct sigqueue *sigq; /* signal queue entry. */ - struct list_head abs_timer_entry; /* clock abs_timer_list */ - struct timespec wall_to_prev; /* wall_to_monotonic used when set */ -}; - #ifdef CONFIG_SCHEDSTATS struct sched_info { /* cumulative counters */ @@ -722,6 +700,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) #define PF_SWAPOFF 0x00080000 /* I am in swapoff */ #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ +#define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ #ifdef CONFIG_SMP extern int set_cpus_allowed(task_t *p, cpumask_t new_mask); diff --git a/include/linux/security.h b/include/linux/security.h index ab0941c9fca7..c1792f3fb6ca 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -40,6 +40,7 @@ struct ctl_table; * as the default capabilities functions */ extern int cap_capable (struct task_struct *tsk, int cap); +extern int cap_settime (struct timespec *ts, struct timezone *tz); extern int cap_ptrace (struct task_struct *parent, struct task_struct *child); extern int cap_capget (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); extern int cap_capset_check (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); @@ -1001,6 +1002,12 @@ struct swap_info_struct; * See the syslog(2) manual page for an explanation of the @type values. * @type contains the type of action. * Return 0 if permission is granted. + * @settime: + * Check permission to change the system time. + * struct timespec and timezone are defined in include/linux/time.h + * @ts contains new time + * @tz contains new timezone + * Return 0 if permission is granted. * @vm_enough_memory: * Check permissions for allocating a new virtual mapping. * @pages contains the number of pages. @@ -1036,6 +1043,7 @@ struct security_operations { int (*quotactl) (int cmds, int type, int id, struct super_block * sb); int (*quota_on) (struct file * f); int (*syslog) (int type); + int (*settime) (struct timespec *ts, struct timezone *tz); int (*vm_enough_memory) (long pages); int (*bprm_alloc_security) (struct linux_binprm * bprm); @@ -1291,6 +1299,12 @@ static inline int security_syslog(int type) return security_ops->syslog(type); } +static inline int security_settime(struct timespec *ts, struct timezone *tz) +{ + return security_ops->settime(ts, tz); +} + + static inline int security_vm_enough_memory(long pages) { return security_ops->vm_enough_memory(pages); @@ -1963,6 +1977,11 @@ static inline int security_syslog(int type) return cap_syslog(type); } +static inline int security_settime(struct timespec *ts, struct timezone *tz) +{ + return cap_settime(ts, tz); +} + static inline int security_vm_enough_memory(long pages) { return cap_vm_enough_memory(pages); diff --git a/include/linux/slab.h b/include/linux/slab.h index e51014cb24a0..7c81a7863b99 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -61,7 +61,14 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo extern int kmem_cache_destroy(kmem_cache_t *); extern int kmem_cache_shrink(kmem_cache_t *); extern void *kmem_cache_alloc(kmem_cache_t *, int); +#ifdef CONFIG_NUMA extern void *kmem_cache_alloc_node(kmem_cache_t *, int); +#else +static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node) +{ + return kmem_cache_alloc(cachep, GFP_KERNEL); +} +#endif extern void kmem_cache_free(kmem_cache_t *, void *); extern unsigned int kmem_cache_size(kmem_cache_t *); diff --git a/include/linux/swap.h b/include/linux/swap.h index 371e8260c577..b0f07148e0eb 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -230,6 +230,7 @@ extern spinlock_t swaplock; /* linux/mm/thrash.c */ extern struct mm_struct * swap_token_mm; +extern unsigned long swap_token_default_timeout; extern void grab_swap_token(void); extern void __put_swap_token(struct mm_struct *); diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 0cfc704d0565..d4c7db35e708 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h @@ -30,8 +30,7 @@ static inline swp_entry_t swp_entry(unsigned long type, pgoff_t offset) */ static inline unsigned swp_type(swp_entry_t entry) { - return (entry.val >> SWP_TYPE_SHIFT(entry)) & - ((1 << MAX_SWAPFILES_SHIFT) - 1); + return (entry.val >> SWP_TYPE_SHIFT(entry)); } /* diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 8db31f8d17ff..129ff0ac8a15 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -167,6 +167,7 @@ enum VM_HUGETLB_GROUP=25, /* permitted hugetlb group */ VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ + VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ }; diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h new file mode 100644 index 000000000000..71d63409d568 --- /dev/null +++ b/include/linux/tc_act/tc_mirred.h @@ -0,0 +1,28 @@ +#ifndef __LINUX_TC_MIR_H +#define __LINUX_TC_MIR_H + +#include <linux/pkt_cls.h> + +#define TCA_ACT_MIRRED 8 +#define TCA_EGRESS_REDIR 1 /* packet redirect to EGRESS*/ +#define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */ +#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ +#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ + +struct tc_mirred +{ + tc_gen; + int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ + __u32 ifindex; /* ifindex of egress port */ +}; + +enum +{ + TCA_MIRRED_UNSPEC, + TCA_MIRRED_TM, + TCA_MIRRED_PARMS, + __TCA_MIRRED_MAX +}; +#define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) + +#endif diff --git a/include/linux/time.h b/include/linux/time.h index ae174b8ab036..0814ed4a4586 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -157,7 +157,13 @@ struct itimerval { #define CLOCK_REALTIME_HR 4 #define CLOCK_MONOTONIC_HR 5 -#define MAX_CLOCKS 6 +/* + * The IDs of various hardware clocks + */ + + +#define CLOCK_SGI_CYCLE 10 +#define MAX_CLOCKS 16 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC | \ CLOCK_REALTIME_HR | CLOCK_MONOTONIC_HR) #define CLOCKS_MONO (CLOCK_MONOTONIC & CLOCK_MONOTONIC_HR) |
