diff options
Diffstat (limited to 'include/linux')
64 files changed, 756 insertions, 230 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a354c199ab98..d1580c17cab3 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -20,15 +20,18 @@ header-y += wimax/ | |||
20 | objhdr-y += version.h | 20 | objhdr-y += version.h |
21 | 21 | ||
22 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | 22 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
23 | $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | 23 | $(srctree)/include/asm-$(SRCARCH)/a.out.h \ |
24 | $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),) | ||
24 | header-y += a.out.h | 25 | header-y += a.out.h |
25 | endif | 26 | endif |
26 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ | 27 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ |
27 | $(srctree)/include/asm-$(SRCARCH)/kvm.h),) | 28 | $(srctree)/include/asm-$(SRCARCH)/kvm.h \ |
29 | $(INSTALL_HDR_PATH)/include/asm-*/kvm.h),) | ||
28 | header-y += kvm.h | 30 | header-y += kvm.h |
29 | endif | 31 | endif |
30 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ | 32 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ |
31 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),) | 33 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ |
34 | $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),) | ||
32 | header-y += kvm_para.h | 35 | header-y += kvm_para.h |
33 | endif | 36 | endif |
34 | 37 | ||
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 09ea4a1e9505..eaf6cd75a1b1 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -102,10 +102,8 @@ extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, | |||
102 | extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); | 102 | extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); |
103 | extern int agp_bind_memory(struct agp_memory *, off_t); | 103 | extern int agp_bind_memory(struct agp_memory *, off_t); |
104 | extern int agp_unbind_memory(struct agp_memory *); | 104 | extern int agp_unbind_memory(struct agp_memory *); |
105 | extern int agp_rebind_memory(void); | ||
106 | extern void agp_enable(struct agp_bridge_data *, u32); | 105 | extern void agp_enable(struct agp_bridge_data *, u32); |
107 | extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); | 106 | extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); |
108 | extern void agp_backend_release(struct agp_bridge_data *); | 107 | extern void agp_backend_release(struct agp_bridge_data *); |
109 | extern void agp_flush_chipset(struct agp_bridge_data *); | ||
110 | 108 | ||
111 | #endif /* _AGP_BACKEND_H */ | 109 | #endif /* _AGP_BACKEND_H */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 8b5c0620abf9..359df0487690 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -372,6 +372,7 @@ struct audit_buffer; | |||
372 | struct audit_context; | 372 | struct audit_context; |
373 | struct inode; | 373 | struct inode; |
374 | struct netlink_skb_parms; | 374 | struct netlink_skb_parms; |
375 | struct path; | ||
375 | struct linux_binprm; | 376 | struct linux_binprm; |
376 | struct mq_attr; | 377 | struct mq_attr; |
377 | struct mqstat; | 378 | struct mqstat; |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 90012b9ddbf3..fb16a3699b99 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -246,7 +246,6 @@ struct cpu_vfs_cap_data { | |||
246 | /* Allow configuration of the secure attention key */ | 246 | /* Allow configuration of the secure attention key */ |
247 | /* Allow administration of the random device */ | 247 | /* Allow administration of the random device */ |
248 | /* Allow examination and configuration of disk quotas */ | 248 | /* Allow examination and configuration of disk quotas */ |
249 | /* Allow configuring the kernel's syslog (printk behaviour) */ | ||
250 | /* Allow setting the domainname */ | 249 | /* Allow setting the domainname */ |
251 | /* Allow setting the hostname */ | 250 | /* Allow setting the hostname */ |
252 | /* Allow calling bdflush() */ | 251 | /* Allow calling bdflush() */ |
@@ -352,7 +351,11 @@ struct cpu_vfs_cap_data { | |||
352 | 351 | ||
353 | #define CAP_MAC_ADMIN 33 | 352 | #define CAP_MAC_ADMIN 33 |
354 | 353 | ||
355 | #define CAP_LAST_CAP CAP_MAC_ADMIN | 354 | /* Allow configuring the kernel's syslog (printk behaviour) */ |
355 | |||
356 | #define CAP_SYSLOG 34 | ||
357 | |||
358 | #define CAP_LAST_CAP CAP_SYSLOG | ||
356 | 359 | ||
357 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | 360 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) |
358 | 361 | ||
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index bd07758943e0..59fcd24b1468 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -307,7 +307,7 @@ extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | |||
307 | * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok | 307 | * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok |
308 | * @dentry: dentry to take a ref on | 308 | * @dentry: dentry to take a ref on |
309 | * @seq: seqcount to verify against | 309 | * @seq: seqcount to verify against |
310 | * @Returns: 0 on failure, else 1. | 310 | * Returns: 0 on failure, else 1. |
311 | * | 311 | * |
312 | * __d_rcu_to_refcount operates on a dentry,seq pair that was returned | 312 | * __d_rcu_to_refcount operates on a dentry,seq pair that was returned |
313 | * by __d_lookup_rcu, to get a reference on an rcu-walk dentry. | 313 | * by __d_lookup_rcu, to get a reference on an rcu-walk dentry. |
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index 24c806f12a6c..5ac3bdd5cee6 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h | |||
@@ -13,10 +13,10 @@ | |||
13 | #ifdef CONFIG_PROFILING | 13 | #ifdef CONFIG_PROFILING |
14 | 14 | ||
15 | #include <linux/dcache.h> | 15 | #include <linux/dcache.h> |
16 | #include <linux/path.h> | ||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | 17 | ||
19 | struct dcookie_user; | 18 | struct dcookie_user; |
19 | struct path; | ||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * dcookie_register - register a user of dcookies | 22 | * dcookie_register - register a user of dcookies |
diff --git a/include/linux/device.h b/include/linux/device.h index dd4895313468..1bf5cf0b4513 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -30,9 +30,8 @@ struct device_private; | |||
30 | struct device_driver; | 30 | struct device_driver; |
31 | struct driver_private; | 31 | struct driver_private; |
32 | struct class; | 32 | struct class; |
33 | struct class_private; | 33 | struct subsys_private; |
34 | struct bus_type; | 34 | struct bus_type; |
35 | struct bus_type_private; | ||
36 | struct device_node; | 35 | struct device_node; |
37 | 36 | ||
38 | struct bus_attribute { | 37 | struct bus_attribute { |
@@ -65,7 +64,7 @@ struct bus_type { | |||
65 | 64 | ||
66 | const struct dev_pm_ops *pm; | 65 | const struct dev_pm_ops *pm; |
67 | 66 | ||
68 | struct bus_type_private *p; | 67 | struct subsys_private *p; |
69 | }; | 68 | }; |
70 | 69 | ||
71 | extern int __must_check bus_register(struct bus_type *bus); | 70 | extern int __must_check bus_register(struct bus_type *bus); |
@@ -197,6 +196,7 @@ struct class { | |||
197 | 196 | ||
198 | struct class_attribute *class_attrs; | 197 | struct class_attribute *class_attrs; |
199 | struct device_attribute *dev_attrs; | 198 | struct device_attribute *dev_attrs; |
199 | struct bin_attribute *dev_bin_attrs; | ||
200 | struct kobject *dev_kobj; | 200 | struct kobject *dev_kobj; |
201 | 201 | ||
202 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); | 202 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); |
@@ -213,7 +213,7 @@ struct class { | |||
213 | 213 | ||
214 | const struct dev_pm_ops *pm; | 214 | const struct dev_pm_ops *pm; |
215 | 215 | ||
216 | struct class_private *p; | 216 | struct subsys_private *p; |
217 | }; | 217 | }; |
218 | 218 | ||
219 | struct class_dev_iter { | 219 | struct class_dev_iter { |
@@ -508,13 +508,13 @@ static inline int device_is_registered(struct device *dev) | |||
508 | 508 | ||
509 | static inline void device_enable_async_suspend(struct device *dev) | 509 | static inline void device_enable_async_suspend(struct device *dev) |
510 | { | 510 | { |
511 | if (dev->power.status == DPM_ON) | 511 | if (!dev->power.in_suspend) |
512 | dev->power.async_suspend = true; | 512 | dev->power.async_suspend = true; |
513 | } | 513 | } |
514 | 514 | ||
515 | static inline void device_disable_async_suspend(struct device *dev) | 515 | static inline void device_disable_async_suspend(struct device *dev) |
516 | { | 516 | { |
517 | if (dev->power.status == DPM_ON) | 517 | if (!dev->power.in_suspend) |
518 | dev->power.async_suspend = false; | 518 | dev->power.async_suspend = false; |
519 | } | 519 | } |
520 | 520 | ||
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index a90b3892074a..1c70028f81f9 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -44,34 +44,24 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, | |||
44 | extern int ddebug_remove_module(const char *mod_name); | 44 | extern int ddebug_remove_module(const char *mod_name); |
45 | 45 | ||
46 | #define dynamic_pr_debug(fmt, ...) do { \ | 46 | #define dynamic_pr_debug(fmt, ...) do { \ |
47 | __label__ do_printk; \ | ||
48 | __label__ out; \ | ||
49 | static struct _ddebug descriptor \ | 47 | static struct _ddebug descriptor \ |
50 | __used \ | 48 | __used \ |
51 | __attribute__((section("__verbose"), aligned(8))) = \ | 49 | __attribute__((section("__verbose"), aligned(8))) = \ |
52 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ | 50 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ |
53 | _DPRINTK_FLAGS_DEFAULT }; \ | 51 | _DPRINTK_FLAGS_DEFAULT }; \ |
54 | JUMP_LABEL(&descriptor.enabled, do_printk); \ | 52 | if (unlikely(descriptor.enabled)) \ |
55 | goto out; \ | 53 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ |
56 | do_printk: \ | ||
57 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ | ||
58 | out: ; \ | ||
59 | } while (0) | 54 | } while (0) |
60 | 55 | ||
61 | 56 | ||
62 | #define dynamic_dev_dbg(dev, fmt, ...) do { \ | 57 | #define dynamic_dev_dbg(dev, fmt, ...) do { \ |
63 | __label__ do_printk; \ | ||
64 | __label__ out; \ | ||
65 | static struct _ddebug descriptor \ | 58 | static struct _ddebug descriptor \ |
66 | __used \ | 59 | __used \ |
67 | __attribute__((section("__verbose"), aligned(8))) = \ | 60 | __attribute__((section("__verbose"), aligned(8))) = \ |
68 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ | 61 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ |
69 | _DPRINTK_FLAGS_DEFAULT }; \ | 62 | _DPRINTK_FLAGS_DEFAULT }; \ |
70 | JUMP_LABEL(&descriptor.enabled, do_printk); \ | 63 | if (unlikely(descriptor.enabled)) \ |
71 | goto out; \ | 64 | dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \ |
72 | do_printk: \ | ||
73 | dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \ | ||
74 | out: ; \ | ||
75 | } while (0) | 65 | } while (0) |
76 | 66 | ||
77 | #else | 67 | #else |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 6ce1bca01724..65990ef612f5 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -724,21 +724,30 @@ struct ext3_dir_entry_2 { | |||
724 | ~EXT3_DIR_ROUND) | 724 | ~EXT3_DIR_ROUND) |
725 | #define EXT3_MAX_REC_LEN ((1<<16)-1) | 725 | #define EXT3_MAX_REC_LEN ((1<<16)-1) |
726 | 726 | ||
727 | /* | ||
728 | * Tests against MAX_REC_LEN etc were put in place for 64k block | ||
729 | * sizes; if that is not possible on this arch, we can skip | ||
730 | * those tests and speed things up. | ||
731 | */ | ||
727 | static inline unsigned ext3_rec_len_from_disk(__le16 dlen) | 732 | static inline unsigned ext3_rec_len_from_disk(__le16 dlen) |
728 | { | 733 | { |
729 | unsigned len = le16_to_cpu(dlen); | 734 | unsigned len = le16_to_cpu(dlen); |
730 | 735 | ||
736 | #if (PAGE_CACHE_SIZE >= 65536) | ||
731 | if (len == EXT3_MAX_REC_LEN) | 737 | if (len == EXT3_MAX_REC_LEN) |
732 | return 1 << 16; | 738 | return 1 << 16; |
739 | #endif | ||
733 | return len; | 740 | return len; |
734 | } | 741 | } |
735 | 742 | ||
736 | static inline __le16 ext3_rec_len_to_disk(unsigned len) | 743 | static inline __le16 ext3_rec_len_to_disk(unsigned len) |
737 | { | 744 | { |
745 | #if (PAGE_CACHE_SIZE >= 65536) | ||
738 | if (len == (1 << 16)) | 746 | if (len == (1 << 16)) |
739 | return cpu_to_le16(EXT3_MAX_REC_LEN); | 747 | return cpu_to_le16(EXT3_MAX_REC_LEN); |
740 | else if (len > (1 << 16)) | 748 | else if (len > (1 << 16)) |
741 | BUG(); | 749 | BUG(); |
750 | #endif | ||
742 | return cpu_to_le16(len); | 751 | return cpu_to_le16(len); |
743 | } | 752 | } |
744 | 753 | ||
@@ -856,6 +865,7 @@ extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb, | |||
856 | extern int ext3_should_retry_alloc(struct super_block *sb, int *retries); | 865 | extern int ext3_should_retry_alloc(struct super_block *sb, int *retries); |
857 | extern void ext3_init_block_alloc_info(struct inode *); | 866 | extern void ext3_init_block_alloc_info(struct inode *); |
858 | extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv); | 867 | extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv); |
868 | extern int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range); | ||
859 | 869 | ||
860 | /* dir.c */ | 870 | /* dir.c */ |
861 | extern int ext3_check_dir_entry(const char *, struct inode *, | 871 | extern int ext3_check_dir_entry(const char *, struct inode *, |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 1cd637ef62d2..9a3f5f9383f6 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -302,9 +302,9 @@ struct fw_packet { | |||
302 | struct fw_transaction { | 302 | struct fw_transaction { |
303 | int node_id; /* The generation is implied; it is always the current. */ | 303 | int node_id; /* The generation is implied; it is always the current. */ |
304 | int tlabel; | 304 | int tlabel; |
305 | int timestamp; | ||
306 | struct list_head link; | 305 | struct list_head link; |
307 | struct fw_card *card; | 306 | struct fw_card *card; |
307 | bool is_split_transaction; | ||
308 | struct timer_list split_timeout_timer; | 308 | struct timer_list split_timeout_timer; |
309 | 309 | ||
310 | struct fw_packet packet; | 310 | struct fw_packet packet; |
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h index c6dcc1dfe781..43fe52fcef0f 100644 --- a/include/linux/firmware-map.h +++ b/include/linux/firmware-map.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #define _LINUX_FIRMWARE_MAP_H | 17 | #define _LINUX_FIRMWARE_MAP_H |
18 | 18 | ||
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/kobject.h> | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled | 22 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 631b77f2ac70..70e4efabe0fb 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
@@ -71,7 +71,7 @@ void *flex_array_get(struct flex_array *fa, unsigned int element_nr); | |||
71 | int flex_array_shrink(struct flex_array *fa); | 71 | int flex_array_shrink(struct flex_array *fa); |
72 | 72 | ||
73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ | 73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ |
74 | flex_array_put(fa, nr, &(void *)(src), gfp) | 74 | flex_array_put(fa, nr, (void *)&(src), gfp) |
75 | 75 | ||
76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); | 76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); |
77 | 77 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index baf3e556ff0e..f84d9928bdb1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -382,7 +382,6 @@ struct inodes_stat_t { | |||
382 | #include <linux/path.h> | 382 | #include <linux/path.h> |
383 | #include <linux/stat.h> | 383 | #include <linux/stat.h> |
384 | #include <linux/cache.h> | 384 | #include <linux/cache.h> |
385 | #include <linux/kobject.h> | ||
386 | #include <linux/list.h> | 385 | #include <linux/list.h> |
387 | #include <linux/radix-tree.h> | 386 | #include <linux/radix-tree.h> |
388 | #include <linux/prio_tree.h> | 387 | #include <linux/prio_tree.h> |
@@ -402,6 +401,7 @@ struct hd_geometry; | |||
402 | struct iovec; | 401 | struct iovec; |
403 | struct nameidata; | 402 | struct nameidata; |
404 | struct kiocb; | 403 | struct kiocb; |
404 | struct kobject; | ||
405 | struct pipe_inode_info; | 405 | struct pipe_inode_info; |
406 | struct poll_table_struct; | 406 | struct poll_table_struct; |
407 | struct kstatfs; | 407 | struct kstatfs; |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index c3c578e09833..d464de53db43 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -41,6 +41,12 @@ | |||
41 | * 7.15 | 41 | * 7.15 |
42 | * - add store notify | 42 | * - add store notify |
43 | * - add retrieve notify | 43 | * - add retrieve notify |
44 | * | ||
45 | * 7.16 | ||
46 | * - add BATCH_FORGET request | ||
47 | * - FUSE_IOCTL_UNRESTRICTED shall now return with array of 'struct | ||
48 | * fuse_ioctl_iovec' instead of ambiguous 'struct iovec' | ||
49 | * - add FUSE_IOCTL_32BIT flag | ||
44 | */ | 50 | */ |
45 | 51 | ||
46 | #ifndef _LINUX_FUSE_H | 52 | #ifndef _LINUX_FUSE_H |
@@ -72,7 +78,7 @@ | |||
72 | #define FUSE_KERNEL_VERSION 7 | 78 | #define FUSE_KERNEL_VERSION 7 |
73 | 79 | ||
74 | /** Minor version number of this interface */ | 80 | /** Minor version number of this interface */ |
75 | #define FUSE_KERNEL_MINOR_VERSION 15 | 81 | #define FUSE_KERNEL_MINOR_VERSION 16 |
76 | 82 | ||
77 | /** The node ID of the root inode */ | 83 | /** The node ID of the root inode */ |
78 | #define FUSE_ROOT_ID 1 | 84 | #define FUSE_ROOT_ID 1 |
@@ -200,12 +206,14 @@ struct fuse_file_lock { | |||
200 | * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine | 206 | * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine |
201 | * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed | 207 | * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed |
202 | * FUSE_IOCTL_RETRY: retry with new iovecs | 208 | * FUSE_IOCTL_RETRY: retry with new iovecs |
209 | * FUSE_IOCTL_32BIT: 32bit ioctl | ||
203 | * | 210 | * |
204 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs | 211 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs |
205 | */ | 212 | */ |
206 | #define FUSE_IOCTL_COMPAT (1 << 0) | 213 | #define FUSE_IOCTL_COMPAT (1 << 0) |
207 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) | 214 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) |
208 | #define FUSE_IOCTL_RETRY (1 << 2) | 215 | #define FUSE_IOCTL_RETRY (1 << 2) |
216 | #define FUSE_IOCTL_32BIT (1 << 3) | ||
209 | 217 | ||
210 | #define FUSE_IOCTL_MAX_IOV 256 | 218 | #define FUSE_IOCTL_MAX_IOV 256 |
211 | 219 | ||
@@ -256,6 +264,7 @@ enum fuse_opcode { | |||
256 | FUSE_IOCTL = 39, | 264 | FUSE_IOCTL = 39, |
257 | FUSE_POLL = 40, | 265 | FUSE_POLL = 40, |
258 | FUSE_NOTIFY_REPLY = 41, | 266 | FUSE_NOTIFY_REPLY = 41, |
267 | FUSE_BATCH_FORGET = 42, | ||
259 | 268 | ||
260 | /* CUSE specific operations */ | 269 | /* CUSE specific operations */ |
261 | CUSE_INIT = 4096, | 270 | CUSE_INIT = 4096, |
@@ -290,6 +299,16 @@ struct fuse_forget_in { | |||
290 | __u64 nlookup; | 299 | __u64 nlookup; |
291 | }; | 300 | }; |
292 | 301 | ||
302 | struct fuse_forget_one { | ||
303 | __u64 nodeid; | ||
304 | __u64 nlookup; | ||
305 | }; | ||
306 | |||
307 | struct fuse_batch_forget_in { | ||
308 | __u32 count; | ||
309 | __u32 dummy; | ||
310 | }; | ||
311 | |||
293 | struct fuse_getattr_in { | 312 | struct fuse_getattr_in { |
294 | __u32 getattr_flags; | 313 | __u32 getattr_flags; |
295 | __u32 dummy; | 314 | __u32 dummy; |
@@ -510,6 +529,11 @@ struct fuse_ioctl_in { | |||
510 | __u32 out_size; | 529 | __u32 out_size; |
511 | }; | 530 | }; |
512 | 531 | ||
532 | struct fuse_ioctl_iovec { | ||
533 | __u64 base; | ||
534 | __u64 len; | ||
535 | }; | ||
536 | |||
513 | struct fuse_ioctl_out { | 537 | struct fuse_ioctl_out { |
514 | __s32 result; | 538 | __s32 result; |
515 | __u32 flags; | 539 | __u32 flags; |
diff --git a/include/linux/gpio-i2cmux.h b/include/linux/gpio-i2cmux.h new file mode 100644 index 000000000000..4a333bb0bd0d --- /dev/null +++ b/include/linux/gpio-i2cmux.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * gpio-i2cmux interface to platform code | ||
3 | * | ||
4 | * Peter Korsgaard <peter.korsgaard@barco.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef _LINUX_GPIO_I2CMUX_H | ||
12 | #define _LINUX_GPIO_I2CMUX_H | ||
13 | |||
14 | /* MUX has no specific idle mode */ | ||
15 | #define GPIO_I2CMUX_NO_IDLE ((unsigned)-1) | ||
16 | |||
17 | /** | ||
18 | * struct gpio_i2cmux_platform_data - Platform-dependent data for gpio-i2cmux | ||
19 | * @parent: Parent I2C bus adapter number | ||
20 | * @base_nr: Base I2C bus number to number adapters from or zero for dynamic | ||
21 | * @values: Array of bitmasks of GPIO settings (low/high) for each | ||
22 | * position | ||
23 | * @n_values: Number of multiplexer positions (busses to instantiate) | ||
24 | * @gpios: Array of GPIO numbers used to control MUX | ||
25 | * @n_gpios: Number of GPIOs used to control MUX | ||
26 | * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used | ||
27 | */ | ||
28 | struct gpio_i2cmux_platform_data { | ||
29 | int parent; | ||
30 | int base_nr; | ||
31 | const unsigned *values; | ||
32 | int n_values; | ||
33 | const unsigned *gpios; | ||
34 | int n_gpios; | ||
35 | unsigned idle; | ||
36 | }; | ||
37 | |||
38 | #endif /* _LINUX_GPIO_I2CMUX_H */ | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index bb0f56f5c01e..20b9801f669b 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -820,6 +820,49 @@ static inline void hid_hw_stop(struct hid_device *hdev) | |||
820 | hdev->ll_driver->stop(hdev); | 820 | hdev->ll_driver->stop(hdev); |
821 | } | 821 | } |
822 | 822 | ||
823 | /** | ||
824 | * hid_hw_open - signal underlaying HW to start delivering events | ||
825 | * | ||
826 | * @hdev: hid device | ||
827 | * | ||
828 | * Tell underlying HW to start delivering events from the device. | ||
829 | * This function should be called sometime after successful call | ||
830 | * to hid_hiw_start(). | ||
831 | */ | ||
832 | static inline int __must_check hid_hw_open(struct hid_device *hdev) | ||
833 | { | ||
834 | return hdev->ll_driver->open(hdev); | ||
835 | } | ||
836 | |||
837 | /** | ||
838 | * hid_hw_close - signal underlaying HW to stop delivering events | ||
839 | * | ||
840 | * @hdev: hid device | ||
841 | * | ||
842 | * This function indicates that we are not interested in the events | ||
843 | * from this device anymore. Delivery of events may or may not stop, | ||
844 | * depending on the number of users still outstanding. | ||
845 | */ | ||
846 | static inline void hid_hw_close(struct hid_device *hdev) | ||
847 | { | ||
848 | hdev->ll_driver->close(hdev); | ||
849 | } | ||
850 | |||
851 | /** | ||
852 | * hid_hw_power - requests underlying HW to go into given power mode | ||
853 | * | ||
854 | * @hdev: hid device | ||
855 | * @level: requested power level (one of %PM_HINT_* defines) | ||
856 | * | ||
857 | * This function requests underlying hardware to enter requested power | ||
858 | * mode. | ||
859 | */ | ||
860 | |||
861 | static inline int hid_hw_power(struct hid_device *hdev, int level) | ||
862 | { | ||
863 | return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; | ||
864 | } | ||
865 | |||
823 | void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | 866 | void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, |
824 | int interrupt); | 867 | int interrupt); |
825 | 868 | ||
@@ -838,12 +881,32 @@ int hid_pidff_init(struct hid_device *hid); | |||
838 | #define hid_pidff_init NULL | 881 | #define hid_pidff_init NULL |
839 | #endif | 882 | #endif |
840 | 883 | ||
841 | #define dbg_hid(format, arg...) if (hid_debug) \ | 884 | #define dbg_hid(format, arg...) \ |
842 | printk(KERN_DEBUG "%s: " format ,\ | 885 | do { \ |
843 | __FILE__ , ## arg) | 886 | if (hid_debug) \ |
844 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 887 | printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ |
845 | __FILE__ , ## arg) | 888 | } while (0) |
846 | #endif /* HID_FF */ | 889 | |
890 | #define hid_printk(level, hid, fmt, arg...) \ | ||
891 | dev_printk(level, &(hid)->dev, fmt, ##arg) | ||
892 | #define hid_emerg(hid, fmt, arg...) \ | ||
893 | dev_emerg(&(hid)->dev, fmt, ##arg) | ||
894 | #define hid_crit(hid, fmt, arg...) \ | ||
895 | dev_crit(&(hid)->dev, fmt, ##arg) | ||
896 | #define hid_alert(hid, fmt, arg...) \ | ||
897 | dev_alert(&(hid)->dev, fmt, ##arg) | ||
898 | #define hid_err(hid, fmt, arg...) \ | ||
899 | dev_err(&(hid)->dev, fmt, ##arg) | ||
900 | #define hid_notice(hid, fmt, arg...) \ | ||
901 | dev_notice(&(hid)->dev, fmt, ##arg) | ||
902 | #define hid_warn(hid, fmt, arg...) \ | ||
903 | dev_warn(&(hid)->dev, fmt, ##arg) | ||
904 | #define hid_info(hid, fmt, arg...) \ | ||
905 | dev_info(&(hid)->dev, fmt, ##arg) | ||
906 | #define hid_dbg(hid, fmt, arg...) \ | ||
907 | dev_dbg(&(hid)->dev, fmt, ##arg) | ||
908 | |||
909 | #endif /* __KERNEL__ */ | ||
847 | 910 | ||
848 | #endif | 911 | #endif |
849 | 912 | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 330586ffffbb..f376ddc64c4d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -131,7 +131,6 @@ struct hrtimer_sleeper { | |||
131 | * @index: clock type index for per_cpu support when moving a | 131 | * @index: clock type index for per_cpu support when moving a |
132 | * timer to a base on another cpu. | 132 | * timer to a base on another cpu. |
133 | * @active: red black tree root node for the active timers | 133 | * @active: red black tree root node for the active timers |
134 | * @first: pointer to the timer node which expires first | ||
135 | * @resolution: the resolution of the clock, in nanoseconds | 134 | * @resolution: the resolution of the clock, in nanoseconds |
136 | * @get_time: function to retrieve the current time of the clock | 135 | * @get_time: function to retrieve the current time of the clock |
137 | * @softirq_time: the time when running the hrtimer queue in the softirq | 136 | * @softirq_time: the time when running the hrtimer queue in the softirq |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 56cfe23ffb39..903576df88dc 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -57,9 +57,10 @@ struct i2c_board_info; | |||
57 | * transmit an arbitrary number of messages without interruption. | 57 | * transmit an arbitrary number of messages without interruption. |
58 | * @count must be be less than 64k since msg.len is u16. | 58 | * @count must be be less than 64k since msg.len is u16. |
59 | */ | 59 | */ |
60 | extern int i2c_master_send(struct i2c_client *client, const char *buf, | 60 | extern int i2c_master_send(const struct i2c_client *client, const char *buf, |
61 | int count); | ||
62 | extern int i2c_master_recv(const struct i2c_client *client, char *buf, | ||
61 | int count); | 63 | int count); |
62 | extern int i2c_master_recv(struct i2c_client *client, char *buf, int count); | ||
63 | 64 | ||
64 | /* Transfer num messages. | 65 | /* Transfer num messages. |
65 | */ | 66 | */ |
@@ -78,23 +79,25 @@ extern s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, | |||
78 | /* Now follow the 'nice' access routines. These also document the calling | 79 | /* Now follow the 'nice' access routines. These also document the calling |
79 | conventions of i2c_smbus_xfer. */ | 80 | conventions of i2c_smbus_xfer. */ |
80 | 81 | ||
81 | extern s32 i2c_smbus_read_byte(struct i2c_client *client); | 82 | extern s32 i2c_smbus_read_byte(const struct i2c_client *client); |
82 | extern s32 i2c_smbus_write_byte(struct i2c_client *client, u8 value); | 83 | extern s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value); |
83 | extern s32 i2c_smbus_read_byte_data(struct i2c_client *client, u8 command); | 84 | extern s32 i2c_smbus_read_byte_data(const struct i2c_client *client, |
84 | extern s32 i2c_smbus_write_byte_data(struct i2c_client *client, | 85 | u8 command); |
86 | extern s32 i2c_smbus_write_byte_data(const struct i2c_client *client, | ||
85 | u8 command, u8 value); | 87 | u8 command, u8 value); |
86 | extern s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command); | 88 | extern s32 i2c_smbus_read_word_data(const struct i2c_client *client, |
87 | extern s32 i2c_smbus_write_word_data(struct i2c_client *client, | 89 | u8 command); |
90 | extern s32 i2c_smbus_write_word_data(const struct i2c_client *client, | ||
88 | u8 command, u16 value); | 91 | u8 command, u16 value); |
89 | /* Returns the number of read bytes */ | 92 | /* Returns the number of read bytes */ |
90 | extern s32 i2c_smbus_read_block_data(struct i2c_client *client, | 93 | extern s32 i2c_smbus_read_block_data(const struct i2c_client *client, |
91 | u8 command, u8 *values); | 94 | u8 command, u8 *values); |
92 | extern s32 i2c_smbus_write_block_data(struct i2c_client *client, | 95 | extern s32 i2c_smbus_write_block_data(const struct i2c_client *client, |
93 | u8 command, u8 length, const u8 *values); | 96 | u8 command, u8 length, const u8 *values); |
94 | /* Returns the number of read bytes */ | 97 | /* Returns the number of read bytes */ |
95 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, | 98 | extern s32 i2c_smbus_read_i2c_block_data(const struct i2c_client *client, |
96 | u8 command, u8 length, u8 *values); | 99 | u8 command, u8 length, u8 *values); |
97 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, | 100 | extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client, |
98 | u8 command, u8 length, | 101 | u8 command, u8 length, |
99 | const u8 *values); | 102 | const u8 *values); |
100 | #endif /* I2C */ | 103 | #endif /* I2C */ |
diff --git a/include/linux/i2c/ds620.h b/include/linux/i2c/ds620.h new file mode 100644 index 000000000000..736bb87ac0fc --- /dev/null +++ b/include/linux/i2c/ds620.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _LINUX_DS620_H | ||
2 | #define _LINUX_DS620_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/i2c.h> | ||
6 | |||
7 | /* platform data for the DS620 temperature sensor and thermostat */ | ||
8 | |||
9 | struct ds620_platform_data { | ||
10 | /* | ||
11 | * Thermostat output pin PO mode: | ||
12 | * 0 = always low (default) | ||
13 | * 1 = PO_LOW | ||
14 | * 2 = PO_HIGH | ||
15 | * | ||
16 | * (see Documentation/hwmon/ds620) | ||
17 | */ | ||
18 | int pomode; | ||
19 | }; | ||
20 | |||
21 | #endif /* _LINUX_DS620_H */ | ||
diff --git a/include/linux/intel-gtt.h b/include/linux/intel-gtt.h deleted file mode 100644 index 1d19ab2afa39..000000000000 --- a/include/linux/intel-gtt.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * Common Intel AGPGART and GTT definitions. | ||
3 | */ | ||
4 | #ifndef _INTEL_GTT_H | ||
5 | #define _INTEL_GTT_H | ||
6 | |||
7 | #include <linux/agp_backend.h> | ||
8 | |||
9 | /* This is for Intel only GTT controls. | ||
10 | * | ||
11 | * Sandybridge: AGP_USER_CACHED_MEMORY default to LLC only | ||
12 | */ | ||
13 | |||
14 | #define AGP_USER_CACHED_MEMORY_LLC_MLC (AGP_USER_TYPES + 2) | ||
15 | #define AGP_USER_UNCACHED_MEMORY (AGP_USER_TYPES + 4) | ||
16 | |||
17 | /* flag for GFDT type */ | ||
18 | #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) | ||
19 | |||
20 | #endif | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 2ae86aa21fce..27e79c27ba08 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -94,7 +94,7 @@ extern void jbd2_free(void *ptr, size_t size); | |||
94 | * | 94 | * |
95 | * This is an opaque datatype. | 95 | * This is an opaque datatype. |
96 | **/ | 96 | **/ |
97 | typedef struct handle_s handle_t; /* Atomic operation type */ | 97 | typedef struct jbd2_journal_handle handle_t; /* Atomic operation type */ |
98 | 98 | ||
99 | 99 | ||
100 | /** | 100 | /** |
@@ -416,7 +416,7 @@ struct jbd2_revoke_table_s; | |||
416 | * in so it can be fixed later. | 416 | * in so it can be fixed later. |
417 | */ | 417 | */ |
418 | 418 | ||
419 | struct handle_s | 419 | struct jbd2_journal_handle |
420 | { | 420 | { |
421 | /* Which compound transaction is this update a part of? */ | 421 | /* Which compound transaction is this update a part of? */ |
422 | transaction_t *h_transaction; | 422 | transaction_t *h_transaction; |
@@ -1158,6 +1158,22 @@ static inline void jbd2_free_handle(handle_t *handle) | |||
1158 | kmem_cache_free(jbd2_handle_cache, handle); | 1158 | kmem_cache_free(jbd2_handle_cache, handle); |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | /* | ||
1162 | * jbd2_inode management (optional, for those file systems that want to use | ||
1163 | * dynamically allocated jbd2_inode structures) | ||
1164 | */ | ||
1165 | extern struct kmem_cache *jbd2_inode_cache; | ||
1166 | |||
1167 | static inline struct jbd2_inode *jbd2_alloc_inode(gfp_t gfp_flags) | ||
1168 | { | ||
1169 | return kmem_cache_alloc(jbd2_inode_cache, gfp_flags); | ||
1170 | } | ||
1171 | |||
1172 | static inline void jbd2_free_inode(struct jbd2_inode *jinode) | ||
1173 | { | ||
1174 | kmem_cache_free(jbd2_inode_cache, jinode); | ||
1175 | } | ||
1176 | |||
1161 | /* Primary revoke support */ | 1177 | /* Primary revoke support */ |
1162 | #define JOURNAL_REVOKE_DEFAULT_HASH 256 | 1178 | #define JOURNAL_REVOKE_DEFAULT_HASH 256 |
1163 | extern int jbd2_journal_init_revoke(journal_t *, int); | 1179 | extern int jbd2_journal_init_revoke(journal_t *, int); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b6de9a6f7018..d0fbc043de60 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -56,6 +56,8 @@ | |||
56 | 56 | ||
57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
59 | |||
60 | /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ | ||
59 | #define roundup(x, y) ( \ | 61 | #define roundup(x, y) ( \ |
60 | { \ | 62 | { \ |
61 | const typeof(y) __y = y; \ | 63 | const typeof(y) __y = y; \ |
@@ -263,6 +265,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
263 | } | 265 | } |
264 | 266 | ||
265 | extern int hex_to_bin(char ch); | 267 | extern int hex_to_bin(char ch); |
268 | extern void hex2bin(u8 *dst, const char *src, size_t count); | ||
266 | 269 | ||
267 | /* | 270 | /* |
268 | * General tracing related utility functions - trace_printk(), | 271 | * General tracing related utility functions - trace_printk(), |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 6cc38fc07ab7..d4a62ab2ee5e 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
@@ -24,5 +24,7 @@ struct kref { | |||
24 | void kref_init(struct kref *kref); | 24 | void kref_init(struct kref *kref); |
25 | void kref_get(struct kref *kref); | 25 | void kref_get(struct kref *kref); |
26 | int kref_put(struct kref *kref, void (*release) (struct kref *kref)); | 26 | int kref_put(struct kref *kref, void (*release) (struct kref *kref)); |
27 | int kref_sub(struct kref *kref, unsigned int count, | ||
28 | void (*release) (struct kref *kref)); | ||
27 | 29 | ||
28 | #endif /* _KREF_H_ */ | 30 | #endif /* _KREF_H_ */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index d947b1231662..c9c5d7ad1a2b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -996,8 +996,7 @@ extern int ata_sas_port_init(struct ata_port *); | |||
996 | extern int ata_sas_port_start(struct ata_port *ap); | 996 | extern int ata_sas_port_start(struct ata_port *ap); |
997 | extern void ata_sas_port_stop(struct ata_port *ap); | 997 | extern void ata_sas_port_stop(struct ata_port *ap); |
998 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); | 998 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); |
999 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), | 999 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap); |
1000 | struct ata_port *ap); | ||
1001 | extern int sata_scr_valid(struct ata_link *link); | 1000 | extern int sata_scr_valid(struct ata_link *link); |
1002 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); | 1001 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); |
1003 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); | 1002 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); |
@@ -1040,8 +1039,7 @@ extern unsigned int ata_do_dev_read_id(struct ata_device *dev, | |||
1040 | struct ata_taskfile *tf, u16 *id); | 1039 | struct ata_taskfile *tf, u16 *id); |
1041 | extern void ata_qc_complete(struct ata_queued_cmd *qc); | 1040 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
1042 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); | 1041 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); |
1043 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | 1042 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd); |
1044 | void (*done)(struct scsi_cmnd *)); | ||
1045 | extern int ata_std_bios_param(struct scsi_device *sdev, | 1043 | extern int ata_std_bios_param(struct scsi_device *sdev, |
1046 | struct block_device *bdev, | 1044 | struct block_device *bdev, |
1047 | sector_t capacity, int geom[]); | 1045 | sector_t capacity, int geom[]); |
diff --git a/include/linux/lockd/debug.h b/include/linux/lockd/debug.h index 34b2b7f33c3b..257d3779f2ab 100644 --- a/include/linux/lockd/debug.h +++ b/include/linux/lockd/debug.h | |||
@@ -44,14 +44,4 @@ | |||
44 | #define NLMDBG_XDR 0x0100 | 44 | #define NLMDBG_XDR 0x0100 |
45 | #define NLMDBG_ALL 0x7fff | 45 | #define NLMDBG_ALL 0x7fff |
46 | 46 | ||
47 | |||
48 | /* | ||
49 | * Support for printing NLM cookies in dprintk() | ||
50 | */ | ||
51 | #ifdef RPC_DEBUG | ||
52 | struct nlm_cookie; | ||
53 | /* Call this function with the BKL held (it uses a static buffer) */ | ||
54 | extern const char *nlmdbg_cookie2a(const struct nlm_cookie *); | ||
55 | #endif | ||
56 | |||
57 | #endif /* LINUX_LOCKD_DEBUG_H */ | 47 | #endif /* LINUX_LOCKD_DEBUG_H */ |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 2dee05e5119a..ff9abff55aa0 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -202,9 +202,9 @@ extern u32 nsm_local_state; | |||
202 | * Lockd client functions | 202 | * Lockd client functions |
203 | */ | 203 | */ |
204 | struct nlm_rqst * nlm_alloc_call(struct nlm_host *host); | 204 | struct nlm_rqst * nlm_alloc_call(struct nlm_host *host); |
205 | void nlm_release_call(struct nlm_rqst *); | ||
206 | int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *); | 205 | int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *); |
207 | int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); | 206 | int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); |
207 | void nlmclnt_release_call(struct nlm_rqst *); | ||
208 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); | 208 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); |
209 | void nlmclnt_finish_block(struct nlm_wait *block); | 209 | void nlmclnt_finish_block(struct nlm_wait *block); |
210 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); | 210 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); |
@@ -223,13 +223,14 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, | |||
223 | const u32 version, | 223 | const u32 version, |
224 | const char *hostname, | 224 | const char *hostname, |
225 | int noresvport); | 225 | int noresvport); |
226 | void nlmclnt_release_host(struct nlm_host *); | ||
226 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, | 227 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, |
227 | const char *hostname, | 228 | const char *hostname, |
228 | const size_t hostname_len); | 229 | const size_t hostname_len); |
230 | void nlmsvc_release_host(struct nlm_host *); | ||
229 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); | 231 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); |
230 | void nlm_rebind_host(struct nlm_host *); | 232 | void nlm_rebind_host(struct nlm_host *); |
231 | struct nlm_host * nlm_get_host(struct nlm_host *); | 233 | struct nlm_host * nlm_get_host(struct nlm_host *); |
232 | void nlm_release_host(struct nlm_host *); | ||
233 | void nlm_shutdown_hosts(void); | 234 | void nlm_shutdown_hosts(void); |
234 | void nlm_host_rebooted(const struct nlm_reboot *); | 235 | void nlm_host_rebooted(const struct nlm_reboot *); |
235 | 236 | ||
@@ -267,6 +268,7 @@ unsigned long nlmsvc_retry_blocked(void); | |||
267 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 268 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
268 | nlm_host_match_fn_t match); | 269 | nlm_host_match_fn_t match); |
269 | void nlmsvc_grant_reply(struct nlm_cookie *, __be32); | 270 | void nlmsvc_grant_reply(struct nlm_cookie *, __be32); |
271 | void nlmsvc_release_call(struct nlm_rqst *); | ||
270 | 272 | ||
271 | /* | 273 | /* |
272 | * File handling for the server personality | 274 | * File handling for the server personality |
diff --git a/include/linux/mbcache.h b/include/linux/mbcache.h index 54cbbac1e71d..5525d370701d 100644 --- a/include/linux/mbcache.h +++ b/include/linux/mbcache.h | |||
@@ -18,6 +18,17 @@ struct mb_cache_entry { | |||
18 | } e_index; | 18 | } e_index; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | struct mb_cache { | ||
22 | struct list_head c_cache_list; | ||
23 | const char *c_name; | ||
24 | atomic_t c_entry_count; | ||
25 | int c_max_entries; | ||
26 | int c_bucket_bits; | ||
27 | struct kmem_cache *c_entry_cache; | ||
28 | struct list_head *c_block_hash; | ||
29 | struct list_head *c_index_hash; | ||
30 | }; | ||
31 | |||
21 | /* Functions on caches */ | 32 | /* Functions on caches */ |
22 | 33 | ||
23 | struct mb_cache *mb_cache_create(const char *, int); | 34 | struct mb_cache *mb_cache_create(const char *, int); |
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 085f041197dc..8e70310ee945 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -57,6 +57,10 @@ | |||
57 | * is configured in 4-bit mode. | 57 | * is configured in 4-bit mode. |
58 | */ | 58 | */ |
59 | #define TMIO_MMC_BLKSZ_2BYTES (1 << 1) | 59 | #define TMIO_MMC_BLKSZ_2BYTES (1 << 1) |
60 | /* | ||
61 | * Some controllers can support SDIO IRQ signalling. | ||
62 | */ | ||
63 | #define TMIO_MMC_SDIO_IRQ (1 << 2) | ||
60 | 64 | ||
61 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | 65 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); |
62 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | 66 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); |
@@ -66,6 +70,7 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); | |||
66 | struct tmio_mmc_dma { | 70 | struct tmio_mmc_dma { |
67 | void *chan_priv_tx; | 71 | void *chan_priv_tx; |
68 | void *chan_priv_rx; | 72 | void *chan_priv_rx; |
73 | int alignment_shift; | ||
69 | }; | 74 | }; |
70 | 75 | ||
71 | /* | 76 | /* |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h new file mode 100644 index 000000000000..16b0261763ed --- /dev/null +++ b/include/linux/mmc/dw_mmc.h | |||
@@ -0,0 +1,217 @@ | |||
1 | /* | ||
2 | * Synopsys DesignWare Multimedia Card Interface driver | ||
3 | * (Based on NXP driver for lpc 31xx) | ||
4 | * | ||
5 | * Copyright (C) 2009 NXP Semiconductors | ||
6 | * Copyright (C) 2009, 2010 Imagination Technologies Ltd. | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef _LINUX_MMC_DW_MMC_H_ | ||
15 | #define _LINUX_MMC_DW_MMC_H_ | ||
16 | |||
17 | #define MAX_MCI_SLOTS 2 | ||
18 | |||
19 | enum dw_mci_state { | ||
20 | STATE_IDLE = 0, | ||
21 | STATE_SENDING_CMD, | ||
22 | STATE_SENDING_DATA, | ||
23 | STATE_DATA_BUSY, | ||
24 | STATE_SENDING_STOP, | ||
25 | STATE_DATA_ERROR, | ||
26 | }; | ||
27 | |||
28 | enum { | ||
29 | EVENT_CMD_COMPLETE = 0, | ||
30 | EVENT_XFER_COMPLETE, | ||
31 | EVENT_DATA_COMPLETE, | ||
32 | EVENT_DATA_ERROR, | ||
33 | EVENT_XFER_ERROR | ||
34 | }; | ||
35 | |||
36 | struct mmc_data; | ||
37 | |||
38 | /** | ||
39 | * struct dw_mci - MMC controller state shared between all slots | ||
40 | * @lock: Spinlock protecting the queue and associated data. | ||
41 | * @regs: Pointer to MMIO registers. | ||
42 | * @sg: Scatterlist entry currently being processed by PIO code, if any. | ||
43 | * @pio_offset: Offset into the current scatterlist entry. | ||
44 | * @cur_slot: The slot which is currently using the controller. | ||
45 | * @mrq: The request currently being processed on @cur_slot, | ||
46 | * or NULL if the controller is idle. | ||
47 | * @cmd: The command currently being sent to the card, or NULL. | ||
48 | * @data: The data currently being transferred, or NULL if no data | ||
49 | * transfer is in progress. | ||
50 | * @use_dma: Whether DMA channel is initialized or not. | ||
51 | * @sg_dma: Bus address of DMA buffer. | ||
52 | * @sg_cpu: Virtual address of DMA buffer. | ||
53 | * @dma_ops: Pointer to platform-specific DMA callbacks. | ||
54 | * @cmd_status: Snapshot of SR taken upon completion of the current | ||
55 | * command. Only valid when EVENT_CMD_COMPLETE is pending. | ||
56 | * @data_status: Snapshot of SR taken upon completion of the current | ||
57 | * data transfer. Only valid when EVENT_DATA_COMPLETE or | ||
58 | * EVENT_DATA_ERROR is pending. | ||
59 | * @stop_cmdr: Value to be loaded into CMDR when the stop command is | ||
60 | * to be sent. | ||
61 | * @dir_status: Direction of current transfer. | ||
62 | * @tasklet: Tasklet running the request state machine. | ||
63 | * @card_tasklet: Tasklet handling card detect. | ||
64 | * @pending_events: Bitmask of events flagged by the interrupt handler | ||
65 | * to be processed by the tasklet. | ||
66 | * @completed_events: Bitmask of events which the state machine has | ||
67 | * processed. | ||
68 | * @state: Tasklet state. | ||
69 | * @queue: List of slots waiting for access to the controller. | ||
70 | * @bus_hz: The rate of @mck in Hz. This forms the basis for MMC bus | ||
71 | * rate and timeout calculations. | ||
72 | * @current_speed: Configured rate of the controller. | ||
73 | * @num_slots: Number of slots available. | ||
74 | * @pdev: Platform device associated with the MMC controller. | ||
75 | * @pdata: Platform data associated with the MMC controller. | ||
76 | * @slot: Slots sharing this MMC controller. | ||
77 | * @data_shift: log2 of FIFO item size. | ||
78 | * @push_data: Pointer to FIFO push function. | ||
79 | * @pull_data: Pointer to FIFO pull function. | ||
80 | * @quirks: Set of quirks that apply to specific versions of the IP. | ||
81 | * | ||
82 | * Locking | ||
83 | * ======= | ||
84 | * | ||
85 | * @lock is a softirq-safe spinlock protecting @queue as well as | ||
86 | * @cur_slot, @mrq and @state. These must always be updated | ||
87 | * at the same time while holding @lock. | ||
88 | * | ||
89 | * The @mrq field of struct dw_mci_slot is also protected by @lock, | ||
90 | * and must always be written at the same time as the slot is added to | ||
91 | * @queue. | ||
92 | * | ||
93 | * @pending_events and @completed_events are accessed using atomic bit | ||
94 | * operations, so they don't need any locking. | ||
95 | * | ||
96 | * None of the fields touched by the interrupt handler need any | ||
97 | * locking. However, ordering is important: Before EVENT_DATA_ERROR or | ||
98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related | ||
99 | * interrupts must be disabled and @data_status updated with a | ||
100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the | ||
101 | * CMDRDY interupt must be disabled and @cmd_status updated with a | ||
102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the | ||
103 | * bytes_xfered field of @data must be written. This is ensured by | ||
104 | * using barriers. | ||
105 | */ | ||
106 | struct dw_mci { | ||
107 | spinlock_t lock; | ||
108 | void __iomem *regs; | ||
109 | |||
110 | struct scatterlist *sg; | ||
111 | unsigned int pio_offset; | ||
112 | |||
113 | struct dw_mci_slot *cur_slot; | ||
114 | struct mmc_request *mrq; | ||
115 | struct mmc_command *cmd; | ||
116 | struct mmc_data *data; | ||
117 | |||
118 | /* DMA interface members*/ | ||
119 | int use_dma; | ||
120 | |||
121 | dma_addr_t sg_dma; | ||
122 | void *sg_cpu; | ||
123 | struct dw_mci_dma_ops *dma_ops; | ||
124 | #ifdef CONFIG_MMC_DW_IDMAC | ||
125 | unsigned int ring_size; | ||
126 | #else | ||
127 | struct dw_mci_dma_data *dma_data; | ||
128 | #endif | ||
129 | u32 cmd_status; | ||
130 | u32 data_status; | ||
131 | u32 stop_cmdr; | ||
132 | u32 dir_status; | ||
133 | struct tasklet_struct tasklet; | ||
134 | struct tasklet_struct card_tasklet; | ||
135 | unsigned long pending_events; | ||
136 | unsigned long completed_events; | ||
137 | enum dw_mci_state state; | ||
138 | struct list_head queue; | ||
139 | |||
140 | u32 bus_hz; | ||
141 | u32 current_speed; | ||
142 | u32 num_slots; | ||
143 | struct platform_device *pdev; | ||
144 | struct dw_mci_board *pdata; | ||
145 | struct dw_mci_slot *slot[MAX_MCI_SLOTS]; | ||
146 | |||
147 | /* FIFO push and pull */ | ||
148 | int data_shift; | ||
149 | void (*push_data)(struct dw_mci *host, void *buf, int cnt); | ||
150 | void (*pull_data)(struct dw_mci *host, void *buf, int cnt); | ||
151 | |||
152 | /* Workaround flags */ | ||
153 | u32 quirks; | ||
154 | }; | ||
155 | |||
156 | /* DMA ops for Internal/External DMAC interface */ | ||
157 | struct dw_mci_dma_ops { | ||
158 | /* DMA Ops */ | ||
159 | int (*init)(struct dw_mci *host); | ||
160 | void (*start)(struct dw_mci *host, unsigned int sg_len); | ||
161 | void (*complete)(struct dw_mci *host); | ||
162 | void (*stop)(struct dw_mci *host); | ||
163 | void (*cleanup)(struct dw_mci *host); | ||
164 | void (*exit)(struct dw_mci *host); | ||
165 | }; | ||
166 | |||
167 | /* IP Quirks/flags. */ | ||
168 | /* No special quirks or flags to cater for */ | ||
169 | #define DW_MCI_QUIRK_NONE 0 | ||
170 | /* DTO fix for command transmission with IDMAC configured */ | ||
171 | #define DW_MCI_QUIRK_IDMAC_DTO 1 | ||
172 | /* delay needed between retries on some 2.11a implementations */ | ||
173 | #define DW_MCI_QUIRK_RETRY_DELAY 2 | ||
174 | /* High Speed Capable - Supports HS cards (upto 50MHz) */ | ||
175 | #define DW_MCI_QUIRK_HIGHSPEED 4 | ||
176 | |||
177 | |||
178 | struct dma_pdata; | ||
179 | |||
180 | struct block_settings { | ||
181 | unsigned short max_segs; /* see blk_queue_max_segments */ | ||
182 | unsigned int max_blk_size; /* maximum size of one mmc block */ | ||
183 | unsigned int max_blk_count; /* maximum number of blocks in one req*/ | ||
184 | unsigned int max_req_size; /* maximum number of bytes in one req*/ | ||
185 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | ||
186 | }; | ||
187 | |||
188 | /* Board platform data */ | ||
189 | struct dw_mci_board { | ||
190 | u32 num_slots; | ||
191 | |||
192 | u32 quirks; /* Workaround / Quirk flags */ | ||
193 | unsigned int bus_hz; /* Bus speed */ | ||
194 | |||
195 | /* delay in mS before detecting cards after interrupt */ | ||
196 | u32 detect_delay_ms; | ||
197 | |||
198 | int (*init)(u32 slot_id, irq_handler_t , void *); | ||
199 | int (*get_ro)(u32 slot_id); | ||
200 | int (*get_cd)(u32 slot_id); | ||
201 | int (*get_ocr)(u32 slot_id); | ||
202 | int (*get_bus_wd)(u32 slot_id); | ||
203 | /* | ||
204 | * Enable power to selected slot and set voltage to desired level. | ||
205 | * Voltage levels are specified using MMC_VDD_xxx defines defined | ||
206 | * in linux/mmc/host.h file. | ||
207 | */ | ||
208 | void (*setpower)(u32 slot_id, u32 volt); | ||
209 | void (*exit)(u32 slot_id); | ||
210 | void (*select_slot)(u32 slot_id); | ||
211 | |||
212 | struct dw_mci_dma_ops *dma_ops; | ||
213 | struct dma_pdata *data; | ||
214 | struct block_settings *blk_settings; | ||
215 | }; | ||
216 | |||
217 | #endif /* _LINUX_MMC_DW_MMC_H_ */ | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 30f6fad99a58..bcb793ec7374 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -131,6 +131,9 @@ struct mmc_host { | |||
131 | unsigned int f_max; | 131 | unsigned int f_max; |
132 | unsigned int f_init; | 132 | unsigned int f_init; |
133 | u32 ocr_avail; | 133 | u32 ocr_avail; |
134 | u32 ocr_avail_sdio; /* SDIO-specific OCR */ | ||
135 | u32 ocr_avail_sd; /* SD-specific OCR */ | ||
136 | u32 ocr_avail_mmc; /* MMC-specific OCR */ | ||
134 | struct notifier_block pm_notify; | 137 | struct notifier_block pm_notify; |
135 | 138 | ||
136 | #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */ | 139 | #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */ |
@@ -169,9 +172,20 @@ struct mmc_host { | |||
169 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ | 172 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ |
170 | /* DDR mode at 1.2V */ | 173 | /* DDR mode at 1.2V */ |
171 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ | 174 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ |
175 | #define MMC_CAP_BUS_WIDTH_TEST (1 << 14) /* CMD14/CMD19 bus width ok */ | ||
172 | 176 | ||
173 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 177 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
174 | 178 | ||
179 | #ifdef CONFIG_MMC_CLKGATE | ||
180 | int clk_requests; /* internal reference counter */ | ||
181 | unsigned int clk_delay; /* number of MCI clk hold cycles */ | ||
182 | bool clk_gated; /* clock gated */ | ||
183 | struct work_struct clk_gate_work; /* delayed clock gate */ | ||
184 | unsigned int clk_old; /* old clock value cache */ | ||
185 | spinlock_t clk_lock; /* lock for clk fields */ | ||
186 | struct mutex clk_gate_mutex; /* mutex for clock gating */ | ||
187 | #endif | ||
188 | |||
175 | /* host specific block data */ | 189 | /* host specific block data */ |
176 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 190 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
177 | unsigned short max_segs; /* see blk_queue_max_segments */ | 191 | unsigned short max_segs; /* see blk_queue_max_segments */ |
@@ -307,5 +321,10 @@ static inline int mmc_card_is_removable(struct mmc_host *host) | |||
307 | return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable; | 321 | return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable; |
308 | } | 322 | } |
309 | 323 | ||
324 | static inline int mmc_card_is_powered_resumed(struct mmc_host *host) | ||
325 | { | ||
326 | return host->pm_flags & MMC_PM_KEEP_POWER; | ||
327 | } | ||
328 | |||
310 | #endif | 329 | #endif |
311 | 330 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 956fbd877692..612301f85d14 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -40,7 +40,9 @@ | |||
40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ | 40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ |
41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ | 41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ |
42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ | 42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ |
43 | #define MMC_BUS_TEST_R 14 /* adtc R1 */ | ||
43 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ | 44 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ |
45 | #define MMC_BUS_TEST_W 19 /* adtc R1 */ | ||
44 | #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ | 46 | #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ |
45 | #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ | 47 | #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ |
46 | 48 | ||
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 1fdc673f2396..83bd9f76709a 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
@@ -83,6 +83,8 @@ struct sdhci_host { | |||
83 | #define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28) | 83 | #define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28) |
84 | /* Controller doesn't have HISPD bit field in HI-SPEED SD card */ | 84 | /* Controller doesn't have HISPD bit field in HI-SPEED SD card */ |
85 | #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29) | 85 | #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29) |
86 | /* Controller treats ADMA descriptors with length 0000h incorrectly */ | ||
87 | #define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC (1<<30) | ||
86 | 88 | ||
87 | int irq; /* Device IRQ */ | 89 | int irq; /* Device IRQ */ |
88 | void __iomem *ioaddr; /* Mapped address */ | 90 | void __iomem *ioaddr; /* Mapped address */ |
@@ -139,6 +141,10 @@ struct sdhci_host { | |||
139 | 141 | ||
140 | unsigned int caps; /* Alternative capabilities */ | 142 | unsigned int caps; /* Alternative capabilities */ |
141 | 143 | ||
144 | unsigned int ocr_avail_sdio; /* OCR bit masks */ | ||
145 | unsigned int ocr_avail_sd; | ||
146 | unsigned int ocr_avail_mmc; | ||
147 | |||
142 | unsigned long private[0] ____cacheline_aligned; | 148 | unsigned long private[0] ____cacheline_aligned; |
143 | }; | 149 | }; |
144 | #endif /* __SDHCI_H */ | 150 | #endif /* __SDHCI_H */ |
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h index ac33806ec7f9..6ccfe3b641e1 100644 --- a/include/linux/nfs3.h +++ b/include/linux/nfs3.h | |||
@@ -11,6 +11,9 @@ | |||
11 | #define NFS3_MAXGROUPS 16 | 11 | #define NFS3_MAXGROUPS 16 |
12 | #define NFS3_FHSIZE 64 | 12 | #define NFS3_FHSIZE 64 |
13 | #define NFS3_COOKIESIZE 4 | 13 | #define NFS3_COOKIESIZE 4 |
14 | #define NFS3_CREATEVERFSIZE 8 | ||
15 | #define NFS3_COOKIEVERFSIZE 8 | ||
16 | #define NFS3_WRITEVERFSIZE 8 | ||
14 | #define NFS3_FIFO_DEV (-1) | 17 | #define NFS3_FIFO_DEV (-1) |
15 | #define NFS3MODE_FMT 0170000 | 18 | #define NFS3MODE_FMT 0170000 |
16 | #define NFS3MODE_DIR 0040000 | 19 | #define NFS3MODE_DIR 0040000 |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 4925b22219d2..9b46300b4305 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -111,9 +111,13 @@ | |||
111 | 111 | ||
112 | #define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001 | 112 | #define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001 |
113 | #define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002 | 113 | #define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002 |
114 | #define EXCHGID4_FLAG_BIND_PRINC_STATEID 0x00000100 | ||
115 | |||
114 | #define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000 | 116 | #define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000 |
115 | #define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000 | 117 | #define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000 |
116 | #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 | 118 | #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 |
119 | #define EXCHGID4_FLAG_MASK_PNFS 0x00070000 | ||
120 | |||
117 | #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 | 121 | #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 |
118 | #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 | 122 | #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 |
119 | /* | 123 | /* |
@@ -121,8 +125,8 @@ | |||
121 | * they're set in the argument or response, have separate | 125 | * they're set in the argument or response, have separate |
122 | * invalid flag masks for arg (_A) and resp (_R). | 126 | * invalid flag masks for arg (_A) and resp (_R). |
123 | */ | 127 | */ |
124 | #define EXCHGID4_FLAG_MASK_A 0x40070003 | 128 | #define EXCHGID4_FLAG_MASK_A 0x40070103 |
125 | #define EXCHGID4_FLAG_MASK_R 0x80070003 | 129 | #define EXCHGID4_FLAG_MASK_R 0x80070103 |
126 | 130 | ||
127 | #define SEQ4_STATUS_CB_PATH_DOWN 0x00000001 | 131 | #define SEQ4_STATUS_CB_PATH_DOWN 0x00000001 |
128 | #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002 | 132 | #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002 |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 452d96436d26..b197563913bf 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -47,11 +47,6 @@ struct nfs_client { | |||
47 | u64 cl_clientid; /* constant */ | 47 | u64 cl_clientid; /* constant */ |
48 | unsigned long cl_state; | 48 | unsigned long cl_state; |
49 | 49 | ||
50 | struct rb_root cl_openowner_id; | ||
51 | struct rb_root cl_lockowner_id; | ||
52 | |||
53 | struct list_head cl_delegations; | ||
54 | struct rb_root cl_state_owners; | ||
55 | spinlock_t cl_lock; | 50 | spinlock_t cl_lock; |
56 | 51 | ||
57 | unsigned long cl_lease_time; | 52 | unsigned long cl_lease_time; |
@@ -71,6 +66,7 @@ struct nfs_client { | |||
71 | */ | 66 | */ |
72 | char cl_ipaddr[48]; | 67 | char cl_ipaddr[48]; |
73 | unsigned char cl_id_uniquifier; | 68 | unsigned char cl_id_uniquifier; |
69 | u32 cl_cb_ident; /* v4.0 callback identifier */ | ||
74 | const struct nfs4_minor_version_ops *cl_mvops; | 70 | const struct nfs4_minor_version_ops *cl_mvops; |
75 | #endif /* CONFIG_NFS_V4 */ | 71 | #endif /* CONFIG_NFS_V4 */ |
76 | 72 | ||
@@ -148,7 +144,14 @@ struct nfs_server { | |||
148 | that are supported on this | 144 | that are supported on this |
149 | filesystem */ | 145 | filesystem */ |
150 | struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ | 146 | struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ |
147 | struct rpc_wait_queue roc_rpcwaitq; | ||
148 | |||
149 | /* the following fields are protected by nfs_client->cl_lock */ | ||
150 | struct rb_root state_owners; | ||
151 | struct rb_root openowner_id; | ||
152 | struct rb_root lockowner_id; | ||
151 | #endif | 153 | #endif |
154 | struct list_head delegations; | ||
152 | void (*destroy)(struct nfs_server *); | 155 | void (*destroy)(struct nfs_server *); |
153 | 156 | ||
154 | atomic_t active; /* Keep trace of any activity to this server */ | 157 | atomic_t active; /* Keep trace of any activity to this server */ |
@@ -196,6 +199,7 @@ struct nfs4_slot_table { | |||
196 | * op for dynamic resizing */ | 199 | * op for dynamic resizing */ |
197 | int target_max_slots; /* Set by CB_RECALL_SLOT as | 200 | int target_max_slots; /* Set by CB_RECALL_SLOT as |
198 | * the new max_slots */ | 201 | * the new max_slots */ |
202 | struct completion complete; | ||
199 | }; | 203 | }; |
200 | 204 | ||
201 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) | 205 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) |
@@ -212,7 +216,6 @@ struct nfs4_session { | |||
212 | unsigned long session_state; | 216 | unsigned long session_state; |
213 | u32 hash_alg; | 217 | u32 hash_alg; |
214 | u32 ssv_len; | 218 | u32 ssv_len; |
215 | struct completion complete; | ||
216 | 219 | ||
217 | /* The fore and back channel */ | 220 | /* The fore and back channel */ |
218 | struct nfs4_channel_attrs fc_attrs; | 221 | struct nfs4_channel_attrs fc_attrs; |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 80f07198a31a..b0068579bec2 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -208,6 +208,7 @@ struct nfs4_layoutget_args { | |||
208 | struct inode *inode; | 208 | struct inode *inode; |
209 | struct nfs_open_context *ctx; | 209 | struct nfs_open_context *ctx; |
210 | struct nfs4_sequence_args seq_args; | 210 | struct nfs4_sequence_args seq_args; |
211 | nfs4_stateid stateid; | ||
211 | }; | 212 | }; |
212 | 213 | ||
213 | struct nfs4_layoutget_res { | 214 | struct nfs4_layoutget_res { |
@@ -223,7 +224,6 @@ struct nfs4_layoutget { | |||
223 | struct nfs4_layoutget_args args; | 224 | struct nfs4_layoutget_args args; |
224 | struct nfs4_layoutget_res res; | 225 | struct nfs4_layoutget_res res; |
225 | struct pnfs_layout_segment **lsegpp; | 226 | struct pnfs_layout_segment **lsegpp; |
226 | int status; | ||
227 | }; | 227 | }; |
228 | 228 | ||
229 | struct nfs4_getdeviceinfo_args { | 229 | struct nfs4_getdeviceinfo_args { |
@@ -317,6 +317,7 @@ struct nfs_closeres { | |||
317 | struct nfs_lowner { | 317 | struct nfs_lowner { |
318 | __u64 clientid; | 318 | __u64 clientid; |
319 | __u64 id; | 319 | __u64 id; |
320 | dev_t s_dev; | ||
320 | }; | 321 | }; |
321 | 322 | ||
322 | struct nfs_lock_args { | 323 | struct nfs_lock_args { |
@@ -484,6 +485,7 @@ struct nfs_entry { | |||
484 | struct nfs_fh * fh; | 485 | struct nfs_fh * fh; |
485 | struct nfs_fattr * fattr; | 486 | struct nfs_fattr * fattr; |
486 | unsigned char d_type; | 487 | unsigned char d_type; |
488 | struct nfs_server * server; | ||
487 | }; | 489 | }; |
488 | 490 | ||
489 | /* | 491 | /* |
@@ -1089,7 +1091,7 @@ struct nfs_rpc_ops { | |||
1089 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, | 1091 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, |
1090 | struct nfs_pathconf *); | 1092 | struct nfs_pathconf *); |
1091 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); | 1093 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); |
1092 | __be32 *(*decode_dirent)(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int plus); | 1094 | int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); |
1093 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); | 1095 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); |
1094 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); | 1096 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); |
1095 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); | 1097 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); |
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 8aea06f0564c..2feda6ee6140 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <linux/ioport.h> | 3 | #include <linux/ioport.h> |
4 | #include <linux/of.h> | 4 | #include <linux/of.h> |
5 | 5 | ||
6 | extern u64 of_translate_address(struct device_node *np, const u32 *addr); | 6 | extern u64 of_translate_address(struct device_node *np, const __be32 *addr); |
7 | extern int of_address_to_resource(struct device_node *dev, int index, | 7 | extern int of_address_to_resource(struct device_node *dev, int index, |
8 | struct resource *r); | 8 | struct resource *r); |
9 | extern void __iomem *of_iomap(struct device_node *device, int index); | 9 | extern void __iomem *of_iomap(struct device_node *device, int index); |
@@ -21,7 +21,7 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; } | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef CONFIG_PCI | 23 | #ifdef CONFIG_PCI |
24 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 24 | extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, |
25 | u64 *size, unsigned int *flags); | 25 | u64 *size, unsigned int *flags); |
26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
27 | struct resource *r); | 27 | struct resource *r); |
@@ -32,7 +32,7 @@ static inline int of_pci_address_to_resource(struct device_node *dev, int bar, | |||
32 | return -ENOSYS; | 32 | return -ENOSYS; |
33 | } | 33 | } |
34 | 34 | ||
35 | static inline const u32 *of_get_pci_address(struct device_node *dev, | 35 | static inline const __be32 *of_get_pci_address(struct device_node *dev, |
36 | int bar_no, u64 *size, unsigned int *flags) | 36 | int bar_no, u64 *size, unsigned int *flags) |
37 | { | 37 | { |
38 | return NULL; | 38 | return NULL; |
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 7bbf5b328438..0ef22a1f129e 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -58,6 +58,23 @@ struct boot_param_header { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | #if defined(CONFIG_OF_FLATTREE) | 60 | #if defined(CONFIG_OF_FLATTREE) |
61 | |||
62 | struct device_node; | ||
63 | |||
64 | /* For scanning an arbitrary device-tree at any time */ | ||
65 | extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset); | ||
66 | extern void *of_fdt_get_property(struct boot_param_header *blob, | ||
67 | unsigned long node, | ||
68 | const char *name, | ||
69 | unsigned long *size); | ||
70 | extern int of_fdt_is_compatible(struct boot_param_header *blob, | ||
71 | unsigned long node, | ||
72 | const char *compat); | ||
73 | extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, | ||
74 | const char **compat); | ||
75 | extern void of_fdt_unflatten_tree(unsigned long *blob, | ||
76 | struct device_node **mynodes); | ||
77 | |||
61 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ | 78 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ |
62 | extern int __initdata dt_root_addr_cells; | 79 | extern int __initdata dt_root_addr_cells; |
63 | extern int __initdata dt_root_size_cells; | 80 | extern int __initdata dt_root_size_cells; |
@@ -71,6 +88,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, | |||
71 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, | 88 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, |
72 | unsigned long *size); | 89 | unsigned long *size); |
73 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); | 90 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); |
91 | extern int of_flat_dt_match(unsigned long node, const char **matches); | ||
74 | extern unsigned long of_get_flat_dt_root(void); | 92 | extern unsigned long of_get_flat_dt_root(void); |
75 | 93 | ||
76 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, | 94 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, |
diff --git a/include/linux/of_net.h b/include/linux/of_net.h new file mode 100644 index 000000000000..e913081fb52a --- /dev/null +++ b/include/linux/of_net.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * OF helpers for network devices. | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __LINUX_OF_NET_H | ||
8 | #define __LINUX_OF_NET_H | ||
9 | |||
10 | #ifdef CONFIG_OF_NET | ||
11 | #include <linux/of.h> | ||
12 | extern const void *of_get_mac_address(struct device_node *np); | ||
13 | #endif | ||
14 | |||
15 | #endif /* __LINUX_OF_NET_H */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cb845c16ad7d..ab47732d81e0 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -518,6 +518,7 @@ | |||
518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 | 518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 |
519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 | 519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 |
520 | #define PCI_DEVICE_ID_AMD_15H_NB_MISC 0x1603 | 520 | #define PCI_DEVICE_ID_AMD_15H_NB_MISC 0x1603 |
521 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 | ||
521 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 522 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
522 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 523 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
523 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 | 524 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 |
@@ -1650,6 +1651,11 @@ | |||
1650 | #define PCI_DEVICE_ID_O2_6836 0x6836 | 1651 | #define PCI_DEVICE_ID_O2_6836 0x6836 |
1651 | #define PCI_DEVICE_ID_O2_6812 0x6872 | 1652 | #define PCI_DEVICE_ID_O2_6812 0x6872 |
1652 | #define PCI_DEVICE_ID_O2_6933 0x6933 | 1653 | #define PCI_DEVICE_ID_O2_6933 0x6933 |
1654 | #define PCI_DEVICE_ID_O2_8120 0x8120 | ||
1655 | #define PCI_DEVICE_ID_O2_8220 0x8220 | ||
1656 | #define PCI_DEVICE_ID_O2_8221 0x8221 | ||
1657 | #define PCI_DEVICE_ID_O2_8320 0x8320 | ||
1658 | #define PCI_DEVICE_ID_O2_8321 0x8321 | ||
1653 | 1659 | ||
1654 | #define PCI_VENDOR_ID_3DFX 0x121a | 1660 | #define PCI_VENDOR_ID_3DFX 0x121a |
1655 | #define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 | 1661 | #define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 |
@@ -2363,6 +2369,8 @@ | |||
2363 | #define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 | 2369 | #define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 |
2364 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MMC 0x2382 | 2370 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MMC 0x2382 |
2365 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383 | 2371 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383 |
2372 | #define PCI_DEVICE_ID_JMICRON_JMB388_SD 0x2391 | ||
2373 | #define PCI_DEVICE_ID_JMICRON_JMB388_ESD 0x2392 | ||
2366 | 2374 | ||
2367 | #define PCI_VENDOR_ID_KORENIX 0x1982 | 2375 | #define PCI_VENDOR_ID_KORENIX 0x1982 |
2368 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2376 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index bb27d7ec2fb9..77257c92155a 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -30,6 +30,7 @@ struct pipe_buffer { | |||
30 | * struct pipe_inode_info - a linux kernel pipe | 30 | * struct pipe_inode_info - a linux kernel pipe |
31 | * @wait: reader/writer wait point in case of empty/full pipe | 31 | * @wait: reader/writer wait point in case of empty/full pipe |
32 | * @nrbufs: the number of non-empty pipe buffers in this pipe | 32 | * @nrbufs: the number of non-empty pipe buffers in this pipe |
33 | * @buffers: total number of buffers (should be a power of 2) | ||
33 | * @curbuf: the current pipe buffer entry | 34 | * @curbuf: the current pipe buffer entry |
34 | * @tmp_page: cached released page | 35 | * @tmp_page: cached released page |
35 | * @readers: number of current readers of this pipe | 36 | * @readers: number of current readers of this pipe |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 40f3f45702ba..dd9c7ab38270 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -367,45 +367,6 @@ extern struct dev_pm_ops generic_subsys_pm_ops; | |||
367 | { .event = PM_EVENT_AUTO_RESUME, }) | 367 | { .event = PM_EVENT_AUTO_RESUME, }) |
368 | 368 | ||
369 | /** | 369 | /** |
370 | * Device power management states | ||
371 | * | ||
372 | * These state labels are used internally by the PM core to indicate the current | ||
373 | * status of a device with respect to the PM core operations. | ||
374 | * | ||
375 | * DPM_ON Device is regarded as operational. Set this way | ||
376 | * initially and when ->complete() is about to be called. | ||
377 | * Also set when ->prepare() fails. | ||
378 | * | ||
379 | * DPM_PREPARING Device is going to be prepared for a PM transition. Set | ||
380 | * when ->prepare() is about to be called. | ||
381 | * | ||
382 | * DPM_RESUMING Device is going to be resumed. Set when ->resume(), | ||
383 | * ->thaw(), or ->restore() is about to be called. | ||
384 | * | ||
385 | * DPM_SUSPENDING Device has been prepared for a power transition. Set | ||
386 | * when ->prepare() has just succeeded. | ||
387 | * | ||
388 | * DPM_OFF Device is regarded as inactive. Set immediately after | ||
389 | * ->suspend(), ->freeze(), or ->poweroff() has succeeded. | ||
390 | * Also set when ->resume()_noirq, ->thaw_noirq(), or | ||
391 | * ->restore_noirq() is about to be called. | ||
392 | * | ||
393 | * DPM_OFF_IRQ Device is in a "deep sleep". Set immediately after | ||
394 | * ->suspend_noirq(), ->freeze_noirq(), or | ||
395 | * ->poweroff_noirq() has just succeeded. | ||
396 | */ | ||
397 | |||
398 | enum dpm_state { | ||
399 | DPM_INVALID, | ||
400 | DPM_ON, | ||
401 | DPM_PREPARING, | ||
402 | DPM_RESUMING, | ||
403 | DPM_SUSPENDING, | ||
404 | DPM_OFF, | ||
405 | DPM_OFF_IRQ, | ||
406 | }; | ||
407 | |||
408 | /** | ||
409 | * Device run-time power management status. | 370 | * Device run-time power management status. |
410 | * | 371 | * |
411 | * These status labels are used internally by the PM core to indicate the | 372 | * These status labels are used internally by the PM core to indicate the |
@@ -463,8 +424,8 @@ struct wakeup_source; | |||
463 | struct dev_pm_info { | 424 | struct dev_pm_info { |
464 | pm_message_t power_state; | 425 | pm_message_t power_state; |
465 | unsigned int can_wakeup:1; | 426 | unsigned int can_wakeup:1; |
466 | unsigned async_suspend:1; | 427 | unsigned int async_suspend:1; |
467 | enum dpm_state status; /* Owned by the PM core */ | 428 | unsigned int in_suspend:1; /* Owned by the PM core */ |
468 | spinlock_t lock; | 429 | spinlock_t lock; |
469 | #ifdef CONFIG_PM_SLEEP | 430 | #ifdef CONFIG_PM_SLEEP |
470 | struct list_head entry; | 431 | struct list_head entry; |
@@ -486,6 +447,7 @@ struct dev_pm_info { | |||
486 | unsigned int run_wake:1; | 447 | unsigned int run_wake:1; |
487 | unsigned int runtime_auto:1; | 448 | unsigned int runtime_auto:1; |
488 | unsigned int no_callbacks:1; | 449 | unsigned int no_callbacks:1; |
450 | unsigned int irq_safe:1; | ||
489 | unsigned int use_autosuspend:1; | 451 | unsigned int use_autosuspend:1; |
490 | unsigned int timer_autosuspends:1; | 452 | unsigned int timer_autosuspends:1; |
491 | enum rpm_request request; | 453 | enum rpm_request request; |
@@ -610,4 +572,11 @@ extern unsigned int pm_flags; | |||
610 | #define PM_APM 1 | 572 | #define PM_APM 1 |
611 | #define PM_ACPI 2 | 573 | #define PM_ACPI 2 |
612 | 574 | ||
575 | extern int pm_generic_suspend(struct device *dev); | ||
576 | extern int pm_generic_resume(struct device *dev); | ||
577 | extern int pm_generic_freeze(struct device *dev); | ||
578 | extern int pm_generic_thaw(struct device *dev); | ||
579 | extern int pm_generic_restore(struct device *dev); | ||
580 | extern int pm_generic_poweroff(struct device *dev); | ||
581 | |||
613 | #endif /* _LINUX_PM_H */ | 582 | #endif /* _LINUX_PM_H */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index d19f1cca7f74..d34f067e2a7f 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -40,6 +40,7 @@ extern int pm_generic_runtime_idle(struct device *dev); | |||
40 | extern int pm_generic_runtime_suspend(struct device *dev); | 40 | extern int pm_generic_runtime_suspend(struct device *dev); |
41 | extern int pm_generic_runtime_resume(struct device *dev); | 41 | extern int pm_generic_runtime_resume(struct device *dev); |
42 | extern void pm_runtime_no_callbacks(struct device *dev); | 42 | extern void pm_runtime_no_callbacks(struct device *dev); |
43 | extern void pm_runtime_irq_safe(struct device *dev); | ||
43 | extern void __pm_runtime_use_autosuspend(struct device *dev, bool use); | 44 | extern void __pm_runtime_use_autosuspend(struct device *dev, bool use); |
44 | extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); | 45 | extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); |
45 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); | 46 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); |
@@ -81,6 +82,11 @@ static inline bool pm_runtime_suspended(struct device *dev) | |||
81 | && !dev->power.disable_depth; | 82 | && !dev->power.disable_depth; |
82 | } | 83 | } |
83 | 84 | ||
85 | static inline bool pm_runtime_enabled(struct device *dev) | ||
86 | { | ||
87 | return !dev->power.disable_depth; | ||
88 | } | ||
89 | |||
84 | static inline void pm_runtime_mark_last_busy(struct device *dev) | 90 | static inline void pm_runtime_mark_last_busy(struct device *dev) |
85 | { | 91 | { |
86 | ACCESS_ONCE(dev->power.last_busy) = jiffies; | 92 | ACCESS_ONCE(dev->power.last_busy) = jiffies; |
@@ -119,11 +125,13 @@ static inline void pm_runtime_put_noidle(struct device *dev) {} | |||
119 | static inline bool device_run_wake(struct device *dev) { return false; } | 125 | static inline bool device_run_wake(struct device *dev) { return false; } |
120 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 126 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
121 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | 127 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } |
128 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } | ||
122 | 129 | ||
123 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } | 130 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } |
124 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } | 131 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } |
125 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } | 132 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } |
126 | static inline void pm_runtime_no_callbacks(struct device *dev) {} | 133 | static inline void pm_runtime_no_callbacks(struct device *dev) {} |
134 | static inline void pm_runtime_irq_safe(struct device *dev) {} | ||
127 | 135 | ||
128 | static inline void pm_runtime_mark_last_busy(struct device *dev) {} | 136 | static inline void pm_runtime_mark_last_busy(struct device *dev) {} |
129 | static inline void __pm_runtime_use_autosuspend(struct device *dev, | 137 | static inline void __pm_runtime_use_autosuspend(struct device *dev, |
@@ -196,6 +204,11 @@ static inline int pm_runtime_put_sync(struct device *dev) | |||
196 | return __pm_runtime_idle(dev, RPM_GET_PUT); | 204 | return __pm_runtime_idle(dev, RPM_GET_PUT); |
197 | } | 205 | } |
198 | 206 | ||
207 | static inline int pm_runtime_put_sync_suspend(struct device *dev) | ||
208 | { | ||
209 | return __pm_runtime_suspend(dev, RPM_GET_PUT); | ||
210 | } | ||
211 | |||
199 | static inline int pm_runtime_put_sync_autosuspend(struct device *dev) | 212 | static inline int pm_runtime_put_sync_autosuspend(struct device *dev) |
200 | { | 213 | { |
201 | return __pm_runtime_suspend(dev, RPM_GET_PUT | RPM_AUTO); | 214 | return __pm_runtime_suspend(dev, RPM_GET_PUT | RPM_AUTO); |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index d1a9193960f1..223b14cd129c 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -31,8 +31,9 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) | |||
31 | #define quota_error(sb, fmt, args...) \ | 31 | #define quota_error(sb, fmt, args...) \ |
32 | __quota_error((sb), __func__, fmt , ## args) | 32 | __quota_error((sb), __func__, fmt , ## args) |
33 | 33 | ||
34 | extern void __quota_error(struct super_block *sb, const char *func, | 34 | extern __attribute__((format (printf, 3, 4))) |
35 | const char *fmt, ...); | 35 | void __quota_error(struct super_block *sb, const char *func, |
36 | const char *fmt, ...); | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * declaration of quota_function calls in kernel. | 39 | * declaration of quota_function calls in kernel. |
diff --git a/include/linux/rar_register.h b/include/linux/rar_register.h index ffa805780f85..5c6118189363 100644 --- a/include/linux/rar_register.h +++ b/include/linux/rar_register.h | |||
@@ -34,11 +34,27 @@ | |||
34 | 34 | ||
35 | struct rar_device; | 35 | struct rar_device; |
36 | 36 | ||
37 | #if defined(CONFIG_RAR_REGISTER) | ||
37 | int register_rar(int num, | 38 | int register_rar(int num, |
38 | int (*callback)(unsigned long data), unsigned long data); | 39 | int (*callback)(unsigned long data), unsigned long data); |
39 | void unregister_rar(int num); | 40 | void unregister_rar(int num); |
40 | int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); | 41 | int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); |
41 | int rar_lock(int rar_index); | 42 | int rar_lock(int rar_index); |
43 | #else | ||
44 | extern void unregister_rar(int num) { } | ||
45 | extern int rar_lock(int rar_index) { return -EIO; } | ||
46 | |||
47 | extern inline int register_rar(int num, | ||
48 | int (*callback)(unsigned long data), unsigned long data) | ||
49 | { | ||
50 | return -ENODEV; | ||
51 | } | ||
52 | |||
53 | extern int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end) | ||
54 | { | ||
55 | return -ENODEV; | ||
56 | } | ||
57 | #endif /* RAR_REGISTER */ | ||
42 | 58 | ||
43 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
44 | #endif /* _RAR_REGISTER_H */ | 60 | #endif /* _RAR_REGISTER_H */ |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 14dbc83ded20..3c995b4d742c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -107,12 +107,17 @@ extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year | |||
107 | extern int rtc_valid_tm(struct rtc_time *tm); | 107 | extern int rtc_valid_tm(struct rtc_time *tm); |
108 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); | 108 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); |
109 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); | 109 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); |
110 | ktime_t rtc_tm_to_ktime(struct rtc_time tm); | ||
111 | struct rtc_time rtc_ktime_to_tm(ktime_t kt); | ||
112 | |||
110 | 113 | ||
111 | #include <linux/device.h> | 114 | #include <linux/device.h> |
112 | #include <linux/seq_file.h> | 115 | #include <linux/seq_file.h> |
113 | #include <linux/cdev.h> | 116 | #include <linux/cdev.h> |
114 | #include <linux/poll.h> | 117 | #include <linux/poll.h> |
115 | #include <linux/mutex.h> | 118 | #include <linux/mutex.h> |
119 | #include <linux/timerqueue.h> | ||
120 | #include <linux/workqueue.h> | ||
116 | 121 | ||
117 | extern struct class *rtc_class; | 122 | extern struct class *rtc_class; |
118 | 123 | ||
@@ -151,7 +156,19 @@ struct rtc_class_ops { | |||
151 | }; | 156 | }; |
152 | 157 | ||
153 | #define RTC_DEVICE_NAME_SIZE 20 | 158 | #define RTC_DEVICE_NAME_SIZE 20 |
154 | struct rtc_task; | 159 | typedef struct rtc_task { |
160 | void (*func)(void *private_data); | ||
161 | void *private_data; | ||
162 | } rtc_task_t; | ||
163 | |||
164 | |||
165 | struct rtc_timer { | ||
166 | struct rtc_task task; | ||
167 | struct timerqueue_node node; | ||
168 | ktime_t period; | ||
169 | int enabled; | ||
170 | }; | ||
171 | |||
155 | 172 | ||
156 | /* flags */ | 173 | /* flags */ |
157 | #define RTC_DEV_BUSY 0 | 174 | #define RTC_DEV_BUSY 0 |
@@ -179,16 +196,13 @@ struct rtc_device | |||
179 | spinlock_t irq_task_lock; | 196 | spinlock_t irq_task_lock; |
180 | int irq_freq; | 197 | int irq_freq; |
181 | int max_user_freq; | 198 | int max_user_freq; |
182 | #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL | 199 | |
183 | struct work_struct uie_task; | 200 | struct timerqueue_head timerqueue; |
184 | struct timer_list uie_timer; | 201 | struct rtc_timer aie_timer; |
185 | /* Those fields are protected by rtc->irq_lock */ | 202 | struct rtc_timer uie_rtctimer; |
186 | unsigned int oldsecs; | 203 | struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */ |
187 | unsigned int uie_irq_active:1; | 204 | int pie_enabled; |
188 | unsigned int stop_uie_polling:1; | 205 | struct work_struct irqwork; |
189 | unsigned int uie_task_active:1; | ||
190 | unsigned int uie_timer_active:1; | ||
191 | #endif | ||
192 | }; | 206 | }; |
193 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) | 207 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) |
194 | 208 | ||
@@ -224,15 +238,22 @@ extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | |||
224 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | 238 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, |
225 | unsigned int enabled); | 239 | unsigned int enabled); |
226 | 240 | ||
227 | typedef struct rtc_task { | 241 | void rtc_aie_update_irq(void *private); |
228 | void (*func)(void *private_data); | 242 | void rtc_uie_update_irq(void *private); |
229 | void *private_data; | 243 | enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer); |
230 | } rtc_task_t; | ||
231 | 244 | ||
232 | int rtc_register(rtc_task_t *task); | 245 | int rtc_register(rtc_task_t *task); |
233 | int rtc_unregister(rtc_task_t *task); | 246 | int rtc_unregister(rtc_task_t *task); |
234 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 247 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
235 | 248 | ||
249 | void rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer); | ||
250 | void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer); | ||
251 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); | ||
252 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, | ||
253 | ktime_t expires, ktime_t period); | ||
254 | int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer* timer); | ||
255 | void rtc_timer_do_work(struct work_struct *work); | ||
256 | |||
236 | static inline bool is_leap_year(unsigned int year) | 257 | static inline bool is_leap_year(unsigned int year) |
237 | { | 258 | { |
238 | return (!(year % 4) && (year % 100)) || !(year % 400); | 259 | return (!(year % 4) && (year % 100)) || !(year % 400); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 341acbbc434a..abc527aa8550 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -70,7 +70,6 @@ struct sched_param { | |||
70 | #include <linux/smp.h> | 70 | #include <linux/smp.h> |
71 | #include <linux/sem.h> | 71 | #include <linux/sem.h> |
72 | #include <linux/signal.h> | 72 | #include <linux/signal.h> |
73 | #include <linux/path.h> | ||
74 | #include <linux/compiler.h> | 73 | #include <linux/compiler.h> |
75 | #include <linux/completion.h> | 74 | #include <linux/completion.h> |
76 | #include <linux/pid.h> | 75 | #include <linux/pid.h> |
@@ -88,7 +87,6 @@ struct sched_param { | |||
88 | #include <linux/timer.h> | 87 | #include <linux/timer.h> |
89 | #include <linux/hrtimer.h> | 88 | #include <linux/hrtimer.h> |
90 | #include <linux/task_io_accounting.h> | 89 | #include <linux/task_io_accounting.h> |
91 | #include <linux/kobject.h> | ||
92 | #include <linux/latencytop.h> | 90 | #include <linux/latencytop.h> |
93 | #include <linux/cred.h> | 91 | #include <linux/cred.h> |
94 | 92 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 1ac42475ea08..c642bb8b8f5a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1058,8 +1058,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1058 | * @cred points to the credentials to provide the context against which to | 1058 | * @cred points to the credentials to provide the context against which to |
1059 | * evaluate the security data on the key. | 1059 | * evaluate the security data on the key. |
1060 | * @perm describes the combination of permissions required of this key. | 1060 | * @perm describes the combination of permissions required of this key. |
1061 | * Return 1 if permission granted, 0 if permission denied and -ve it the | 1061 | * Return 0 if permission is granted, -ve error otherwise. |
1062 | * normal permissions model should be effected. | ||
1063 | * @key_getsecurity: | 1062 | * @key_getsecurity: |
1064 | * Get a textual representation of the security context attached to a key | 1063 | * Get a textual representation of the security context attached to a key |
1065 | * for the purposes of honouring KEYCTL_GETSECURITY. This function | 1064 | * for the purposes of honouring KEYCTL_GETSECURITY. This function |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 791a502f6906..83203ae9390b 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -138,11 +138,12 @@ void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | |||
138 | void *__kmalloc(size_t size, gfp_t flags); | 138 | void *__kmalloc(size_t size, gfp_t flags); |
139 | 139 | ||
140 | #ifdef CONFIG_TRACING | 140 | #ifdef CONFIG_TRACING |
141 | extern void *kmem_cache_alloc_notrace(struct kmem_cache *cachep, gfp_t flags); | 141 | extern void *kmem_cache_alloc_trace(size_t size, |
142 | struct kmem_cache *cachep, gfp_t flags); | ||
142 | extern size_t slab_buffer_size(struct kmem_cache *cachep); | 143 | extern size_t slab_buffer_size(struct kmem_cache *cachep); |
143 | #else | 144 | #else |
144 | static __always_inline void * | 145 | static __always_inline void * |
145 | kmem_cache_alloc_notrace(struct kmem_cache *cachep, gfp_t flags) | 146 | kmem_cache_alloc_trace(size_t size, struct kmem_cache *cachep, gfp_t flags) |
146 | { | 147 | { |
147 | return kmem_cache_alloc(cachep, flags); | 148 | return kmem_cache_alloc(cachep, flags); |
148 | } | 149 | } |
@@ -179,10 +180,7 @@ found: | |||
179 | #endif | 180 | #endif |
180 | cachep = malloc_sizes[i].cs_cachep; | 181 | cachep = malloc_sizes[i].cs_cachep; |
181 | 182 | ||
182 | ret = kmem_cache_alloc_notrace(cachep, flags); | 183 | ret = kmem_cache_alloc_trace(size, cachep, flags); |
183 | |||
184 | trace_kmalloc(_THIS_IP_, ret, | ||
185 | size, slab_buffer_size(cachep), flags); | ||
186 | 184 | ||
187 | return ret; | 185 | return ret; |
188 | } | 186 | } |
@@ -194,14 +192,16 @@ extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | |||
194 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 192 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
195 | 193 | ||
196 | #ifdef CONFIG_TRACING | 194 | #ifdef CONFIG_TRACING |
197 | extern void *kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | 195 | extern void *kmem_cache_alloc_node_trace(size_t size, |
198 | gfp_t flags, | 196 | struct kmem_cache *cachep, |
199 | int nodeid); | 197 | gfp_t flags, |
198 | int nodeid); | ||
200 | #else | 199 | #else |
201 | static __always_inline void * | 200 | static __always_inline void * |
202 | kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | 201 | kmem_cache_alloc_node_trace(size_t size, |
203 | gfp_t flags, | 202 | struct kmem_cache *cachep, |
204 | int nodeid) | 203 | gfp_t flags, |
204 | int nodeid) | ||
205 | { | 205 | { |
206 | return kmem_cache_alloc_node(cachep, flags, nodeid); | 206 | return kmem_cache_alloc_node(cachep, flags, nodeid); |
207 | } | 207 | } |
@@ -210,7 +210,6 @@ kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | |||
210 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 210 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
211 | { | 211 | { |
212 | struct kmem_cache *cachep; | 212 | struct kmem_cache *cachep; |
213 | void *ret; | ||
214 | 213 | ||
215 | if (__builtin_constant_p(size)) { | 214 | if (__builtin_constant_p(size)) { |
216 | int i = 0; | 215 | int i = 0; |
@@ -234,13 +233,7 @@ found: | |||
234 | #endif | 233 | #endif |
235 | cachep = malloc_sizes[i].cs_cachep; | 234 | cachep = malloc_sizes[i].cs_cachep; |
236 | 235 | ||
237 | ret = kmem_cache_alloc_node_notrace(cachep, flags, node); | 236 | return kmem_cache_alloc_node_trace(size, cachep, flags, node); |
238 | |||
239 | trace_kmalloc_node(_THIS_IP_, ret, | ||
240 | size, slab_buffer_size(cachep), | ||
241 | flags, node); | ||
242 | |||
243 | return ret; | ||
244 | } | 237 | } |
245 | return __kmalloc_node(size, flags, node); | 238 | return __kmalloc_node(size, flags, node); |
246 | } | 239 | } |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index e4f5ed180b9b..8b6e8ae5d5ca 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -10,9 +10,8 @@ | |||
10 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
13 | #include <linux/kmemleak.h> | ||
14 | 13 | ||
15 | #include <trace/events/kmem.h> | 14 | #include <linux/kmemleak.h> |
16 | 15 | ||
17 | enum stat_item { | 16 | enum stat_item { |
18 | ALLOC_FASTPATH, /* Allocation from cpu slab */ | 17 | ALLOC_FASTPATH, /* Allocation from cpu slab */ |
@@ -216,31 +215,40 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size) | |||
216 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 215 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
217 | void *__kmalloc(size_t size, gfp_t flags); | 216 | void *__kmalloc(size_t size, gfp_t flags); |
218 | 217 | ||
218 | static __always_inline void * | ||
219 | kmalloc_order(size_t size, gfp_t flags, unsigned int order) | ||
220 | { | ||
221 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | ||
222 | kmemleak_alloc(ret, size, 1, flags); | ||
223 | return ret; | ||
224 | } | ||
225 | |||
219 | #ifdef CONFIG_TRACING | 226 | #ifdef CONFIG_TRACING |
220 | extern void *kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags); | 227 | extern void * |
228 | kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size); | ||
229 | extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order); | ||
221 | #else | 230 | #else |
222 | static __always_inline void * | 231 | static __always_inline void * |
223 | kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags) | 232 | kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size) |
224 | { | 233 | { |
225 | return kmem_cache_alloc(s, gfpflags); | 234 | return kmem_cache_alloc(s, gfpflags); |
226 | } | 235 | } |
236 | |||
237 | static __always_inline void * | ||
238 | kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) | ||
239 | { | ||
240 | return kmalloc_order(size, flags, order); | ||
241 | } | ||
227 | #endif | 242 | #endif |
228 | 243 | ||
229 | static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | 244 | static __always_inline void *kmalloc_large(size_t size, gfp_t flags) |
230 | { | 245 | { |
231 | unsigned int order = get_order(size); | 246 | unsigned int order = get_order(size); |
232 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | 247 | return kmalloc_order_trace(size, flags, order); |
233 | |||
234 | kmemleak_alloc(ret, size, 1, flags); | ||
235 | trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); | ||
236 | |||
237 | return ret; | ||
238 | } | 248 | } |
239 | 249 | ||
240 | static __always_inline void *kmalloc(size_t size, gfp_t flags) | 250 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
241 | { | 251 | { |
242 | void *ret; | ||
243 | |||
244 | if (__builtin_constant_p(size)) { | 252 | if (__builtin_constant_p(size)) { |
245 | if (size > SLUB_MAX_SIZE) | 253 | if (size > SLUB_MAX_SIZE) |
246 | return kmalloc_large(size, flags); | 254 | return kmalloc_large(size, flags); |
@@ -251,11 +259,7 @@ static __always_inline void *kmalloc(size_t size, gfp_t flags) | |||
251 | if (!s) | 259 | if (!s) |
252 | return ZERO_SIZE_PTR; | 260 | return ZERO_SIZE_PTR; |
253 | 261 | ||
254 | ret = kmem_cache_alloc_notrace(s, flags); | 262 | return kmem_cache_alloc_trace(s, flags, size); |
255 | |||
256 | trace_kmalloc(_THIS_IP_, ret, size, s->size, flags); | ||
257 | |||
258 | return ret; | ||
259 | } | 263 | } |
260 | } | 264 | } |
261 | return __kmalloc(size, flags); | 265 | return __kmalloc(size, flags); |
@@ -266,14 +270,14 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node); | |||
266 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 270 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
267 | 271 | ||
268 | #ifdef CONFIG_TRACING | 272 | #ifdef CONFIG_TRACING |
269 | extern void *kmem_cache_alloc_node_notrace(struct kmem_cache *s, | 273 | extern void *kmem_cache_alloc_node_trace(struct kmem_cache *s, |
270 | gfp_t gfpflags, | 274 | gfp_t gfpflags, |
271 | int node); | 275 | int node, size_t size); |
272 | #else | 276 | #else |
273 | static __always_inline void * | 277 | static __always_inline void * |
274 | kmem_cache_alloc_node_notrace(struct kmem_cache *s, | 278 | kmem_cache_alloc_node_trace(struct kmem_cache *s, |
275 | gfp_t gfpflags, | 279 | gfp_t gfpflags, |
276 | int node) | 280 | int node, size_t size) |
277 | { | 281 | { |
278 | return kmem_cache_alloc_node(s, gfpflags, node); | 282 | return kmem_cache_alloc_node(s, gfpflags, node); |
279 | } | 283 | } |
@@ -281,8 +285,6 @@ kmem_cache_alloc_node_notrace(struct kmem_cache *s, | |||
281 | 285 | ||
282 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 286 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
283 | { | 287 | { |
284 | void *ret; | ||
285 | |||
286 | if (__builtin_constant_p(size) && | 288 | if (__builtin_constant_p(size) && |
287 | size <= SLUB_MAX_SIZE && !(flags & SLUB_DMA)) { | 289 | size <= SLUB_MAX_SIZE && !(flags & SLUB_DMA)) { |
288 | struct kmem_cache *s = kmalloc_slab(size); | 290 | struct kmem_cache *s = kmalloc_slab(size); |
@@ -290,12 +292,7 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
290 | if (!s) | 292 | if (!s) |
291 | return ZERO_SIZE_PTR; | 293 | return ZERO_SIZE_PTR; |
292 | 294 | ||
293 | ret = kmem_cache_alloc_node_notrace(s, flags, node); | 295 | return kmem_cache_alloc_node_trace(s, flags, node, size); |
294 | |||
295 | trace_kmalloc_node(_THIS_IP_, ret, | ||
296 | size, s->size, flags, node); | ||
297 | |||
298 | return ret; | ||
299 | } | 296 | } |
300 | return __kmalloc_node(size, flags, node); | 297 | return __kmalloc_node(size, flags, node); |
301 | } | 298 | } |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 4f95c1aac2fd..0e6dc3891942 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -112,6 +112,7 @@ | |||
112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 | 112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 |
113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 | 113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 |
114 | #define SONYPI_EVENT_MEDIA_PRESSED 72 | 114 | #define SONYPI_EVENT_MEDIA_PRESSED 72 |
115 | #define SONYPI_EVENT_VENDOR_PRESSED 73 | ||
115 | 116 | ||
116 | /* get/set brightness */ | 117 | /* get/set brightness */ |
117 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) | 118 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index b2024757edd5..8521067ed4f7 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -110,9 +110,9 @@ struct rpc_credops { | |||
110 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); | 110 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); |
111 | int (*crrefresh)(struct rpc_task *); | 111 | int (*crrefresh)(struct rpc_task *); |
112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); | 112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
113 | int (*crwrap_req)(struct rpc_task *, kxdrproc_t, | 113 | int (*crwrap_req)(struct rpc_task *, kxdreproc_t, |
114 | void *, __be32 *, void *); | 114 | void *, __be32 *, void *); |
115 | int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, | 115 | int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t, |
116 | void *, __be32 *, void *); | 116 | void *, __be32 *, void *); |
117 | }; | 117 | }; |
118 | 118 | ||
@@ -139,8 +139,8 @@ struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred * | |||
139 | void put_rpccred(struct rpc_cred *); | 139 | void put_rpccred(struct rpc_cred *); |
140 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); | 140 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); |
141 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); | 141 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); |
142 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); | 142 | int rpcauth_wrap_req(struct rpc_task *task, kxdreproc_t encode, void *rqstp, __be32 *data, void *obj); |
143 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, __be32 *data, void *obj); | 143 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrdproc_t decode, void *rqstp, __be32 *data, void *obj); |
144 | int rpcauth_refreshcred(struct rpc_task *); | 144 | int rpcauth_refreshcred(struct rpc_task *); |
145 | void rpcauth_invalcred(struct rpc_task *); | 145 | void rpcauth_invalcred(struct rpc_task *); |
146 | int rpcauth_uptodatecred(struct rpc_task *); | 146 | int rpcauth_uptodatecred(struct rpc_task *); |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index 7c91260c44a9..c50b458b8a3f 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -43,10 +43,18 @@ int bc_send(struct rpc_rqst *req); | |||
43 | */ | 43 | */ |
44 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | 44 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) |
45 | { | 45 | { |
46 | if (rqstp->rq_server->bc_xprt) | 46 | if (rqstp->rq_server->sv_bc_xprt) |
47 | return 1; | 47 | return 1; |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
51 | { | ||
52 | if (svc_is_backchannel(rqstp)) | ||
53 | return (struct nfs4_sessionid *) | ||
54 | rqstp->rq_server->sv_bc_xprt->xpt_bc_sid; | ||
55 | return NULL; | ||
56 | } | ||
57 | |||
50 | #else /* CONFIG_NFS_V4_1 */ | 58 | #else /* CONFIG_NFS_V4_1 */ |
51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 59 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
52 | unsigned int min_reqs) | 60 | unsigned int min_reqs) |
@@ -59,6 +67,11 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
59 | return 0; | 67 | return 0; |
60 | } | 68 | } |
61 | 69 | ||
70 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
71 | { | ||
72 | return NULL; | ||
73 | } | ||
74 | |||
62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | 75 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
63 | { | 76 | { |
64 | } | 77 | } |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6950c981882d..78aa104250b7 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef _LINUX_SUNRPC_CACHE_H_ | 13 | #ifndef _LINUX_SUNRPC_CACHE_H_ |
14 | #define _LINUX_SUNRPC_CACHE_H_ | 14 | #define _LINUX_SUNRPC_CACHE_H_ |
15 | 15 | ||
16 | #include <linux/kref.h> | ||
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
18 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index a5a55f284b7d..ef9476a36ff7 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -89,8 +89,8 @@ struct rpc_version { | |||
89 | */ | 89 | */ |
90 | struct rpc_procinfo { | 90 | struct rpc_procinfo { |
91 | u32 p_proc; /* RPC procedure number */ | 91 | u32 p_proc; /* RPC procedure number */ |
92 | kxdrproc_t p_encode; /* XDR encode function */ | 92 | kxdreproc_t p_encode; /* XDR encode function */ |
93 | kxdrproc_t p_decode; /* XDR decode function */ | 93 | kxdrdproc_t p_decode; /* XDR decode function */ |
94 | unsigned int p_arglen; /* argument hdr length (u32) */ | 94 | unsigned int p_arglen; /* argument hdr length (u32) */ |
95 | unsigned int p_replen; /* reply hdr length (u32) */ | 95 | unsigned int p_replen; /* reply hdr length (u32) */ |
96 | unsigned int p_count; /* call count */ | 96 | unsigned int p_count; /* call count */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 5a3085b9b394..c81d4d8be3a9 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -99,7 +99,7 @@ struct svc_serv { | |||
99 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ | 99 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ |
100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no | 100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no |
101 | * entries in the svc_cb_list */ | 101 | * entries in the svc_cb_list */ |
102 | struct svc_xprt *bc_xprt; | 102 | struct svc_xprt *sv_bc_xprt; /* callback on fore channel */ |
103 | #endif /* CONFIG_NFS_V4_1 */ | 103 | #endif /* CONFIG_NFS_V4_1 */ |
104 | }; | 104 | }; |
105 | 105 | ||
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index aea0d438e3c7..357da5e0daa3 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -78,6 +78,7 @@ struct svc_xprt { | |||
78 | size_t xpt_remotelen; /* length of address */ | 78 | size_t xpt_remotelen; /* length of address */ |
79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
80 | struct list_head xpt_users; /* callbacks on free */ | 80 | struct list_head xpt_users; /* callbacks on free */ |
81 | void *xpt_bc_sid; /* back channel session ID */ | ||
81 | 82 | ||
82 | struct net *xpt_net; | 83 | struct net *xpt_net; |
83 | }; | 84 | }; |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 498ab93a81e4..fc84b7a19ca3 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -33,8 +33,8 @@ struct xdr_netobj { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * This is the generic XDR function. rqstp is either a rpc_rqst (client | 36 | * This is the legacy generic XDR function. rqstp is either a rpc_rqst |
37 | * side) or svc_rqst pointer (server side). | 37 | * (client side) or svc_rqst pointer (server side). |
38 | * Encode functions always assume there's enough room in the buffer. | 38 | * Encode functions always assume there's enough room in the buffer. |
39 | */ | 39 | */ |
40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); | 40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); |
@@ -201,14 +201,22 @@ struct xdr_stream { | |||
201 | 201 | ||
202 | __be32 *end; /* end of available buffer space */ | 202 | __be32 *end; /* end of available buffer space */ |
203 | struct kvec *iov; /* pointer to the current kvec */ | 203 | struct kvec *iov; /* pointer to the current kvec */ |
204 | struct kvec scratch; /* Scratch buffer */ | ||
205 | struct page **page_ptr; /* pointer to the current page */ | ||
204 | }; | 206 | }; |
205 | 207 | ||
208 | /* | ||
209 | * These are the xdr_stream style generic XDR encode and decode functions. | ||
210 | */ | ||
211 | typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
212 | typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
213 | |||
206 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 214 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
207 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 215 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |
208 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 216 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
209 | unsigned int base, unsigned int len); | 217 | unsigned int base, unsigned int len); |
210 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 218 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
211 | extern __be32 *xdr_inline_peek(struct xdr_stream *xdr, size_t nbytes); | 219 | extern void xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen); |
212 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 220 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
213 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 221 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
214 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 222 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 26697514c5ec..144b34be5c32 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -292,7 +292,7 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
292 | /* drivers/base/power/wakeup.c */ | 292 | /* drivers/base/power/wakeup.c */ |
293 | extern bool events_check_enabled; | 293 | extern bool events_check_enabled; |
294 | 294 | ||
295 | extern bool pm_check_wakeup_events(void); | 295 | extern bool pm_wakeup_pending(void); |
296 | extern bool pm_get_wakeup_count(unsigned int *count); | 296 | extern bool pm_get_wakeup_count(unsigned int *count); |
297 | extern bool pm_save_wakeup_count(unsigned int count); | 297 | extern bool pm_save_wakeup_count(unsigned int count); |
298 | #else /* !CONFIG_PM_SLEEP */ | 298 | #else /* !CONFIG_PM_SLEEP */ |
@@ -309,7 +309,7 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
309 | 309 | ||
310 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 310 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
311 | 311 | ||
312 | static inline bool pm_check_wakeup_events(void) { return true; } | 312 | static inline bool pm_wakeup_pending(void) { return false; } |
313 | #endif /* !CONFIG_PM_SLEEP */ | 313 | #endif /* !CONFIG_PM_SLEEP */ |
314 | 314 | ||
315 | extern struct mutex pm_mutex; | 315 | extern struct mutex pm_mutex; |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index ac5d1c1285d9..fdc718abf83b 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); |
33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); |
34 | extern int tpm_send(u32 chip_num, void *cmd, size_t buflen); | ||
34 | #else | 35 | #else |
35 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | 36 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { |
36 | return -ENODEV; | 37 | return -ENODEV; |
@@ -38,5 +39,8 @@ static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | |||
38 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { | 39 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { |
39 | return -ENODEV; | 40 | return -ENODEV; |
40 | } | 41 | } |
42 | static inline int tpm_send(u32 chip_num, void *cmd, size_t buflen) { | ||
43 | return -ENODEV; | ||
44 | } | ||
41 | #endif | 45 | #endif |
42 | #endif | 46 | #endif |
diff --git a/include/linux/tpm_command.h b/include/linux/tpm_command.h new file mode 100644 index 000000000000..727512e249b5 --- /dev/null +++ b/include/linux/tpm_command.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef __LINUX_TPM_COMMAND_H__ | ||
2 | #define __LINUX_TPM_COMMAND_H__ | ||
3 | |||
4 | /* | ||
5 | * TPM Command constants from specifications at | ||
6 | * http://www.trustedcomputinggroup.org | ||
7 | */ | ||
8 | |||
9 | /* Command TAGS */ | ||
10 | #define TPM_TAG_RQU_COMMAND 193 | ||
11 | #define TPM_TAG_RQU_AUTH1_COMMAND 194 | ||
12 | #define TPM_TAG_RQU_AUTH2_COMMAND 195 | ||
13 | #define TPM_TAG_RSP_COMMAND 196 | ||
14 | #define TPM_TAG_RSP_AUTH1_COMMAND 197 | ||
15 | #define TPM_TAG_RSP_AUTH2_COMMAND 198 | ||
16 | |||
17 | /* Command Ordinals */ | ||
18 | #define TPM_ORD_GETRANDOM 70 | ||
19 | #define TPM_ORD_OSAP 11 | ||
20 | #define TPM_ORD_OIAP 10 | ||
21 | #define TPM_ORD_SEAL 23 | ||
22 | #define TPM_ORD_UNSEAL 24 | ||
23 | |||
24 | /* Other constants */ | ||
25 | #define SRKHANDLE 0x40000000 | ||
26 | #define TPM_NONCE_SIZE 20 | ||
27 | |||
28 | #endif | ||
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index d3e4f87e95c0..c6814616653b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -32,7 +32,7 @@ struct tracepoint { | |||
32 | int state; /* State. */ | 32 | int state; /* State. */ |
33 | void (*regfunc)(void); | 33 | void (*regfunc)(void); |
34 | void (*unregfunc)(void); | 34 | void (*unregfunc)(void); |
35 | struct tracepoint_func *funcs; | 35 | struct tracepoint_func __rcu *funcs; |
36 | } __attribute__((aligned(32))); /* | 36 | } __attribute__((aligned(32))); /* |
37 | * Aligned on 32 bytes because it is | 37 | * Aligned on 32 bytes because it is |
38 | * globally visible and gcc happily | 38 | * globally visible and gcc happily |
@@ -326,7 +326,7 @@ do_trace: \ | |||
326 | * memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); | 326 | * memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); |
327 | * __entry->next_pid = next->pid; | 327 | * __entry->next_pid = next->pid; |
328 | * __entry->next_prio = next->prio; | 328 | * __entry->next_prio = next->prio; |
329 | * ) | 329 | * ), |
330 | * | 330 | * |
331 | * * | 331 | * * |
332 | * * Formatted output of a trace record via TP_printk(). | 332 | * * Formatted output of a trace record via TP_printk(). |
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index ae9ab13b963d..4b9a7f596f92 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h | |||
@@ -33,6 +33,7 @@ struct vga_switcheroo_handler { | |||
33 | void vga_switcheroo_unregister_client(struct pci_dev *dev); | 33 | void vga_switcheroo_unregister_client(struct pci_dev *dev); |
34 | int vga_switcheroo_register_client(struct pci_dev *dev, | 34 | int vga_switcheroo_register_client(struct pci_dev *dev, |
35 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | 35 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), |
36 | void (*reprobe)(struct pci_dev *dev), | ||
36 | bool (*can_switch)(struct pci_dev *dev)); | 37 | bool (*can_switch)(struct pci_dev *dev)); |
37 | 38 | ||
38 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, | 39 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, |
@@ -48,6 +49,7 @@ int vga_switcheroo_process_delayed_switch(void); | |||
48 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} | 49 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} |
49 | static inline int vga_switcheroo_register_client(struct pci_dev *dev, | 50 | static inline int vga_switcheroo_register_client(struct pci_dev *dev, |
50 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | 51 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), |
52 | void (*reprobe)(struct pci_dev *dev), | ||
51 | bool (*can_switch)(struct pci_dev *dev)) { return 0; } | 53 | bool (*can_switch)(struct pci_dev *dev)) { return 0; } |
52 | static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {} | 54 | static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {} |
53 | static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; } | 55 | static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; } |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index f1e5bde4b35a..e6131ef98d8f 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -40,9 +40,13 @@ | |||
40 | #define XATTR_SMACK_SUFFIX "SMACK64" | 40 | #define XATTR_SMACK_SUFFIX "SMACK64" |
41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" | 41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" |
42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" | 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" |
43 | #define XATTR_SMACK_EXEC "SMACK64EXEC" | ||
44 | #define XATTR_SMACK_TRANSMUTE "SMACK64TRANSMUTE" | ||
43 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX | 45 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX |
44 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN | 46 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN |
45 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT | 47 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT |
48 | #define XATTR_NAME_SMACKEXEC XATTR_SECURITY_PREFIX XATTR_SMACK_EXEC | ||
49 | #define XATTR_NAME_SMACKTRANSMUTE XATTR_SECURITY_PREFIX XATTR_SMACK_TRANSMUTE | ||
46 | 50 | ||
47 | #define XATTR_CAPS_SUFFIX "capability" | 51 | #define XATTR_CAPS_SUFFIX "capability" |
48 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | 52 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |