diff options
Diffstat (limited to 'include/linux')
41 files changed, 1050 insertions, 70 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 4c4142c5aa6e..a26f565e8189 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -97,6 +97,7 @@ header-y += ioctl.h | |||
| 97 | header-y += ip6_tunnel.h | 97 | header-y += ip6_tunnel.h |
| 98 | header-y += ipmi_msgdefs.h | 98 | header-y += ipmi_msgdefs.h |
| 99 | header-y += ipsec.h | 99 | header-y += ipsec.h |
| 100 | header-y += ip_vs.h | ||
| 100 | header-y += ipx.h | 101 | header-y += ipx.h |
| 101 | header-y += irda.h | 102 | header-y += irda.h |
| 102 | header-y += iso_fs.h | 103 | header-y += iso_fs.h |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 88d68081a0f1..e61f22be4d0e 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -655,6 +655,7 @@ extern struct request *blk_get_request(struct request_queue *, int, gfp_t); | |||
| 655 | extern void blk_insert_request(struct request_queue *, struct request *, int, void *); | 655 | extern void blk_insert_request(struct request_queue *, struct request *, int, void *); |
| 656 | extern void blk_requeue_request(struct request_queue *, struct request *); | 656 | extern void blk_requeue_request(struct request_queue *, struct request *); |
| 657 | extern void blk_plug_device(struct request_queue *); | 657 | extern void blk_plug_device(struct request_queue *); |
| 658 | extern void blk_plug_device_unlocked(struct request_queue *); | ||
| 658 | extern int blk_remove_plug(struct request_queue *); | 659 | extern int blk_remove_plug(struct request_queue *); |
| 659 | extern void blk_recount_segments(struct request_queue *, struct bio *); | 660 | extern void blk_recount_segments(struct request_queue *, struct bio *); |
| 660 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, | 661 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index d62c19ff041c..7f627775c947 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/list.h> | 40 | #include <linux/list.h> |
| 41 | #include <linux/kref.h> | 41 | #include <linux/kref.h> |
| 42 | #include <linux/mutex.h> | 42 | #include <linux/mutex.h> |
| 43 | #include <linux/err.h> | ||
| 43 | 44 | ||
| 44 | #include <asm/atomic.h> | 45 | #include <asm/atomic.h> |
| 45 | 46 | ||
| @@ -129,8 +130,25 @@ struct configfs_attribute { | |||
| 129 | /* | 130 | /* |
| 130 | * Users often need to create attribute structures for their configurable | 131 | * Users often need to create attribute structures for their configurable |
| 131 | * attributes, containing a configfs_attribute member and function pointers | 132 | * attributes, containing a configfs_attribute member and function pointers |
| 132 | * for the show() and store() operations on that attribute. They can use | 133 | * for the show() and store() operations on that attribute. If they don't |
| 133 | * this macro (similar to sysfs' __ATTR) to make defining attributes easier. | 134 | * need anything else on the extended attribute structure, they can use |
| 135 | * this macro to define it The argument _item is the name of the | ||
| 136 | * config_item structure. | ||
| 137 | */ | ||
| 138 | #define CONFIGFS_ATTR_STRUCT(_item) \ | ||
| 139 | struct _item##_attribute { \ | ||
| 140 | struct configfs_attribute attr; \ | ||
| 141 | ssize_t (*show)(struct _item *, char *); \ | ||
| 142 | ssize_t (*store)(struct _item *, const char *, size_t); \ | ||
| 143 | } | ||
| 144 | |||
| 145 | /* | ||
| 146 | * With the extended attribute structure, users can use this macro | ||
| 147 | * (similar to sysfs' __ATTR) to make defining attributes easier. | ||
| 148 | * An example: | ||
| 149 | * #define MYITEM_ATTR(_name, _mode, _show, _store) \ | ||
| 150 | * struct myitem_attribute childless_attr_##_name = \ | ||
| 151 | * __CONFIGFS_ATTR(_name, _mode, _show, _store) | ||
| 134 | */ | 152 | */ |
| 135 | #define __CONFIGFS_ATTR(_name, _mode, _show, _store) \ | 153 | #define __CONFIGFS_ATTR(_name, _mode, _show, _store) \ |
| 136 | { \ | 154 | { \ |
| @@ -142,6 +160,52 @@ struct configfs_attribute { | |||
| 142 | .show = _show, \ | 160 | .show = _show, \ |
| 143 | .store = _store, \ | 161 | .store = _store, \ |
| 144 | } | 162 | } |
| 163 | /* Here is a readonly version, only requiring a show() operation */ | ||
| 164 | #define __CONFIGFS_ATTR_RO(_name, _show) \ | ||
| 165 | { \ | ||
| 166 | .attr = { \ | ||
| 167 | .ca_name = __stringify(_name), \ | ||
| 168 | .ca_mode = 0444, \ | ||
| 169 | .ca_owner = THIS_MODULE, \ | ||
| 170 | }, \ | ||
| 171 | .show = _show, \ | ||
| 172 | } | ||
| 173 | |||
| 174 | /* | ||
| 175 | * With these extended attributes, the simple show_attribute() and | ||
| 176 | * store_attribute() operations need to call the show() and store() of the | ||
| 177 | * attributes. This is a common pattern, so we provide a macro to define | ||
| 178 | * them. The argument _item is the name of the config_item structure. | ||
| 179 | * This macro expects the attributes to be named "struct <name>_attribute" | ||
| 180 | * and the function to_<name>() to exist; | ||
| 181 | */ | ||
| 182 | #define CONFIGFS_ATTR_OPS(_item) \ | ||
| 183 | static ssize_t _item##_attr_show(struct config_item *item, \ | ||
| 184 | struct configfs_attribute *attr, \ | ||
| 185 | char *page) \ | ||
| 186 | { \ | ||
| 187 | struct _item *_item = to_##_item(item); \ | ||
| 188 | struct _item##_attribute *_item##_attr = \ | ||
| 189 | container_of(attr, struct _item##_attribute, attr); \ | ||
| 190 | ssize_t ret = 0; \ | ||
| 191 | \ | ||
| 192 | if (_item##_attr->show) \ | ||
| 193 | ret = _item##_attr->show(_item, page); \ | ||
| 194 | return ret; \ | ||
| 195 | } \ | ||
| 196 | static ssize_t _item##_attr_store(struct config_item *item, \ | ||
| 197 | struct configfs_attribute *attr, \ | ||
| 198 | const char *page, size_t count) \ | ||
| 199 | { \ | ||
| 200 | struct _item *_item = to_##_item(item); \ | ||
| 201 | struct _item##_attribute *_item##_attr = \ | ||
| 202 | container_of(attr, struct _item##_attribute, attr); \ | ||
| 203 | ssize_t ret = -EINVAL; \ | ||
| 204 | \ | ||
| 205 | if (_item##_attr->store) \ | ||
| 206 | ret = _item##_attr->store(_item, page, count); \ | ||
| 207 | return ret; \ | ||
| 208 | } | ||
| 145 | 209 | ||
| 146 | /* | 210 | /* |
| 147 | * If allow_link() exists, the item can symlink(2) out to other | 211 | * If allow_link() exists, the item can symlink(2) out to other |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 96a89d3d6727..5c7f9468f753 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -38,8 +38,9 @@ | |||
| 38 | #define CN_W1_VAL 0x1 | 38 | #define CN_W1_VAL 0x1 |
| 39 | #define CN_IDX_V86D 0x4 | 39 | #define CN_IDX_V86D 0x4 |
| 40 | #define CN_VAL_V86D_UVESAFB 0x1 | 40 | #define CN_VAL_V86D_UVESAFB 0x1 |
| 41 | #define CN_IDX_BB 0x5 /* BlackBoard, from the TSP GPL sampling framework */ | ||
| 41 | 42 | ||
| 42 | #define CN_NETLINK_USERS 5 | 43 | #define CN_NETLINK_USERS 6 |
| 43 | 44 | ||
| 44 | /* | 45 | /* |
| 45 | * Maximum connector's message size. | 46 | * Maximum connector's message size. |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 2270ca5ec631..6fd5668aa572 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -106,6 +106,7 @@ struct cpufreq_policy { | |||
| 106 | #define CPUFREQ_ADJUST (0) | 106 | #define CPUFREQ_ADJUST (0) |
| 107 | #define CPUFREQ_INCOMPATIBLE (1) | 107 | #define CPUFREQ_INCOMPATIBLE (1) |
| 108 | #define CPUFREQ_NOTIFY (2) | 108 | #define CPUFREQ_NOTIFY (2) |
| 109 | #define CPUFREQ_START (3) | ||
| 109 | 110 | ||
| 110 | #define CPUFREQ_SHARED_TYPE_NONE (0) /* None */ | 111 | #define CPUFREQ_SHARED_TYPE_NONE (0) /* None */ |
| 111 | #define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */ | 112 | #define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 96d0509fb8d8..d3219d73f8e6 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -287,7 +287,7 @@ static inline const cpumask_t *get_cpu_mask(unsigned int cpu) | |||
| 287 | * gcc optimizes it out (it's a constant) and there's no huge stack | 287 | * gcc optimizes it out (it's a constant) and there's no huge stack |
| 288 | * variable created: | 288 | * variable created: |
| 289 | */ | 289 | */ |
| 290 | #define cpumask_of_cpu(cpu) ({ *get_cpu_mask(cpu); }) | 290 | #define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) |
| 291 | 291 | ||
| 292 | 292 | ||
| 293 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) | 293 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 98202c672fde..07aa198f19ed 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -230,6 +230,7 @@ extern void d_delete(struct dentry *); | |||
| 230 | extern struct dentry * d_alloc(struct dentry *, const struct qstr *); | 230 | extern struct dentry * d_alloc(struct dentry *, const struct qstr *); |
| 231 | extern struct dentry * d_alloc_anon(struct inode *); | 231 | extern struct dentry * d_alloc_anon(struct inode *); |
| 232 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); | 232 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); |
| 233 | extern struct dentry * d_add_ci(struct inode *, struct dentry *, struct qstr *); | ||
| 233 | extern void shrink_dcache_sb(struct super_block *); | 234 | extern void shrink_dcache_sb(struct super_block *); |
| 234 | extern void shrink_dcache_parent(struct dentry *); | 235 | extern void shrink_dcache_parent(struct dentry *); |
| 235 | extern void shrink_dcache_for_umount(struct super_block *); | 236 | extern void shrink_dcache_for_umount(struct super_block *); |
diff --git a/include/linux/file.h b/include/linux/file.h index 27c64bdc68c9..a20259e248a5 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
| @@ -34,8 +34,9 @@ extern struct file *fget(unsigned int fd); | |||
| 34 | extern struct file *fget_light(unsigned int fd, int *fput_needed); | 34 | extern struct file *fget_light(unsigned int fd, int *fput_needed); |
| 35 | extern void set_close_on_exec(unsigned int fd, int flag); | 35 | extern void set_close_on_exec(unsigned int fd, int flag); |
| 36 | extern void put_filp(struct file *); | 36 | extern void put_filp(struct file *); |
| 37 | extern int alloc_fd(unsigned start, unsigned flags); | ||
| 37 | extern int get_unused_fd(void); | 38 | extern int get_unused_fd(void); |
| 38 | extern int get_unused_fd_flags(int flags); | 39 | #define get_unused_fd_flags(flags) alloc_fd(0, (flags)) |
| 39 | extern void put_unused_fd(unsigned int fd); | 40 | extern void put_unused_fd(unsigned int fd); |
| 40 | 41 | ||
| 41 | extern void fd_install(unsigned int fd, struct file *file); | 42 | extern void fd_install(unsigned int fd, struct file *file); |
diff --git a/include/linux/ihex.h b/include/linux/ihex.h index 2baace2788a7..31d8629e75a1 100644 --- a/include/linux/ihex.h +++ b/include/linux/ihex.h | |||
| @@ -18,7 +18,7 @@ struct ihex_binrec { | |||
| 18 | __be32 addr; | 18 | __be32 addr; |
| 19 | __be16 len; | 19 | __be16 len; |
| 20 | uint8_t data[0]; | 20 | uint8_t data[0]; |
| 21 | } __attribute__((aligned(4))); | 21 | } __attribute__((packed)); |
| 22 | 22 | ||
| 23 | /* Find the next record, taking into account the 4-byte alignment */ | 23 | /* Find the next record, taking into account the 4-byte alignment */ |
| 24 | static inline const struct ihex_binrec * | 24 | static inline const struct ihex_binrec * |
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h index f8598f583944..c975caf75385 100644 --- a/include/linux/iommu-helper.h +++ b/include/linux/iommu-helper.h | |||
| @@ -8,4 +8,3 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, | |||
| 8 | unsigned long align_mask); | 8 | unsigned long align_mask); |
| 9 | extern void iommu_area_free(unsigned long *map, unsigned long start, | 9 | extern void iommu_area_free(unsigned long *map, unsigned long start, |
| 10 | unsigned int nr); | 10 | unsigned int nr); |
| 11 | extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len); | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 2cd07cc29687..22d2115458c6 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -118,6 +118,10 @@ extern int allocate_resource(struct resource *root, struct resource *new, | |||
| 118 | int adjust_resource(struct resource *res, resource_size_t start, | 118 | int adjust_resource(struct resource *res, resource_size_t start, |
| 119 | resource_size_t size); | 119 | resource_size_t size); |
| 120 | resource_size_t resource_alignment(struct resource *res); | 120 | resource_size_t resource_alignment(struct resource *res); |
| 121 | static inline resource_size_t resource_size(struct resource *res) | ||
| 122 | { | ||
| 123 | return res->end - res->start + 1; | ||
| 124 | } | ||
| 121 | 125 | ||
| 122 | /* Convenience shorthand with allocation */ | 126 | /* Convenience shorthand with allocation */ |
| 123 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) | 127 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) |
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h new file mode 100644 index 000000000000..ec6eb49af2d8 --- /dev/null +++ b/include/linux/ip_vs.h | |||
| @@ -0,0 +1,245 @@ | |||
| 1 | /* | ||
| 2 | * IP Virtual Server | ||
| 3 | * data structure and functionality definitions | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _IP_VS_H | ||
| 7 | #define _IP_VS_H | ||
| 8 | |||
| 9 | #include <linux/types.h> /* For __beXX types in userland */ | ||
| 10 | |||
| 11 | #define IP_VS_VERSION_CODE 0x010201 | ||
| 12 | #define NVERSION(version) \ | ||
| 13 | (version >> 16) & 0xFF, \ | ||
| 14 | (version >> 8) & 0xFF, \ | ||
| 15 | version & 0xFF | ||
| 16 | |||
| 17 | /* | ||
| 18 | * Virtual Service Flags | ||
| 19 | */ | ||
| 20 | #define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */ | ||
| 21 | #define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */ | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Destination Server Flags | ||
| 25 | */ | ||
| 26 | #define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */ | ||
| 27 | #define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * IPVS sync daemon states | ||
| 31 | */ | ||
| 32 | #define IP_VS_STATE_NONE 0x0000 /* daemon is stopped */ | ||
| 33 | #define IP_VS_STATE_MASTER 0x0001 /* started as master */ | ||
| 34 | #define IP_VS_STATE_BACKUP 0x0002 /* started as backup */ | ||
| 35 | |||
| 36 | /* | ||
| 37 | * IPVS socket options | ||
| 38 | */ | ||
| 39 | #define IP_VS_BASE_CTL (64+1024+64) /* base */ | ||
| 40 | |||
| 41 | #define IP_VS_SO_SET_NONE IP_VS_BASE_CTL /* just peek */ | ||
| 42 | #define IP_VS_SO_SET_INSERT (IP_VS_BASE_CTL+1) | ||
| 43 | #define IP_VS_SO_SET_ADD (IP_VS_BASE_CTL+2) | ||
| 44 | #define IP_VS_SO_SET_EDIT (IP_VS_BASE_CTL+3) | ||
| 45 | #define IP_VS_SO_SET_DEL (IP_VS_BASE_CTL+4) | ||
| 46 | #define IP_VS_SO_SET_FLUSH (IP_VS_BASE_CTL+5) | ||
| 47 | #define IP_VS_SO_SET_LIST (IP_VS_BASE_CTL+6) | ||
| 48 | #define IP_VS_SO_SET_ADDDEST (IP_VS_BASE_CTL+7) | ||
| 49 | #define IP_VS_SO_SET_DELDEST (IP_VS_BASE_CTL+8) | ||
| 50 | #define IP_VS_SO_SET_EDITDEST (IP_VS_BASE_CTL+9) | ||
| 51 | #define IP_VS_SO_SET_TIMEOUT (IP_VS_BASE_CTL+10) | ||
| 52 | #define IP_VS_SO_SET_STARTDAEMON (IP_VS_BASE_CTL+11) | ||
| 53 | #define IP_VS_SO_SET_STOPDAEMON (IP_VS_BASE_CTL+12) | ||
| 54 | #define IP_VS_SO_SET_RESTORE (IP_VS_BASE_CTL+13) | ||
| 55 | #define IP_VS_SO_SET_SAVE (IP_VS_BASE_CTL+14) | ||
| 56 | #define IP_VS_SO_SET_ZERO (IP_VS_BASE_CTL+15) | ||
| 57 | #define IP_VS_SO_SET_MAX IP_VS_SO_SET_ZERO | ||
| 58 | |||
| 59 | #define IP_VS_SO_GET_VERSION IP_VS_BASE_CTL | ||
| 60 | #define IP_VS_SO_GET_INFO (IP_VS_BASE_CTL+1) | ||
| 61 | #define IP_VS_SO_GET_SERVICES (IP_VS_BASE_CTL+2) | ||
| 62 | #define IP_VS_SO_GET_SERVICE (IP_VS_BASE_CTL+3) | ||
| 63 | #define IP_VS_SO_GET_DESTS (IP_VS_BASE_CTL+4) | ||
| 64 | #define IP_VS_SO_GET_DEST (IP_VS_BASE_CTL+5) /* not used now */ | ||
| 65 | #define IP_VS_SO_GET_TIMEOUT (IP_VS_BASE_CTL+6) | ||
| 66 | #define IP_VS_SO_GET_DAEMON (IP_VS_BASE_CTL+7) | ||
| 67 | #define IP_VS_SO_GET_MAX IP_VS_SO_GET_DAEMON | ||
| 68 | |||
| 69 | |||
| 70 | /* | ||
| 71 | * IPVS Connection Flags | ||
| 72 | */ | ||
| 73 | #define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */ | ||
| 74 | #define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */ | ||
| 75 | #define IP_VS_CONN_F_LOCALNODE 0x0001 /* local node */ | ||
| 76 | #define IP_VS_CONN_F_TUNNEL 0x0002 /* tunneling */ | ||
| 77 | #define IP_VS_CONN_F_DROUTE 0x0003 /* direct routing */ | ||
| 78 | #define IP_VS_CONN_F_BYPASS 0x0004 /* cache bypass */ | ||
| 79 | #define IP_VS_CONN_F_SYNC 0x0020 /* entry created by sync */ | ||
| 80 | #define IP_VS_CONN_F_HASHED 0x0040 /* hashed entry */ | ||
| 81 | #define IP_VS_CONN_F_NOOUTPUT 0x0080 /* no output packets */ | ||
| 82 | #define IP_VS_CONN_F_INACTIVE 0x0100 /* not established */ | ||
| 83 | #define IP_VS_CONN_F_OUT_SEQ 0x0200 /* must do output seq adjust */ | ||
| 84 | #define IP_VS_CONN_F_IN_SEQ 0x0400 /* must do input seq adjust */ | ||
| 85 | #define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */ | ||
| 86 | #define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */ | ||
| 87 | #define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */ | ||
| 88 | |||
| 89 | #define IP_VS_SCHEDNAME_MAXLEN 16 | ||
| 90 | #define IP_VS_IFNAME_MAXLEN 16 | ||
| 91 | |||
| 92 | |||
| 93 | /* | ||
| 94 | * The struct ip_vs_service_user and struct ip_vs_dest_user are | ||
| 95 | * used to set IPVS rules through setsockopt. | ||
| 96 | */ | ||
| 97 | struct ip_vs_service_user { | ||
| 98 | /* virtual service addresses */ | ||
| 99 | u_int16_t protocol; | ||
| 100 | __be32 addr; /* virtual ip address */ | ||
| 101 | __be16 port; | ||
| 102 | u_int32_t fwmark; /* firwall mark of service */ | ||
| 103 | |||
| 104 | /* virtual service options */ | ||
| 105 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; | ||
| 106 | unsigned flags; /* virtual service flags */ | ||
| 107 | unsigned timeout; /* persistent timeout in sec */ | ||
| 108 | __be32 netmask; /* persistent netmask */ | ||
| 109 | }; | ||
| 110 | |||
| 111 | |||
| 112 | struct ip_vs_dest_user { | ||
| 113 | /* destination server address */ | ||
| 114 | __be32 addr; | ||
| 115 | __be16 port; | ||
| 116 | |||
| 117 | /* real server options */ | ||
| 118 | unsigned conn_flags; /* connection flags */ | ||
| 119 | int weight; /* destination weight */ | ||
| 120 | |||
| 121 | /* thresholds for active connections */ | ||
| 122 | u_int32_t u_threshold; /* upper threshold */ | ||
| 123 | u_int32_t l_threshold; /* lower threshold */ | ||
| 124 | }; | ||
| 125 | |||
| 126 | |||
| 127 | /* | ||
| 128 | * IPVS statistics object (for user space) | ||
| 129 | */ | ||
| 130 | struct ip_vs_stats_user | ||
| 131 | { | ||
| 132 | __u32 conns; /* connections scheduled */ | ||
| 133 | __u32 inpkts; /* incoming packets */ | ||
| 134 | __u32 outpkts; /* outgoing packets */ | ||
| 135 | __u64 inbytes; /* incoming bytes */ | ||
| 136 | __u64 outbytes; /* outgoing bytes */ | ||
| 137 | |||
| 138 | __u32 cps; /* current connection rate */ | ||
| 139 | __u32 inpps; /* current in packet rate */ | ||
| 140 | __u32 outpps; /* current out packet rate */ | ||
| 141 | __u32 inbps; /* current in byte rate */ | ||
| 142 | __u32 outbps; /* current out byte rate */ | ||
| 143 | }; | ||
| 144 | |||
| 145 | |||
| 146 | /* The argument to IP_VS_SO_GET_INFO */ | ||
| 147 | struct ip_vs_getinfo { | ||
| 148 | /* version number */ | ||
| 149 | unsigned int version; | ||
| 150 | |||
| 151 | /* size of connection hash table */ | ||
| 152 | unsigned int size; | ||
| 153 | |||
| 154 | /* number of virtual services */ | ||
| 155 | unsigned int num_services; | ||
| 156 | }; | ||
| 157 | |||
| 158 | |||
| 159 | /* The argument to IP_VS_SO_GET_SERVICE */ | ||
| 160 | struct ip_vs_service_entry { | ||
| 161 | /* which service: user fills in these */ | ||
| 162 | u_int16_t protocol; | ||
| 163 | __be32 addr; /* virtual address */ | ||
| 164 | __be16 port; | ||
| 165 | u_int32_t fwmark; /* firwall mark of service */ | ||
| 166 | |||
| 167 | /* service options */ | ||
| 168 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; | ||
| 169 | unsigned flags; /* virtual service flags */ | ||
| 170 | unsigned timeout; /* persistent timeout */ | ||
| 171 | __be32 netmask; /* persistent netmask */ | ||
| 172 | |||
| 173 | /* number of real servers */ | ||
| 174 | unsigned int num_dests; | ||
| 175 | |||
| 176 | /* statistics */ | ||
| 177 | struct ip_vs_stats_user stats; | ||
| 178 | }; | ||
| 179 | |||
| 180 | |||
| 181 | struct ip_vs_dest_entry { | ||
| 182 | __be32 addr; /* destination address */ | ||
| 183 | __be16 port; | ||
| 184 | unsigned conn_flags; /* connection flags */ | ||
| 185 | int weight; /* destination weight */ | ||
| 186 | |||
| 187 | u_int32_t u_threshold; /* upper threshold */ | ||
| 188 | u_int32_t l_threshold; /* lower threshold */ | ||
| 189 | |||
| 190 | u_int32_t activeconns; /* active connections */ | ||
| 191 | u_int32_t inactconns; /* inactive connections */ | ||
| 192 | u_int32_t persistconns; /* persistent connections */ | ||
| 193 | |||
| 194 | /* statistics */ | ||
| 195 | struct ip_vs_stats_user stats; | ||
| 196 | }; | ||
| 197 | |||
| 198 | |||
| 199 | /* The argument to IP_VS_SO_GET_DESTS */ | ||
| 200 | struct ip_vs_get_dests { | ||
| 201 | /* which service: user fills in these */ | ||
| 202 | u_int16_t protocol; | ||
| 203 | __be32 addr; /* virtual address */ | ||
| 204 | __be16 port; | ||
| 205 | u_int32_t fwmark; /* firwall mark of service */ | ||
| 206 | |||
| 207 | /* number of real servers */ | ||
| 208 | unsigned int num_dests; | ||
| 209 | |||
| 210 | /* the real servers */ | ||
| 211 | struct ip_vs_dest_entry entrytable[0]; | ||
| 212 | }; | ||
| 213 | |||
| 214 | |||
| 215 | /* The argument to IP_VS_SO_GET_SERVICES */ | ||
| 216 | struct ip_vs_get_services { | ||
| 217 | /* number of virtual services */ | ||
| 218 | unsigned int num_services; | ||
| 219 | |||
| 220 | /* service table */ | ||
| 221 | struct ip_vs_service_entry entrytable[0]; | ||
| 222 | }; | ||
| 223 | |||
| 224 | |||
| 225 | /* The argument to IP_VS_SO_GET_TIMEOUT */ | ||
| 226 | struct ip_vs_timeout_user { | ||
| 227 | int tcp_timeout; | ||
| 228 | int tcp_fin_timeout; | ||
| 229 | int udp_timeout; | ||
| 230 | }; | ||
| 231 | |||
| 232 | |||
| 233 | /* The argument to IP_VS_SO_GET_DAEMON */ | ||
| 234 | struct ip_vs_daemon_user { | ||
| 235 | /* sync daemon state (master/backup) */ | ||
| 236 | int state; | ||
| 237 | |||
| 238 | /* multicast interface name */ | ||
| 239 | char mcast_ifn[IP_VS_IFNAME_MAXLEN]; | ||
| 240 | |||
| 241 | /* SyncID we belong to */ | ||
| 242 | int syncid; | ||
| 243 | }; | ||
| 244 | |||
| 245 | #endif /* _IP_VS_H */ | ||
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 57aefa160a92..b96144887444 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
| @@ -108,8 +108,7 @@ static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) | |||
| 108 | 108 | ||
| 109 | static inline void print_ip_sym(unsigned long ip) | 109 | static inline void print_ip_sym(unsigned long ip) |
| 110 | { | 110 | { |
| 111 | printk("[<%p>]", (void *) ip); | 111 | printk("[<%p>] %pS\n", (void *) ip, (void *) ip); |
| 112 | print_symbol(" %s\n", ip); | ||
| 113 | } | 112 | } |
| 114 | 113 | ||
| 115 | #endif /*_LINUX_KALLSYMS_H*/ | 114 | #endif /*_LINUX_KALLSYMS_H*/ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fdbbf72ca2eb..aaa998f65c7a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -75,6 +75,12 @@ extern const char linux_proc_banner[]; | |||
| 75 | */ | 75 | */ |
| 76 | #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) | 76 | #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) |
| 77 | 77 | ||
| 78 | /** | ||
| 79 | * lower_32_bits - return bits 0-31 of a number | ||
| 80 | * @n: the number we're accessing | ||
| 81 | */ | ||
| 82 | #define lower_32_bits(n) ((u32)(n)) | ||
| 83 | |||
| 78 | #define KERN_EMERG "<0>" /* system is unusable */ | 84 | #define KERN_EMERG "<0>" /* system is unusable */ |
| 79 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | 85 | #define KERN_ALERT "<1>" /* action must be taken immediately */ |
| 80 | #define KERN_CRIT "<2>" /* critical conditions */ | 86 | #define KERN_CRIT "<2>" /* critical conditions */ |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 0ea064cbfbc8..69511f74f912 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
| @@ -371,6 +371,7 @@ struct kvm_trace_rec { | |||
| 371 | #define KVM_CAP_PV_MMU 13 | 371 | #define KVM_CAP_PV_MMU 13 |
| 372 | #define KVM_CAP_MP_STATE 14 | 372 | #define KVM_CAP_MP_STATE 14 |
| 373 | #define KVM_CAP_COALESCED_MMIO 15 | 373 | #define KVM_CAP_COALESCED_MMIO 15 |
| 374 | #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ | ||
| 374 | 375 | ||
| 375 | /* | 376 | /* |
| 376 | * ioctls for VM fds | 377 | * ioctls for VM fds |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 07d68a8ae8e9..8525afc53107 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -121,6 +121,12 @@ struct kvm { | |||
| 121 | struct kvm_coalesced_mmio_dev *coalesced_mmio_dev; | 121 | struct kvm_coalesced_mmio_dev *coalesced_mmio_dev; |
| 122 | struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; | 122 | struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; |
| 123 | #endif | 123 | #endif |
| 124 | |||
| 125 | #ifdef KVM_ARCH_WANT_MMU_NOTIFIER | ||
| 126 | struct mmu_notifier mmu_notifier; | ||
| 127 | unsigned long mmu_notifier_seq; | ||
| 128 | long mmu_notifier_count; | ||
| 129 | #endif | ||
| 124 | }; | 130 | }; |
| 125 | 131 | ||
| 126 | /* The guest did something we don't support. */ | 132 | /* The guest did something we don't support. */ |
| @@ -332,4 +338,22 @@ int kvm_trace_ioctl(unsigned int ioctl, unsigned long arg) | |||
| 332 | #define kvm_trace_cleanup() ((void)0) | 338 | #define kvm_trace_cleanup() ((void)0) |
| 333 | #endif | 339 | #endif |
| 334 | 340 | ||
| 341 | #ifdef KVM_ARCH_WANT_MMU_NOTIFIER | ||
| 342 | static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_seq) | ||
| 343 | { | ||
| 344 | if (unlikely(vcpu->kvm->mmu_notifier_count)) | ||
| 345 | return 1; | ||
| 346 | /* | ||
| 347 | * Both reads happen under the mmu_lock and both values are | ||
| 348 | * modified under mmu_lock, so there's no need of smb_rmb() | ||
| 349 | * here in between, otherwise mmu_notifier_count should be | ||
| 350 | * read before mmu_notifier_seq, see | ||
| 351 | * mmu_notifier_invalidate_range_end write side. | ||
| 352 | */ | ||
| 353 | if (vcpu->kvm->mmu_notifier_seq != mmu_seq) | ||
| 354 | return 1; | ||
| 355 | return 0; | ||
| 356 | } | ||
| 357 | #endif | ||
| 358 | |||
| 335 | #endif | 359 | #endif |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 5b247b8a6b3b..06b80337303b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -60,9 +60,9 @@ | |||
| 60 | 60 | ||
| 61 | /* note: prints function name for you */ | 61 | /* note: prints function name for you */ |
| 62 | #ifdef ATA_DEBUG | 62 | #ifdef ATA_DEBUG |
| 63 | #define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) | 63 | #define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) |
| 64 | #ifdef ATA_VERBOSE_DEBUG | 64 | #ifdef ATA_VERBOSE_DEBUG |
| 65 | #define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) | 65 | #define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) |
| 66 | #else | 66 | #else |
| 67 | #define VPRINTK(fmt, args...) | 67 | #define VPRINTK(fmt, args...) |
| 68 | #endif /* ATA_VERBOSE_DEBUG */ | 68 | #endif /* ATA_VERBOSE_DEBUG */ |
| @@ -71,7 +71,7 @@ | |||
| 71 | #define VPRINTK(fmt, args...) | 71 | #define VPRINTK(fmt, args...) |
| 72 | #endif /* ATA_DEBUG */ | 72 | #endif /* ATA_DEBUG */ |
| 73 | 73 | ||
| 74 | #define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) | 74 | #define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __func__, ## args) |
| 75 | 75 | ||
| 76 | /* NEW: debug levels */ | 76 | /* NEW: debug levels */ |
| 77 | #define HAVE_LIBATA_MSG 1 | 77 | #define HAVE_LIBATA_MSG 1 |
| @@ -750,6 +750,7 @@ struct ata_port_operations { | |||
| 750 | void (*set_piomode)(struct ata_port *ap, struct ata_device *dev); | 750 | void (*set_piomode)(struct ata_port *ap, struct ata_device *dev); |
| 751 | void (*set_dmamode)(struct ata_port *ap, struct ata_device *dev); | 751 | void (*set_dmamode)(struct ata_port *ap, struct ata_device *dev); |
| 752 | int (*set_mode)(struct ata_link *link, struct ata_device **r_failed_dev); | 752 | int (*set_mode)(struct ata_link *link, struct ata_device **r_failed_dev); |
| 753 | unsigned int (*read_id)(struct ata_device *dev, struct ata_taskfile *tf, u16 *id); | ||
| 753 | 754 | ||
| 754 | void (*dev_config)(struct ata_device *dev); | 755 | void (*dev_config)(struct ata_device *dev); |
| 755 | 756 | ||
| @@ -951,6 +952,8 @@ extern void ata_id_string(const u16 *id, unsigned char *s, | |||
| 951 | unsigned int ofs, unsigned int len); | 952 | unsigned int ofs, unsigned int len); |
| 952 | extern void ata_id_c_string(const u16 *id, unsigned char *s, | 953 | extern void ata_id_c_string(const u16 *id, unsigned char *s, |
| 953 | unsigned int ofs, unsigned int len); | 954 | unsigned int ofs, unsigned int len); |
| 955 | extern unsigned int ata_do_dev_read_id(struct ata_device *dev, | ||
| 956 | struct ata_taskfile *tf, u16 *id); | ||
| 954 | extern void ata_qc_complete(struct ata_queued_cmd *qc); | 957 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
| 955 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); | 958 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); |
| 956 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | 959 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, |
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h index 5c948f337817..8f2d60da04e7 100644 --- a/include/linux/mISDNif.h +++ b/include/linux/mISDNif.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | */ | 37 | */ |
| 38 | #define MISDN_MAJOR_VERSION 1 | 38 | #define MISDN_MAJOR_VERSION 1 |
| 39 | #define MISDN_MINOR_VERSION 0 | 39 | #define MISDN_MINOR_VERSION 0 |
| 40 | #define MISDN_RELEASE 18 | 40 | #define MISDN_RELEASE 19 |
| 41 | 41 | ||
| 42 | /* primitives for information exchange | 42 | /* primitives for information exchange |
| 43 | * generell format | 43 | * generell format |
| @@ -242,7 +242,8 @@ struct mISDNhead { | |||
| 242 | #define TEI_SAPI 63 | 242 | #define TEI_SAPI 63 |
| 243 | #define CTRL_SAPI 0 | 243 | #define CTRL_SAPI 0 |
| 244 | 244 | ||
| 245 | #define MISDN_CHMAP_SIZE 4 | 245 | #define MISDN_MAX_CHANNEL 127 |
| 246 | #define MISDN_CHMAP_SIZE ((MISDN_MAX_CHANNEL + 1) >> 3) | ||
| 246 | 247 | ||
| 247 | #define SOL_MISDN 0 | 248 | #define SOL_MISDN 0 |
| 248 | 249 | ||
| @@ -275,11 +276,32 @@ struct mISDN_devinfo { | |||
| 275 | u_int Dprotocols; | 276 | u_int Dprotocols; |
| 276 | u_int Bprotocols; | 277 | u_int Bprotocols; |
| 277 | u_int protocol; | 278 | u_int protocol; |
| 278 | u_long channelmap[MISDN_CHMAP_SIZE]; | 279 | u_char channelmap[MISDN_CHMAP_SIZE]; |
| 279 | u_int nrbchan; | 280 | u_int nrbchan; |
| 280 | char name[MISDN_MAX_IDLEN]; | 281 | char name[MISDN_MAX_IDLEN]; |
| 281 | }; | 282 | }; |
| 282 | 283 | ||
| 284 | static inline int | ||
| 285 | test_channelmap(u_int nr, u_char *map) | ||
| 286 | { | ||
| 287 | if (nr <= MISDN_MAX_CHANNEL) | ||
| 288 | return map[nr >> 3] & (1 << (nr & 7)); | ||
| 289 | else | ||
| 290 | return 0; | ||
| 291 | } | ||
| 292 | |||
| 293 | static inline void | ||
| 294 | set_channelmap(u_int nr, u_char *map) | ||
| 295 | { | ||
| 296 | map[nr >> 3] |= (1 << (nr & 7)); | ||
| 297 | } | ||
| 298 | |||
| 299 | static inline void | ||
| 300 | clear_channelmap(u_int nr, u_char *map) | ||
| 301 | { | ||
| 302 | map[nr >> 3] &= ~(1 << (nr & 7)); | ||
| 303 | } | ||
| 304 | |||
| 283 | /* CONTROL_CHANNEL parameters */ | 305 | /* CONTROL_CHANNEL parameters */ |
| 284 | #define MISDN_CTRL_GETOP 0x0000 | 306 | #define MISDN_CTRL_GETOP 0x0000 |
| 285 | #define MISDN_CTRL_LOOP 0x0001 | 307 | #define MISDN_CTRL_LOOP 0x0001 |
| @@ -405,7 +427,7 @@ struct mISDNdevice { | |||
| 405 | u_int Dprotocols; | 427 | u_int Dprotocols; |
| 406 | u_int Bprotocols; | 428 | u_int Bprotocols; |
| 407 | u_int nrbchan; | 429 | u_int nrbchan; |
| 408 | u_long channelmap[MISDN_CHMAP_SIZE]; | 430 | u_char channelmap[MISDN_CHMAP_SIZE]; |
| 409 | struct list_head bchannels; | 431 | struct list_head bchannels; |
| 410 | struct mISDNchannel *teimgr; | 432 | struct mISDNchannel *teimgr; |
| 411 | struct device dev; | 433 | struct device dev; |
| @@ -430,7 +452,7 @@ struct mISDNstack { | |||
| 430 | #endif | 452 | #endif |
| 431 | }; | 453 | }; |
| 432 | 454 | ||
| 433 | /* global alloc/queue dunctions */ | 455 | /* global alloc/queue functions */ |
| 434 | 456 | ||
| 435 | static inline struct sk_buff * | 457 | static inline struct sk_buff * |
| 436 | mI_alloc_skb(unsigned int len, gfp_t gfp_mask) | 458 | mI_alloc_skb(unsigned int len, gfp_t gfp_mask) |
diff --git a/include/linux/maple.h b/include/linux/maple.h index 523a286bb477..c853b1066018 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define __LINUX_MAPLE_H | 2 | #define __LINUX_MAPLE_H |
| 3 | 3 | ||
| 4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
| 5 | #include <mach/maple.h> | ||
| 5 | 6 | ||
| 6 | extern struct bus_type maple_bus_type; | 7 | extern struct bus_type maple_bus_type; |
| 7 | 8 | ||
| @@ -33,6 +34,7 @@ struct mapleq { | |||
| 33 | void *sendbuf, *recvbuf, *recvbufdcsp; | 34 | void *sendbuf, *recvbuf, *recvbufdcsp; |
| 34 | unsigned char length; | 35 | unsigned char length; |
| 35 | enum maple_code command; | 36 | enum maple_code command; |
| 37 | struct mutex mutex; | ||
| 36 | }; | 38 | }; |
| 37 | 39 | ||
| 38 | struct maple_devinfo { | 40 | struct maple_devinfo { |
| @@ -69,7 +71,9 @@ void maple_getcond_callback(struct maple_device *dev, | |||
| 69 | unsigned long interval, | 71 | unsigned long interval, |
| 70 | unsigned long function); | 72 | unsigned long function); |
| 71 | int maple_driver_register(struct device_driver *drv); | 73 | int maple_driver_register(struct device_driver *drv); |
| 72 | void maple_add_packet(struct mapleq *mq); | 74 | int maple_add_packet_sleeps(struct maple_device *mdev, u32 function, |
| 75 | u32 command, u32 length, void *data); | ||
| 76 | void maple_clear_dev(struct maple_device *mdev); | ||
| 73 | 77 | ||
| 74 | #define to_maple_dev(n) container_of(n, struct maple_device, dev) | 78 | #define to_maple_dev(n) container_of(n, struct maple_device, dev) |
| 75 | #define to_maple_driver(n) container_of(n, struct maple_driver, drv) | 79 | #define to_maple_driver(n) container_of(n, struct maple_driver, drv) |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 866a3dbe5c75..335288bff1b7 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -744,6 +744,8 @@ struct zap_details { | |||
| 744 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, | 744 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, |
| 745 | pte_t pte); | 745 | pte_t pte); |
| 746 | 746 | ||
| 747 | int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, | ||
| 748 | unsigned long size); | ||
| 747 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, | 749 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, |
| 748 | unsigned long size, struct zap_details *); | 750 | unsigned long size, struct zap_details *); |
| 749 | unsigned long unmap_vmas(struct mmu_gather **tlb, | 751 | unsigned long unmap_vmas(struct mmu_gather **tlb, |
| @@ -1041,7 +1043,6 @@ extern unsigned long absent_pages_in_range(unsigned long start_pfn, | |||
| 1041 | extern void get_pfn_range_for_nid(unsigned int nid, | 1043 | extern void get_pfn_range_for_nid(unsigned int nid, |
| 1042 | unsigned long *start_pfn, unsigned long *end_pfn); | 1044 | unsigned long *start_pfn, unsigned long *end_pfn); |
| 1043 | extern unsigned long find_min_pfn_with_active_regions(void); | 1045 | extern unsigned long find_min_pfn_with_active_regions(void); |
| 1044 | extern unsigned long find_max_pfn_with_active_regions(void); | ||
| 1045 | extern void free_bootmem_with_active_regions(int nid, | 1046 | extern void free_bootmem_with_active_regions(int nid, |
| 1046 | unsigned long max_low_pfn); | 1047 | unsigned long max_low_pfn); |
| 1047 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); | 1048 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); |
diff --git a/include/linux/mount.h b/include/linux/mount.h index b5efaa2132ab..30a1d63b6fb5 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -105,7 +105,8 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, | |||
| 105 | 105 | ||
| 106 | struct nameidata; | 106 | struct nameidata; |
| 107 | 107 | ||
| 108 | extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd, | 108 | struct path; |
| 109 | extern int do_add_mount(struct vfsmount *newmnt, struct path *path, | ||
| 109 | int mnt_flags, struct list_head *fslist); | 110 | int mnt_flags, struct list_head *fslist); |
| 110 | 111 | ||
| 111 | extern void mark_mounts_for_expiry(struct list_head *mounts); | 112 | extern void mark_mounts_for_expiry(struct list_head *mounts); |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 4ed40caff4e5..922636548558 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -272,7 +272,11 @@ static inline void mtd_erase_callback(struct erase_info *instr) | |||
| 272 | printk(KERN_INFO args); \ | 272 | printk(KERN_INFO args); \ |
| 273 | } while(0) | 273 | } while(0) |
| 274 | #else /* CONFIG_MTD_DEBUG */ | 274 | #else /* CONFIG_MTD_DEBUG */ |
| 275 | #define DEBUG(n, args...) do { } while(0) | 275 | #define DEBUG(n, args...) \ |
| 276 | do { \ | ||
| 277 | if (0) \ | ||
| 278 | printk(KERN_INFO args); \ | ||
| 279 | } while(0) | ||
| 276 | 280 | ||
| 277 | #endif /* CONFIG_MTD_DEBUG */ | 281 | #endif /* CONFIG_MTD_DEBUG */ |
| 278 | 282 | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 83f678702dff..81774e5facf4 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -177,7 +177,9 @@ typedef enum { | |||
| 177 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) | 177 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) |
| 178 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) | 178 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) |
| 179 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) | 179 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) |
| 180 | #define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT)) | 180 | /* Large page NAND with SOFT_ECC should support subpage reads */ |
| 181 | #define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \ | ||
| 182 | && (chip->page_shift > 9)) | ||
| 181 | 183 | ||
| 182 | /* Mask to zero out the chip options, which come from the id table */ | 184 | /* Mask to zero out the chip options, which come from the id table */ |
| 183 | #define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) | 185 | #define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b4d056ceab96..ee583f642a9f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -440,6 +440,7 @@ static inline void napi_synchronize(const struct napi_struct *n) | |||
| 440 | enum netdev_queue_state_t | 440 | enum netdev_queue_state_t |
| 441 | { | 441 | { |
| 442 | __QUEUE_STATE_XOFF, | 442 | __QUEUE_STATE_XOFF, |
| 443 | __QUEUE_STATE_FROZEN, | ||
| 443 | }; | 444 | }; |
| 444 | 445 | ||
| 445 | struct netdev_queue { | 446 | struct netdev_queue { |
| @@ -636,7 +637,7 @@ struct net_device | |||
| 636 | unsigned int real_num_tx_queues; | 637 | unsigned int real_num_tx_queues; |
| 637 | 638 | ||
| 638 | unsigned long tx_queue_len; /* Max frames per queue allowed */ | 639 | unsigned long tx_queue_len; /* Max frames per queue allowed */ |
| 639 | 640 | spinlock_t tx_global_lock; | |
| 640 | /* | 641 | /* |
| 641 | * One part is mostly used on xmit path (device) | 642 | * One part is mostly used on xmit path (device) |
| 642 | */ | 643 | */ |
| @@ -1099,6 +1100,11 @@ static inline int netif_queue_stopped(const struct net_device *dev) | |||
| 1099 | return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0)); | 1100 | return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0)); |
| 1100 | } | 1101 | } |
| 1101 | 1102 | ||
| 1103 | static inline int netif_tx_queue_frozen(const struct netdev_queue *dev_queue) | ||
| 1104 | { | ||
| 1105 | return test_bit(__QUEUE_STATE_FROZEN, &dev_queue->state); | ||
| 1106 | } | ||
| 1107 | |||
| 1102 | /** | 1108 | /** |
| 1103 | * netif_running - test if up | 1109 | * netif_running - test if up |
| 1104 | * @dev: network device | 1110 | * @dev: network device |
| @@ -1475,6 +1481,26 @@ static inline void __netif_tx_lock_bh(struct netdev_queue *txq) | |||
| 1475 | txq->xmit_lock_owner = smp_processor_id(); | 1481 | txq->xmit_lock_owner = smp_processor_id(); |
| 1476 | } | 1482 | } |
| 1477 | 1483 | ||
| 1484 | static inline int __netif_tx_trylock(struct netdev_queue *txq) | ||
| 1485 | { | ||
| 1486 | int ok = spin_trylock(&txq->_xmit_lock); | ||
| 1487 | if (likely(ok)) | ||
| 1488 | txq->xmit_lock_owner = smp_processor_id(); | ||
| 1489 | return ok; | ||
| 1490 | } | ||
| 1491 | |||
| 1492 | static inline void __netif_tx_unlock(struct netdev_queue *txq) | ||
| 1493 | { | ||
| 1494 | txq->xmit_lock_owner = -1; | ||
| 1495 | spin_unlock(&txq->_xmit_lock); | ||
| 1496 | } | ||
| 1497 | |||
| 1498 | static inline void __netif_tx_unlock_bh(struct netdev_queue *txq) | ||
| 1499 | { | ||
| 1500 | txq->xmit_lock_owner = -1; | ||
| 1501 | spin_unlock_bh(&txq->_xmit_lock); | ||
| 1502 | } | ||
| 1503 | |||
| 1478 | /** | 1504 | /** |
| 1479 | * netif_tx_lock - grab network device transmit lock | 1505 | * netif_tx_lock - grab network device transmit lock |
| 1480 | * @dev: network device | 1506 | * @dev: network device |
| @@ -1484,12 +1510,23 @@ static inline void __netif_tx_lock_bh(struct netdev_queue *txq) | |||
| 1484 | */ | 1510 | */ |
| 1485 | static inline void netif_tx_lock(struct net_device *dev) | 1511 | static inline void netif_tx_lock(struct net_device *dev) |
| 1486 | { | 1512 | { |
| 1487 | int cpu = smp_processor_id(); | ||
| 1488 | unsigned int i; | 1513 | unsigned int i; |
| 1514 | int cpu; | ||
| 1489 | 1515 | ||
| 1516 | spin_lock(&dev->tx_global_lock); | ||
| 1517 | cpu = smp_processor_id(); | ||
| 1490 | for (i = 0; i < dev->num_tx_queues; i++) { | 1518 | for (i = 0; i < dev->num_tx_queues; i++) { |
| 1491 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); | 1519 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); |
| 1520 | |||
| 1521 | /* We are the only thread of execution doing a | ||
| 1522 | * freeze, but we have to grab the _xmit_lock in | ||
| 1523 | * order to synchronize with threads which are in | ||
| 1524 | * the ->hard_start_xmit() handler and already | ||
| 1525 | * checked the frozen bit. | ||
| 1526 | */ | ||
| 1492 | __netif_tx_lock(txq, cpu); | 1527 | __netif_tx_lock(txq, cpu); |
| 1528 | set_bit(__QUEUE_STATE_FROZEN, &txq->state); | ||
| 1529 | __netif_tx_unlock(txq); | ||
| 1493 | } | 1530 | } |
| 1494 | } | 1531 | } |
| 1495 | 1532 | ||
| @@ -1499,40 +1536,22 @@ static inline void netif_tx_lock_bh(struct net_device *dev) | |||
| 1499 | netif_tx_lock(dev); | 1536 | netif_tx_lock(dev); |
| 1500 | } | 1537 | } |
| 1501 | 1538 | ||
| 1502 | static inline int __netif_tx_trylock(struct netdev_queue *txq) | ||
| 1503 | { | ||
| 1504 | int ok = spin_trylock(&txq->_xmit_lock); | ||
| 1505 | if (likely(ok)) | ||
| 1506 | txq->xmit_lock_owner = smp_processor_id(); | ||
| 1507 | return ok; | ||
| 1508 | } | ||
| 1509 | |||
| 1510 | static inline int netif_tx_trylock(struct net_device *dev) | ||
| 1511 | { | ||
| 1512 | return __netif_tx_trylock(netdev_get_tx_queue(dev, 0)); | ||
| 1513 | } | ||
| 1514 | |||
| 1515 | static inline void __netif_tx_unlock(struct netdev_queue *txq) | ||
| 1516 | { | ||
| 1517 | txq->xmit_lock_owner = -1; | ||
| 1518 | spin_unlock(&txq->_xmit_lock); | ||
| 1519 | } | ||
| 1520 | |||
| 1521 | static inline void __netif_tx_unlock_bh(struct netdev_queue *txq) | ||
| 1522 | { | ||
| 1523 | txq->xmit_lock_owner = -1; | ||
| 1524 | spin_unlock_bh(&txq->_xmit_lock); | ||
| 1525 | } | ||
| 1526 | |||
| 1527 | static inline void netif_tx_unlock(struct net_device *dev) | 1539 | static inline void netif_tx_unlock(struct net_device *dev) |
| 1528 | { | 1540 | { |
| 1529 | unsigned int i; | 1541 | unsigned int i; |
| 1530 | 1542 | ||
| 1531 | for (i = 0; i < dev->num_tx_queues; i++) { | 1543 | for (i = 0; i < dev->num_tx_queues; i++) { |
| 1532 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); | 1544 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); |
| 1533 | __netif_tx_unlock(txq); | ||
| 1534 | } | ||
| 1535 | 1545 | ||
| 1546 | /* No need to grab the _xmit_lock here. If the | ||
| 1547 | * queue is not stopped for another reason, we | ||
| 1548 | * force a schedule. | ||
| 1549 | */ | ||
| 1550 | clear_bit(__QUEUE_STATE_FROZEN, &txq->state); | ||
| 1551 | if (!test_bit(__QUEUE_STATE_XOFF, &txq->state)) | ||
| 1552 | __netif_schedule(txq->qdisc); | ||
| 1553 | } | ||
| 1554 | spin_unlock(&dev->tx_global_lock); | ||
| 1536 | } | 1555 | } |
| 1537 | 1556 | ||
| 1538 | static inline void netif_tx_unlock_bh(struct net_device *dev) | 1557 | static inline void netif_tx_unlock_bh(struct net_device *dev) |
| @@ -1556,13 +1575,18 @@ static inline void netif_tx_unlock_bh(struct net_device *dev) | |||
| 1556 | static inline void netif_tx_disable(struct net_device *dev) | 1575 | static inline void netif_tx_disable(struct net_device *dev) |
| 1557 | { | 1576 | { |
| 1558 | unsigned int i; | 1577 | unsigned int i; |
| 1578 | int cpu; | ||
| 1559 | 1579 | ||
| 1560 | netif_tx_lock_bh(dev); | 1580 | local_bh_disable(); |
| 1581 | cpu = smp_processor_id(); | ||
| 1561 | for (i = 0; i < dev->num_tx_queues; i++) { | 1582 | for (i = 0; i < dev->num_tx_queues; i++) { |
| 1562 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); | 1583 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); |
| 1584 | |||
| 1585 | __netif_tx_lock(txq, cpu); | ||
| 1563 | netif_tx_stop_queue(txq); | 1586 | netif_tx_stop_queue(txq); |
| 1587 | __netif_tx_unlock(txq); | ||
| 1564 | } | 1588 | } |
| 1565 | netif_tx_unlock_bh(dev); | 1589 | local_bh_enable(); |
| 1566 | } | 1590 | } |
| 1567 | 1591 | ||
| 1568 | static inline void netif_addr_lock(struct net_device *dev) | 1592 | static inline void netif_addr_lock(struct net_device *dev) |
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index 22ce29995f13..a049df4f2236 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
| @@ -30,6 +30,9 @@ enum tcp_conntrack { | |||
| 30 | /* Be liberal in window checking */ | 30 | /* Be liberal in window checking */ |
| 31 | #define IP_CT_TCP_FLAG_BE_LIBERAL 0x08 | 31 | #define IP_CT_TCP_FLAG_BE_LIBERAL 0x08 |
| 32 | 32 | ||
| 33 | /* Has unacknowledged data */ | ||
| 34 | #define IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10 | ||
| 35 | |||
| 33 | struct nf_ct_tcp_flags { | 36 | struct nf_ct_tcp_flags { |
| 34 | u_int8_t flags; | 37 | u_int8_t flags; |
| 35 | u_int8_t mask; | 38 | u_int8_t mask; |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 54590a9a103e..25aaccdb2f26 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -239,9 +239,6 @@ static inline void __SetPageUptodate(struct page *page) | |||
| 239 | { | 239 | { |
| 240 | smp_wmb(); | 240 | smp_wmb(); |
| 241 | __set_bit(PG_uptodate, &(page)->flags); | 241 | __set_bit(PG_uptodate, &(page)->flags); |
| 242 | #ifdef CONFIG_S390 | ||
| 243 | page_clear_dirty(page); | ||
| 244 | #endif | ||
| 245 | } | 242 | } |
| 246 | 243 | ||
| 247 | static inline void SetPageUptodate(struct page *page) | 244 | static inline void SetPageUptodate(struct page *page) |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index a39b38ccdc97..69ed3cb1197a 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -143,6 +143,29 @@ static inline int page_cache_get_speculative(struct page *page) | |||
| 143 | return 1; | 143 | return 1; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | /* | ||
| 147 | * Same as above, but add instead of inc (could just be merged) | ||
| 148 | */ | ||
| 149 | static inline int page_cache_add_speculative(struct page *page, int count) | ||
| 150 | { | ||
| 151 | VM_BUG_ON(in_interrupt()); | ||
| 152 | |||
| 153 | #if !defined(CONFIG_SMP) && defined(CONFIG_CLASSIC_RCU) | ||
| 154 | # ifdef CONFIG_PREEMPT | ||
| 155 | VM_BUG_ON(!in_atomic()); | ||
| 156 | # endif | ||
| 157 | VM_BUG_ON(page_count(page) == 0); | ||
| 158 | atomic_add(count, &page->_count); | ||
| 159 | |||
| 160 | #else | ||
| 161 | if (unlikely(!atomic_add_unless(&page->_count, count, 0))) | ||
| 162 | return 0; | ||
| 163 | #endif | ||
| 164 | VM_BUG_ON(PageCompound(page) && page != compound_head(page)); | ||
| 165 | |||
| 166 | return 1; | ||
| 167 | } | ||
| 168 | |||
| 146 | static inline int page_freeze_refs(struct page *page, int count) | 169 | static inline int page_freeze_refs(struct page *page, int count) |
| 147 | { | 170 | { |
| 148 | return likely(atomic_cmpxchg(&page->_count, count, 0) == count); | 171 | return likely(atomic_cmpxchg(&page->_count, count, 0) == count); |
diff --git a/include/linux/parser.h b/include/linux/parser.h index cc554ca8bc78..7dcd05075756 100644 --- a/include/linux/parser.h +++ b/include/linux/parser.h | |||
| @@ -14,7 +14,7 @@ struct match_token { | |||
| 14 | const char *pattern; | 14 | const char *pattern; |
| 15 | }; | 15 | }; |
| 16 | 16 | ||
| 17 | typedef const struct match_token match_table_t[]; | 17 | typedef struct match_token match_table_t[]; |
| 18 | 18 | ||
| 19 | /* Maximum number of arguments that match_token will find in a pattern */ | 19 | /* Maximum number of arguments that match_token will find in a pattern */ |
| 20 | enum {MAX_OPT_ARGS = 3}; | 20 | enum {MAX_OPT_ARGS = 3}; |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 68ed19ccf1f7..ea96ead1d39d 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -78,6 +78,7 @@ enum power_supply_property { | |||
| 78 | POWER_SUPPLY_PROP_CHARGE_EMPTY, | 78 | POWER_SUPPLY_PROP_CHARGE_EMPTY, |
| 79 | POWER_SUPPLY_PROP_CHARGE_NOW, | 79 | POWER_SUPPLY_PROP_CHARGE_NOW, |
| 80 | POWER_SUPPLY_PROP_CHARGE_AVG, | 80 | POWER_SUPPLY_PROP_CHARGE_AVG, |
| 81 | POWER_SUPPLY_PROP_CHARGE_COUNTER, | ||
| 81 | POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, | 82 | POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, |
| 82 | POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN, | 83 | POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN, |
| 83 | POWER_SUPPLY_PROP_ENERGY_FULL, | 84 | POWER_SUPPLY_PROP_ENERGY_FULL, |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 742187f7a05c..ca6b9b5c8d52 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -43,6 +43,8 @@ int dquot_mark_dquot_dirty(struct dquot *dquot); | |||
| 43 | 43 | ||
| 44 | int vfs_quota_on(struct super_block *sb, int type, int format_id, | 44 | int vfs_quota_on(struct super_block *sb, int type, int format_id, |
| 45 | char *path, int remount); | 45 | char *path, int remount); |
| 46 | int vfs_quota_on_path(struct super_block *sb, int type, int format_id, | ||
| 47 | struct path *path); | ||
| 46 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, | 48 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, |
| 47 | int format_id, int type); | 49 | int format_id, int type); |
| 48 | int vfs_quota_off(struct super_block *sb, int type, int remount); | 50 | int vfs_quota_off(struct super_block *sb, int type, int remount); |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 9f2549ac0e2d..c200b9a34aff 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
| @@ -128,6 +128,7 @@ struct mddev_s | |||
| 128 | #define MD_CHANGE_DEVS 0 /* Some device status has changed */ | 128 | #define MD_CHANGE_DEVS 0 /* Some device status has changed */ |
| 129 | #define MD_CHANGE_CLEAN 1 /* transition to or from 'clean' */ | 129 | #define MD_CHANGE_CLEAN 1 /* transition to or from 'clean' */ |
| 130 | #define MD_CHANGE_PENDING 2 /* superblock update in progress */ | 130 | #define MD_CHANGE_PENDING 2 /* superblock update in progress */ |
| 131 | #define MD_NOTIFY_ARRAY_STATE 3 /* atomic context wants to notify userspace */ | ||
| 131 | 132 | ||
| 132 | int ro; | 133 | int ro; |
| 133 | 134 | ||
diff --git a/include/linux/regulator/bq24022.h b/include/linux/regulator/bq24022.h new file mode 100644 index 000000000000..e84b0a9feda5 --- /dev/null +++ b/include/linux/regulator/bq24022.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Support for TI bq24022 (bqTINY-II) Dual Input (USB/AC Adpater) | ||
| 3 | * 1-Cell Li-Ion Charger connected via GPIOs. | ||
| 4 | * | ||
| 5 | * Copyright (c) 2008 Philipp Zabel | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | /** | ||
| 14 | * bq24022_mach_info - platform data for bq24022 | ||
| 15 | * @gpio_nce: GPIO line connected to the nCE pin, used to enable / disable charging | ||
| 16 | * @gpio_iset2: GPIO line connected to the ISET2 pin, used to limit charging current to 100 mA / 500 mA | ||
| 17 | */ | ||
| 18 | struct bq24022_mach_info { | ||
| 19 | int gpio_nce; | ||
| 20 | int gpio_iset2; | ||
| 21 | }; | ||
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h new file mode 100644 index 000000000000..afdc4558bb94 --- /dev/null +++ b/include/linux/regulator/consumer.h | |||
| @@ -0,0 +1,284 @@ | |||
| 1 | /* | ||
| 2 | * consumer.h -- SoC Regulator consumer support. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Liam Girdwood <lg@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * Regulator Consumer Interface. | ||
| 13 | * | ||
| 14 | * A Power Management Regulator framework for SoC based devices. | ||
| 15 | * Features:- | ||
| 16 | * o Voltage and current level control. | ||
| 17 | * o Operating mode control. | ||
| 18 | * o Regulator status. | ||
| 19 | * o sysfs entries for showing client devices and status | ||
| 20 | * | ||
| 21 | * EXPERIMENTAL FEATURES: | ||
| 22 | * Dynamic Regulator operating Mode Switching (DRMS) - allows regulators | ||
| 23 | * to use most efficient operating mode depending upon voltage and load and | ||
| 24 | * is transparent to client drivers. | ||
| 25 | * | ||
| 26 | * e.g. Devices x,y,z share regulator r. Device x and y draw 20mA each during | ||
| 27 | * IO and 1mA at idle. Device z draws 100mA when under load and 5mA when | ||
| 28 | * idling. Regulator r has > 90% efficiency in NORMAL mode at loads > 100mA | ||
| 29 | * but this drops rapidly to 60% when below 100mA. Regulator r has > 90% | ||
| 30 | * efficiency in IDLE mode at loads < 10mA. Thus regulator r will operate | ||
| 31 | * in normal mode for loads > 10mA and in IDLE mode for load <= 10mA. | ||
| 32 | * | ||
| 33 | */ | ||
| 34 | |||
| 35 | #ifndef __LINUX_REGULATOR_CONSUMER_H_ | ||
| 36 | #define __LINUX_REGULATOR_CONSUMER_H_ | ||
| 37 | |||
| 38 | /* | ||
| 39 | * Regulator operating modes. | ||
| 40 | * | ||
| 41 | * Regulators can run in a variety of different operating modes depending on | ||
| 42 | * output load. This allows further system power savings by selecting the | ||
| 43 | * best (and most efficient) regulator mode for a desired load. | ||
| 44 | * | ||
| 45 | * Most drivers will only care about NORMAL. The modes below are generic and | ||
| 46 | * will probably not match the naming convention of your regulator data sheet | ||
| 47 | * but should match the use cases in the datasheet. | ||
| 48 | * | ||
| 49 | * In order of power efficiency (least efficient at top). | ||
| 50 | * | ||
| 51 | * Mode Description | ||
| 52 | * FAST Regulator can handle fast changes in it's load. | ||
| 53 | * e.g. useful in CPU voltage & frequency scaling where | ||
| 54 | * load can quickly increase with CPU frequency increases. | ||
| 55 | * | ||
| 56 | * NORMAL Normal regulator power supply mode. Most drivers will | ||
| 57 | * use this mode. | ||
| 58 | * | ||
| 59 | * IDLE Regulator runs in a more efficient mode for light | ||
| 60 | * loads. Can be used for devices that have a low power | ||
| 61 | * requirement during periods of inactivity. This mode | ||
| 62 | * may be more noisy than NORMAL and may not be able | ||
| 63 | * to handle fast load switching. | ||
| 64 | * | ||
| 65 | * STANDBY Regulator runs in the most efficient mode for very | ||
| 66 | * light loads. Can be used by devices when they are | ||
| 67 | * in a sleep/standby state. This mode is likely to be | ||
| 68 | * the most noisy and may not be able to handle fast load | ||
| 69 | * switching. | ||
| 70 | * | ||
| 71 | * NOTE: Most regulators will only support a subset of these modes. Some | ||
| 72 | * will only just support NORMAL. | ||
| 73 | * | ||
| 74 | * These modes can be OR'ed together to make up a mask of valid register modes. | ||
| 75 | */ | ||
| 76 | |||
| 77 | #define REGULATOR_MODE_FAST 0x1 | ||
| 78 | #define REGULATOR_MODE_NORMAL 0x2 | ||
| 79 | #define REGULATOR_MODE_IDLE 0x4 | ||
| 80 | #define REGULATOR_MODE_STANDBY 0x8 | ||
| 81 | |||
| 82 | /* | ||
| 83 | * Regulator notifier events. | ||
| 84 | * | ||
| 85 | * UNDER_VOLTAGE Regulator output is under voltage. | ||
| 86 | * OVER_CURRENT Regulator output current is too high. | ||
| 87 | * REGULATION_OUT Regulator output is out of regulation. | ||
| 88 | * FAIL Regulator output has failed. | ||
| 89 | * OVER_TEMP Regulator over temp. | ||
| 90 | * FORCE_DISABLE Regulator shut down by software. | ||
| 91 | * | ||
| 92 | * NOTE: These events can be OR'ed together when passed into handler. | ||
| 93 | */ | ||
| 94 | |||
| 95 | #define REGULATOR_EVENT_UNDER_VOLTAGE 0x01 | ||
| 96 | #define REGULATOR_EVENT_OVER_CURRENT 0x02 | ||
| 97 | #define REGULATOR_EVENT_REGULATION_OUT 0x04 | ||
| 98 | #define REGULATOR_EVENT_FAIL 0x08 | ||
| 99 | #define REGULATOR_EVENT_OVER_TEMP 0x10 | ||
| 100 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 | ||
| 101 | |||
| 102 | struct regulator; | ||
| 103 | |||
| 104 | /** | ||
| 105 | * struct regulator_bulk_data - Data used for bulk regulator operations. | ||
| 106 | * | ||
| 107 | * @supply The name of the supply. Initialised by the user before | ||
| 108 | * using the bulk regulator APIs. | ||
| 109 | * @consumer The regulator consumer for the supply. This will be managed | ||
| 110 | * by the bulk API. | ||
| 111 | * | ||
| 112 | * The regulator APIs provide a series of regulator_bulk_() API calls as | ||
| 113 | * a convenience to consumers which require multiple supplies. This | ||
| 114 | * structure is used to manage data for these calls. | ||
| 115 | */ | ||
| 116 | struct regulator_bulk_data { | ||
| 117 | const char *supply; | ||
| 118 | struct regulator *consumer; | ||
| 119 | }; | ||
| 120 | |||
| 121 | #if defined(CONFIG_REGULATOR) | ||
| 122 | |||
| 123 | /* regulator get and put */ | ||
| 124 | struct regulator *__must_check regulator_get(struct device *dev, | ||
| 125 | const char *id); | ||
| 126 | void regulator_put(struct regulator *regulator); | ||
| 127 | |||
| 128 | /* regulator output control and status */ | ||
| 129 | int regulator_enable(struct regulator *regulator); | ||
| 130 | int regulator_disable(struct regulator *regulator); | ||
| 131 | int regulator_force_disable(struct regulator *regulator); | ||
| 132 | int regulator_is_enabled(struct regulator *regulator); | ||
| 133 | |||
| 134 | int regulator_bulk_get(struct device *dev, int num_consumers, | ||
| 135 | struct regulator_bulk_data *consumers); | ||
| 136 | int regulator_bulk_enable(int num_consumers, | ||
| 137 | struct regulator_bulk_data *consumers); | ||
| 138 | int regulator_bulk_disable(int num_consumers, | ||
| 139 | struct regulator_bulk_data *consumers); | ||
| 140 | void regulator_bulk_free(int num_consumers, | ||
| 141 | struct regulator_bulk_data *consumers); | ||
| 142 | |||
| 143 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); | ||
| 144 | int regulator_get_voltage(struct regulator *regulator); | ||
| 145 | int regulator_set_current_limit(struct regulator *regulator, | ||
| 146 | int min_uA, int max_uA); | ||
| 147 | int regulator_get_current_limit(struct regulator *regulator); | ||
| 148 | |||
| 149 | int regulator_set_mode(struct regulator *regulator, unsigned int mode); | ||
| 150 | unsigned int regulator_get_mode(struct regulator *regulator); | ||
| 151 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); | ||
| 152 | |||
| 153 | /* regulator notifier block */ | ||
| 154 | int regulator_register_notifier(struct regulator *regulator, | ||
| 155 | struct notifier_block *nb); | ||
| 156 | int regulator_unregister_notifier(struct regulator *regulator, | ||
| 157 | struct notifier_block *nb); | ||
| 158 | |||
| 159 | /* driver data - core doesn't touch */ | ||
| 160 | void *regulator_get_drvdata(struct regulator *regulator); | ||
| 161 | void regulator_set_drvdata(struct regulator *regulator, void *data); | ||
| 162 | |||
| 163 | #else | ||
| 164 | |||
| 165 | /* | ||
| 166 | * Make sure client drivers will still build on systems with no software | ||
| 167 | * controllable voltage or current regulators. | ||
| 168 | */ | ||
| 169 | static inline struct regulator *__must_check regulator_get(struct device *dev, | ||
| 170 | const char *id) | ||
| 171 | { | ||
| 172 | /* Nothing except the stubbed out regulator API should be | ||
| 173 | * looking at the value except to check if it is an error | ||
| 174 | * value so the actual return value doesn't matter. | ||
| 175 | */ | ||
| 176 | return (struct regulator *)id; | ||
| 177 | } | ||
| 178 | static inline void regulator_put(struct regulator *regulator) | ||
| 179 | { | ||
| 180 | } | ||
| 181 | |||
| 182 | static inline int regulator_enable(struct regulator *regulator) | ||
| 183 | { | ||
| 184 | return 0; | ||
| 185 | } | ||
| 186 | |||
| 187 | static inline int regulator_disable(struct regulator *regulator) | ||
| 188 | { | ||
| 189 | return 0; | ||
| 190 | } | ||
| 191 | |||
| 192 | static inline int regulator_is_enabled(struct regulator *regulator) | ||
| 193 | { | ||
| 194 | return 1; | ||
| 195 | } | ||
| 196 | |||
| 197 | static inline int regulator_bulk_get(struct device *dev, | ||
| 198 | int num_consumers, | ||
| 199 | struct regulator_bulk_data *consumers) | ||
| 200 | { | ||
| 201 | return 0; | ||
| 202 | } | ||
| 203 | |||
| 204 | static inline int regulator_bulk_enable(int num_consumers, | ||
| 205 | struct regulator_bulk_data *consumers) | ||
| 206 | { | ||
| 207 | return 0; | ||
| 208 | } | ||
| 209 | |||
| 210 | static inline int regulator_bulk_disable(int num_consumers, | ||
| 211 | struct regulator_bulk_data *consumers) | ||
| 212 | { | ||
| 213 | return 0; | ||
| 214 | } | ||
| 215 | |||
| 216 | static inline void regulator_bulk_free(int num_consumers, | ||
| 217 | struct regulator_bulk_data *consumers) | ||
| 218 | { | ||
| 219 | } | ||
| 220 | |||
| 221 | static inline int regulator_set_voltage(struct regulator *regulator, | ||
| 222 | int min_uV, int max_uV) | ||
| 223 | { | ||
| 224 | return 0; | ||
| 225 | } | ||
| 226 | |||
| 227 | static inline int regulator_get_voltage(struct regulator *regulator) | ||
| 228 | { | ||
| 229 | return 0; | ||
| 230 | } | ||
| 231 | |||
| 232 | static inline int regulator_set_current_limit(struct regulator *regulator, | ||
| 233 | int min_uA, int max_uA) | ||
| 234 | { | ||
| 235 | return 0; | ||
| 236 | } | ||
| 237 | |||
| 238 | static inline int regulator_get_current_limit(struct regulator *regulator) | ||
| 239 | { | ||
| 240 | return 0; | ||
| 241 | } | ||
| 242 | |||
| 243 | static inline int regulator_set_mode(struct regulator *regulator, | ||
| 244 | unsigned int mode) | ||
| 245 | { | ||
| 246 | return 0; | ||
| 247 | } | ||
| 248 | |||
| 249 | static inline unsigned int regulator_get_mode(struct regulator *regulator) | ||
| 250 | { | ||
| 251 | return REGULATOR_MODE_NORMAL; | ||
| 252 | } | ||
| 253 | |||
| 254 | static inline int regulator_set_optimum_mode(struct regulator *regulator, | ||
| 255 | int load_uA) | ||
| 256 | { | ||
| 257 | return REGULATOR_MODE_NORMAL; | ||
| 258 | } | ||
| 259 | |||
| 260 | static inline int regulator_register_notifier(struct regulator *regulator, | ||
| 261 | struct notifier_block *nb) | ||
| 262 | { | ||
| 263 | return 0; | ||
| 264 | } | ||
| 265 | |||
| 266 | static inline int regulator_unregister_notifier(struct regulator *regulator, | ||
| 267 | struct notifier_block *nb) | ||
| 268 | { | ||
| 269 | return 0; | ||
| 270 | } | ||
| 271 | |||
| 272 | static inline void *regulator_get_drvdata(struct regulator *regulator) | ||
| 273 | { | ||
| 274 | return NULL; | ||
| 275 | } | ||
| 276 | |||
| 277 | static inline void regulator_set_drvdata(struct regulator *regulator, | ||
| 278 | void *data) | ||
| 279 | { | ||
| 280 | } | ||
| 281 | |||
| 282 | #endif | ||
| 283 | |||
| 284 | #endif | ||
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h new file mode 100644 index 000000000000..1d712c7172a2 --- /dev/null +++ b/include/linux/regulator/driver.h | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | /* | ||
| 2 | * driver.h -- SoC Regulator driver support. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Liam Girdwood <lg@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * Regulator Driver Interface. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __LINUX_REGULATOR_DRIVER_H_ | ||
| 16 | #define __LINUX_REGULATOR_DRIVER_H_ | ||
| 17 | |||
| 18 | #include <linux/device.h> | ||
| 19 | #include <linux/regulator/consumer.h> | ||
| 20 | |||
| 21 | struct regulator_constraints; | ||
| 22 | struct regulator_dev; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * struct regulator_ops - regulator operations. | ||
| 26 | * | ||
| 27 | * This struct describes regulator operations. | ||
| 28 | */ | ||
| 29 | struct regulator_ops { | ||
| 30 | |||
| 31 | /* get/set regulator voltage */ | ||
| 32 | int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV); | ||
| 33 | int (*get_voltage) (struct regulator_dev *); | ||
| 34 | |||
| 35 | /* get/set regulator current */ | ||
| 36 | int (*set_current_limit) (struct regulator_dev *, | ||
| 37 | int min_uA, int max_uA); | ||
| 38 | int (*get_current_limit) (struct regulator_dev *); | ||
| 39 | |||
| 40 | /* enable/disable regulator */ | ||
| 41 | int (*enable) (struct regulator_dev *); | ||
| 42 | int (*disable) (struct regulator_dev *); | ||
| 43 | int (*is_enabled) (struct regulator_dev *); | ||
| 44 | |||
| 45 | /* get/set regulator operating mode (defined in regulator.h) */ | ||
| 46 | int (*set_mode) (struct regulator_dev *, unsigned int mode); | ||
| 47 | unsigned int (*get_mode) (struct regulator_dev *); | ||
| 48 | |||
| 49 | /* get most efficient regulator operating mode for load */ | ||
| 50 | unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, | ||
| 51 | int output_uV, int load_uA); | ||
| 52 | |||
| 53 | /* the operations below are for configuration of regulator state when | ||
| 54 | * it's parent PMIC enters a global STANBY/HIBERNATE state */ | ||
| 55 | |||
| 56 | /* set regulator suspend voltage */ | ||
| 57 | int (*set_suspend_voltage) (struct regulator_dev *, int uV); | ||
| 58 | |||
| 59 | /* enable/disable regulator in suspend state */ | ||
| 60 | int (*set_suspend_enable) (struct regulator_dev *); | ||
| 61 | int (*set_suspend_disable) (struct regulator_dev *); | ||
| 62 | |||
| 63 | /* set regulator suspend operating mode (defined in regulator.h) */ | ||
| 64 | int (*set_suspend_mode) (struct regulator_dev *, unsigned int mode); | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Regulators can either control voltage or current. | ||
| 69 | */ | ||
| 70 | enum regulator_type { | ||
| 71 | REGULATOR_VOLTAGE, | ||
| 72 | REGULATOR_CURRENT, | ||
| 73 | }; | ||
| 74 | |||
| 75 | /** | ||
| 76 | * struct regulator_desc - Regulator descriptor | ||
| 77 | * | ||
| 78 | */ | ||
| 79 | struct regulator_desc { | ||
| 80 | const char *name; | ||
| 81 | int id; | ||
| 82 | struct regulator_ops *ops; | ||
| 83 | int irq; | ||
| 84 | enum regulator_type type; | ||
| 85 | struct module *owner; | ||
| 86 | }; | ||
| 87 | |||
| 88 | |||
| 89 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | ||
| 90 | void *reg_data); | ||
| 91 | void regulator_unregister(struct regulator_dev *rdev); | ||
| 92 | |||
| 93 | int regulator_notifier_call_chain(struct regulator_dev *rdev, | ||
| 94 | unsigned long event, void *data); | ||
| 95 | |||
| 96 | void *rdev_get_drvdata(struct regulator_dev *rdev); | ||
| 97 | int rdev_get_id(struct regulator_dev *rdev); | ||
| 98 | |||
| 99 | #endif | ||
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h new file mode 100644 index 000000000000..1387a5d2190e --- /dev/null +++ b/include/linux/regulator/fixed.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * fixed.h | ||
| 3 | * | ||
| 4 | * Copyright 2008 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License as | ||
| 10 | * published by the Free Software Foundation; either version 2 of the | ||
| 11 | * License, or (at your option) any later version. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __REGULATOR_FIXED_H | ||
| 15 | #define __REGULATOR_FIXED_H | ||
| 16 | |||
| 17 | struct fixed_voltage_config { | ||
| 18 | const char *supply_name; | ||
| 19 | int microvolts; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h new file mode 100644 index 000000000000..11e737dbfcf2 --- /dev/null +++ b/include/linux/regulator/machine.h | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | /* | ||
| 2 | * machine.h -- SoC Regulator support, machine/board driver API. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Liam Girdwood <lg@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * Regulator Machine/Board Interface. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __LINUX_REGULATOR_MACHINE_H_ | ||
| 16 | #define __LINUX_REGULATOR_MACHINE_H_ | ||
| 17 | |||
| 18 | #include <linux/regulator/consumer.h> | ||
| 19 | #include <linux/suspend.h> | ||
| 20 | |||
| 21 | struct regulator; | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Regulator operation constraint flags. These flags are used to enable | ||
| 25 | * certain regulator operations and can be OR'ed together. | ||
| 26 | * | ||
| 27 | * VOLTAGE: Regulator output voltage can be changed by software on this | ||
| 28 | * board/machine. | ||
| 29 | * CURRENT: Regulator output current can be changed by software on this | ||
| 30 | * board/machine. | ||
| 31 | * MODE: Regulator operating mode can be changed by software on this | ||
| 32 | * board/machine. | ||
| 33 | * STATUS: Regulator can be enabled and disabled. | ||
| 34 | * DRMS: Dynamic Regulator Mode Switching is enabled for this regulator. | ||
| 35 | */ | ||
| 36 | |||
| 37 | #define REGULATOR_CHANGE_VOLTAGE 0x1 | ||
| 38 | #define REGULATOR_CHANGE_CURRENT 0x2 | ||
| 39 | #define REGULATOR_CHANGE_MODE 0x4 | ||
| 40 | #define REGULATOR_CHANGE_STATUS 0x8 | ||
| 41 | #define REGULATOR_CHANGE_DRMS 0x10 | ||
| 42 | |||
| 43 | /** | ||
| 44 | * struct regulator_state - regulator state during low power syatem states | ||
| 45 | * | ||
| 46 | * This describes a regulators state during a system wide low power state. | ||
| 47 | */ | ||
| 48 | struct regulator_state { | ||
| 49 | int uV; /* suspend voltage */ | ||
| 50 | unsigned int mode; /* suspend regulator operating mode */ | ||
| 51 | int enabled; /* is regulator enabled in this suspend state */ | ||
| 52 | }; | ||
| 53 | |||
| 54 | /** | ||
| 55 | * struct regulation_constraints - regulator operating constraints. | ||
| 56 | * | ||
| 57 | * This struct describes regulator and board/machine specific constraints. | ||
| 58 | */ | ||
| 59 | struct regulation_constraints { | ||
| 60 | |||
| 61 | char *name; | ||
| 62 | |||
| 63 | /* voltage output range (inclusive) - for voltage control */ | ||
| 64 | int min_uV; | ||
| 65 | int max_uV; | ||
| 66 | |||
| 67 | /* current output range (inclusive) - for current control */ | ||
| 68 | int min_uA; | ||
| 69 | int max_uA; | ||
| 70 | |||
| 71 | /* valid regulator operating modes for this machine */ | ||
| 72 | unsigned int valid_modes_mask; | ||
| 73 | |||
| 74 | /* valid operations for regulator on this machine */ | ||
| 75 | unsigned int valid_ops_mask; | ||
| 76 | |||
| 77 | /* regulator input voltage - only if supply is another regulator */ | ||
| 78 | int input_uV; | ||
| 79 | |||
| 80 | /* regulator suspend states for global PMIC STANDBY/HIBERNATE */ | ||
| 81 | struct regulator_state state_disk; | ||
| 82 | struct regulator_state state_mem; | ||
| 83 | struct regulator_state state_standby; | ||
| 84 | suspend_state_t initial_state; /* suspend state to set at init */ | ||
| 85 | |||
| 86 | /* constriant flags */ | ||
| 87 | unsigned always_on:1; /* regulator never off when system is on */ | ||
| 88 | unsigned boot_on:1; /* bootloader/firmware enabled regulator */ | ||
| 89 | unsigned apply_uV:1; /* apply uV constraint iff min == max */ | ||
| 90 | }; | ||
| 91 | |||
| 92 | int regulator_set_supply(const char *regulator, const char *regulator_supply); | ||
| 93 | |||
| 94 | const char *regulator_get_supply(const char *regulator); | ||
| 95 | |||
| 96 | int regulator_set_machine_constraints(const char *regulator, | ||
| 97 | struct regulation_constraints *constraints); | ||
| 98 | |||
| 99 | int regulator_set_device_supply(const char *regulator, struct device *dev, | ||
| 100 | const char *supply); | ||
| 101 | |||
| 102 | int regulator_suspend_prepare(suspend_state_t state); | ||
| 103 | |||
| 104 | #endif | ||
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index c5f6e54ec6ae..741d1a62cc3f 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -68,7 +68,8 @@ enum rfkill_state { | |||
| 68 | * @user_claim_unsupported: Whether the hardware supports exclusive | 68 | * @user_claim_unsupported: Whether the hardware supports exclusive |
| 69 | * RF-kill control by userspace. Set this before registering. | 69 | * RF-kill control by userspace. Set this before registering. |
| 70 | * @user_claim: Set when the switch is controlled exlusively by userspace. | 70 | * @user_claim: Set when the switch is controlled exlusively by userspace. |
| 71 | * @mutex: Guards switch state transitions | 71 | * @mutex: Guards switch state transitions. It serializes callbacks |
| 72 | * and also protects the state. | ||
| 72 | * @data: Pointer to the RF button drivers private data which will be | 73 | * @data: Pointer to the RF button drivers private data which will be |
| 73 | * passed along when toggling radio state. | 74 | * passed along when toggling radio state. |
| 74 | * @toggle_radio(): Mandatory handler to control state of the radio. | 75 | * @toggle_radio(): Mandatory handler to control state of the radio. |
| @@ -89,12 +90,13 @@ struct rfkill { | |||
| 89 | const char *name; | 90 | const char *name; |
| 90 | enum rfkill_type type; | 91 | enum rfkill_type type; |
| 91 | 92 | ||
| 92 | enum rfkill_state state; | ||
| 93 | bool user_claim_unsupported; | 93 | bool user_claim_unsupported; |
| 94 | bool user_claim; | 94 | bool user_claim; |
| 95 | 95 | ||
| 96 | /* the mutex serializes callbacks and also protects | ||
| 97 | * the state */ | ||
| 96 | struct mutex mutex; | 98 | struct mutex mutex; |
| 97 | 99 | enum rfkill_state state; | |
| 98 | void *data; | 100 | void *data; |
| 99 | int (*toggle_radio)(void *data, enum rfkill_state state); | 101 | int (*toggle_radio)(void *data, enum rfkill_state state); |
| 100 | int (*get_state)(void *data, enum rfkill_state *state); | 102 | int (*get_state)(void *data, enum rfkill_state *state); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 7ea44f6621f2..cfcc45b3bef0 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -243,6 +243,7 @@ typedef unsigned char *sk_buff_data_t; | |||
| 243 | * @tc_index: Traffic control index | 243 | * @tc_index: Traffic control index |
| 244 | * @tc_verd: traffic control verdict | 244 | * @tc_verd: traffic control verdict |
| 245 | * @ndisc_nodetype: router type (from link layer) | 245 | * @ndisc_nodetype: router type (from link layer) |
| 246 | * @do_not_encrypt: set to prevent encryption of this frame | ||
| 246 | * @dma_cookie: a cookie to one of several possible DMA operations | 247 | * @dma_cookie: a cookie to one of several possible DMA operations |
| 247 | * done by skb DMA functions | 248 | * done by skb DMA functions |
| 248 | * @secmark: security marking | 249 | * @secmark: security marking |
| @@ -316,7 +317,10 @@ struct sk_buff { | |||
| 316 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 317 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
| 317 | __u8 ndisc_nodetype:2; | 318 | __u8 ndisc_nodetype:2; |
| 318 | #endif | 319 | #endif |
| 319 | /* 14 bit hole */ | 320 | #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) |
| 321 | __u8 do_not_encrypt:1; | ||
| 322 | #endif | ||
| 323 | /* 0/13/14 bit hole */ | ||
| 320 | 324 | ||
| 321 | #ifdef CONFIG_NET_DMA | 325 | #ifdef CONFIG_NET_DMA |
| 322 | dma_cookie_t dma_cookie; | 326 | dma_cookie_t dma_cookie; |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index 5df62ef1280c..7a6e6bba4a71 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
| @@ -214,6 +214,8 @@ enum | |||
| 214 | LINUX_MIB_TCPDSACKIGNOREDOLD, /* TCPSACKIgnoredOld */ | 214 | LINUX_MIB_TCPDSACKIGNOREDOLD, /* TCPSACKIgnoredOld */ |
| 215 | LINUX_MIB_TCPDSACKIGNOREDNOUNDO, /* TCPSACKIgnoredNoUndo */ | 215 | LINUX_MIB_TCPDSACKIGNOREDNOUNDO, /* TCPSACKIgnoredNoUndo */ |
| 216 | LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */ | 216 | LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */ |
| 217 | LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */ | ||
| 218 | LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */ | ||
| 217 | __LINUX_MIB_MAX | 219 | __LINUX_MIB_MAX |
| 218 | }; | 220 | }; |
| 219 | 221 | ||
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index b1875582c1a1..12532839f508 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
| @@ -493,16 +493,21 @@ static inline int tracehook_notify_jctl(int notify, int why) | |||
| 493 | * @death_cookie: value to pass to tracehook_report_death() | 493 | * @death_cookie: value to pass to tracehook_report_death() |
| 494 | * @group_dead: nonzero if this was the last thread in the group to die | 494 | * @group_dead: nonzero if this was the last thread in the group to die |
| 495 | * | 495 | * |
| 496 | * Return the signal number to send our parent with do_notify_parent(), or | 496 | * A return value >= 0 means call do_notify_parent() with that signal |
| 497 | * zero to send no signal and leave a zombie, or -1 to self-reap right now. | 497 | * number. Negative return value can be %DEATH_REAP to self-reap right |
| 498 | * now, or %DEATH_DELAYED_GROUP_LEADER to a zombie without notifying our | ||
| 499 | * parent. Note that a return value of 0 means a do_notify_parent() call | ||
| 500 | * that sends no signal, but still wakes up a parent blocked in wait*(). | ||
| 498 | * | 501 | * |
| 499 | * Called with write_lock_irq(&tasklist_lock) held. | 502 | * Called with write_lock_irq(&tasklist_lock) held. |
| 500 | */ | 503 | */ |
| 504 | #define DEATH_REAP -1 | ||
| 505 | #define DEATH_DELAYED_GROUP_LEADER -2 | ||
| 501 | static inline int tracehook_notify_death(struct task_struct *task, | 506 | static inline int tracehook_notify_death(struct task_struct *task, |
| 502 | void **death_cookie, int group_dead) | 507 | void **death_cookie, int group_dead) |
| 503 | { | 508 | { |
| 504 | if (task->exit_signal == -1) | 509 | if (task->exit_signal == -1) |
| 505 | return task->ptrace ? SIGCHLD : -1; | 510 | return task->ptrace ? SIGCHLD : DEATH_REAP; |
| 506 | 511 | ||
| 507 | /* | 512 | /* |
| 508 | * If something other than our normal parent is ptracing us, then | 513 | * If something other than our normal parent is ptracing us, then |
| @@ -512,21 +517,21 @@ static inline int tracehook_notify_death(struct task_struct *task, | |||
| 512 | if (thread_group_empty(task) && !ptrace_reparented(task)) | 517 | if (thread_group_empty(task) && !ptrace_reparented(task)) |
| 513 | return task->exit_signal; | 518 | return task->exit_signal; |
| 514 | 519 | ||
| 515 | return task->ptrace ? SIGCHLD : 0; | 520 | return task->ptrace ? SIGCHLD : DEATH_DELAYED_GROUP_LEADER; |
| 516 | } | 521 | } |
| 517 | 522 | ||
| 518 | /** | 523 | /** |
| 519 | * tracehook_report_death - task is dead and ready to be reaped | 524 | * tracehook_report_death - task is dead and ready to be reaped |
| 520 | * @task: @current task now exiting | 525 | * @task: @current task now exiting |
| 521 | * @signal: signal number sent to parent, or 0 or -1 | 526 | * @signal: return value from tracheook_notify_death() |
| 522 | * @death_cookie: value passed back from tracehook_notify_death() | 527 | * @death_cookie: value passed back from tracehook_notify_death() |
| 523 | * @group_dead: nonzero if this was the last thread in the group to die | 528 | * @group_dead: nonzero if this was the last thread in the group to die |
| 524 | * | 529 | * |
| 525 | * Thread has just become a zombie or is about to self-reap. If positive, | 530 | * Thread has just become a zombie or is about to self-reap. If positive, |
| 526 | * @signal is the signal number just sent to the parent (usually %SIGCHLD). | 531 | * @signal is the signal number just sent to the parent (usually %SIGCHLD). |
| 527 | * If @signal is -1, this thread will self-reap. If @signal is 0, this is | 532 | * If @signal is %DEATH_REAP, this thread will self-reap. If @signal is |
| 528 | * a delayed_group_leader() zombie. The @death_cookie was passed back by | 533 | * %DEATH_DELAYED_GROUP_LEADER, this is a delayed_group_leader() zombie. |
| 529 | * tracehook_notify_death(). | 534 | * The @death_cookie was passed back by tracehook_notify_death(). |
| 530 | * | 535 | * |
| 531 | * If normal reaping is not inhibited, @task->exit_state might be changing | 536 | * If normal reaping is not inhibited, @task->exit_state might be changing |
| 532 | * in parallel. | 537 | * in parallel. |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 14c0e91be9b5..1c78d56c57e5 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
| @@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly); | |||
| 74 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | 74 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); |
| 75 | 75 | ||
| 76 | #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ | 76 | #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ |
| 77 | (vc)->vc_toggle_meta ? 0x80 : 0]) | 77 | ((vc)->vc_toggle_meta ? 0x80 : 0)]) |
| 78 | #else | 78 | #else |
| 79 | #define con_set_trans_old(arg) (0) | 79 | #define con_set_trans_old(arg) (0) |
| 80 | #define con_get_trans_old(arg) (-EINVAL) | 80 | #define con_get_trans_old(arg) (-EINVAL) |
| @@ -86,6 +86,7 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | |||
| 86 | #define con_copy_unimap(d, s) (0) | 86 | #define con_copy_unimap(d, s) (0) |
| 87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) | 87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) |
| 88 | #define con_free_unimap(vc) do { ; } while (0) | 88 | #define con_free_unimap(vc) do { ; } while (0) |
| 89 | #define con_protect_unimap(vc, rdonly) do { ; } while (0) | ||
| 89 | 90 | ||
| 90 | #define vc_translate(vc, c) (c) | 91 | #define vc_translate(vc, c) (c) |
| 91 | #endif | 92 | #endif |
