diff options
Diffstat (limited to 'include/linux')
44 files changed, 643 insertions, 120 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 4a3d52e545e1..5ffc6dda4675 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -32,6 +32,13 @@ enum backlight_update_reason { | |||
32 | BACKLIGHT_UPDATE_SYSFS, | 32 | BACKLIGHT_UPDATE_SYSFS, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | enum backlight_type { | ||
36 | BACKLIGHT_RAW = 1, | ||
37 | BACKLIGHT_PLATFORM, | ||
38 | BACKLIGHT_FIRMWARE, | ||
39 | BACKLIGHT_TYPE_MAX, | ||
40 | }; | ||
41 | |||
35 | struct backlight_device; | 42 | struct backlight_device; |
36 | struct fb_info; | 43 | struct fb_info; |
37 | 44 | ||
@@ -62,6 +69,8 @@ struct backlight_properties { | |||
62 | /* FB Blanking active? (values as for power) */ | 69 | /* FB Blanking active? (values as for power) */ |
63 | /* Due to be removed, please use (state & BL_CORE_FBBLANK) */ | 70 | /* Due to be removed, please use (state & BL_CORE_FBBLANK) */ |
64 | int fb_blank; | 71 | int fb_blank; |
72 | /* Backlight type */ | ||
73 | enum backlight_type type; | ||
65 | /* Flags used to signal drivers of state changes */ | 74 | /* Flags used to signal drivers of state changes */ |
66 | /* Upper 4 bits are reserved for driver internal use */ | 75 | /* Upper 4 bits are reserved for driver internal use */ |
67 | unsigned int state; | 76 | unsigned int state; |
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index 09dcc0c2ffd5..b8e995fbd867 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h | |||
@@ -136,9 +136,18 @@ struct ceph_dir_layout { | |||
136 | 136 | ||
137 | 137 | ||
138 | /* osd */ | 138 | /* osd */ |
139 | #define CEPH_MSG_OSD_MAP 41 | 139 | #define CEPH_MSG_OSD_MAP 41 |
140 | #define CEPH_MSG_OSD_OP 42 | 140 | #define CEPH_MSG_OSD_OP 42 |
141 | #define CEPH_MSG_OSD_OPREPLY 43 | 141 | #define CEPH_MSG_OSD_OPREPLY 43 |
142 | #define CEPH_MSG_WATCH_NOTIFY 44 | ||
143 | |||
144 | |||
145 | /* watch-notify operations */ | ||
146 | enum { | ||
147 | WATCH_NOTIFY = 1, /* notifying watcher */ | ||
148 | WATCH_NOTIFY_COMPLETE = 2, /* notifier notified when done */ | ||
149 | }; | ||
150 | |||
142 | 151 | ||
143 | /* pool operations */ | 152 | /* pool operations */ |
144 | enum { | 153 | enum { |
@@ -213,8 +222,10 @@ struct ceph_client_mount { | |||
213 | struct ceph_mon_request_header monhdr; | 222 | struct ceph_mon_request_header monhdr; |
214 | } __attribute__ ((packed)); | 223 | } __attribute__ ((packed)); |
215 | 224 | ||
225 | #define CEPH_SUBSCRIBE_ONETIME 1 /* i want only 1 update after have */ | ||
226 | |||
216 | struct ceph_mon_subscribe_item { | 227 | struct ceph_mon_subscribe_item { |
217 | __le64 have_version; __le64 have; | 228 | __le64 have_version; __le64 have; |
218 | __u8 onetime; | 229 | __u8 onetime; |
219 | } __attribute__ ((packed)); | 230 | } __attribute__ ((packed)); |
220 | 231 | ||
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 72c72bfccb88..0d2e0fffb470 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
@@ -71,7 +71,6 @@ struct ceph_options { | |||
71 | #define CEPH_OSD_TIMEOUT_DEFAULT 60 /* seconds */ | 71 | #define CEPH_OSD_TIMEOUT_DEFAULT 60 /* seconds */ |
72 | #define CEPH_OSD_KEEPALIVE_DEFAULT 5 | 72 | #define CEPH_OSD_KEEPALIVE_DEFAULT 5 |
73 | #define CEPH_OSD_IDLE_TTL_DEFAULT 60 | 73 | #define CEPH_OSD_IDLE_TTL_DEFAULT 60 |
74 | #define CEPH_MOUNT_RSIZE_DEFAULT (512*1024) /* readahead */ | ||
75 | 74 | ||
76 | #define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024) | 75 | #define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024) |
77 | #define CEPH_MSG_MAX_DATA_LEN (16*1024*1024) | 76 | #define CEPH_MSG_MAX_DATA_LEN (16*1024*1024) |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index a1af29648fb5..f88eacb111d4 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
@@ -32,6 +32,7 @@ struct ceph_osd { | |||
32 | struct rb_node o_node; | 32 | struct rb_node o_node; |
33 | struct ceph_connection o_con; | 33 | struct ceph_connection o_con; |
34 | struct list_head o_requests; | 34 | struct list_head o_requests; |
35 | struct list_head o_linger_requests; | ||
35 | struct list_head o_osd_lru; | 36 | struct list_head o_osd_lru; |
36 | struct ceph_authorizer *o_authorizer; | 37 | struct ceph_authorizer *o_authorizer; |
37 | void *o_authorizer_buf, *o_authorizer_reply_buf; | 38 | void *o_authorizer_buf, *o_authorizer_reply_buf; |
@@ -47,6 +48,8 @@ struct ceph_osd_request { | |||
47 | struct rb_node r_node; | 48 | struct rb_node r_node; |
48 | struct list_head r_req_lru_item; | 49 | struct list_head r_req_lru_item; |
49 | struct list_head r_osd_item; | 50 | struct list_head r_osd_item; |
51 | struct list_head r_linger_item; | ||
52 | struct list_head r_linger_osd; | ||
50 | struct ceph_osd *r_osd; | 53 | struct ceph_osd *r_osd; |
51 | struct ceph_pg r_pgid; | 54 | struct ceph_pg r_pgid; |
52 | int r_pg_osds[CEPH_PG_MAX_SIZE]; | 55 | int r_pg_osds[CEPH_PG_MAX_SIZE]; |
@@ -59,6 +62,7 @@ struct ceph_osd_request { | |||
59 | int r_flags; /* any additional flags for the osd */ | 62 | int r_flags; /* any additional flags for the osd */ |
60 | u32 r_sent; /* >0 if r_request is sending/sent */ | 63 | u32 r_sent; /* >0 if r_request is sending/sent */ |
61 | int r_got_reply; | 64 | int r_got_reply; |
65 | int r_linger; | ||
62 | 66 | ||
63 | struct ceph_osd_client *r_osdc; | 67 | struct ceph_osd_client *r_osdc; |
64 | struct kref r_kref; | 68 | struct kref r_kref; |
@@ -74,7 +78,6 @@ struct ceph_osd_request { | |||
74 | char r_oid[40]; /* object name */ | 78 | char r_oid[40]; /* object name */ |
75 | int r_oid_len; | 79 | int r_oid_len; |
76 | unsigned long r_stamp; /* send OR check time */ | 80 | unsigned long r_stamp; /* send OR check time */ |
77 | bool r_resend; /* msg send failed, needs retry */ | ||
78 | 81 | ||
79 | struct ceph_file_layout r_file_layout; | 82 | struct ceph_file_layout r_file_layout; |
80 | struct ceph_snap_context *r_snapc; /* snap context for writes */ | 83 | struct ceph_snap_context *r_snapc; /* snap context for writes */ |
@@ -90,6 +93,26 @@ struct ceph_osd_request { | |||
90 | struct ceph_pagelist *r_trail; /* trailing part of the data */ | 93 | struct ceph_pagelist *r_trail; /* trailing part of the data */ |
91 | }; | 94 | }; |
92 | 95 | ||
96 | struct ceph_osd_event { | ||
97 | u64 cookie; | ||
98 | int one_shot; | ||
99 | struct ceph_osd_client *osdc; | ||
100 | void (*cb)(u64, u64, u8, void *); | ||
101 | void *data; | ||
102 | struct rb_node node; | ||
103 | struct list_head osd_node; | ||
104 | struct kref kref; | ||
105 | struct completion completion; | ||
106 | }; | ||
107 | |||
108 | struct ceph_osd_event_work { | ||
109 | struct work_struct work; | ||
110 | struct ceph_osd_event *event; | ||
111 | u64 ver; | ||
112 | u64 notify_id; | ||
113 | u8 opcode; | ||
114 | }; | ||
115 | |||
93 | struct ceph_osd_client { | 116 | struct ceph_osd_client { |
94 | struct ceph_client *client; | 117 | struct ceph_client *client; |
95 | 118 | ||
@@ -104,7 +127,10 @@ struct ceph_osd_client { | |||
104 | u64 timeout_tid; /* tid of timeout triggering rq */ | 127 | u64 timeout_tid; /* tid of timeout triggering rq */ |
105 | u64 last_tid; /* tid of last request */ | 128 | u64 last_tid; /* tid of last request */ |
106 | struct rb_root requests; /* pending requests */ | 129 | struct rb_root requests; /* pending requests */ |
107 | struct list_head req_lru; /* pending requests lru */ | 130 | struct list_head req_lru; /* in-flight lru */ |
131 | struct list_head req_unsent; /* unsent/need-resend queue */ | ||
132 | struct list_head req_notarget; /* map to no osd */ | ||
133 | struct list_head req_linger; /* lingering requests */ | ||
108 | int num_requests; | 134 | int num_requests; |
109 | struct delayed_work timeout_work; | 135 | struct delayed_work timeout_work; |
110 | struct delayed_work osds_timeout_work; | 136 | struct delayed_work osds_timeout_work; |
@@ -116,6 +142,12 @@ struct ceph_osd_client { | |||
116 | 142 | ||
117 | struct ceph_msgpool msgpool_op; | 143 | struct ceph_msgpool msgpool_op; |
118 | struct ceph_msgpool msgpool_op_reply; | 144 | struct ceph_msgpool msgpool_op_reply; |
145 | |||
146 | spinlock_t event_lock; | ||
147 | struct rb_root event_tree; | ||
148 | u64 event_count; | ||
149 | |||
150 | struct workqueue_struct *notify_wq; | ||
119 | }; | 151 | }; |
120 | 152 | ||
121 | struct ceph_osd_req_op { | 153 | struct ceph_osd_req_op { |
@@ -150,6 +182,13 @@ struct ceph_osd_req_op { | |||
150 | struct { | 182 | struct { |
151 | u64 snapid; | 183 | u64 snapid; |
152 | } snap; | 184 | } snap; |
185 | struct { | ||
186 | u64 cookie; | ||
187 | u64 ver; | ||
188 | __u8 flag; | ||
189 | u32 prot_ver; | ||
190 | u32 timeout; | ||
191 | } watch; | ||
153 | }; | 192 | }; |
154 | u32 payload_len; | 193 | u32 payload_len; |
155 | }; | 194 | }; |
@@ -198,6 +237,11 @@ extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *, | |||
198 | bool use_mempool, int num_reply, | 237 | bool use_mempool, int num_reply, |
199 | int page_align); | 238 | int page_align); |
200 | 239 | ||
240 | extern void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc, | ||
241 | struct ceph_osd_request *req); | ||
242 | extern void ceph_osdc_unregister_linger_request(struct ceph_osd_client *osdc, | ||
243 | struct ceph_osd_request *req); | ||
244 | |||
201 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) | 245 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) |
202 | { | 246 | { |
203 | kref_get(&req->r_kref); | 247 | kref_get(&req->r_kref); |
@@ -233,5 +277,14 @@ extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, | |||
233 | struct page **pages, int nr_pages, | 277 | struct page **pages, int nr_pages, |
234 | int flags, int do_sync, bool nofail); | 278 | int flags, int do_sync, bool nofail); |
235 | 279 | ||
280 | /* watch/notify events */ | ||
281 | extern int ceph_osdc_create_event(struct ceph_osd_client *osdc, | ||
282 | void (*event_cb)(u64, u64, u8, void *), | ||
283 | int one_shot, void *data, | ||
284 | struct ceph_osd_event **pevent); | ||
285 | extern void ceph_osdc_cancel_event(struct ceph_osd_event *event); | ||
286 | extern int ceph_osdc_wait_event(struct ceph_osd_event *event, | ||
287 | unsigned long timeout); | ||
288 | extern void ceph_osdc_put_event(struct ceph_osd_event *event); | ||
236 | #endif | 289 | #endif |
237 | 290 | ||
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h index 6d5247f2e81b..0a99099801a4 100644 --- a/include/linux/ceph/rados.h +++ b/include/linux/ceph/rados.h | |||
@@ -12,9 +12,9 @@ | |||
12 | * osdmap encoding versions | 12 | * osdmap encoding versions |
13 | */ | 13 | */ |
14 | #define CEPH_OSDMAP_INC_VERSION 5 | 14 | #define CEPH_OSDMAP_INC_VERSION 5 |
15 | #define CEPH_OSDMAP_INC_VERSION_EXT 5 | 15 | #define CEPH_OSDMAP_INC_VERSION_EXT 6 |
16 | #define CEPH_OSDMAP_VERSION 5 | 16 | #define CEPH_OSDMAP_VERSION 5 |
17 | #define CEPH_OSDMAP_VERSION_EXT 5 | 17 | #define CEPH_OSDMAP_VERSION_EXT 6 |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * fs id | 20 | * fs id |
@@ -181,9 +181,17 @@ enum { | |||
181 | /* read */ | 181 | /* read */ |
182 | CEPH_OSD_OP_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 1, | 182 | CEPH_OSD_OP_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 1, |
183 | CEPH_OSD_OP_STAT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 2, | 183 | CEPH_OSD_OP_STAT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 2, |
184 | CEPH_OSD_OP_MAPEXT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 3, | ||
184 | 185 | ||
185 | /* fancy read */ | 186 | /* fancy read */ |
186 | CEPH_OSD_OP_MASKTRUNC = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 4, | 187 | CEPH_OSD_OP_MASKTRUNC = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 4, |
188 | CEPH_OSD_OP_SPARSE_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 5, | ||
189 | |||
190 | CEPH_OSD_OP_NOTIFY = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 6, | ||
191 | CEPH_OSD_OP_NOTIFY_ACK = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 7, | ||
192 | |||
193 | /* versioning */ | ||
194 | CEPH_OSD_OP_ASSERT_VER = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 8, | ||
187 | 195 | ||
188 | /* write */ | 196 | /* write */ |
189 | CEPH_OSD_OP_WRITE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 1, | 197 | CEPH_OSD_OP_WRITE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 1, |
@@ -205,6 +213,8 @@ enum { | |||
205 | CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13, | 213 | CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13, |
206 | CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14, | 214 | CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14, |
207 | 215 | ||
216 | CEPH_OSD_OP_WATCH = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 15, | ||
217 | |||
208 | /** attrs **/ | 218 | /** attrs **/ |
209 | /* read */ | 219 | /* read */ |
210 | CEPH_OSD_OP_GETXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 1, | 220 | CEPH_OSD_OP_GETXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 1, |
@@ -218,11 +228,14 @@ enum { | |||
218 | CEPH_OSD_OP_RMXATTR = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_ATTR | 4, | 228 | CEPH_OSD_OP_RMXATTR = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_ATTR | 4, |
219 | 229 | ||
220 | /** subop **/ | 230 | /** subop **/ |
221 | CEPH_OSD_OP_PULL = CEPH_OSD_OP_MODE_SUB | 1, | 231 | CEPH_OSD_OP_PULL = CEPH_OSD_OP_MODE_SUB | 1, |
222 | CEPH_OSD_OP_PUSH = CEPH_OSD_OP_MODE_SUB | 2, | 232 | CEPH_OSD_OP_PUSH = CEPH_OSD_OP_MODE_SUB | 2, |
223 | CEPH_OSD_OP_BALANCEREADS = CEPH_OSD_OP_MODE_SUB | 3, | 233 | CEPH_OSD_OP_BALANCEREADS = CEPH_OSD_OP_MODE_SUB | 3, |
224 | CEPH_OSD_OP_UNBALANCEREADS = CEPH_OSD_OP_MODE_SUB | 4, | 234 | CEPH_OSD_OP_UNBALANCEREADS = CEPH_OSD_OP_MODE_SUB | 4, |
225 | CEPH_OSD_OP_SCRUB = CEPH_OSD_OP_MODE_SUB | 5, | 235 | CEPH_OSD_OP_SCRUB = CEPH_OSD_OP_MODE_SUB | 5, |
236 | CEPH_OSD_OP_SCRUB_RESERVE = CEPH_OSD_OP_MODE_SUB | 6, | ||
237 | CEPH_OSD_OP_SCRUB_UNRESERVE = CEPH_OSD_OP_MODE_SUB | 7, | ||
238 | CEPH_OSD_OP_SCRUB_STOP = CEPH_OSD_OP_MODE_SUB | 8, | ||
226 | 239 | ||
227 | /** lock **/ | 240 | /** lock **/ |
228 | CEPH_OSD_OP_WRLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 1, | 241 | CEPH_OSD_OP_WRLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 1, |
@@ -328,6 +341,8 @@ enum { | |||
328 | CEPH_OSD_CMPXATTR_MODE_U64 = 2 | 341 | CEPH_OSD_CMPXATTR_MODE_U64 = 2 |
329 | }; | 342 | }; |
330 | 343 | ||
344 | #define RADOS_NOTIFY_VER 1 | ||
345 | |||
331 | /* | 346 | /* |
332 | * an individual object operation. each may be accompanied by some data | 347 | * an individual object operation. each may be accompanied by some data |
333 | * payload | 348 | * payload |
@@ -359,7 +374,12 @@ struct ceph_osd_op { | |||
359 | struct { | 374 | struct { |
360 | __le64 snapid; | 375 | __le64 snapid; |
361 | } __attribute__ ((packed)) snap; | 376 | } __attribute__ ((packed)) snap; |
362 | }; | 377 | struct { |
378 | __le64 cookie; | ||
379 | __le64 ver; | ||
380 | __u8 flag; /* 0 = unwatch, 1 = watch */ | ||
381 | } __attribute__ ((packed)) watch; | ||
382 | }; | ||
363 | __le32 payload_len; | 383 | __le32 payload_len; |
364 | } __attribute__ ((packed)); | 384 | } __attribute__ ((packed)); |
365 | 385 | ||
@@ -402,4 +422,5 @@ struct ceph_osd_reply_head { | |||
402 | } __attribute__ ((packed)); | 422 | } __attribute__ ((packed)); |
403 | 423 | ||
404 | 424 | ||
425 | |||
405 | #endif | 426 | #endif |
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index dfa2ed4c0d26..cc9f7a428649 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -11,9 +11,6 @@ | |||
11 | /* The full zone was compacted */ | 11 | /* The full zone was compacted */ |
12 | #define COMPACT_COMPLETE 3 | 12 | #define COMPACT_COMPLETE 3 |
13 | 13 | ||
14 | #define COMPACT_MODE_DIRECT_RECLAIM 0 | ||
15 | #define COMPACT_MODE_KSWAPD 1 | ||
16 | |||
17 | #ifdef CONFIG_COMPACTION | 14 | #ifdef CONFIG_COMPACTION |
18 | extern int sysctl_compact_memory; | 15 | extern int sysctl_compact_memory; |
19 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, | 16 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, |
@@ -28,8 +25,7 @@ extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | |||
28 | bool sync); | 25 | bool sync); |
29 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 26 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
30 | extern unsigned long compact_zone_order(struct zone *zone, int order, | 27 | extern unsigned long compact_zone_order(struct zone *zone, int order, |
31 | gfp_t gfp_mask, bool sync, | 28 | gfp_t gfp_mask, bool sync); |
32 | int compact_mode); | ||
33 | 29 | ||
34 | /* Do not skip compaction more than 64 times */ | 30 | /* Do not skip compaction more than 64 times */ |
35 | #define COMPACT_MAX_DEFER_SHIFT 6 | 31 | #define COMPACT_MAX_DEFER_SHIFT 6 |
@@ -74,8 +70,7 @@ static inline unsigned long compaction_suitable(struct zone *zone, int order) | |||
74 | } | 70 | } |
75 | 71 | ||
76 | static inline unsigned long compact_zone_order(struct zone *zone, int order, | 72 | static inline unsigned long compact_zone_order(struct zone *zone, int order, |
77 | gfp_t gfp_mask, bool sync, | 73 | gfp_t gfp_mask, bool sync) |
78 | int compact_mode) | ||
79 | { | 74 | { |
80 | return COMPACT_CONTINUE; | 75 | return COMPACT_CONTINUE; |
81 | } | 76 | } |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 16508bcddacc..cb4c1eb7778e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -92,3 +92,11 @@ | |||
92 | #if !defined(__noclone) | 92 | #if !defined(__noclone) |
93 | #define __noclone /* not needed */ | 93 | #define __noclone /* not needed */ |
94 | #endif | 94 | #endif |
95 | |||
96 | /* | ||
97 | * A trick to suppress uninitialized variable warning without generating any | ||
98 | * code | ||
99 | */ | ||
100 | #define uninitialized_var(x) x = x | ||
101 | |||
102 | #define __always_inline inline __attribute__((always_inline)) | ||
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index b721129e0469..37d412436d0f 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -21,11 +21,3 @@ | |||
21 | # error "GCOV profiling support for gcc versions below 3.4 not included" | 21 | # error "GCOV profiling support for gcc versions below 3.4 not included" |
22 | # endif /* __GNUC_MINOR__ */ | 22 | # endif /* __GNUC_MINOR__ */ |
23 | #endif /* CONFIG_GCOV_KERNEL */ | 23 | #endif /* CONFIG_GCOV_KERNEL */ |
24 | |||
25 | /* | ||
26 | * A trick to suppress uninitialized variable warning without generating any | ||
27 | * code | ||
28 | */ | ||
29 | #define uninitialized_var(x) x = x | ||
30 | |||
31 | #define __always_inline inline __attribute__((always_inline)) | ||
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index fcfa5b9a4317..64b7c003fd7a 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -12,13 +12,6 @@ | |||
12 | #define __used __attribute__((__used__)) | 12 | #define __used __attribute__((__used__)) |
13 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
15 | #define __always_inline inline __attribute__((always_inline)) | ||
16 | |||
17 | /* | ||
18 | * A trick to suppress uninitialized variable warning without generating any | ||
19 | * code | ||
20 | */ | ||
21 | #define uninitialized_var(x) x = x | ||
22 | 15 | ||
23 | #if __GNUC_MINOR__ >= 3 | 16 | #if __GNUC_MINOR__ >= 3 |
24 | /* Mark functions as cold. gcc will assume any path leading to a call | 17 | /* Mark functions as cold. gcc will assume any path leading to a call |
@@ -53,7 +46,6 @@ | |||
53 | #define __noclone __attribute__((__noclone__)) | 46 | #define __noclone __attribute__((__noclone__)) |
54 | 47 | ||
55 | #endif | 48 | #endif |
56 | |||
57 | #endif | 49 | #endif |
58 | 50 | ||
59 | #if __GNUC_MINOR__ > 0 | 51 | #if __GNUC_MINOR__ > 0 |
diff --git a/include/linux/crc32.h b/include/linux/crc32.h index e20dd1f9b40a..391a259b2cc9 100644 --- a/include/linux/crc32.h +++ b/include/linux/crc32.h | |||
@@ -11,7 +11,7 @@ | |||
11 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); | 11 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); |
12 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); | 12 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); |
13 | 13 | ||
14 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length) | 14 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length) |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Helpers for hash table generation of ethernet nics: | 17 | * Helpers for hash table generation of ethernet nics: |
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h index c8aad713a046..6998d9376ef9 100644 --- a/include/linux/dw_dmac.h +++ b/include/linux/dw_dmac.h | |||
@@ -16,9 +16,18 @@ | |||
16 | /** | 16 | /** |
17 | * struct dw_dma_platform_data - Controller configuration parameters | 17 | * struct dw_dma_platform_data - Controller configuration parameters |
18 | * @nr_channels: Number of channels supported by hardware (max 8) | 18 | * @nr_channels: Number of channels supported by hardware (max 8) |
19 | * @is_private: The device channels should be marked as private and not for | ||
20 | * by the general purpose DMA channel allocator. | ||
19 | */ | 21 | */ |
20 | struct dw_dma_platform_data { | 22 | struct dw_dma_platform_data { |
21 | unsigned int nr_channels; | 23 | unsigned int nr_channels; |
24 | bool is_private; | ||
25 | #define CHAN_ALLOCATION_ASCENDING 0 /* zero to seven */ | ||
26 | #define CHAN_ALLOCATION_DESCENDING 1 /* seven to zero */ | ||
27 | unsigned char chan_allocation_order; | ||
28 | #define CHAN_PRIORITY_ASCENDING 0 /* chan0 highest */ | ||
29 | #define CHAN_PRIORITY_DESCENDING 1 /* chan7 highest */ | ||
30 | unsigned char chan_priority; | ||
22 | }; | 31 | }; |
23 | 32 | ||
24 | /** | 33 | /** |
@@ -33,6 +42,30 @@ enum dw_dma_slave_width { | |||
33 | DW_DMA_SLAVE_WIDTH_32BIT, | 42 | DW_DMA_SLAVE_WIDTH_32BIT, |
34 | }; | 43 | }; |
35 | 44 | ||
45 | /* bursts size */ | ||
46 | enum dw_dma_msize { | ||
47 | DW_DMA_MSIZE_1, | ||
48 | DW_DMA_MSIZE_4, | ||
49 | DW_DMA_MSIZE_8, | ||
50 | DW_DMA_MSIZE_16, | ||
51 | DW_DMA_MSIZE_32, | ||
52 | DW_DMA_MSIZE_64, | ||
53 | DW_DMA_MSIZE_128, | ||
54 | DW_DMA_MSIZE_256, | ||
55 | }; | ||
56 | |||
57 | /* flow controller */ | ||
58 | enum dw_dma_fc { | ||
59 | DW_DMA_FC_D_M2M, | ||
60 | DW_DMA_FC_D_M2P, | ||
61 | DW_DMA_FC_D_P2M, | ||
62 | DW_DMA_FC_D_P2P, | ||
63 | DW_DMA_FC_P_P2M, | ||
64 | DW_DMA_FC_SP_P2P, | ||
65 | DW_DMA_FC_P_M2P, | ||
66 | DW_DMA_FC_DP_P2P, | ||
67 | }; | ||
68 | |||
36 | /** | 69 | /** |
37 | * struct dw_dma_slave - Controller-specific information about a slave | 70 | * struct dw_dma_slave - Controller-specific information about a slave |
38 | * | 71 | * |
@@ -44,6 +77,11 @@ enum dw_dma_slave_width { | |||
44 | * @reg_width: peripheral register width | 77 | * @reg_width: peripheral register width |
45 | * @cfg_hi: Platform-specific initializer for the CFG_HI register | 78 | * @cfg_hi: Platform-specific initializer for the CFG_HI register |
46 | * @cfg_lo: Platform-specific initializer for the CFG_LO register | 79 | * @cfg_lo: Platform-specific initializer for the CFG_LO register |
80 | * @src_master: src master for transfers on allocated channel. | ||
81 | * @dst_master: dest master for transfers on allocated channel. | ||
82 | * @src_msize: src burst size. | ||
83 | * @dst_msize: dest burst size. | ||
84 | * @fc: flow controller for DMA transfer | ||
47 | */ | 85 | */ |
48 | struct dw_dma_slave { | 86 | struct dw_dma_slave { |
49 | struct device *dma_dev; | 87 | struct device *dma_dev; |
@@ -52,6 +90,11 @@ struct dw_dma_slave { | |||
52 | enum dw_dma_slave_width reg_width; | 90 | enum dw_dma_slave_width reg_width; |
53 | u32 cfg_hi; | 91 | u32 cfg_hi; |
54 | u32 cfg_lo; | 92 | u32 cfg_lo; |
93 | u8 src_master; | ||
94 | u8 dst_master; | ||
95 | u8 src_msize; | ||
96 | u8 dst_msize; | ||
97 | u8 fc; | ||
55 | }; | 98 | }; |
56 | 99 | ||
57 | /* Platform-configurable bits in CFG_HI */ | 100 | /* Platform-configurable bits in CFG_HI */ |
@@ -62,7 +105,6 @@ struct dw_dma_slave { | |||
62 | #define DWC_CFGH_DST_PER(x) ((x) << 11) | 105 | #define DWC_CFGH_DST_PER(x) ((x) << 11) |
63 | 106 | ||
64 | /* Platform-configurable bits in CFG_LO */ | 107 | /* Platform-configurable bits in CFG_LO */ |
65 | #define DWC_CFGL_PRIO(x) ((x) << 5) /* priority */ | ||
66 | #define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */ | 108 | #define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */ |
67 | #define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) | 109 | #define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) |
68 | #define DWC_CFGL_LOCK_CH_XACT (2 << 12) | 110 | #define DWC_CFGL_LOCK_CH_XACT (2 << 12) |
diff --git a/include/linux/err.h b/include/linux/err.h index 448afc12c78a..f2edce25a76b 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -52,6 +52,14 @@ static inline void * __must_check ERR_CAST(const void *ptr) | |||
52 | return (void *) ptr; | 52 | return (void *) ptr; |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline int __must_check PTR_RET(const void *ptr) | ||
56 | { | ||
57 | if (IS_ERR(ptr)) | ||
58 | return PTR_ERR(ptr); | ||
59 | else | ||
60 | return 0; | ||
61 | } | ||
62 | |||
55 | #endif | 63 | #endif |
56 | 64 | ||
57 | #endif /* _LINUX_ERR_H */ | 65 | #endif /* _LINUX_ERR_H */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index aac3e2eeb4fd..b297f288f6eb 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -13,6 +13,9 @@ | |||
13 | #ifndef _LINUX_ETHTOOL_H | 13 | #ifndef _LINUX_ETHTOOL_H |
14 | #define _LINUX_ETHTOOL_H | 14 | #define _LINUX_ETHTOOL_H |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | #include <linux/compat.h> | ||
18 | #endif | ||
16 | #include <linux/types.h> | 19 | #include <linux/types.h> |
17 | #include <linux/if_ether.h> | 20 | #include <linux/if_ether.h> |
18 | 21 | ||
@@ -450,6 +453,37 @@ struct ethtool_rxnfc { | |||
450 | __u32 rule_locs[0]; | 453 | __u32 rule_locs[0]; |
451 | }; | 454 | }; |
452 | 455 | ||
456 | #ifdef __KERNEL__ | ||
457 | #ifdef CONFIG_COMPAT | ||
458 | |||
459 | struct compat_ethtool_rx_flow_spec { | ||
460 | u32 flow_type; | ||
461 | union { | ||
462 | struct ethtool_tcpip4_spec tcp_ip4_spec; | ||
463 | struct ethtool_tcpip4_spec udp_ip4_spec; | ||
464 | struct ethtool_tcpip4_spec sctp_ip4_spec; | ||
465 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
466 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
467 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
468 | struct ethhdr ether_spec; | ||
469 | u8 hdata[72]; | ||
470 | } h_u, m_u; | ||
471 | compat_u64 ring_cookie; | ||
472 | u32 location; | ||
473 | }; | ||
474 | |||
475 | struct compat_ethtool_rxnfc { | ||
476 | u32 cmd; | ||
477 | u32 flow_type; | ||
478 | compat_u64 data; | ||
479 | struct compat_ethtool_rx_flow_spec fs; | ||
480 | u32 rule_cnt; | ||
481 | u32 rule_locs[0]; | ||
482 | }; | ||
483 | |||
484 | #endif /* CONFIG_COMPAT */ | ||
485 | #endif /* __KERNEL__ */ | ||
486 | |||
453 | /** | 487 | /** |
454 | * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection | 488 | * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection |
455 | * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR | 489 | * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7061a8587ee3..12529e966350 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -662,9 +662,9 @@ struct address_space { | |||
662 | 662 | ||
663 | struct block_device { | 663 | struct block_device { |
664 | dev_t bd_dev; /* not a kdev_t - it's a search key */ | 664 | dev_t bd_dev; /* not a kdev_t - it's a search key */ |
665 | int bd_openers; | ||
665 | struct inode * bd_inode; /* will die */ | 666 | struct inode * bd_inode; /* will die */ |
666 | struct super_block * bd_super; | 667 | struct super_block * bd_super; |
667 | int bd_openers; | ||
668 | struct mutex bd_mutex; /* open/close mutex */ | 668 | struct mutex bd_mutex; /* open/close mutex */ |
669 | struct list_head bd_inodes; | 669 | struct list_head bd_inodes; |
670 | void * bd_claiming; | 670 | void * bd_claiming; |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index dca31761b311..bfb8f934521e 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -35,6 +35,7 @@ struct vm_area_struct; | |||
35 | #define ___GFP_NOTRACK 0 | 35 | #define ___GFP_NOTRACK 0 |
36 | #endif | 36 | #endif |
37 | #define ___GFP_NO_KSWAPD 0x400000u | 37 | #define ___GFP_NO_KSWAPD 0x400000u |
38 | #define ___GFP_OTHER_NODE 0x800000u | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * GFP bitmasks.. | 41 | * GFP bitmasks.. |
@@ -83,6 +84,7 @@ struct vm_area_struct; | |||
83 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ | 84 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ |
84 | 85 | ||
85 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) | 86 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) |
87 | #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */ | ||
86 | 88 | ||
87 | /* | 89 | /* |
88 | * This may seem redundant, but it's a way of annotating false positives vs. | 90 | * This may seem redundant, but it's a way of annotating false positives vs. |
diff --git a/include/linux/i2c/pxa-i2c.h b/include/linux/i2c/pxa-i2c.h new file mode 100644 index 000000000000..1a9f65e6ec0f --- /dev/null +++ b/include/linux/i2c/pxa-i2c.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * i2c_pxa.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intrinsyc Software Inc. | ||
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 _I2C_PXA_H_ | ||
12 | #define _I2C_PXA_H_ | ||
13 | |||
14 | #if 0 | ||
15 | #define DEF_TIMEOUT 3 | ||
16 | #else | ||
17 | /* need a longer timeout if we're dealing with the fact we may well be | ||
18 | * looking at a multi-master environment | ||
19 | */ | ||
20 | #define DEF_TIMEOUT 32 | ||
21 | #endif | ||
22 | |||
23 | #define BUS_ERROR (-EREMOTEIO) | ||
24 | #define XFER_NAKED (-ECONNREFUSED) | ||
25 | #define I2C_RETRY (-2000) /* an error has occurred retry transmit */ | ||
26 | |||
27 | /* ICR initialize bit values | ||
28 | * | ||
29 | * 15. FM 0 (100 Khz operation) | ||
30 | * 14. UR 0 (No unit reset) | ||
31 | * 13. SADIE 0 (Disables the unit from interrupting on slave addresses | ||
32 | * matching its slave address) | ||
33 | * 12. ALDIE 0 (Disables the unit from interrupt when it loses arbitration | ||
34 | * in master mode) | ||
35 | * 11. SSDIE 0 (Disables interrupts from a slave stop detected, in slave mode) | ||
36 | * 10. BEIE 1 (Enable interrupts from detected bus errors, no ACK sent) | ||
37 | * 9. IRFIE 1 (Enable interrupts from full buffer received) | ||
38 | * 8. ITEIE 1 (Enables the I2C unit to interrupt when transmit buffer empty) | ||
39 | * 7. GCD 1 (Disables i2c unit response to general call messages as a slave) | ||
40 | * 6. IUE 0 (Disable unit until we change settings) | ||
41 | * 5. SCLE 1 (Enables the i2c clock output for master mode (drives SCL) | ||
42 | * 4. MA 0 (Only send stop with the ICR stop bit) | ||
43 | * 3. TB 0 (We are not transmitting a byte initially) | ||
44 | * 2. ACKNAK 0 (Send an ACK after the unit receives a byte) | ||
45 | * 1. STOP 0 (Do not send a STOP) | ||
46 | * 0. START 0 (Do not send a START) | ||
47 | * | ||
48 | */ | ||
49 | #define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE) | ||
50 | |||
51 | /* I2C status register init values | ||
52 | * | ||
53 | * 10. BED 1 (Clear bus error detected) | ||
54 | * 9. SAD 1 (Clear slave address detected) | ||
55 | * 7. IRF 1 (Clear IDBR Receive Full) | ||
56 | * 6. ITE 1 (Clear IDBR Transmit Empty) | ||
57 | * 5. ALD 1 (Clear Arbitration Loss Detected) | ||
58 | * 4. SSD 1 (Clear Slave Stop Detected) | ||
59 | */ | ||
60 | #define I2C_ISR_INIT 0x7FF /* status register init */ | ||
61 | |||
62 | struct i2c_slave_client; | ||
63 | |||
64 | struct i2c_pxa_platform_data { | ||
65 | unsigned int slave_addr; | ||
66 | struct i2c_slave_client *slave; | ||
67 | unsigned int class; | ||
68 | unsigned int use_pio :1; | ||
69 | unsigned int fast_mode :1; | ||
70 | }; | ||
71 | |||
72 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); | ||
73 | |||
74 | #ifdef CONFIG_PXA27x | ||
75 | extern void pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
76 | #endif | ||
77 | |||
78 | #ifdef CONFIG_PXA3xx | ||
79 | extern void pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
80 | #endif | ||
81 | |||
82 | #endif | ||
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index fcef103aa3f6..c9ad38322576 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -114,14 +114,14 @@ struct pppol2tp_ioc_stats { | |||
114 | __u16 tunnel_id; /* redundant */ | 114 | __u16 tunnel_id; /* redundant */ |
115 | __u16 session_id; /* if zero, get tunnel stats */ | 115 | __u16 session_id; /* if zero, get tunnel stats */ |
116 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ | 116 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ |
117 | aligned_u64 tx_packets; | 117 | __aligned_u64 tx_packets; |
118 | aligned_u64 tx_bytes; | 118 | __aligned_u64 tx_bytes; |
119 | aligned_u64 tx_errors; | 119 | __aligned_u64 tx_errors; |
120 | aligned_u64 rx_packets; | 120 | __aligned_u64 rx_packets; |
121 | aligned_u64 rx_bytes; | 121 | __aligned_u64 rx_bytes; |
122 | aligned_u64 rx_seq_discards; | 122 | __aligned_u64 rx_seq_discards; |
123 | aligned_u64 rx_oos_packets; | 123 | __aligned_u64 rx_oos_packets; |
124 | aligned_u64 rx_errors; | 124 | __aligned_u64 rx_errors; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | #define ifr__name b.ifr_ifrn.ifrn_name | 127 | #define ifr__name b.ifr_ifrn.ifrn_name |
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 4b0761cc7dd9..ec2d17bc1f1e 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -159,7 +159,7 @@ static inline void con_schedule_flip(struct tty_struct *t) | |||
159 | if (t->buf.tail != NULL) | 159 | if (t->buf.tail != NULL) |
160 | t->buf.tail->commit = t->buf.tail->used; | 160 | t->buf.tail->commit = t->buf.tail->used; |
161 | spin_unlock_irqrestore(&t->buf.lock, flags); | 161 | spin_unlock_irqrestore(&t->buf.lock, flags); |
162 | schedule_delayed_work(&t->buf.work, 0); | 162 | schedule_work(&t->buf.work); |
163 | } | 163 | } |
164 | 164 | ||
165 | #endif | 165 | #endif |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2fe6e84894a4..00cec4dc0ae2 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -187,14 +187,76 @@ NORET_TYPE void do_exit(long error_code) | |||
187 | ATTRIB_NORET; | 187 | ATTRIB_NORET; |
188 | NORET_TYPE void complete_and_exit(struct completion *, long) | 188 | NORET_TYPE void complete_and_exit(struct completion *, long) |
189 | ATTRIB_NORET; | 189 | ATTRIB_NORET; |
190 | |||
191 | /* Internal, do not use. */ | ||
192 | int __must_check _kstrtoul(const char *s, unsigned int base, unsigned long *res); | ||
193 | int __must_check _kstrtol(const char *s, unsigned int base, long *res); | ||
194 | |||
195 | int __must_check kstrtoull(const char *s, unsigned int base, unsigned long long *res); | ||
196 | int __must_check kstrtoll(const char *s, unsigned int base, long long *res); | ||
197 | static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res) | ||
198 | { | ||
199 | /* | ||
200 | * We want to shortcut function call, but | ||
201 | * __builtin_types_compatible_p(unsigned long, unsigned long long) = 0. | ||
202 | */ | ||
203 | if (sizeof(unsigned long) == sizeof(unsigned long long) && | ||
204 | __alignof__(unsigned long) == __alignof__(unsigned long long)) | ||
205 | return kstrtoull(s, base, (unsigned long long *)res); | ||
206 | else | ||
207 | return _kstrtoul(s, base, res); | ||
208 | } | ||
209 | |||
210 | static inline int __must_check kstrtol(const char *s, unsigned int base, long *res) | ||
211 | { | ||
212 | /* | ||
213 | * We want to shortcut function call, but | ||
214 | * __builtin_types_compatible_p(long, long long) = 0. | ||
215 | */ | ||
216 | if (sizeof(long) == sizeof(long long) && | ||
217 | __alignof__(long) == __alignof__(long long)) | ||
218 | return kstrtoll(s, base, (long long *)res); | ||
219 | else | ||
220 | return _kstrtol(s, base, res); | ||
221 | } | ||
222 | |||
223 | int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res); | ||
224 | int __must_check kstrtoint(const char *s, unsigned int base, int *res); | ||
225 | |||
226 | static inline int __must_check kstrtou64(const char *s, unsigned int base, u64 *res) | ||
227 | { | ||
228 | return kstrtoull(s, base, res); | ||
229 | } | ||
230 | |||
231 | static inline int __must_check kstrtos64(const char *s, unsigned int base, s64 *res) | ||
232 | { | ||
233 | return kstrtoll(s, base, res); | ||
234 | } | ||
235 | |||
236 | static inline int __must_check kstrtou32(const char *s, unsigned int base, u32 *res) | ||
237 | { | ||
238 | return kstrtouint(s, base, res); | ||
239 | } | ||
240 | |||
241 | static inline int __must_check kstrtos32(const char *s, unsigned int base, s32 *res) | ||
242 | { | ||
243 | return kstrtoint(s, base, res); | ||
244 | } | ||
245 | |||
246 | int __must_check kstrtou16(const char *s, unsigned int base, u16 *res); | ||
247 | int __must_check kstrtos16(const char *s, unsigned int base, s16 *res); | ||
248 | int __must_check kstrtou8(const char *s, unsigned int base, u8 *res); | ||
249 | int __must_check kstrtos8(const char *s, unsigned int base, s8 *res); | ||
250 | |||
190 | extern unsigned long simple_strtoul(const char *,char **,unsigned int); | 251 | extern unsigned long simple_strtoul(const char *,char **,unsigned int); |
191 | extern long simple_strtol(const char *,char **,unsigned int); | 252 | extern long simple_strtol(const char *,char **,unsigned int); |
192 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); | 253 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); |
193 | extern long long simple_strtoll(const char *,char **,unsigned int); | 254 | extern long long simple_strtoll(const char *,char **,unsigned int); |
194 | extern int __must_check strict_strtoul(const char *, unsigned int, unsigned long *); | 255 | #define strict_strtoul kstrtoul |
195 | extern int __must_check strict_strtol(const char *, unsigned int, long *); | 256 | #define strict_strtol kstrtol |
196 | extern int __must_check strict_strtoull(const char *, unsigned int, unsigned long long *); | 257 | #define strict_strtoull kstrtoull |
197 | extern int __must_check strict_strtoll(const char *, unsigned int, long long *); | 258 | #define strict_strtoll kstrtoll |
259 | |||
198 | extern int sprintf(char * buf, const char * fmt, ...) | 260 | extern int sprintf(char * buf, const char * fmt, ...) |
199 | __attribute__ ((format (printf, 2, 3))); | 261 | __attribute__ ((format (printf, 2, 3))); |
200 | extern int vsprintf(char *buf, const char *, va_list) | 262 | extern int vsprintf(char *buf, const char *, va_list) |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 7ff16f7d3ed4..1e923e5e88e8 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -4,10 +4,15 @@ | |||
4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | 6 | ||
7 | struct task_struct *kthread_create(int (*threadfn)(void *data), | 7 | struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), |
8 | void *data, | 8 | void *data, |
9 | const char namefmt[], ...) | 9 | int node, |
10 | __attribute__((format(printf, 3, 4))); | 10 | const char namefmt[], ...) |
11 | __attribute__((format(printf, 4, 5))); | ||
12 | |||
13 | #define kthread_create(threadfn, data, namefmt, arg...) \ | ||
14 | kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) | ||
15 | |||
11 | 16 | ||
12 | /** | 17 | /** |
13 | * kthread_run - create and wake a thread. | 18 | * kthread_run - create and wake a thread. |
@@ -34,6 +39,7 @@ void *kthread_data(struct task_struct *k); | |||
34 | 39 | ||
35 | int kthreadd(void *unused); | 40 | int kthreadd(void *unused); |
36 | extern struct task_struct *kthreadd_task; | 41 | extern struct task_struct *kthreadd_task; |
42 | extern int tsk_fork_get_node(struct task_struct *tsk); | ||
37 | 43 | ||
38 | /* | 44 | /* |
39 | * Simple work processor based on kthread. | 45 | * Simple work processor based on kthread. |
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h new file mode 100644 index 000000000000..bb69d20da0dc --- /dev/null +++ b/include/linux/led-lm3530.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 ST-Ericsson SA. | ||
3 | * Copyright (C) 2009 Motorola, Inc. | ||
4 | * | ||
5 | * License Terms: GNU General Public License v2 | ||
6 | * | ||
7 | * Simple driver for National Semiconductor LM35330 Backlight driver chip | ||
8 | * | ||
9 | * Author: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com> | ||
10 | * based on leds-lm3530.c by Dan Murphy <D.Murphy@motorola.com> | ||
11 | */ | ||
12 | |||
13 | #ifndef _LINUX_LED_LM3530_H__ | ||
14 | #define _LINUX_LED_LM3530_H__ | ||
15 | |||
16 | #define LM3530_FS_CURR_5mA (0) /* Full Scale Current */ | ||
17 | #define LM3530_FS_CURR_8mA (1) | ||
18 | #define LM3530_FS_CURR_12mA (2) | ||
19 | #define LM3530_FS_CURR_15mA (3) | ||
20 | #define LM3530_FS_CURR_19mA (4) | ||
21 | #define LM3530_FS_CURR_22mA (5) | ||
22 | #define LM3530_FS_CURR_26mA (6) | ||
23 | #define LM3530_FS_CURR_29mA (7) | ||
24 | |||
25 | #define LM3530_ALS_AVRG_TIME_32ms (0) /* ALS Averaging Time */ | ||
26 | #define LM3530_ALS_AVRG_TIME_64ms (1) | ||
27 | #define LM3530_ALS_AVRG_TIME_128ms (2) | ||
28 | #define LM3530_ALS_AVRG_TIME_256ms (3) | ||
29 | #define LM3530_ALS_AVRG_TIME_512ms (4) | ||
30 | #define LM3530_ALS_AVRG_TIME_1024ms (5) | ||
31 | #define LM3530_ALS_AVRG_TIME_2048ms (6) | ||
32 | #define LM3530_ALS_AVRG_TIME_4096ms (7) | ||
33 | |||
34 | #define LM3530_RAMP_TIME_1ms (0) /* Brigtness Ramp Time */ | ||
35 | #define LM3530_RAMP_TIME_130ms (1) /* Max to 0 and vice versa */ | ||
36 | #define LM3530_RAMP_TIME_260ms (2) | ||
37 | #define LM3530_RAMP_TIME_520ms (3) | ||
38 | #define LM3530_RAMP_TIME_1s (4) | ||
39 | #define LM3530_RAMP_TIME_2s (5) | ||
40 | #define LM3530_RAMP_TIME_4s (6) | ||
41 | #define LM3530_RAMP_TIME_8s (7) | ||
42 | |||
43 | /* ALS Resistor Select */ | ||
44 | #define LM3530_ALS_IMPD_Z (0x00) /* ALS Impedence */ | ||
45 | #define LM3530_ALS_IMPD_13_53kOhm (0x01) | ||
46 | #define LM3530_ALS_IMPD_9_01kOhm (0x02) | ||
47 | #define LM3530_ALS_IMPD_5_41kOhm (0x03) | ||
48 | #define LM3530_ALS_IMPD_2_27kOhm (0x04) | ||
49 | #define LM3530_ALS_IMPD_1_94kOhm (0x05) | ||
50 | #define LM3530_ALS_IMPD_1_81kOhm (0x06) | ||
51 | #define LM3530_ALS_IMPD_1_6kOhm (0x07) | ||
52 | #define LM3530_ALS_IMPD_1_138kOhm (0x08) | ||
53 | #define LM3530_ALS_IMPD_1_05kOhm (0x09) | ||
54 | #define LM3530_ALS_IMPD_1_011kOhm (0x0A) | ||
55 | #define LM3530_ALS_IMPD_941Ohm (0x0B) | ||
56 | #define LM3530_ALS_IMPD_759Ohm (0x0C) | ||
57 | #define LM3530_ALS_IMPD_719Ohm (0x0D) | ||
58 | #define LM3530_ALS_IMPD_700Ohm (0x0E) | ||
59 | #define LM3530_ALS_IMPD_667Ohm (0x0F) | ||
60 | |||
61 | enum lm3530_mode { | ||
62 | LM3530_BL_MODE_MANUAL = 0, /* "man" */ | ||
63 | LM3530_BL_MODE_ALS, /* "als" */ | ||
64 | LM3530_BL_MODE_PWM, /* "pwm" */ | ||
65 | }; | ||
66 | |||
67 | /* ALS input select */ | ||
68 | enum lm3530_als_mode { | ||
69 | LM3530_INPUT_AVRG = 0, /* ALS1 and ALS2 input average */ | ||
70 | LM3530_INPUT_ALS1, /* ALS1 Input */ | ||
71 | LM3530_INPUT_ALS2, /* ALS2 Input */ | ||
72 | LM3530_INPUT_CEIL, /* Max of ALS1 and ALS2 */ | ||
73 | }; | ||
74 | |||
75 | /** | ||
76 | * struct lm3530_platform_data | ||
77 | * @mode: mode of operation i.e. Manual, ALS or PWM | ||
78 | * @als_input_mode: select source of ALS input - ALS1/2 or average | ||
79 | * @max_current: full scale LED current | ||
80 | * @pwm_pol_hi: PWM input polarity - active high/active low | ||
81 | * @als_avrg_time: ALS input averaging time | ||
82 | * @brt_ramp_law: brightness mapping mode - exponential/linear | ||
83 | * @brt_ramp_fall: rate of fall of led current | ||
84 | * @brt_ramp_rise: rate of rise of led current | ||
85 | * @als1_resistor_sel: internal resistance from ALS1 input to ground | ||
86 | * @als2_resistor_sel: internal resistance from ALS2 input to ground | ||
87 | * @brt_val: brightness value (0-255) | ||
88 | */ | ||
89 | struct lm3530_platform_data { | ||
90 | enum lm3530_mode mode; | ||
91 | enum lm3530_als_mode als_input_mode; | ||
92 | |||
93 | u8 max_current; | ||
94 | bool pwm_pol_hi; | ||
95 | u8 als_avrg_time; | ||
96 | |||
97 | bool brt_ramp_law; | ||
98 | u8 brt_ramp_fall; | ||
99 | u8 brt_ramp_rise; | ||
100 | |||
101 | u8 als1_resistor_sel; | ||
102 | u8 als2_resistor_sel; | ||
103 | |||
104 | u8 brt_val; | ||
105 | }; | ||
106 | |||
107 | #endif /* _LINUX_LED_LM3530_H__ */ | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index 0f19df9e37b0..383811d9af83 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -194,11 +194,11 @@ struct gpio_led { | |||
194 | 194 | ||
195 | struct gpio_led_platform_data { | 195 | struct gpio_led_platform_data { |
196 | int num_leds; | 196 | int num_leds; |
197 | struct gpio_led *leds; | 197 | const struct gpio_led *leds; |
198 | 198 | ||
199 | #define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */ | 199 | #define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */ |
200 | #define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */ | 200 | #define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */ |
201 | #define GPIO_LED_BLINK 2 /* Plase, blink */ | 201 | #define GPIO_LED_BLINK 2 /* Please, blink */ |
202 | int (*gpio_blink_set)(unsigned gpio, int state, | 202 | int (*gpio_blink_set)(unsigned gpio, int state, |
203 | unsigned long *delay_on, | 203 | unsigned long *delay_on, |
204 | unsigned long *delay_off); | 204 | unsigned long *delay_off); |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index f512e189be5a..5bb7be2628ca 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -62,6 +62,7 @@ extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | |||
62 | gfp_t gfp_mask); | 62 | gfp_t gfp_mask); |
63 | extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru); | 63 | extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru); |
64 | extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru); | 64 | extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru); |
65 | extern void mem_cgroup_rotate_reclaimable_page(struct page *page); | ||
65 | extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru); | 66 | extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru); |
66 | extern void mem_cgroup_del_lru(struct page *page); | 67 | extern void mem_cgroup_del_lru(struct page *page); |
67 | extern void mem_cgroup_move_lists(struct page *page, | 68 | extern void mem_cgroup_move_lists(struct page *page, |
@@ -96,7 +97,7 @@ extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem); | |||
96 | 97 | ||
97 | extern int | 98 | extern int |
98 | mem_cgroup_prepare_migration(struct page *page, | 99 | mem_cgroup_prepare_migration(struct page *page, |
99 | struct page *newpage, struct mem_cgroup **ptr); | 100 | struct page *newpage, struct mem_cgroup **ptr, gfp_t gfp_mask); |
100 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | 101 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, |
101 | struct page *oldpage, struct page *newpage, bool migration_ok); | 102 | struct page *oldpage, struct page *newpage, bool migration_ok); |
102 | 103 | ||
@@ -211,6 +212,11 @@ static inline void mem_cgroup_del_lru_list(struct page *page, int lru) | |||
211 | return ; | 212 | return ; |
212 | } | 213 | } |
213 | 214 | ||
215 | static inline inline void mem_cgroup_rotate_reclaimable_page(struct page *page) | ||
216 | { | ||
217 | return ; | ||
218 | } | ||
219 | |||
214 | static inline void mem_cgroup_rotate_lru_list(struct page *page, int lru) | 220 | static inline void mem_cgroup_rotate_lru_list(struct page *page, int lru) |
215 | { | 221 | { |
216 | return ; | 222 | return ; |
@@ -249,7 +255,7 @@ static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem) | |||
249 | 255 | ||
250 | static inline int | 256 | static inline int |
251 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | 257 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, |
252 | struct mem_cgroup **ptr) | 258 | struct mem_cgroup **ptr, gfp_t gfp_mask) |
253 | { | 259 | { |
254 | return 0; | 260 | return 0; |
255 | } | 261 | } |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 581703d86fbd..294104e0891d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -151,6 +151,7 @@ extern pgprot_t protection_map[16]; | |||
151 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ | 151 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ |
152 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ | 152 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ |
153 | #define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */ | 153 | #define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */ |
154 | #define FAULT_FLAG_RETRY_NOWAIT 0x10 /* Don't drop mmap_sem and wait when retrying */ | ||
154 | 155 | ||
155 | /* | 156 | /* |
156 | * This interface is used by x86 PAT code to identify a pfn mapping that is | 157 | * This interface is used by x86 PAT code to identify a pfn mapping that is |
@@ -859,7 +860,14 @@ extern void pagefault_out_of_memory(void); | |||
859 | 860 | ||
860 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) | 861 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) |
861 | 862 | ||
863 | /* | ||
864 | * Flags passed to __show_mem() and __show_free_areas() to suppress output in | ||
865 | * various contexts. | ||
866 | */ | ||
867 | #define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */ | ||
868 | |||
862 | extern void show_free_areas(void); | 869 | extern void show_free_areas(void); |
870 | extern void __show_free_areas(unsigned int flags); | ||
863 | 871 | ||
864 | int shmem_lock(struct file *file, int lock, struct user_struct *user); | 872 | int shmem_lock(struct file *file, int lock, struct user_struct *user); |
865 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); | 873 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); |
@@ -906,6 +914,9 @@ unsigned long unmap_vmas(struct mmu_gather **tlb, | |||
906 | * @pgd_entry: if set, called for each non-empty PGD (top-level) entry | 914 | * @pgd_entry: if set, called for each non-empty PGD (top-level) entry |
907 | * @pud_entry: if set, called for each non-empty PUD (2nd-level) entry | 915 | * @pud_entry: if set, called for each non-empty PUD (2nd-level) entry |
908 | * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry | 916 | * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry |
917 | * this handler is required to be able to handle | ||
918 | * pmd_trans_huge() pmds. They may simply choose to | ||
919 | * split_huge_page() instead of handling it explicitly. | ||
909 | * @pte_entry: if set, called for each non-empty PTE (4th-level) entry | 920 | * @pte_entry: if set, called for each non-empty PTE (4th-level) entry |
910 | * @pte_hole: if set, called for each hole at all levels | 921 | * @pte_hole: if set, called for each hole at all levels |
911 | * @hugetlb_entry: if set, called for each hugetlb entry | 922 | * @hugetlb_entry: if set, called for each hugetlb entry |
@@ -1348,6 +1359,7 @@ extern void calculate_zone_inactive_ratio(struct zone *zone); | |||
1348 | extern void mem_init(void); | 1359 | extern void mem_init(void); |
1349 | extern void __init mmap_init(void); | 1360 | extern void __init mmap_init(void); |
1350 | extern void show_mem(void); | 1361 | extern void show_mem(void); |
1362 | extern void __show_mem(unsigned int flags); | ||
1351 | extern void si_meminfo(struct sysinfo * val); | 1363 | extern void si_meminfo(struct sysinfo * val); |
1352 | extern void si_meminfo_node(struct sysinfo *val, int nid); | 1364 | extern void si_meminfo_node(struct sysinfo *val, int nid); |
1353 | extern int after_bootmem; | 1365 | extern int after_bootmem; |
@@ -1537,6 +1549,8 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address, | |||
1537 | #define FOLL_GET 0x04 /* do get_page on page */ | 1549 | #define FOLL_GET 0x04 /* do get_page on page */ |
1538 | #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ | 1550 | #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ |
1539 | #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ | 1551 | #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ |
1552 | #define FOLL_NOWAIT 0x20 /* if a disk transfer is needed, start the IO | ||
1553 | * and return without waiting upon it */ | ||
1540 | #define FOLL_MLOCK 0x40 /* mark page as mlocked */ | 1554 | #define FOLL_MLOCK 0x40 /* mark page as mlocked */ |
1541 | #define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */ | 1555 | #define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */ |
1542 | #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */ | 1556 | #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 26bc4e2cd275..02aa5619709b 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -237,8 +237,9 @@ struct mm_struct { | |||
237 | atomic_t mm_users; /* How many users with user space? */ | 237 | atomic_t mm_users; /* How many users with user space? */ |
238 | atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ | 238 | atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ |
239 | int map_count; /* number of VMAs */ | 239 | int map_count; /* number of VMAs */ |
240 | struct rw_semaphore mmap_sem; | 240 | |
241 | spinlock_t page_table_lock; /* Protects page tables and some counters */ | 241 | spinlock_t page_table_lock; /* Protects page tables and some counters */ |
242 | struct rw_semaphore mmap_sem; | ||
242 | 243 | ||
243 | struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung | 244 | struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung |
244 | * together off init_mm.mmlist, and are protected | 245 | * together off init_mm.mmlist, and are protected |
@@ -281,6 +282,9 @@ struct mm_struct { | |||
281 | unsigned int token_priority; | 282 | unsigned int token_priority; |
282 | unsigned int last_interval; | 283 | unsigned int last_interval; |
283 | 284 | ||
285 | /* How many tasks sharing this mm are OOM_DISABLE */ | ||
286 | atomic_t oom_disable_count; | ||
287 | |||
284 | unsigned long flags; /* Must use atomic bitops to access the bits */ | 288 | unsigned long flags; /* Must use atomic bitops to access the bits */ |
285 | 289 | ||
286 | struct core_state *core_state; /* coredumping support */ | 290 | struct core_state *core_state; /* coredumping support */ |
@@ -313,8 +317,6 @@ struct mm_struct { | |||
313 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 317 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
314 | pgtable_t pmd_huge_pte; /* protected by page_table_lock */ | 318 | pgtable_t pmd_huge_pte; /* protected by page_table_lock */ |
315 | #endif | 319 | #endif |
316 | /* How many tasks sharing this mm are OOM_DISABLE */ | ||
317 | atomic_t oom_disable_count; | ||
318 | }; | 320 | }; |
319 | 321 | ||
320 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ | 322 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ |
diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 3882a81a3b3c..5aebd170f899 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/include/linux/netfilter/ipset/ip_set_getport.h | |||
@@ -18,4 +18,14 @@ static inline bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, | |||
18 | extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, | 18 | extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, |
19 | __be16 *port); | 19 | __be16 *port); |
20 | 20 | ||
21 | static inline bool ip_set_proto_with_ports(u8 proto) | ||
22 | { | ||
23 | switch (proto) { | ||
24 | case IPPROTO_TCP: | ||
25 | case IPPROTO_UDP: | ||
26 | return true; | ||
27 | } | ||
28 | return false; | ||
29 | } | ||
30 | |||
21 | #endif /*_IP_SET_GETPORT_H*/ | 31 | #endif /*_IP_SET_GETPORT_H*/ |
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h index ea9b8d380527..90c2c9575bac 100644 --- a/include/linux/netfilter/nfnetlink_log.h +++ b/include/linux/netfilter/nfnetlink_log.h | |||
@@ -28,8 +28,8 @@ struct nfulnl_msg_packet_hw { | |||
28 | }; | 28 | }; |
29 | 29 | ||
30 | struct nfulnl_msg_packet_timestamp { | 30 | struct nfulnl_msg_packet_timestamp { |
31 | aligned_be64 sec; | 31 | __aligned_be64 sec; |
32 | aligned_be64 usec; | 32 | __aligned_be64 usec; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | enum nfulnl_attr_type { | 35 | enum nfulnl_attr_type { |
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h index 2455fe5f4e01..af94e0014ebd 100644 --- a/include/linux/netfilter/nfnetlink_queue.h +++ b/include/linux/netfilter/nfnetlink_queue.h | |||
@@ -25,8 +25,8 @@ struct nfqnl_msg_packet_hw { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | struct nfqnl_msg_packet_timestamp { | 27 | struct nfqnl_msg_packet_timestamp { |
28 | aligned_be64 sec; | 28 | __aligned_be64 sec; |
29 | aligned_be64 usec; | 29 | __aligned_be64 usec; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | enum nfqnl_attr_type { | 32 | enum nfqnl_attr_type { |
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h index 92fcbb0d193e..f1d6c15bd9e3 100644 --- a/include/linux/netfilter/xt_connbytes.h +++ b/include/linux/netfilter/xt_connbytes.h | |||
@@ -17,8 +17,8 @@ enum xt_connbytes_direction { | |||
17 | 17 | ||
18 | struct xt_connbytes_info { | 18 | struct xt_connbytes_info { |
19 | struct { | 19 | struct { |
20 | aligned_u64 from; /* count to be matched */ | 20 | __aligned_u64 from; /* count to be matched */ |
21 | aligned_u64 to; /* count to be matched */ | 21 | __aligned_u64 to; /* count to be matched */ |
22 | } count; | 22 | } count; |
23 | __u8 what; /* ipt_connbytes_what */ | 23 | __u8 what; /* ipt_connbytes_what */ |
24 | __u8 direction; /* ipt_connbytes_direction */ | 24 | __u8 direction; /* ipt_connbytes_direction */ |
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h index ca6e03e47a17..9314723f39ca 100644 --- a/include/linux/netfilter/xt_quota.h +++ b/include/linux/netfilter/xt_quota.h | |||
@@ -13,7 +13,7 @@ struct xt_quota_priv; | |||
13 | struct xt_quota_info { | 13 | struct xt_quota_info { |
14 | __u32 flags; | 14 | __u32 flags; |
15 | __u32 pad; | 15 | __u32 pad; |
16 | aligned_u64 quota; | 16 | __aligned_u64 quota; |
17 | 17 | ||
18 | /* Used internally by the kernel */ | 18 | /* Used internally by the kernel */ |
19 | struct xt_quota_priv *master; | 19 | struct xt_quota_priv *master; |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 0db8037e2725..811183de1ef5 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -196,7 +196,7 @@ static inline int __TestClearPage##uname(struct page *page) { return 0; } | |||
196 | 196 | ||
197 | struct page; /* forward declaration */ | 197 | struct page; /* forward declaration */ |
198 | 198 | ||
199 | TESTPAGEFLAG(Locked, locked) TESTSETFLAG(Locked, locked) | 199 | TESTPAGEFLAG(Locked, locked) |
200 | PAGEFLAG(Error, error) TESTCLEARFLAG(Error, error) | 200 | PAGEFLAG(Error, error) TESTCLEARFLAG(Error, error) |
201 | PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced) | 201 | PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced) |
202 | PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) | 202 | PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 9c66e994540f..29ebba54c238 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -455,8 +455,9 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping, | |||
455 | pgoff_t index, gfp_t gfp_mask); | 455 | pgoff_t index, gfp_t gfp_mask); |
456 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, | 456 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, |
457 | pgoff_t index, gfp_t gfp_mask); | 457 | pgoff_t index, gfp_t gfp_mask); |
458 | extern void remove_from_page_cache(struct page *page); | 458 | extern void delete_from_page_cache(struct page *page); |
459 | extern void __remove_from_page_cache(struct page *page); | 459 | extern void __delete_from_page_cache(struct page *page); |
460 | int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask); | ||
460 | 461 | ||
461 | /* | 462 | /* |
462 | * Like add_to_page_cache_locked, but used to add newly allocated pages: | 463 | * Like add_to_page_cache_locked, but used to add newly allocated pages: |
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index e031e1a486d9..5e3e25a3c9c3 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifndef __LINUX_PWM_BACKLIGHT_H | 4 | #ifndef __LINUX_PWM_BACKLIGHT_H |
5 | #define __LINUX_PWM_BACKLIGHT_H | 5 | #define __LINUX_PWM_BACKLIGHT_H |
6 | 6 | ||
7 | #include <linux/backlight.h> | ||
8 | |||
7 | struct platform_pwm_backlight_data { | 9 | struct platform_pwm_backlight_data { |
8 | int pwm_id; | 10 | int pwm_id; |
9 | unsigned int max_brightness; | 11 | unsigned int max_brightness; |
@@ -13,6 +15,7 @@ struct platform_pwm_backlight_data { | |||
13 | int (*init)(struct device *dev); | 15 | int (*init)(struct device *dev); |
14 | int (*notify)(struct device *dev, int brightness); | 16 | int (*notify)(struct device *dev, int brightness); |
15 | void (*exit)(struct device *dev); | 17 | void (*exit)(struct device *dev); |
18 | int (*check_fb)(struct device *dev, struct fb_info *info); | ||
16 | }; | 19 | }; |
17 | 20 | ||
18 | #endif | 21 | #endif |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index e9fd04ca1e51..830e65dc01ee 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -27,18 +27,15 @@ | |||
27 | struct anon_vma { | 27 | struct anon_vma { |
28 | struct anon_vma *root; /* Root of this anon_vma tree */ | 28 | struct anon_vma *root; /* Root of this anon_vma tree */ |
29 | spinlock_t lock; /* Serialize access to vma list */ | 29 | spinlock_t lock; /* Serialize access to vma list */ |
30 | #if defined(CONFIG_KSM) || defined(CONFIG_MIGRATION) | ||
31 | |||
32 | /* | 30 | /* |
33 | * The external_refcount is taken by either KSM or page migration | 31 | * The refcount is taken on an anon_vma when there is no |
34 | * to take a reference to an anon_vma when there is no | ||
35 | * guarantee that the vma of page tables will exist for | 32 | * guarantee that the vma of page tables will exist for |
36 | * the duration of the operation. A caller that takes | 33 | * the duration of the operation. A caller that takes |
37 | * the reference is responsible for clearing up the | 34 | * the reference is responsible for clearing up the |
38 | * anon_vma if they are the last user on release | 35 | * anon_vma if they are the last user on release |
39 | */ | 36 | */ |
40 | atomic_t external_refcount; | 37 | atomic_t refcount; |
41 | #endif | 38 | |
42 | /* | 39 | /* |
43 | * NOTE: the LSB of the head.next is set by | 40 | * NOTE: the LSB of the head.next is set by |
44 | * mm_take_all_locks() _after_ taking the above lock. So the | 41 | * mm_take_all_locks() _after_ taking the above lock. So the |
@@ -71,42 +68,19 @@ struct anon_vma_chain { | |||
71 | }; | 68 | }; |
72 | 69 | ||
73 | #ifdef CONFIG_MMU | 70 | #ifdef CONFIG_MMU |
74 | #if defined(CONFIG_KSM) || defined(CONFIG_MIGRATION) | ||
75 | static inline void anonvma_external_refcount_init(struct anon_vma *anon_vma) | ||
76 | { | ||
77 | atomic_set(&anon_vma->external_refcount, 0); | ||
78 | } | ||
79 | |||
80 | static inline int anonvma_external_refcount(struct anon_vma *anon_vma) | ||
81 | { | ||
82 | return atomic_read(&anon_vma->external_refcount); | ||
83 | } | ||
84 | |||
85 | static inline void get_anon_vma(struct anon_vma *anon_vma) | 71 | static inline void get_anon_vma(struct anon_vma *anon_vma) |
86 | { | 72 | { |
87 | atomic_inc(&anon_vma->external_refcount); | 73 | atomic_inc(&anon_vma->refcount); |
88 | } | 74 | } |
89 | 75 | ||
90 | void drop_anon_vma(struct anon_vma *); | 76 | void __put_anon_vma(struct anon_vma *anon_vma); |
91 | #else | ||
92 | static inline void anonvma_external_refcount_init(struct anon_vma *anon_vma) | ||
93 | { | ||
94 | } | ||
95 | 77 | ||
96 | static inline int anonvma_external_refcount(struct anon_vma *anon_vma) | 78 | static inline void put_anon_vma(struct anon_vma *anon_vma) |
97 | { | ||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | static inline void get_anon_vma(struct anon_vma *anon_vma) | ||
102 | { | 79 | { |
80 | if (atomic_dec_and_test(&anon_vma->refcount)) | ||
81 | __put_anon_vma(anon_vma); | ||
103 | } | 82 | } |
104 | 83 | ||
105 | static inline void drop_anon_vma(struct anon_vma *anon_vma) | ||
106 | { | ||
107 | } | ||
108 | #endif /* CONFIG_KSM */ | ||
109 | |||
110 | static inline struct anon_vma *page_anon_vma(struct page *page) | 84 | static inline struct anon_vma *page_anon_vma(struct page *page) |
111 | { | 85 | { |
112 | if (((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) != | 86 | if (((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) != |
@@ -148,7 +122,6 @@ void unlink_anon_vmas(struct vm_area_struct *); | |||
148 | int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *); | 122 | int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *); |
149 | int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *); | 123 | int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *); |
150 | void __anon_vma_link(struct vm_area_struct *); | 124 | void __anon_vma_link(struct vm_area_struct *); |
151 | void anon_vma_free(struct anon_vma *); | ||
152 | 125 | ||
153 | static inline void anon_vma_merge(struct vm_area_struct *vma, | 126 | static inline void anon_vma_merge(struct vm_area_struct *vma, |
154 | struct vm_area_struct *next) | 127 | struct vm_area_struct *next) |
@@ -157,6 +130,8 @@ static inline void anon_vma_merge(struct vm_area_struct *vma, | |||
157 | unlink_anon_vmas(next); | 130 | unlink_anon_vmas(next); |
158 | } | 131 | } |
159 | 132 | ||
133 | struct anon_vma *page_get_anon_vma(struct page *page); | ||
134 | |||
160 | /* | 135 | /* |
161 | * rmap interfaces called when adding or removing pte of page | 136 | * rmap interfaces called when adding or removing pte of page |
162 | */ | 137 | */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index c15936fe998b..4b601be3dace 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1471,6 +1471,7 @@ struct task_struct { | |||
1471 | #ifdef CONFIG_NUMA | 1471 | #ifdef CONFIG_NUMA |
1472 | struct mempolicy *mempolicy; /* Protected by alloc_lock */ | 1472 | struct mempolicy *mempolicy; /* Protected by alloc_lock */ |
1473 | short il_next; | 1473 | short il_next; |
1474 | short pref_node_fork; | ||
1474 | #endif | 1475 | #endif |
1475 | atomic_t fs_excl; /* holding fs exclusive resources */ | 1476 | atomic_t fs_excl; /* holding fs exclusive resources */ |
1476 | struct rcu_head rcu; | 1477 | struct rcu_head rcu; |
diff --git a/include/linux/sigma.h b/include/linux/sigma.h new file mode 100644 index 000000000000..e2accb3164d8 --- /dev/null +++ b/include/linux/sigma.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Load firmware files from Analog Devices SigmaStudio | ||
3 | * | ||
4 | * Copyright 2009-2011 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __SIGMA_FIRMWARE_H__ | ||
10 | #define __SIGMA_FIRMWARE_H__ | ||
11 | |||
12 | #include <linux/firmware.h> | ||
13 | #include <linux/types.h> | ||
14 | |||
15 | struct i2c_client; | ||
16 | |||
17 | #define SIGMA_MAGIC "ADISIGM" | ||
18 | |||
19 | struct sigma_firmware { | ||
20 | const struct firmware *fw; | ||
21 | size_t pos; | ||
22 | }; | ||
23 | |||
24 | struct sigma_firmware_header { | ||
25 | unsigned char magic[7]; | ||
26 | u8 version; | ||
27 | u32 crc; | ||
28 | }; | ||
29 | |||
30 | enum { | ||
31 | SIGMA_ACTION_WRITEXBYTES = 0, | ||
32 | SIGMA_ACTION_WRITESINGLE, | ||
33 | SIGMA_ACTION_WRITESAFELOAD, | ||
34 | SIGMA_ACTION_DELAY, | ||
35 | SIGMA_ACTION_PLLWAIT, | ||
36 | SIGMA_ACTION_NOOP, | ||
37 | SIGMA_ACTION_END, | ||
38 | }; | ||
39 | |||
40 | struct sigma_action { | ||
41 | u8 instr; | ||
42 | u8 len_hi; | ||
43 | u16 len; | ||
44 | u16 addr; | ||
45 | unsigned char payload[]; | ||
46 | }; | ||
47 | |||
48 | static inline u32 sigma_action_len(struct sigma_action *sa) | ||
49 | { | ||
50 | return (sa->len_hi << 16) | sa->len; | ||
51 | } | ||
52 | |||
53 | static inline size_t sigma_action_size(struct sigma_action *sa, u32 payload_len) | ||
54 | { | ||
55 | return sizeof(*sa) + payload_len + (payload_len % 2); | ||
56 | } | ||
57 | |||
58 | extern int process_sigma_firmware(struct i2c_client *client, const char *name); | ||
59 | |||
60 | #endif | ||
diff --git a/include/linux/slab.h b/include/linux/slab.h index fa9086647eb7..ad4dd1c8d30a 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -105,7 +105,6 @@ void kmem_cache_destroy(struct kmem_cache *); | |||
105 | int kmem_cache_shrink(struct kmem_cache *); | 105 | 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 *); | ||
109 | 108 | ||
110 | /* | 109 | /* |
111 | * Please use this macro to create slab caches. Simply specify the | 110 | * Please use this macro to create slab caches. Simply specify the |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 8b6e8ae5d5ca..45ca123e8002 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -32,10 +32,14 @@ enum stat_item { | |||
32 | DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ | 32 | DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ |
33 | DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ | 33 | DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ |
34 | ORDER_FALLBACK, /* Number of times fallback was necessary */ | 34 | ORDER_FALLBACK, /* Number of times fallback was necessary */ |
35 | CMPXCHG_DOUBLE_CPU_FAIL,/* Failure of this_cpu_cmpxchg_double */ | ||
35 | NR_SLUB_STAT_ITEMS }; | 36 | NR_SLUB_STAT_ITEMS }; |
36 | 37 | ||
37 | struct kmem_cache_cpu { | 38 | struct kmem_cache_cpu { |
38 | void **freelist; /* Pointer to first free per cpu object */ | 39 | void **freelist; /* Pointer to next available object */ |
40 | #ifdef CONFIG_CMPXCHG_LOCAL | ||
41 | unsigned long tid; /* Globally unique transaction id */ | ||
42 | #endif | ||
39 | struct page *page; /* The slab from which we are allocating */ | 43 | struct page *page; /* The slab from which we are allocating */ |
40 | int node; /* The node of the page (or -1 for debug) */ | 44 | int node; /* The node of the page (or -1 for debug) */ |
41 | #ifdef CONFIG_SLUB_STATS | 45 | #ifdef CONFIG_SLUB_STATS |
@@ -70,6 +74,7 @@ struct kmem_cache { | |||
70 | struct kmem_cache_cpu __percpu *cpu_slab; | 74 | struct kmem_cache_cpu __percpu *cpu_slab; |
71 | /* Used for retriving partial slabs etc */ | 75 | /* Used for retriving partial slabs etc */ |
72 | unsigned long flags; | 76 | unsigned long flags; |
77 | unsigned long min_partial; | ||
73 | int size; /* The size of an object including meta data */ | 78 | int size; /* The size of an object including meta data */ |
74 | int objsize; /* The size of an object without meta data */ | 79 | int objsize; /* The size of an object without meta data */ |
75 | int offset; /* Free pointer offset. */ | 80 | int offset; /* Free pointer offset. */ |
@@ -83,7 +88,7 @@ struct kmem_cache { | |||
83 | void (*ctor)(void *); | 88 | void (*ctor)(void *); |
84 | int inuse; /* Offset to metadata */ | 89 | int inuse; /* Offset to metadata */ |
85 | int align; /* Alignment */ | 90 | int align; /* Alignment */ |
86 | unsigned long min_partial; | 91 | int reserved; /* Reserved bytes at the end of slabs */ |
87 | const char *name; /* Name (only for display!) */ | 92 | const char *name; /* Name (only for display!) */ |
88 | struct list_head list; /* List of slab caches */ | 93 | struct list_head list; /* List of slab caches */ |
89 | #ifdef CONFIG_SYSFS | 94 | #ifdef CONFIG_SYSFS |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 6dc95cac6b3d..74243c86ba39 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/init.h> | ||
13 | 14 | ||
14 | extern void cpu_idle(void); | 15 | extern void cpu_idle(void); |
15 | 16 | ||
@@ -114,6 +115,8 @@ int on_each_cpu(smp_call_func_t func, void *info, int wait); | |||
114 | void smp_prepare_boot_cpu(void); | 115 | void smp_prepare_boot_cpu(void); |
115 | 116 | ||
116 | extern unsigned int setup_max_cpus; | 117 | extern unsigned int setup_max_cpus; |
118 | extern void __init setup_nr_cpu_ids(void); | ||
119 | extern void __init smp_init(void); | ||
117 | 120 | ||
118 | #else /* !SMP */ | 121 | #else /* !SMP */ |
119 | 122 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 4d559325d919..ed6ebe690f4a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -155,6 +155,15 @@ enum { | |||
155 | #define SWAP_CLUSTER_MAX 32 | 155 | #define SWAP_CLUSTER_MAX 32 |
156 | #define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX | 156 | #define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX |
157 | 157 | ||
158 | /* | ||
159 | * Ratio between the present memory in the zone and the "gap" that | ||
160 | * we're allowing kswapd to shrink in addition to the per-zone high | ||
161 | * wmark, even for zones that already have the high wmark satisfied, | ||
162 | * in order to provide better per-zone lru behavior. We are ok to | ||
163 | * spend not more than 1% of the memory for this zone balancing "gap". | ||
164 | */ | ||
165 | #define KSWAPD_ZONE_BALANCE_GAP_RATIO 100 | ||
166 | |||
158 | #define SWAP_MAP_MAX 0x3e /* Max duplication count, in first swap_map */ | 167 | #define SWAP_MAP_MAX 0x3e /* Max duplication count, in first swap_map */ |
159 | #define SWAP_MAP_BAD 0x3f /* Note pageblock is bad, in first swap_map */ | 168 | #define SWAP_MAP_BAD 0x3f /* Note pageblock is bad, in first swap_map */ |
160 | #define SWAP_HAS_CACHE 0x40 /* Flag page is cached, in first swap_map */ | 169 | #define SWAP_HAS_CACHE 0x40 /* Flag page is cached, in first swap_map */ |
@@ -215,6 +224,7 @@ extern void mark_page_accessed(struct page *); | |||
215 | extern void lru_add_drain(void); | 224 | extern void lru_add_drain(void); |
216 | extern int lru_add_drain_all(void); | 225 | extern int lru_add_drain_all(void); |
217 | extern void rotate_reclaimable_page(struct page *page); | 226 | extern void rotate_reclaimable_page(struct page *page); |
227 | extern void deactivate_page(struct page *page); | ||
218 | extern void swap_setup(void); | 228 | extern void swap_setup(void); |
219 | 229 | ||
220 | extern void add_page_to_unevictable_list(struct page *page); | 230 | extern void add_page_to_unevictable_list(struct page *page); |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 4e53d4641b38..9f469c700550 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -82,7 +82,7 @@ struct tty_buffer { | |||
82 | 82 | ||
83 | 83 | ||
84 | struct tty_bufhead { | 84 | struct tty_bufhead { |
85 | struct delayed_work work; | 85 | struct work_struct work; |
86 | spinlock_t lock; | 86 | spinlock_t lock; |
87 | struct tty_buffer *head; /* Queue head */ | 87 | struct tty_buffer *head; /* Queue head */ |
88 | struct tty_buffer *tail; /* Active buffer */ | 88 | struct tty_buffer *tail; /* Active buffer */ |
diff --git a/include/linux/types.h b/include/linux/types.h index c2a9eb44f2fa..176da8c1fbb1 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -150,6 +150,12 @@ typedef unsigned long blkcnt_t; | |||
150 | #define pgoff_t unsigned long | 150 | #define pgoff_t unsigned long |
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT | ||
154 | typedef u64 dma_addr_t; | ||
155 | #else | ||
156 | typedef u32 dma_addr_t; | ||
157 | #endif /* dma_addr_t */ | ||
158 | |||
153 | #endif /* __KERNEL__ */ | 159 | #endif /* __KERNEL__ */ |
154 | 160 | ||
155 | /* | 161 | /* |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 833e676d6d92..461c0119664f 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -220,12 +220,12 @@ static inline unsigned long node_page_state(int node, | |||
220 | zone_page_state(&zones[ZONE_MOVABLE], item); | 220 | zone_page_state(&zones[ZONE_MOVABLE], item); |
221 | } | 221 | } |
222 | 222 | ||
223 | extern void zone_statistics(struct zone *, struct zone *); | 223 | extern void zone_statistics(struct zone *, struct zone *, gfp_t gfp); |
224 | 224 | ||
225 | #else | 225 | #else |
226 | 226 | ||
227 | #define node_page_state(node, item) global_page_state(item) | 227 | #define node_page_state(node, item) global_page_state(item) |
228 | #define zone_statistics(_zl,_z) do { } while (0) | 228 | #define zone_statistics(_zl, _z, gfp) do { } while (0) |
229 | 229 | ||
230 | #endif /* CONFIG_NUMA */ | 230 | #endif /* CONFIG_NUMA */ |
231 | 231 | ||
diff --git a/include/linux/zlib.h b/include/linux/zlib.h index 40c49cb3eb51..9c5a6b4de0a3 100644 --- a/include/linux/zlib.h +++ b/include/linux/zlib.h | |||
@@ -179,11 +179,16 @@ typedef z_stream *z_streamp; | |||
179 | 179 | ||
180 | /* basic functions */ | 180 | /* basic functions */ |
181 | 181 | ||
182 | extern int zlib_deflate_workspacesize (void); | 182 | extern int zlib_deflate_workspacesize (int windowBits, int memLevel); |
183 | /* | 183 | /* |
184 | Returns the number of bytes that needs to be allocated for a per- | 184 | Returns the number of bytes that needs to be allocated for a per- |
185 | stream workspace. A pointer to this number of bytes should be | 185 | stream workspace with the specified parameters. A pointer to this |
186 | returned in stream->workspace before calling zlib_deflateInit(). | 186 | number of bytes should be returned in stream->workspace before |
187 | you call zlib_deflateInit() or zlib_deflateInit2(). If you call | ||
188 | zlib_deflateInit(), specify windowBits = MAX_WBITS and memLevel = | ||
189 | MAX_MEM_LEVEL here. If you call zlib_deflateInit2(), the windowBits | ||
190 | and memLevel parameters passed to zlib_deflateInit2() must not | ||
191 | exceed those passed here. | ||
187 | */ | 192 | */ |
188 | 193 | ||
189 | /* | 194 | /* |