diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-11 05:44:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-11 05:44:30 -0400 |
commit | 4a1032faac94ebbf647460ae3e06fc21146eb280 (patch) | |
tree | 7f31b97beb0406faa1523e619289ad0ab07c9787 /include/linux | |
parent | ae4e8d63b5619d4d95f1d2bfa2b836caa6e62d06 (diff) | |
parent | 0eddb519b9127c73d53db4bf3ec1d45b13f844d1 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'include/linux')
48 files changed, 143 insertions, 133 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 6816be6c3f77..8b1038607831 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -14,6 +14,9 @@ | |||
14 | #ifndef ASMARM_AMBA_H | 14 | #ifndef ASMARM_AMBA_H |
15 | #define ASMARM_AMBA_H | 15 | #define ASMARM_AMBA_H |
16 | 16 | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/resource.h> | ||
19 | |||
17 | #define AMBA_NR_IRQS 2 | 20 | #define AMBA_NR_IRQS 2 |
18 | 21 | ||
19 | struct amba_device { | 22 | struct amba_device { |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index b4fbd9862606..5ddd9ad4b19c 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #include <linux/types.h> | ||
2 | |||
1 | /* platform data for the PL061 GPIO driver */ | 3 | /* platform data for the PL061 GPIO driver */ |
2 | 4 | ||
3 | struct pl061_platform_data { | 5 | struct pl061_platform_data { |
diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2adef5..700c5b9b3583 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) | |||
1025 | 1025 | ||
1026 | static inline int lba_28_ok(u64 block, u32 n_block) | 1026 | static inline int lba_28_ok(u64 block, u32 n_block) |
1027 | { | 1027 | { |
1028 | /* check the ending block number */ | 1028 | /* check the ending block number: must be LESS THAN 0x0fffffff */ |
1029 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); | 1029 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | static inline int lba_48_ok(u64 block, u32 n_block) | 1032 | static inline int lba_48_ok(u64 block, u32 n_block) |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index b79389879238..b796eab5ca75 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -21,9 +21,6 @@ | |||
21 | (bit) < (size); \ | 21 | (bit) < (size); \ |
22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
23 | 23 | ||
24 | /* Temporary */ | ||
25 | #define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size) | ||
26 | |||
27 | static __inline__ int get_bitmask_order(unsigned int count) | 24 | static __inline__ int get_bitmask_order(unsigned int count) |
28 | { | 25 | { |
29 | int order; | 26 | int order; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ebd22dbed861..6690e8bae7bb 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -158,7 +158,6 @@ enum rq_flag_bits { | |||
158 | struct request { | 158 | struct request { |
159 | struct list_head queuelist; | 159 | struct list_head queuelist; |
160 | struct call_single_data csd; | 160 | struct call_single_data csd; |
161 | int cpu; | ||
162 | 161 | ||
163 | struct request_queue *q; | 162 | struct request_queue *q; |
164 | 163 | ||
@@ -166,9 +165,11 @@ struct request { | |||
166 | enum rq_cmd_type_bits cmd_type; | 165 | enum rq_cmd_type_bits cmd_type; |
167 | unsigned long atomic_flags; | 166 | unsigned long atomic_flags; |
168 | 167 | ||
168 | int cpu; | ||
169 | |||
169 | /* the following two fields are internal, NEVER access directly */ | 170 | /* the following two fields are internal, NEVER access directly */ |
170 | sector_t __sector; /* sector cursor */ | ||
171 | unsigned int __data_len; /* total data len */ | 171 | unsigned int __data_len; /* total data len */ |
172 | sector_t __sector; /* sector cursor */ | ||
172 | 173 | ||
173 | struct bio *bio; | 174 | struct bio *bio; |
174 | struct bio *biotail; | 175 | struct bio *biotail; |
@@ -201,20 +202,20 @@ struct request { | |||
201 | 202 | ||
202 | unsigned short ioprio; | 203 | unsigned short ioprio; |
203 | 204 | ||
205 | int ref_count; | ||
206 | |||
204 | void *special; /* opaque pointer available for LLD use */ | 207 | void *special; /* opaque pointer available for LLD use */ |
205 | char *buffer; /* kaddr of the current segment if available */ | 208 | char *buffer; /* kaddr of the current segment if available */ |
206 | 209 | ||
207 | int tag; | 210 | int tag; |
208 | int errors; | 211 | int errors; |
209 | 212 | ||
210 | int ref_count; | ||
211 | |||
212 | /* | 213 | /* |
213 | * when request is used as a packet command carrier | 214 | * when request is used as a packet command carrier |
214 | */ | 215 | */ |
215 | unsigned short cmd_len; | ||
216 | unsigned char __cmd[BLK_MAX_CDB]; | 216 | unsigned char __cmd[BLK_MAX_CDB]; |
217 | unsigned char *cmd; | 217 | unsigned char *cmd; |
218 | unsigned short cmd_len; | ||
218 | 219 | ||
219 | unsigned int extra_len; /* length of alignment and padding */ | 220 | unsigned int extra_len; /* length of alignment and padding */ |
220 | unsigned int sense_len; | 221 | unsigned int sense_len; |
@@ -921,26 +922,7 @@ extern void blk_cleanup_queue(struct request_queue *); | |||
921 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 922 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
922 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 923 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
923 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 924 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
924 | |||
925 | /* Temporary compatibility wrapper */ | ||
926 | static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int max) | ||
927 | { | ||
928 | blk_queue_max_hw_sectors(q, max); | ||
929 | } | ||
930 | |||
931 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 925 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
932 | |||
933 | static inline void blk_queue_max_phys_segments(struct request_queue *q, unsigned short max) | ||
934 | { | ||
935 | blk_queue_max_segments(q, max); | ||
936 | } | ||
937 | |||
938 | static inline void blk_queue_max_hw_segments(struct request_queue *q, unsigned short max) | ||
939 | { | ||
940 | blk_queue_max_segments(q, max); | ||
941 | } | ||
942 | |||
943 | |||
944 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 926 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
945 | extern void blk_queue_max_discard_sectors(struct request_queue *q, | 927 | extern void blk_queue_max_discard_sectors(struct request_queue *q, |
946 | unsigned int max_discard_sectors); | 928 | unsigned int max_discard_sectors); |
@@ -1030,11 +1012,6 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
1030 | 1012 | ||
1031 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 1013 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
1032 | 1014 | ||
1033 | #define MAX_PHYS_SEGMENTS 128 | ||
1034 | #define MAX_HW_SEGMENTS 128 | ||
1035 | #define SAFE_MAX_SECTORS 255 | ||
1036 | #define MAX_SEGMENT_SIZE 65536 | ||
1037 | |||
1038 | enum blk_default_limits { | 1015 | enum blk_default_limits { |
1039 | BLK_MAX_SEGMENTS = 128, | 1016 | BLK_MAX_SEGMENTS = 128, |
1040 | BLK_SAFE_MAX_SECTORS = 255, | 1017 | BLK_SAFE_MAX_SECTORS = 255, |
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb19..90f2471dc6f2 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
@@ -1,3 +1,7 @@ | |||
1 | /* | ||
2 | * See Documentation/circular-buffers.txt for more information. | ||
3 | */ | ||
4 | |||
1 | #ifndef _LINUX_CIRC_BUF_H | 5 | #ifndef _LINUX_CIRC_BUF_H |
2 | #define _LINUX_CIRC_BUF_H 1 | 6 | #define _LINUX_CIRC_BUF_H 1 |
3 | 7 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a1..fc53492b6ad7 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -73,6 +73,7 @@ enum clock_event_nofitiers { | |||
73 | * @list: list head for the management code | 73 | * @list: list head for the management code |
74 | * @mode: operating mode assigned by the management code | 74 | * @mode: operating mode assigned by the management code |
75 | * @next_event: local storage for the next event in oneshot mode | 75 | * @next_event: local storage for the next event in oneshot mode |
76 | * @retries: number of forced programming retries | ||
76 | */ | 77 | */ |
77 | struct clock_event_device { | 78 | struct clock_event_device { |
78 | const char *name; | 79 | const char *name; |
@@ -93,6 +94,7 @@ struct clock_event_device { | |||
93 | struct list_head list; | 94 | struct list_head list; |
94 | enum clock_event_mode mode; | 95 | enum clock_event_mode mode; |
95 | ktime_t next_event; | 96 | ktime_t next_event; |
97 | unsigned long retries; | ||
96 | }; | 98 | }; |
97 | 99 | ||
98 | /* | 100 | /* |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 5076fe0c8a96..6cee17c22313 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define _LINUX_DELAYACCT_H | 18 | #define _LINUX_DELAYACCT_H |
19 | 19 | ||
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Per-task flags relevant to delay accounting | 24 | * Per-task flags relevant to delay accounting |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 78962272338a..4341b1a97a34 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -56,7 +56,7 @@ extern const char *drbd_buildtag(void); | |||
56 | #define REL_VERSION "8.3.7" | 56 | #define REL_VERSION "8.3.7" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 91 | 59 | #define PRO_VERSION_MAX 92 |
60 | 60 | ||
61 | 61 | ||
62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index a4d82f895994..f7431a4ca608 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | NL_PACKET(primary, 1, | 14 | NL_PACKET(primary, 1, |
15 | NL_BIT( 1, T_MAY_IGNORE, overwrite_peer) | 15 | NL_BIT( 1, T_MAY_IGNORE, primary_force) |
16 | ) | 16 | ) |
17 | 17 | ||
18 | NL_PACKET(secondary, 2, ) | 18 | NL_PACKET(secondary, 2, ) |
@@ -63,6 +63,7 @@ NL_PACKET(net_conf, 5, | |||
63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) | 63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) |
64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) | 64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) |
65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) | 65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) |
66 | NL_BIT( 70, T_MANDATORY, dry_run) | ||
66 | ) | 67 | ) |
67 | 68 | ||
68 | NL_PACKET(disconnect, 6, ) | 69 | NL_PACKET(disconnect, 6, ) |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cac84b006667..5f494b465097 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -565,17 +565,17 @@ enum { | |||
565 | 565 | ||
566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) | 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) |
567 | { | 567 | { |
568 | return test_bit(bit, &EXT3_I(inode)->i_state); | 568 | return test_bit(bit, &EXT3_I(inode)->i_state_flags); |
569 | } | 569 | } |
570 | 570 | ||
571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) | 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) |
572 | { | 572 | { |
573 | set_bit(bit, &EXT3_I(inode)->i_state); | 573 | set_bit(bit, &EXT3_I(inode)->i_state_flags); |
574 | } | 574 | } |
575 | 575 | ||
576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) | 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) |
577 | { | 577 | { |
578 | clear_bit(bit, &EXT3_I(inode)->i_state); | 578 | clear_bit(bit, &EXT3_I(inode)->i_state_flags); |
579 | } | 579 | } |
580 | #else | 580 | #else |
581 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7679acdb519a..f42c098aed8d 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -87,7 +87,7 @@ struct ext3_inode_info { | |||
87 | * near to their parent directory's inode. | 87 | * near to their parent directory's inode. |
88 | */ | 88 | */ |
89 | __u32 i_block_group; | 89 | __u32 i_block_group; |
90 | unsigned long i_state; /* Dynamic state flags for ext3 */ | 90 | unsigned long i_state_flags; /* Dynamic state flags for ext3 */ |
91 | 91 | ||
92 | /* block reservation info */ | 92 | /* block reservation info */ |
93 | struct ext3_block_alloc_info *i_block_alloc_info; | 93 | struct ext3_block_alloc_info *i_block_alloc_info; |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5a361f85cfec..da7e52b099f3 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only); | |||
64 | extern void cancel_freezing(struct task_struct *p); | 64 | extern void cancel_freezing(struct task_struct *p); |
65 | 65 | ||
66 | #ifdef CONFIG_CGROUP_FREEZER | 66 | #ifdef CONFIG_CGROUP_FREEZER |
67 | extern int cgroup_frozen(struct task_struct *task); | 67 | extern int cgroup_freezing_or_frozen(struct task_struct *task); |
68 | #else /* !CONFIG_CGROUP_FREEZER */ | 68 | #else /* !CONFIG_CGROUP_FREEZER */ |
69 | static inline int cgroup_frozen(struct task_struct *task) { return 0; } | 69 | static inline int cgroup_freezing_or_frozen(struct task_struct *task) |
70 | { | ||
71 | return 0; | ||
72 | } | ||
70 | #endif /* !CONFIG_CGROUP_FREEZER */ | 73 | #endif /* !CONFIG_CGROUP_FREEZER */ |
71 | 74 | ||
72 | /* | 75 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 10b8dedcd18b..39d57bc6cc71 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2212,6 +2212,7 @@ extern int generic_segment_checks(const struct iovec *iov, | |||
2212 | /* fs/block_dev.c */ | 2212 | /* fs/block_dev.c */ |
2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | 2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, |
2214 | unsigned long nr_segs, loff_t pos); | 2214 | unsigned long nr_segs, loff_t pos); |
2215 | extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync); | ||
2215 | 2216 | ||
2216 | /* fs/splice.c */ | 2217 | /* fs/splice.c */ |
2217 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2218 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 7be0c6fbe880..c57db27ac861 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -105,7 +105,7 @@ struct fscache_operation { | |||
105 | /* operation releaser */ | 105 | /* operation releaser */ |
106 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
107 | 107 | ||
108 | #ifdef CONFIG_SLOW_WORK_PROC | 108 | #ifdef CONFIG_SLOW_WORK_DEBUG |
109 | const char *name; /* operation name */ | 109 | const char *name; /* operation name */ |
110 | const char *state; /* operation state */ | 110 | const char *state; /* operation state */ |
111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index df8fd9a3b214..01755909ce81 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/inotify.h> | 15 | #include <linux/inotify.h> |
16 | #include <linux/fsnotify_backend.h> | 16 | #include <linux/fsnotify_backend.h> |
17 | #include <linux/audit.h> | 17 | #include <linux/audit.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * fsnotify_d_instantiate - instantiate a dentry for inode | 21 | * fsnotify_d_instantiate - instantiate a dentry for inode |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 48e68da097f6..361d1cc288d0 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | struct gameport { | 21 | struct gameport { |
21 | 22 | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 56b50514ab25..5f2f4c4d8fb0 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -109,7 +109,7 @@ struct hd_struct { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | #define GENHD_FL_REMOVABLE 1 | 111 | #define GENHD_FL_REMOVABLE 1 |
112 | #define GENHD_FL_DRIVERFS 2 | 112 | /* 2 is unused */ |
113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 |
114 | #define GENHD_FL_CD 8 | 114 | #define GENHD_FL_CD 8 |
115 | #define GENHD_FL_UP 16 | 115 | #define GENHD_FL_UP 16 |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 87018dc5527d..9e7a12d6385d 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -782,7 +782,6 @@ extern int i2o_exec_lct_get(struct i2o_controller *); | |||
782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) | 782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) |
783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) | 783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) |
784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) | 784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) |
785 | #define kobj_to_i2o_device(kobj) to_i2o_device(container_of(kobj, struct device, kobj)) | ||
786 | 785 | ||
787 | /** | 786 | /** |
788 | * i2o_out_to_virt - Turn an I2O message to a virtual address | 787 | * i2o_out_to_virt - Turn an I2O message to a virtual address |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 97e6ab435184..3239d1c10acb 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
1169 | extern void ide_timer_expiry(unsigned long); | 1169 | extern void ide_timer_expiry(unsigned long); |
1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
1171 | extern void do_ide_request(struct request_queue *); | 1171 | extern void do_ide_request(struct request_queue *); |
1172 | extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq); | ||
1172 | 1173 | ||
1173 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1174 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
1174 | 1175 | ||
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 97eb928b4924..25085ddd955f 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define _LINUX_IO_MAPPING_H | 19 | #define _LINUX_IO_MAPPING_H |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/iomap.h> | 25 | #include <asm/iomap.h> |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 71ab79da7e7f..26fad187d661 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -112,12 +112,14 @@ struct resource_list { | |||
112 | extern struct resource ioport_resource; | 112 | extern struct resource ioport_resource; |
113 | extern struct resource iomem_resource; | 113 | extern struct resource iomem_resource; |
114 | 114 | ||
115 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | ||
115 | extern int request_resource(struct resource *root, struct resource *new); | 116 | extern int request_resource(struct resource *root, struct resource *new); |
116 | extern int release_resource(struct resource *new); | 117 | extern int release_resource(struct resource *new); |
117 | void release_child_resources(struct resource *new); | 118 | void release_child_resources(struct resource *new); |
118 | extern void reserve_region_with_split(struct resource *root, | 119 | extern void reserve_region_with_split(struct resource *root, |
119 | resource_size_t start, resource_size_t end, | 120 | resource_size_t start, resource_size_t end, |
120 | const char *name); | 121 | const char *name); |
122 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | ||
121 | extern int insert_resource(struct resource *parent, struct resource *new); | 123 | extern int insert_resource(struct resource *parent, struct resource *new); |
122 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 124 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
123 | extern int allocate_resource(struct resource *root, struct resource *new, | 125 | extern int allocate_resource(struct resource *root, struct resource *new, |
diff --git a/include/linux/iscsi_ibft.h b/include/linux/iscsi_ibft.h index 6092487e2950..d2e4042f8f5e 100644 --- a/include/linux/iscsi_ibft.h +++ b/include/linux/iscsi_ibft.h | |||
@@ -42,9 +42,13 @@ extern struct ibft_table_header *ibft_addr; | |||
42 | * mapped address is set in the ibft_addr variable. | 42 | * mapped address is set in the ibft_addr variable. |
43 | */ | 43 | */ |
44 | #ifdef CONFIG_ISCSI_IBFT_FIND | 44 | #ifdef CONFIG_ISCSI_IBFT_FIND |
45 | extern void __init reserve_ibft_region(void); | 45 | unsigned long find_ibft_region(unsigned long *sizep); |
46 | #else | 46 | #else |
47 | static inline void reserve_ibft_region(void) { } | 47 | static inline unsigned long find_ibft_region(unsigned long *sizep) |
48 | { | ||
49 | *sizep = 0; | ||
50 | return 0; | ||
51 | } | ||
48 | #endif | 52 | #endif |
49 | 53 | ||
50 | #endif /* ISCSI_IBFT_H */ | 54 | #endif /* ISCSI_IBFT_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index f3aa59cb675d..516a2a27e87a 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/lockdep.h> | 33 | #include <linux/lockdep.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
36 | 37 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 1ec876358180..a4d2e9f7088a 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/bit_spinlock.h> | 30 | #include <linux/bit_spinlock.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/slab.h> | ||
33 | #endif | 34 | #endif |
34 | 35 | ||
35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7f0707463360..9365227dbaf6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -426,7 +426,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
426 | .burst = DEFAULT_RATELIMIT_BURST, \ | 426 | .burst = DEFAULT_RATELIMIT_BURST, \ |
427 | }; \ | 427 | }; \ |
428 | \ | 428 | \ |
429 | if (!__ratelimit(&_rs)) \ | 429 | if (__ratelimit(&_rs)) \ |
430 | printk(fmt, ##__VA_ARGS__); \ | 430 | printk(fmt, ##__VA_ARGS__); \ |
431 | }) | 431 | }) |
432 | #else | 432 | #else |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd35..e117b1aee69c 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -86,7 +86,8 @@ union { \ | |||
86 | */ | 86 | */ |
87 | #define INIT_KFIFO(name) \ | 87 | #define INIT_KFIFO(name) \ |
88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ | 88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ |
89 | sizeof(struct kfifo), name##kfifo_buffer) | 89 | sizeof(struct kfifo), \ |
90 | name##kfifo_buffer + sizeof(struct kfifo)) | ||
90 | 91 | ||
91 | /** | 92 | /** |
92 | * DEFINE_KFIFO - macro to define and initialize a kfifo | 93 | * DEFINE_KFIFO - macro to define and initialize a kfifo |
@@ -102,8 +103,6 @@ union { \ | |||
102 | unsigned char name##kfifo_buffer[size]; \ | 103 | unsigned char name##kfifo_buffer[size]; \ |
103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) | 104 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) |
104 | 105 | ||
105 | #undef __kfifo_initializer | ||
106 | |||
107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, | 106 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
108 | unsigned int size); | 107 | unsigned int size); |
109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 108 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
diff --git a/include/linux/lcm.h b/include/linux/lcm.h new file mode 100644 index 000000000000..7bf01d779b45 --- /dev/null +++ b/include/linux/lcm.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LCM_H | ||
2 | #define _LCM_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | |||
6 | unsigned long lcm(unsigned long a, unsigned long b) __attribute_const__; | ||
7 | |||
8 | #endif /* _LCM_H */ | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index f8ea71e6d0e2..b2f2003b92e5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -146,6 +146,7 @@ enum { | |||
146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ | 146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ |
147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ | 147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ |
148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ | 148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ |
149 | ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */ | ||
149 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, | 150 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, |
150 | 151 | ||
151 | ATA_DFLAG_DETACH = (1 << 24), | 152 | ATA_DFLAG_DETACH = (1 << 24), |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e70f21beb4b4..462acaf36f3a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -783,8 +783,8 @@ struct mm_walk { | |||
783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); | 783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); | 784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); | 785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
786 | int (*hugetlb_entry)(pte_t *, unsigned long, unsigned long, | 786 | int (*hugetlb_entry)(pte_t *, unsigned long, |
787 | struct mm_walk *); | 787 | unsigned long, unsigned long, struct mm_walk *); |
788 | struct mm_struct *mm; | 788 | struct mm_struct *mm; |
789 | void *private; | 789 | void *private; |
790 | }; | 790 | }; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -268,6 +268,7 @@ struct _mmc_csd { | |||
268 | 268 | ||
269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
271 | 272 | ||
272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 5e869ffd34aa..515d53ae6a79 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -330,8 +330,11 @@ struct module | |||
330 | struct module_notes_attrs *notes_attrs; | 330 | struct module_notes_attrs *notes_attrs; |
331 | #endif | 331 | #endif |
332 | 332 | ||
333 | #ifdef CONFIG_SMP | ||
333 | /* Per-cpu data. */ | 334 | /* Per-cpu data. */ |
334 | void *percpu; | 335 | void __percpu *percpu; |
336 | unsigned int percpu_size; | ||
337 | #endif | ||
335 | 338 | ||
336 | /* The command line arguments (may be mangled). People like | 339 | /* The command line arguments (may be mangled). People like |
337 | keeping pointers to this stuff */ | 340 | keeping pointers to this stuff */ |
@@ -365,7 +368,8 @@ struct module | |||
365 | void (*exit)(void); | 368 | void (*exit)(void); |
366 | 369 | ||
367 | struct module_ref { | 370 | struct module_ref { |
368 | int count; | 371 | unsigned int incs; |
372 | unsigned int decs; | ||
369 | } __percpu *refptr; | 373 | } __percpu *refptr; |
370 | #endif | 374 | #endif |
371 | 375 | ||
@@ -392,6 +396,7 @@ static inline int module_is_live(struct module *mod) | |||
392 | struct module *__module_text_address(unsigned long addr); | 396 | struct module *__module_text_address(unsigned long addr); |
393 | struct module *__module_address(unsigned long addr); | 397 | struct module *__module_address(unsigned long addr); |
394 | bool is_module_address(unsigned long addr); | 398 | bool is_module_address(unsigned long addr); |
399 | bool is_module_percpu_address(unsigned long addr); | ||
395 | bool is_module_text_address(unsigned long addr); | 400 | bool is_module_text_address(unsigned long addr); |
396 | 401 | ||
397 | static inline int within_module_core(unsigned long addr, struct module *mod) | 402 | static inline int within_module_core(unsigned long addr, struct module *mod) |
@@ -459,9 +464,9 @@ static inline void __module_get(struct module *module) | |||
459 | { | 464 | { |
460 | if (module) { | 465 | if (module) { |
461 | preempt_disable(); | 466 | preempt_disable(); |
462 | __this_cpu_inc(module->refptr->count); | 467 | __this_cpu_inc(module->refptr->incs); |
463 | trace_module_get(module, _THIS_IP_, | 468 | trace_module_get(module, _THIS_IP_, |
464 | __this_cpu_read(module->refptr->count)); | 469 | __this_cpu_read(module->refptr->incs)); |
465 | preempt_enable(); | 470 | preempt_enable(); |
466 | } | 471 | } |
467 | } | 472 | } |
@@ -474,11 +479,10 @@ static inline int try_module_get(struct module *module) | |||
474 | preempt_disable(); | 479 | preempt_disable(); |
475 | 480 | ||
476 | if (likely(module_is_live(module))) { | 481 | if (likely(module_is_live(module))) { |
477 | __this_cpu_inc(module->refptr->count); | 482 | __this_cpu_inc(module->refptr->incs); |
478 | trace_module_get(module, _THIS_IP_, | 483 | trace_module_get(module, _THIS_IP_, |
479 | __this_cpu_read(module->refptr->count)); | 484 | __this_cpu_read(module->refptr->incs)); |
480 | } | 485 | } else |
481 | else | ||
482 | ret = 0; | 486 | ret = 0; |
483 | 487 | ||
484 | preempt_enable(); | 488 | preempt_enable(); |
@@ -563,6 +567,11 @@ static inline bool is_module_address(unsigned long addr) | |||
563 | return false; | 567 | return false; |
564 | } | 568 | } |
565 | 569 | ||
570 | static inline bool is_module_percpu_address(unsigned long addr) | ||
571 | { | ||
572 | return false; | ||
573 | } | ||
574 | |||
566 | static inline bool is_module_text_address(unsigned long addr) | 575 | static inline bool is_module_text_address(unsigned long addr) |
567 | { | 576 | { |
568 | return false; | 577 | return false; |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 30b08136fdf3..aef22ae2af47 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -39,6 +39,7 @@ enum { | |||
39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
41 | PCG_ACCT_LRU, /* page has been accounted for */ | 41 | PCG_ACCT_LRU, /* page has been accounted for */ |
42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
42 | }; | 43 | }; |
43 | 44 | ||
44 | #define TESTPCGFLAG(uname, lname) \ | 45 | #define TESTPCGFLAG(uname, lname) \ |
@@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU) | |||
73 | TESTPCGFLAG(AcctLRU, ACCT_LRU) | 74 | TESTPCGFLAG(AcctLRU, ACCT_LRU) |
74 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) | 75 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) |
75 | 76 | ||
77 | |||
78 | SETPCGFLAG(FileMapped, FILE_MAPPED) | ||
79 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) | ||
80 | TESTPCGFLAG(FileMapped, FILE_MAPPED) | ||
81 | |||
76 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 82 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
77 | { | 83 | { |
78 | return page_to_nid(pc->page); | 84 | return page_to_nid(pc->page); |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a93e5bfdccb8..d3a38d687104 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -2,10 +2,10 @@ | |||
2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
3 | 3 | ||
4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
5 | #include <linux/slab.h> /* For kmalloc() */ | ||
6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
7 | #include <linux/cpumask.h> | 6 | #include <linux/cpumask.h> |
8 | #include <linux/pfn.h> | 7 | #include <linux/pfn.h> |
8 | #include <linux/init.h> | ||
9 | 9 | ||
10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
11 | 11 | ||
@@ -135,9 +135,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) |
136 | 136 | ||
137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | 138 | extern bool is_kernel_percpu_address(unsigned long addr); |
139 | extern void free_percpu(void __percpu *__pdata); | ||
140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
141 | 139 | ||
142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 140 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
143 | extern void __init setup_per_cpu_areas(void); | 141 | extern void __init setup_per_cpu_areas(void); |
@@ -147,25 +145,10 @@ extern void __init setup_per_cpu_areas(void); | |||
147 | 145 | ||
148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 146 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
149 | 147 | ||
150 | static inline void __percpu *__alloc_percpu(size_t size, size_t align) | 148 | /* can't distinguish from other static vars, always false */ |
149 | static inline bool is_kernel_percpu_address(unsigned long addr) | ||
151 | { | 150 | { |
152 | /* | 151 | return false; |
153 | * Can't easily make larger alignment work with kmalloc. WARN | ||
154 | * on it. Larger alignment should only be used for module | ||
155 | * percpu sections on SMP for which this path isn't used. | ||
156 | */ | ||
157 | WARN_ON_ONCE(align > SMP_CACHE_BYTES); | ||
158 | return kzalloc(size, GFP_KERNEL); | ||
159 | } | ||
160 | |||
161 | static inline void free_percpu(void __percpu *p) | ||
162 | { | ||
163 | kfree(p); | ||
164 | } | ||
165 | |||
166 | static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) | ||
167 | { | ||
168 | return __pa(addr); | ||
169 | } | 152 | } |
170 | 153 | ||
171 | static inline void __init setup_per_cpu_areas(void) { } | 154 | static inline void __init setup_per_cpu_areas(void) { } |
@@ -177,6 +160,10 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
177 | 160 | ||
178 | #endif /* CONFIG_SMP */ | 161 | #endif /* CONFIG_SMP */ |
179 | 162 | ||
163 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | ||
164 | extern void free_percpu(void __percpu *__pdata); | ||
165 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
166 | |||
180 | #define alloc_percpu(type) \ | 167 | #define alloc_percpu(type) \ |
181 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) | 168 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) |
182 | 169 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 95477038a72a..c8e375440403 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -842,13 +842,6 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | |||
842 | 842 | ||
843 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 843 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
844 | 844 | ||
845 | static inline void | ||
846 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
847 | { | ||
848 | if (atomic_read(&perf_swevent_enabled[event_id])) | ||
849 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
850 | } | ||
851 | |||
852 | extern void | 845 | extern void |
853 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | 846 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); |
854 | 847 | ||
@@ -887,6 +880,20 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | |||
887 | return perf_arch_fetch_caller_regs(regs, ip, skip); | 880 | return perf_arch_fetch_caller_regs(regs, ip, skip); |
888 | } | 881 | } |
889 | 882 | ||
883 | static inline void | ||
884 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
885 | { | ||
886 | if (atomic_read(&perf_swevent_enabled[event_id])) { | ||
887 | struct pt_regs hot_regs; | ||
888 | |||
889 | if (!regs) { | ||
890 | perf_fetch_caller_regs(&hot_regs, 1); | ||
891 | regs = &hot_regs; | ||
892 | } | ||
893 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
894 | } | ||
895 | } | ||
896 | |||
890 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 897 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
891 | 898 | ||
892 | static inline void perf_event_mmap(struct vm_area_struct *vma) | 899 | static inline void perf_event_mmap(struct vm_area_struct *vma) |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c5da74918096..55ca73cf25e5 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -121,6 +121,13 @@ do { \ | |||
121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control | 121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control |
122 | * access to data items when inserting into or looking up from the radix tree) | 122 | * access to data items when inserting into or looking up from the radix tree) |
123 | * | 123 | * |
124 | * Note that the value returned by radix_tree_tag_get() may not be relied upon | ||
125 | * if only the RCU read lock is held. Functions to set/clear tags and to | ||
126 | * delete nodes running concurrently with it may affect its result such that | ||
127 | * two consecutive reads in the same locked section may return different | ||
128 | * values. If reliability is required, modification functions must also be | ||
129 | * excluded from concurrency. | ||
130 | * | ||
124 | * radix_tree_tagged is able to be called without locking or RCU. | 131 | * radix_tree_tagged is able to be called without locking or RCU. |
125 | */ | 132 | */ |
126 | 133 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 3024050c82a1..872a98e13d6a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -123,22 +123,11 @@ static inline int rcu_read_lock_held(void) | |||
123 | return lock_is_held(&rcu_lock_map); | 123 | return lock_is_held(&rcu_lock_map); |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /* |
127 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 127 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file |
128 | * | 128 | * hell. |
129 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | ||
130 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, | ||
131 | * this assumes we are in an RCU-bh read-side critical section unless it can | ||
132 | * prove otherwise. | ||
133 | * | ||
134 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
135 | */ | 129 | */ |
136 | static inline int rcu_read_lock_bh_held(void) | 130 | extern int rcu_read_lock_bh_held(void); |
137 | { | ||
138 | if (!debug_lockdep_rcu_enabled()) | ||
139 | return 1; | ||
140 | return lock_is_held(&rcu_bh_lock_map); | ||
141 | } | ||
142 | 131 | ||
143 | /** | 132 | /** |
144 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? | 133 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? |
@@ -160,7 +149,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
160 | return 1; | 149 | return 1; |
161 | if (debug_locks) | 150 | if (debug_locks) |
162 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 151 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
163 | return lockdep_opinion || preempt_count() != 0; | 152 | return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); |
164 | } | 153 | } |
165 | #else /* #ifdef CONFIG_PREEMPT */ | 154 | #else /* #ifdef CONFIG_PREEMPT */ |
166 | static inline int rcu_read_lock_sched_held(void) | 155 | static inline int rcu_read_lock_sched_held(void) |
@@ -191,7 +180,7 @@ static inline int rcu_read_lock_bh_held(void) | |||
191 | #ifdef CONFIG_PREEMPT | 180 | #ifdef CONFIG_PREEMPT |
192 | static inline int rcu_read_lock_sched_held(void) | 181 | static inline int rcu_read_lock_sched_held(void) |
193 | { | 182 | { |
194 | return !rcu_scheduler_active || preempt_count() != 0; | 183 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); |
195 | } | 184 | } |
196 | #else /* #ifdef CONFIG_PREEMPT */ | 185 | #else /* #ifdef CONFIG_PREEMPT */ |
197 | static inline int rcu_read_lock_sched_held(void) | 186 | static inline int rcu_read_lock_sched_held(void) |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37ea..7fa02b4af838 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, | |||
70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | static inline int reiserfs_xattrs_initialized(struct super_block *sb) | ||
74 | { | ||
75 | return REISERFS_SB(sb)->priv_root != NULL; | ||
76 | } | ||
77 | |||
73 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 78 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
74 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 79 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
75 | { | 80 | { |
diff --git a/include/linux/security.h b/include/linux/security.h index 233d20b52c1b..3158dd982d27 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/key.h> | 34 | #include <linux/key.h> |
35 | #include <linux/xfrm.h> | 35 | #include <linux/xfrm.h> |
36 | #include <linux/gfp.h> | 36 | #include <linux/slab.h> |
37 | #include <net/flow.h> | 37 | #include <net/flow.h> |
38 | 38 | ||
39 | /* Maximum number of letters for an LSM name string */ | 39 | /* Maximum number of letters for an LSM name string */ |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 488446289cab..49d1247cd6d9 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -106,6 +106,7 @@ int kmem_cache_shrink(struct kmem_cache *); | |||
106 | void kmem_cache_free(struct kmem_cache *, void *); | 106 | void kmem_cache_free(struct kmem_cache *, void *); |
107 | unsigned int kmem_cache_size(struct kmem_cache *); | 107 | unsigned int kmem_cache_size(struct kmem_cache *); |
108 | const char *kmem_cache_name(struct kmem_cache *); | 108 | const char *kmem_cache_name(struct kmem_cache *); |
109 | int kern_ptr_validate(const void *ptr, unsigned long size); | ||
109 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | 110 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); |
110 | 111 | ||
111 | /* | 112 | /* |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 97b60b37f445..af56071b06f9 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 27 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index d7152b451e21..7c91260c44a9 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -36,7 +36,6 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | |||
36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); |
39 | void bc_release_request(struct rpc_task *); | ||
40 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
41 | 40 | ||
42 | /* | 41 | /* |
@@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
59 | { | 58 | { |
60 | return 0; | 59 | return 0; |
61 | } | 60 | } |
61 | |||
62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | ||
63 | { | ||
64 | } | ||
62 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_NFS_V4_1 */ |
63 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
64 | 67 | ||
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index b6523c1427ce..58de6edf751f 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/taskstats.h> | 10 | #include <linux/taskstats.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #ifdef CONFIG_TASKSTATS | 14 | #ifdef CONFIG_TASKSTATS |
14 | extern struct kmem_cache *taskstats_cache; | 15 | extern struct kmem_cache *taskstats_cache; |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index f59604ed0ec6..78b4bd3be496 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -49,7 +49,7 @@ struct tracepoint { | |||
49 | void **it_func; \ | 49 | void **it_func; \ |
50 | \ | 50 | \ |
51 | rcu_read_lock_sched_notrace(); \ | 51 | rcu_read_lock_sched_notrace(); \ |
52 | it_func = rcu_dereference((tp)->funcs); \ | 52 | it_func = rcu_dereference_sched((tp)->funcs); \ |
53 | if (it_func) { \ | 53 | if (it_func) { \ |
54 | do { \ | 54 | do { \ |
55 | ((void(*)(proto))(*it_func))(args); \ | 55 | ((void(*)(proto))(*it_func))(args); \ |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index bbf45d500b6d..f4b7ca516cdd 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __LINUX_USB_GADGET_H | 15 | #ifndef __LINUX_USB_GADGET_H |
16 | #define __LINUX_USB_GADGET_H | 16 | #define __LINUX_USB_GADGET_H |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
19 | |||
18 | struct usb_ep; | 20 | struct usb_ep; |
19 | 21 | ||
20 | /** | 22 | /** |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index ae4f039515b4..92228a8fbcbc 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -12,37 +12,14 @@ | |||
12 | 12 | ||
13 | /* Feature bits */ | 13 | /* Feature bits */ |
14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ | 14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ |
15 | #define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */ | ||
16 | 15 | ||
17 | struct virtio_console_config { | 16 | struct virtio_console_config { |
18 | /* colums of the screens */ | 17 | /* colums of the screens */ |
19 | __u16 cols; | 18 | __u16 cols; |
20 | /* rows of the screens */ | 19 | /* rows of the screens */ |
21 | __u16 rows; | 20 | __u16 rows; |
22 | /* max. number of ports this device can hold */ | ||
23 | __u32 max_nr_ports; | ||
24 | /* number of ports added so far */ | ||
25 | __u32 nr_ports; | ||
26 | } __attribute__((packed)); | 21 | } __attribute__((packed)); |
27 | 22 | ||
28 | /* | ||
29 | * A message that's passed between the Host and the Guest for a | ||
30 | * particular port. | ||
31 | */ | ||
32 | struct virtio_console_control { | ||
33 | __u32 id; /* Port number */ | ||
34 | __u16 event; /* The kind of control event (see below) */ | ||
35 | __u16 value; /* Extra information for the key */ | ||
36 | }; | ||
37 | |||
38 | /* Some events for control messages */ | ||
39 | #define VIRTIO_CONSOLE_PORT_READY 0 | ||
40 | #define VIRTIO_CONSOLE_CONSOLE_PORT 1 | ||
41 | #define VIRTIO_CONSOLE_RESIZE 2 | ||
42 | #define VIRTIO_CONSOLE_PORT_OPEN 3 | ||
43 | #define VIRTIO_CONSOLE_PORT_NAME 4 | ||
44 | #define VIRTIO_CONSOLE_PORT_REMOVE 5 | ||
45 | |||
46 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
47 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); | 24 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); |
48 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index db8096e88533..57031b4d12f2 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
@@ -155,6 +155,7 @@ | |||
155 | 155 | ||
156 | #include <linux/types.h> | 156 | #include <linux/types.h> |
157 | #include <linux/device.h> | 157 | #include <linux/device.h> |
158 | #include <linux/slab.h> | ||
158 | 159 | ||
159 | 160 | ||
160 | /* Backend stuff */ | 161 | /* Backend stuff */ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd204..36520ded3e06 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -34,6 +34,9 @@ struct writeback_control { | |||
34 | enum writeback_sync_modes sync_mode; | 34 | enum writeback_sync_modes sync_mode; |
35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
36 | older than this */ | 36 | older than this */ |
37 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
38 | called. This is needed to avoid | ||
39 | extra jobs and livelock */ | ||
37 | long nr_to_write; /* Write this many pages, and decrement | 40 | long nr_to_write; /* Write this many pages, and decrement |
38 | this for each page written */ | 41 | this for each page written */ |
39 | long pages_skipped; /* Pages which were not written */ | 42 | long pages_skipped; /* Pages which were not written */ |