diff options
Diffstat (limited to 'include')
37 files changed, 683 insertions, 306 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 95ac82340c3b..39da666067b9 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -56,8 +56,6 @@ header-y += dlm_device.h | |||
56 | header-y += dlm_netlink.h | 56 | header-y += dlm_netlink.h |
57 | header-y += dm-ioctl.h | 57 | header-y += dm-ioctl.h |
58 | header-y += dn.h | 58 | header-y += dn.h |
59 | header-y += dqblk_v1.h | ||
60 | header-y += dqblk_v2.h | ||
61 | header-y += dqblk_xfs.h | 59 | header-y += dqblk_xfs.h |
62 | header-y += efs_fs_sb.h | 60 | header-y += efs_fs_sb.h |
63 | header-y += elf-fdpic.h | 61 | header-y += elf-fdpic.h |
@@ -134,8 +132,6 @@ header-y += posix_types.h | |||
134 | header-y += ppdev.h | 132 | header-y += ppdev.h |
135 | header-y += prctl.h | 133 | header-y += prctl.h |
136 | header-y += qnxtypes.h | 134 | header-y += qnxtypes.h |
137 | header-y += quotaio_v1.h | ||
138 | header-y += quotaio_v2.h | ||
139 | header-y += radeonfb.h | 135 | header-y += radeonfb.h |
140 | header-y += raw.h | 136 | header-y += raw.h |
141 | header-y += resource.h | 137 | header-y += resource.h |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 26c4f6f65a46..67e5dbfc2961 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -247,6 +247,18 @@ | |||
247 | #define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL) | 247 | #define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL) |
248 | #define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL|AUDIT_BIT_MASK) | 248 | #define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL|AUDIT_BIT_MASK) |
249 | 249 | ||
250 | enum { | ||
251 | Audit_equal, | ||
252 | Audit_not_equal, | ||
253 | Audit_bitmask, | ||
254 | Audit_bittest, | ||
255 | Audit_lt, | ||
256 | Audit_gt, | ||
257 | Audit_le, | ||
258 | Audit_ge, | ||
259 | Audit_bad | ||
260 | }; | ||
261 | |||
250 | /* Status symbols */ | 262 | /* Status symbols */ |
251 | /* Mask values */ | 263 | /* Mask values */ |
252 | #define AUDIT_STATUS_ENABLED 0x0001 | 264 | #define AUDIT_STATUS_ENABLED 0x0001 |
@@ -373,6 +385,8 @@ struct audit_krule { | |||
373 | struct audit_watch *watch; /* associated watch */ | 385 | struct audit_watch *watch; /* associated watch */ |
374 | struct audit_tree *tree; /* associated watched tree */ | 386 | struct audit_tree *tree; /* associated watched tree */ |
375 | struct list_head rlist; /* entry in audit_{watch,tree}.rules list */ | 387 | struct list_head rlist; /* entry in audit_{watch,tree}.rules list */ |
388 | struct list_head list; /* for AUDIT_LIST* purposes only */ | ||
389 | u64 prio; | ||
376 | }; | 390 | }; |
377 | 391 | ||
378 | struct audit_field { | 392 | struct audit_field { |
@@ -443,70 +457,56 @@ extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | |||
443 | #define audit_get_loginuid(t) ((t)->loginuid) | 457 | #define audit_get_loginuid(t) ((t)->loginuid) |
444 | #define audit_get_sessionid(t) ((t)->sessionid) | 458 | #define audit_get_sessionid(t) ((t)->sessionid) |
445 | extern void audit_log_task_context(struct audit_buffer *ab); | 459 | extern void audit_log_task_context(struct audit_buffer *ab); |
446 | extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp); | 460 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
447 | extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); | 461 | extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); |
448 | extern int audit_bprm(struct linux_binprm *bprm); | 462 | extern int audit_bprm(struct linux_binprm *bprm); |
449 | extern int audit_socketcall(int nargs, unsigned long *args); | 463 | extern void audit_socketcall(int nargs, unsigned long *args); |
450 | extern int audit_sockaddr(int len, void *addr); | 464 | extern int audit_sockaddr(int len, void *addr); |
451 | extern int __audit_fd_pair(int fd1, int fd2); | 465 | extern void __audit_fd_pair(int fd1, int fd2); |
452 | extern int audit_set_macxattr(const char *name); | 466 | extern int audit_set_macxattr(const char *name); |
453 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); | 467 | extern void __audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr); |
454 | extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); | 468 | extern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout); |
455 | extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); | 469 | extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification); |
456 | extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); | 470 | extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); |
457 | extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | ||
458 | extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, | 471 | extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, |
459 | const struct cred *new, | 472 | const struct cred *new, |
460 | const struct cred *old); | 473 | const struct cred *old); |
461 | extern int __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); | 474 | extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); |
462 | 475 | ||
463 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | 476 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) |
464 | { | 477 | { |
465 | if (unlikely(!audit_dummy_context())) | 478 | if (unlikely(!audit_dummy_context())) |
466 | return __audit_ipc_obj(ipcp); | 479 | __audit_ipc_obj(ipcp); |
467 | return 0; | ||
468 | } | ||
469 | static inline int audit_fd_pair(int fd1, int fd2) | ||
470 | { | ||
471 | if (unlikely(!audit_dummy_context())) | ||
472 | return __audit_fd_pair(fd1, fd2); | ||
473 | return 0; | ||
474 | } | 480 | } |
475 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 481 | static inline void audit_fd_pair(int fd1, int fd2) |
476 | { | 482 | { |
477 | if (unlikely(!audit_dummy_context())) | 483 | if (unlikely(!audit_dummy_context())) |
478 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); | 484 | __audit_fd_pair(fd1, fd2); |
479 | return 0; | ||
480 | } | 485 | } |
481 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) | 486 | static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) |
482 | { | 487 | { |
483 | if (unlikely(!audit_dummy_context())) | 488 | if (unlikely(!audit_dummy_context())) |
484 | return __audit_mq_open(oflag, mode, u_attr); | 489 | __audit_ipc_set_perm(qbytes, uid, gid, mode); |
485 | return 0; | ||
486 | } | 490 | } |
487 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) | 491 | static inline void audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr) |
488 | { | 492 | { |
489 | if (unlikely(!audit_dummy_context())) | 493 | if (unlikely(!audit_dummy_context())) |
490 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); | 494 | __audit_mq_open(oflag, mode, attr); |
491 | return 0; | ||
492 | } | 495 | } |
493 | static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) | 496 | static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout) |
494 | { | 497 | { |
495 | if (unlikely(!audit_dummy_context())) | 498 | if (unlikely(!audit_dummy_context())) |
496 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); | 499 | __audit_mq_sendrecv(mqdes, msg_len, msg_prio, abs_timeout); |
497 | return 0; | ||
498 | } | 500 | } |
499 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) | 501 | static inline void audit_mq_notify(mqd_t mqdes, const struct sigevent *notification) |
500 | { | 502 | { |
501 | if (unlikely(!audit_dummy_context())) | 503 | if (unlikely(!audit_dummy_context())) |
502 | return __audit_mq_notify(mqdes, u_notification); | 504 | __audit_mq_notify(mqdes, notification); |
503 | return 0; | ||
504 | } | 505 | } |
505 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | 506 | static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) |
506 | { | 507 | { |
507 | if (unlikely(!audit_dummy_context())) | 508 | if (unlikely(!audit_dummy_context())) |
508 | return __audit_mq_getsetattr(mqdes, mqstat); | 509 | __audit_mq_getsetattr(mqdes, mqstat); |
509 | return 0; | ||
510 | } | 510 | } |
511 | 511 | ||
512 | static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, | 512 | static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, |
@@ -518,12 +518,11 @@ static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, | |||
518 | return 0; | 518 | return 0; |
519 | } | 519 | } |
520 | 520 | ||
521 | static inline int audit_log_capset(pid_t pid, const struct cred *new, | 521 | static inline void audit_log_capset(pid_t pid, const struct cred *new, |
522 | const struct cred *old) | 522 | const struct cred *old) |
523 | { | 523 | { |
524 | if (unlikely(!audit_dummy_context())) | 524 | if (unlikely(!audit_dummy_context())) |
525 | return __audit_log_capset(pid, new, old); | 525 | __audit_log_capset(pid, new, old); |
526 | return 0; | ||
527 | } | 526 | } |
528 | 527 | ||
529 | extern int audit_n_rules; | 528 | extern int audit_n_rules; |
@@ -546,20 +545,19 @@ extern int audit_signals; | |||
546 | #define audit_get_loginuid(t) (-1) | 545 | #define audit_get_loginuid(t) (-1) |
547 | #define audit_get_sessionid(t) (-1) | 546 | #define audit_get_sessionid(t) (-1) |
548 | #define audit_log_task_context(b) do { ; } while (0) | 547 | #define audit_log_task_context(b) do { ; } while (0) |
549 | #define audit_ipc_obj(i) ({ 0; }) | 548 | #define audit_ipc_obj(i) ((void)0) |
550 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) | 549 | #define audit_ipc_set_perm(q,u,g,m) ((void)0) |
551 | #define audit_bprm(p) ({ 0; }) | 550 | #define audit_bprm(p) ({ 0; }) |
552 | #define audit_socketcall(n,a) ({ 0; }) | 551 | #define audit_socketcall(n,a) ((void)0) |
553 | #define audit_fd_pair(n,a) ({ 0; }) | 552 | #define audit_fd_pair(n,a) ((void)0) |
554 | #define audit_sockaddr(len, addr) ({ 0; }) | 553 | #define audit_sockaddr(len, addr) ({ 0; }) |
555 | #define audit_set_macxattr(n) do { ; } while (0) | 554 | #define audit_set_macxattr(n) do { ; } while (0) |
556 | #define audit_mq_open(o,m,a) ({ 0; }) | 555 | #define audit_mq_open(o,m,a) ((void)0) |
557 | #define audit_mq_timedsend(d,l,p,t) ({ 0; }) | 556 | #define audit_mq_sendrecv(d,l,p,t) ((void)0) |
558 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) | 557 | #define audit_mq_notify(d,n) ((void)0) |
559 | #define audit_mq_notify(d,n) ({ 0; }) | 558 | #define audit_mq_getsetattr(d,s) ((void)0) |
560 | #define audit_mq_getsetattr(d,s) ({ 0; }) | ||
561 | #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) | 559 | #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) |
562 | #define audit_log_capset(pid, ncr, ocr) ({ 0; }) | 560 | #define audit_log_capset(pid, ncr, ocr) ((void)0) |
563 | #define audit_ptrace(t) ((void)0) | 561 | #define audit_ptrace(t) ((void)0) |
564 | #define audit_n_rules 0 | 562 | #define audit_n_rules 0 |
565 | #define audit_signals 0 | 563 | #define audit_signals 0 |
diff --git a/include/linux/blockgroup_lock.h b/include/linux/blockgroup_lock.h index 8607312983bd..e44b88ba552b 100644 --- a/include/linux/blockgroup_lock.h +++ b/include/linux/blockgroup_lock.h | |||
@@ -53,7 +53,10 @@ static inline void bgl_lock_init(struct blockgroup_lock *bgl) | |||
53 | * The accessor is a macro so we can embed a blockgroup_lock into different | 53 | * The accessor is a macro so we can embed a blockgroup_lock into different |
54 | * superblock types | 54 | * superblock types |
55 | */ | 55 | */ |
56 | #define sb_bgl_lock(sb, block_group) \ | 56 | static inline spinlock_t * |
57 | (&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock) | 57 | bgl_lock_ptr(struct blockgroup_lock *bgl, unsigned int block_group) |
58 | { | ||
59 | return &bgl->locks[(block_group) & (NR_BG_LOCKS-1)].lock; | ||
60 | } | ||
58 | 61 | ||
59 | #endif | 62 | #endif |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 1ee608fd7b77..484b3abf61bb 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -234,6 +234,7 @@ struct cpufreq_driver { | |||
234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); | 234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); |
235 | int (*resume) (struct cpufreq_policy *policy); | 235 | int (*resume) (struct cpufreq_policy *policy); |
236 | struct freq_attr **attr; | 236 | struct freq_attr **attr; |
237 | bool hide_interface; | ||
237 | }; | 238 | }; |
238 | 239 | ||
239 | /* flags */ | 240 | /* flags */ |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index c17fd334e574..8209e08969f9 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -45,6 +45,8 @@ typedef void (*dm_dtr_fn) (struct dm_target *ti); | |||
45 | */ | 45 | */ |
46 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, | 46 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, |
47 | union map_info *map_context); | 47 | union map_info *map_context); |
48 | typedef int (*dm_map_request_fn) (struct dm_target *ti, struct request *clone, | ||
49 | union map_info *map_context); | ||
48 | 50 | ||
49 | /* | 51 | /* |
50 | * Returns: | 52 | * Returns: |
@@ -57,6 +59,9 @@ typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, | |||
57 | typedef int (*dm_endio_fn) (struct dm_target *ti, | 59 | typedef int (*dm_endio_fn) (struct dm_target *ti, |
58 | struct bio *bio, int error, | 60 | struct bio *bio, int error, |
59 | union map_info *map_context); | 61 | union map_info *map_context); |
62 | typedef int (*dm_request_endio_fn) (struct dm_target *ti, | ||
63 | struct request *clone, int error, | ||
64 | union map_info *map_context); | ||
60 | 65 | ||
61 | typedef void (*dm_flush_fn) (struct dm_target *ti); | 66 | typedef void (*dm_flush_fn) (struct dm_target *ti); |
62 | typedef void (*dm_presuspend_fn) (struct dm_target *ti); | 67 | typedef void (*dm_presuspend_fn) (struct dm_target *ti); |
@@ -75,6 +80,13 @@ typedef int (*dm_ioctl_fn) (struct dm_target *ti, unsigned int cmd, | |||
75 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, | 80 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, |
76 | struct bio_vec *biovec, int max_size); | 81 | struct bio_vec *biovec, int max_size); |
77 | 82 | ||
83 | /* | ||
84 | * Returns: | ||
85 | * 0: The target can handle the next I/O immediately. | ||
86 | * 1: The target can't handle the next I/O immediately. | ||
87 | */ | ||
88 | typedef int (*dm_busy_fn) (struct dm_target *ti); | ||
89 | |||
78 | void dm_error(const char *message); | 90 | void dm_error(const char *message); |
79 | 91 | ||
80 | /* | 92 | /* |
@@ -100,14 +112,23 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d); | |||
100 | /* | 112 | /* |
101 | * Information about a target type | 113 | * Information about a target type |
102 | */ | 114 | */ |
115 | |||
116 | /* | ||
117 | * Target features | ||
118 | */ | ||
119 | #define DM_TARGET_SUPPORTS_BARRIERS 0x00000001 | ||
120 | |||
103 | struct target_type { | 121 | struct target_type { |
122 | uint64_t features; | ||
104 | const char *name; | 123 | const char *name; |
105 | struct module *module; | 124 | struct module *module; |
106 | unsigned version[3]; | 125 | unsigned version[3]; |
107 | dm_ctr_fn ctr; | 126 | dm_ctr_fn ctr; |
108 | dm_dtr_fn dtr; | 127 | dm_dtr_fn dtr; |
109 | dm_map_fn map; | 128 | dm_map_fn map; |
129 | dm_map_request_fn map_rq; | ||
110 | dm_endio_fn end_io; | 130 | dm_endio_fn end_io; |
131 | dm_request_endio_fn rq_end_io; | ||
111 | dm_flush_fn flush; | 132 | dm_flush_fn flush; |
112 | dm_presuspend_fn presuspend; | 133 | dm_presuspend_fn presuspend; |
113 | dm_postsuspend_fn postsuspend; | 134 | dm_postsuspend_fn postsuspend; |
@@ -117,6 +138,7 @@ struct target_type { | |||
117 | dm_message_fn message; | 138 | dm_message_fn message; |
118 | dm_ioctl_fn ioctl; | 139 | dm_ioctl_fn ioctl; |
119 | dm_merge_fn merge; | 140 | dm_merge_fn merge; |
141 | dm_busy_fn busy; | ||
120 | }; | 142 | }; |
121 | 143 | ||
122 | struct io_restrictions { | 144 | struct io_restrictions { |
@@ -157,8 +179,7 @@ struct dm_target { | |||
157 | }; | 179 | }; |
158 | 180 | ||
159 | int dm_register_target(struct target_type *t); | 181 | int dm_register_target(struct target_type *t); |
160 | int dm_unregister_target(struct target_type *t); | 182 | void dm_unregister_target(struct target_type *t); |
161 | |||
162 | 183 | ||
163 | /*----------------------------------------------------------------- | 184 | /*----------------------------------------------------------------- |
164 | * Functions for creating and manipulating mapped devices. | 185 | * Functions for creating and manipulating mapped devices. |
@@ -276,6 +297,9 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size); | |||
276 | *---------------------------------------------------------------*/ | 297 | *---------------------------------------------------------------*/ |
277 | #define DM_NAME "device-mapper" | 298 | #define DM_NAME "device-mapper" |
278 | 299 | ||
300 | #define DMCRIT(f, arg...) \ | ||
301 | printk(KERN_CRIT DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | ||
302 | |||
279 | #define DMERR(f, arg...) \ | 303 | #define DMERR(f, arg...) \ |
280 | printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | 304 | printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) |
281 | #define DMERR_LIMIT(f, arg...) \ | 305 | #define DMERR_LIMIT(f, arg...) \ |
diff --git a/include/linux/dqblk_qtree.h b/include/linux/dqblk_qtree.h new file mode 100644 index 000000000000..82a16527b367 --- /dev/null +++ b/include/linux/dqblk_qtree.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Definitions of structures and functions for quota formats using trie | ||
3 | */ | ||
4 | |||
5 | #ifndef _LINUX_DQBLK_QTREE_H | ||
6 | #define _LINUX_DQBLK_QTREE_H | ||
7 | |||
8 | #include <linux/types.h> | ||
9 | |||
10 | /* Numbers of blocks needed for updates - we count with the smallest | ||
11 | * possible block size (1024) */ | ||
12 | #define QTREE_INIT_ALLOC 4 | ||
13 | #define QTREE_INIT_REWRITE 2 | ||
14 | #define QTREE_DEL_ALLOC 0 | ||
15 | #define QTREE_DEL_REWRITE 6 | ||
16 | |||
17 | struct dquot; | ||
18 | |||
19 | /* Operations */ | ||
20 | struct qtree_fmt_operations { | ||
21 | void (*mem2disk_dqblk)(void *disk, struct dquot *dquot); /* Convert given entry from in memory format to disk one */ | ||
22 | void (*disk2mem_dqblk)(struct dquot *dquot, void *disk); /* Convert given entry from disk format to in memory one */ | ||
23 | int (*is_id)(void *disk, struct dquot *dquot); /* Is this structure for given id? */ | ||
24 | }; | ||
25 | |||
26 | /* Inmemory copy of version specific information */ | ||
27 | struct qtree_mem_dqinfo { | ||
28 | struct super_block *dqi_sb; /* Sb quota is on */ | ||
29 | int dqi_type; /* Quota type */ | ||
30 | unsigned int dqi_blocks; /* # of blocks in quota file */ | ||
31 | unsigned int dqi_free_blk; /* First block in list of free blocks */ | ||
32 | unsigned int dqi_free_entry; /* First block with free entry */ | ||
33 | unsigned int dqi_blocksize_bits; /* Block size of quota file */ | ||
34 | unsigned int dqi_entry_size; /* Size of quota entry in quota file */ | ||
35 | unsigned int dqi_usable_bs; /* Space usable in block for quota data */ | ||
36 | unsigned int dqi_qtree_depth; /* Precomputed depth of quota tree */ | ||
37 | struct qtree_fmt_operations *dqi_ops; /* Operations for entry manipulation */ | ||
38 | }; | ||
39 | |||
40 | int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); | ||
41 | int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); | ||
42 | int qtree_delete_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); | ||
43 | int qtree_release_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); | ||
44 | int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk); | ||
45 | static inline int qtree_depth(struct qtree_mem_dqinfo *info) | ||
46 | { | ||
47 | unsigned int epb = info->dqi_usable_bs >> 2; | ||
48 | unsigned long long entries = epb; | ||
49 | int i; | ||
50 | |||
51 | for (i = 1; entries < (1ULL << 32); i++) | ||
52 | entries *= epb; | ||
53 | return i; | ||
54 | } | ||
55 | |||
56 | #endif /* _LINUX_DQBLK_QTREE_H */ | ||
diff --git a/include/linux/dqblk_v1.h b/include/linux/dqblk_v1.h index 57f1250d5a52..3713a7232dd8 100644 --- a/include/linux/dqblk_v1.h +++ b/include/linux/dqblk_v1.h | |||
@@ -5,9 +5,6 @@ | |||
5 | #ifndef _LINUX_DQBLK_V1_H | 5 | #ifndef _LINUX_DQBLK_V1_H |
6 | #define _LINUX_DQBLK_V1_H | 6 | #define _LINUX_DQBLK_V1_H |
7 | 7 | ||
8 | /* Id of quota format */ | ||
9 | #define QFMT_VFS_OLD 1 | ||
10 | |||
11 | /* Root squash turned on */ | 8 | /* Root squash turned on */ |
12 | #define V1_DQF_RSQUASH 1 | 9 | #define V1_DQF_RSQUASH 1 |
13 | 10 | ||
@@ -17,8 +14,4 @@ | |||
17 | #define V1_DEL_ALLOC 0 | 14 | #define V1_DEL_ALLOC 0 |
18 | #define V1_DEL_REWRITE 2 | 15 | #define V1_DEL_REWRITE 2 |
19 | 16 | ||
20 | /* Special information about quotafile */ | ||
21 | struct v1_mem_dqinfo { | ||
22 | }; | ||
23 | |||
24 | #endif /* _LINUX_DQBLK_V1_H */ | 17 | #endif /* _LINUX_DQBLK_V1_H */ |
diff --git a/include/linux/dqblk_v2.h b/include/linux/dqblk_v2.h index 4f853322cb7f..18000a542677 100644 --- a/include/linux/dqblk_v2.h +++ b/include/linux/dqblk_v2.h | |||
@@ -1,26 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * Definitions of structures for vfsv0 quota format | 2 | * Definitions for vfsv0 quota format |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef _LINUX_DQBLK_V2_H | 5 | #ifndef _LINUX_DQBLK_V2_H |
6 | #define _LINUX_DQBLK_V2_H | 6 | #define _LINUX_DQBLK_V2_H |
7 | 7 | ||
8 | #include <linux/types.h> | 8 | #include <linux/dqblk_qtree.h> |
9 | |||
10 | /* id numbers of quota format */ | ||
11 | #define QFMT_VFS_V0 2 | ||
12 | 9 | ||
13 | /* Numbers of blocks needed for updates */ | 10 | /* Numbers of blocks needed for updates */ |
14 | #define V2_INIT_ALLOC 4 | 11 | #define V2_INIT_ALLOC QTREE_INIT_ALLOC |
15 | #define V2_INIT_REWRITE 2 | 12 | #define V2_INIT_REWRITE QTREE_INIT_REWRITE |
16 | #define V2_DEL_ALLOC 0 | 13 | #define V2_DEL_ALLOC QTREE_DEL_ALLOC |
17 | #define V2_DEL_REWRITE 6 | 14 | #define V2_DEL_REWRITE QTREE_DEL_REWRITE |
18 | |||
19 | /* Inmemory copy of version specific information */ | ||
20 | struct v2_mem_dqinfo { | ||
21 | unsigned int dqi_blocks; | ||
22 | unsigned int dqi_free_blk; | ||
23 | unsigned int dqi_free_entry; | ||
24 | }; | ||
25 | 15 | ||
26 | #endif /* _LINUX_DQBLK_V2_H */ | 16 | #endif /* _LINUX_DQBLK_V2_H */ |
diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h index f273415ab6f1..dc541f3653d1 100644 --- a/include/linux/ext2_fs_sb.h +++ b/include/linux/ext2_fs_sb.h | |||
@@ -108,4 +108,10 @@ struct ext2_sb_info { | |||
108 | struct ext2_reserve_window_node s_rsv_window_head; | 108 | struct ext2_reserve_window_node s_rsv_window_head; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static inline spinlock_t * | ||
112 | sb_bgl_lock(struct ext2_sb_info *sbi, unsigned int block_group) | ||
113 | { | ||
114 | return bgl_lock_ptr(&sbi->s_blockgroup_lock, block_group); | ||
115 | } | ||
116 | |||
111 | #endif /* _LINUX_EXT2_FS_SB */ | 117 | #endif /* _LINUX_EXT2_FS_SB */ |
diff --git a/include/linux/ext3_fs_sb.h b/include/linux/ext3_fs_sb.h index b65f0288b842..e024e38248ff 100644 --- a/include/linux/ext3_fs_sb.h +++ b/include/linux/ext3_fs_sb.h | |||
@@ -83,4 +83,10 @@ struct ext3_sb_info { | |||
83 | #endif | 83 | #endif |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static inline spinlock_t * | ||
87 | sb_bgl_lock(struct ext3_sb_info *sbi, unsigned int block_group) | ||
88 | { | ||
89 | return bgl_lock_ptr(&sbi->s_blockgroup_lock, block_group); | ||
90 | } | ||
91 | |||
86 | #endif /* _LINUX_EXT3_FS_SB */ | 92 | #endif /* _LINUX_EXT3_FS_SB */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index e2170ee21e18..fb59673c60b1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -423,6 +423,9 @@ enum positive_aop_returns { | |||
423 | 423 | ||
424 | #define AOP_FLAG_UNINTERRUPTIBLE 0x0001 /* will not do a short write */ | 424 | #define AOP_FLAG_UNINTERRUPTIBLE 0x0001 /* will not do a short write */ |
425 | #define AOP_FLAG_CONT_EXPAND 0x0002 /* called from cont_expand */ | 425 | #define AOP_FLAG_CONT_EXPAND 0x0002 /* called from cont_expand */ |
426 | #define AOP_FLAG_NOFS 0x0004 /* used by filesystem to direct | ||
427 | * helper code (eg buffer layer) | ||
428 | * to clear GFP_FS from alloc */ | ||
426 | 429 | ||
427 | /* | 430 | /* |
428 | * oh the beauties of C type declarations. | 431 | * oh the beauties of C type declarations. |
@@ -1827,7 +1830,7 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping, | |||
1827 | extern int filemap_fdatawrite_range(struct address_space *mapping, | 1830 | extern int filemap_fdatawrite_range(struct address_space *mapping, |
1828 | loff_t start, loff_t end); | 1831 | loff_t start, loff_t end); |
1829 | 1832 | ||
1830 | extern long do_fsync(struct file *file, int datasync); | 1833 | extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); |
1831 | extern void sync_supers(void); | 1834 | extern void sync_supers(void); |
1832 | extern void sync_filesystems(int wait); | 1835 | extern void sync_filesystems(int wait); |
1833 | extern void __fsync_super(struct super_block *sb); | 1836 | extern void __fsync_super(struct super_block *sb); |
@@ -2035,7 +2038,7 @@ extern int page_readlink(struct dentry *, char __user *, int); | |||
2035 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); | 2038 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); |
2036 | extern void page_put_link(struct dentry *, struct nameidata *, void *); | 2039 | extern void page_put_link(struct dentry *, struct nameidata *, void *); |
2037 | extern int __page_symlink(struct inode *inode, const char *symname, int len, | 2040 | extern int __page_symlink(struct inode *inode, const char *symname, int len, |
2038 | gfp_t gfp_mask); | 2041 | int nofs); |
2039 | extern int page_symlink(struct inode *inode, const char *symname, int len); | 2042 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
2040 | extern const struct inode_operations page_symlink_inode_operations; | 2043 | extern const struct inode_operations page_symlink_inode_operations; |
2041 | extern int generic_readlink(struct dentry *, char __user *, int); | 2044 | extern int generic_readlink(struct dentry *, char __user *, int); |
@@ -2056,6 +2059,9 @@ extern int vfs_fstat(unsigned int, struct kstat *); | |||
2056 | 2059 | ||
2057 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | 2060 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, |
2058 | unsigned long arg); | 2061 | unsigned long arg); |
2062 | extern int __generic_block_fiemap(struct inode *inode, | ||
2063 | struct fiemap_extent_info *fieinfo, u64 start, | ||
2064 | u64 len, get_block_t *get_block); | ||
2059 | extern int generic_block_fiemap(struct inode *inode, | 2065 | extern int generic_block_fiemap(struct inode *inode, |
2060 | struct fiemap_extent_info *fieinfo, u64 start, | 2066 | struct fiemap_extent_info *fieinfo, u64 start, |
2061 | u64 len, get_block_t *get_block); | 2067 | u64 len, get_block_t *get_block); |
diff --git a/include/linux/hid.h b/include/linux/hid.h index e5780f8c934a..81aa84d60c6b 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -403,15 +403,6 @@ struct hid_output_fifo { | |||
403 | #define HID_STAT_ADDED 1 | 403 | #define HID_STAT_ADDED 1 |
404 | #define HID_STAT_PARSED 2 | 404 | #define HID_STAT_PARSED 2 |
405 | 405 | ||
406 | #define HID_CTRL_RUNNING 1 | ||
407 | #define HID_OUT_RUNNING 2 | ||
408 | #define HID_IN_RUNNING 3 | ||
409 | #define HID_RESET_PENDING 4 | ||
410 | #define HID_SUSPENDED 5 | ||
411 | #define HID_CLEAR_HALT 6 | ||
412 | #define HID_DISCONNECTED 7 | ||
413 | #define HID_STARTED 8 | ||
414 | |||
415 | struct hid_input { | 406 | struct hid_input { |
416 | struct list_head list; | 407 | struct list_head list; |
417 | struct hid_report *report; | 408 | struct hid_report *report; |
@@ -540,6 +531,8 @@ struct hid_usage_id { | |||
540 | * @name: driver name (e.g. "Footech_bar-wheel") | 531 | * @name: driver name (e.g. "Footech_bar-wheel") |
541 | * @id_table: which devices is this driver for (must be non-NULL for probe | 532 | * @id_table: which devices is this driver for (must be non-NULL for probe |
542 | * to be called) | 533 | * to be called) |
534 | * @dyn_list: list of dynamically added device ids | ||
535 | * @dyn_lock: lock protecting @dyn_list | ||
543 | * @probe: new device inserted | 536 | * @probe: new device inserted |
544 | * @remove: device removed (NULL if not a hot-plug capable driver) | 537 | * @remove: device removed (NULL if not a hot-plug capable driver) |
545 | * @report_table: on which reports to call raw_event (NULL means all) | 538 | * @report_table: on which reports to call raw_event (NULL means all) |
@@ -567,6 +560,9 @@ struct hid_driver { | |||
567 | char *name; | 560 | char *name; |
568 | const struct hid_device_id *id_table; | 561 | const struct hid_device_id *id_table; |
569 | 562 | ||
563 | struct list_head dyn_list; | ||
564 | spinlock_t dyn_lock; | ||
565 | |||
570 | int (*probe)(struct hid_device *dev, const struct hid_device_id *id); | 566 | int (*probe)(struct hid_device *dev, const struct hid_device_id *id); |
571 | void (*remove)(struct hid_device *dev); | 567 | void (*remove)(struct hid_device *dev); |
572 | 568 | ||
@@ -797,6 +793,8 @@ dbg_hid(const char *fmt, ...) | |||
797 | 793 | ||
798 | #ifdef CONFIG_HID_COMPAT | 794 | #ifdef CONFIG_HID_COMPAT |
799 | #define HID_COMPAT_LOAD_DRIVER(name) \ | 795 | #define HID_COMPAT_LOAD_DRIVER(name) \ |
796 | /* prototype to avoid sparse warning */ \ | ||
797 | extern void hid_compat_##name(void); \ | ||
800 | void hid_compat_##name(void) { } \ | 798 | void hid_compat_##name(void) { } \ |
801 | EXPORT_SYMBOL(hid_compat_##name) | 799 | EXPORT_SYMBOL(hid_compat_##name) |
802 | #else | 800 | #else |
diff --git a/include/linux/hidraw.h b/include/linux/hidraw.h index dbb5c8c374f0..dd8d69269176 100644 --- a/include/linux/hidraw.h +++ b/include/linux/hidraw.h | |||
@@ -33,6 +33,8 @@ struct hidraw_devinfo { | |||
33 | #define HIDIOCGRDESCSIZE _IOR('H', 0x01, int) | 33 | #define HIDIOCGRDESCSIZE _IOR('H', 0x01, int) |
34 | #define HIDIOCGRDESC _IOR('H', 0x02, struct hidraw_report_descriptor) | 34 | #define HIDIOCGRDESC _IOR('H', 0x02, struct hidraw_report_descriptor) |
35 | #define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo) | 35 | #define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo) |
36 | #define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len) | ||
37 | #define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len) | ||
36 | 38 | ||
37 | #define HIDRAW_FIRST_MINOR 0 | 39 | #define HIDRAW_FIRST_MINOR 0 |
38 | #define HIDRAW_MAX_DEVICES 64 | 40 | #define HIDRAW_MAX_DEVICES 64 |
diff --git a/include/linux/i2c/dm355evm_msp.h b/include/linux/i2c/dm355evm_msp.h new file mode 100644 index 000000000000..372470350fab --- /dev/null +++ b/include/linux/i2c/dm355evm_msp.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * dm355evm_msp.h - support MSP430 microcontroller on DM355EVM board | ||
3 | */ | ||
4 | #ifndef __LINUX_I2C_DM355EVM_MSP | ||
5 | #define __LINUX_I2C_DM355EVM_MSP | ||
6 | |||
7 | /* | ||
8 | * Written against Spectrum's writeup for the A4 firmware revision, | ||
9 | * and tweaked to match source and rev D2 schematics by removing CPLD | ||
10 | * and NOR flash hooks (which were last appropriate in rev B boards). | ||
11 | * | ||
12 | * Note that the firmware supports a flavor of write posting ... to be | ||
13 | * sure a write completes, issue another read or write. | ||
14 | */ | ||
15 | |||
16 | /* utilities to access "registers" emulated by msp430 firmware */ | ||
17 | extern int dm355evm_msp_write(u8 value, u8 reg); | ||
18 | extern int dm355evm_msp_read(u8 reg); | ||
19 | |||
20 | |||
21 | /* command/control registers */ | ||
22 | #define DM355EVM_MSP_COMMAND 0x00 | ||
23 | # define MSP_COMMAND_NULL 0 | ||
24 | # define MSP_COMMAND_RESET_COLD 1 | ||
25 | # define MSP_COMMAND_RESET_WARM 2 | ||
26 | # define MSP_COMMAND_RESET_WARM_I 3 | ||
27 | # define MSP_COMMAND_POWEROFF 4 | ||
28 | # define MSP_COMMAND_IR_REINIT 5 | ||
29 | #define DM355EVM_MSP_STATUS 0x01 | ||
30 | # define MSP_STATUS_BAD_OFFSET BIT(0) | ||
31 | # define MSP_STATUS_BAD_COMMAND BIT(1) | ||
32 | # define MSP_STATUS_POWER_ERROR BIT(2) | ||
33 | # define MSP_STATUS_RXBUF_OVERRUN BIT(3) | ||
34 | #define DM355EVM_MSP_RESET 0x02 /* 0 bits == in reset */ | ||
35 | # define MSP_RESET_DC5 BIT(0) | ||
36 | # define MSP_RESET_TVP5154 BIT(2) | ||
37 | # define MSP_RESET_IMAGER BIT(3) | ||
38 | # define MSP_RESET_ETHERNET BIT(4) | ||
39 | # define MSP_RESET_SYS BIT(5) | ||
40 | # define MSP_RESET_AIC33 BIT(7) | ||
41 | |||
42 | /* GPIO registers ... bit patterns mostly match the source MSP ports */ | ||
43 | #define DM355EVM_MSP_LED 0x03 /* active low (MSP P4) */ | ||
44 | #define DM355EVM_MSP_SWITCH1 0x04 /* (MSP P5, masked) */ | ||
45 | # define MSP_SWITCH1_SW6_1 BIT(0) | ||
46 | # define MSP_SWITCH1_SW6_2 BIT(1) | ||
47 | # define MSP_SWITCH1_SW6_3 BIT(2) | ||
48 | # define MSP_SWITCH1_SW6_4 BIT(3) | ||
49 | # define MSP_SWITCH1_J1 BIT(4) /* NTSC/PAL */ | ||
50 | # define MSP_SWITCH1_MSP_INT BIT(5) /* active low */ | ||
51 | #define DM355EVM_MSP_SWITCH2 0x05 /* (MSP P6, masked) */ | ||
52 | # define MSP_SWITCH2_SW10 BIT(3) | ||
53 | # define MSP_SWITCH2_SW11 BIT(4) | ||
54 | # define MSP_SWITCH2_SW12 BIT(5) | ||
55 | # define MSP_SWITCH2_SW13 BIT(6) | ||
56 | # define MSP_SWITCH2_SW14 BIT(7) | ||
57 | #define DM355EVM_MSP_SDMMC 0x06 /* (MSP P2, masked) */ | ||
58 | # define MSP_SDMMC_0_WP BIT(1) | ||
59 | # define MSP_SDMMC_0_CD BIT(2) /* active low */ | ||
60 | # define MSP_SDMMC_1_WP BIT(3) | ||
61 | # define MSP_SDMMC_1_CD BIT(4) /* active low */ | ||
62 | #define DM355EVM_MSP_FIRMREV 0x07 /* not a GPIO (out of order) */ | ||
63 | #define DM355EVM_MSP_VIDEO_IN 0x08 /* (MSP P3, masked) */ | ||
64 | # define MSP_VIDEO_IMAGER BIT(7) /* low == tvp5146 */ | ||
65 | |||
66 | /* power supply registers are currently omitted */ | ||
67 | |||
68 | /* RTC registers */ | ||
69 | #define DM355EVM_MSP_RTC_0 0x12 /* LSB */ | ||
70 | #define DM355EVM_MSP_RTC_1 0x13 | ||
71 | #define DM355EVM_MSP_RTC_2 0x14 | ||
72 | #define DM355EVM_MSP_RTC_3 0x15 /* MSB */ | ||
73 | |||
74 | /* input event queue registers; code == ((HIGH << 8) | LOW) */ | ||
75 | #define DM355EVM_MSP_INPUT_COUNT 0x16 /* decrement by reading LOW */ | ||
76 | #define DM355EVM_MSP_INPUT_HIGH 0x17 | ||
77 | #define DM355EVM_MSP_INPUT_LOW 0x18 | ||
78 | |||
79 | #endif /* __LINUX_I2C_DM355EVM_MSP */ | ||
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h index fb604dcd38f1..a8f84c01f82e 100644 --- a/include/linux/i2c/twl4030.h +++ b/include/linux/i2c/twl4030.h | |||
@@ -78,8 +78,8 @@ int twl4030_i2c_read_u8(u8 mod_no, u8 *val, u8 reg); | |||
78 | * IMPORTANT: For twl4030_i2c_write(), allocate num_bytes + 1 | 78 | * IMPORTANT: For twl4030_i2c_write(), allocate num_bytes + 1 |
79 | * for the value, and populate your data starting at offset 1. | 79 | * for the value, and populate your data starting at offset 1. |
80 | */ | 80 | */ |
81 | int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, u8 num_bytes); | 81 | int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
82 | int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, u8 num_bytes); | 82 | int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
83 | 83 | ||
84 | /*----------------------------------------------------------------------*/ | 84 | /*----------------------------------------------------------------------*/ |
85 | 85 | ||
@@ -278,6 +278,18 @@ struct twl4030_platform_data { | |||
278 | struct twl4030_keypad_data *keypad; | 278 | struct twl4030_keypad_data *keypad; |
279 | struct twl4030_usb_data *usb; | 279 | struct twl4030_usb_data *usb; |
280 | 280 | ||
281 | /* LDO regulators */ | ||
282 | struct regulator_init_data *vdac; | ||
283 | struct regulator_init_data *vpll1; | ||
284 | struct regulator_init_data *vpll2; | ||
285 | struct regulator_init_data *vmmc1; | ||
286 | struct regulator_init_data *vmmc2; | ||
287 | struct regulator_init_data *vsim; | ||
288 | struct regulator_init_data *vaux1; | ||
289 | struct regulator_init_data *vaux2; | ||
290 | struct regulator_init_data *vaux3; | ||
291 | struct regulator_init_data *vaux4; | ||
292 | |||
281 | /* REVISIT more to come ... _nothing_ should be hard-wired */ | 293 | /* REVISIT more to come ... _nothing_ should be hard-wired */ |
282 | }; | 294 | }; |
283 | 295 | ||
@@ -285,33 +297,6 @@ struct twl4030_platform_data { | |||
285 | 297 | ||
286 | int twl4030_sih_setup(int module); | 298 | int twl4030_sih_setup(int module); |
287 | 299 | ||
288 | /* | ||
289 | * FIXME completely stop using TWL4030_IRQ_BASE ... instead, pass the | ||
290 | * IRQ data to subsidiary devices using platform device resources. | ||
291 | */ | ||
292 | |||
293 | /* IRQ information-need base */ | ||
294 | #include <mach/irqs.h> | ||
295 | /* TWL4030 interrupts */ | ||
296 | |||
297 | /* #define TWL4030_MODIRQ_GPIO (TWL4030_IRQ_BASE + 0) */ | ||
298 | #define TWL4030_MODIRQ_KEYPAD (TWL4030_IRQ_BASE + 1) | ||
299 | #define TWL4030_MODIRQ_BCI (TWL4030_IRQ_BASE + 2) | ||
300 | #define TWL4030_MODIRQ_MADC (TWL4030_IRQ_BASE + 3) | ||
301 | /* #define TWL4030_MODIRQ_USB (TWL4030_IRQ_BASE + 4) */ | ||
302 | /* #define TWL4030_MODIRQ_PWR (TWL4030_IRQ_BASE + 5) */ | ||
303 | |||
304 | #define TWL4030_PWRIRQ_PWRBTN (TWL4030_PWR_IRQ_BASE + 0) | ||
305 | /* #define TWL4030_PWRIRQ_CHG_PRES (TWL4030_PWR_IRQ_BASE + 1) */ | ||
306 | /* #define TWL4030_PWRIRQ_USB_PRES (TWL4030_PWR_IRQ_BASE + 2) */ | ||
307 | /* #define TWL4030_PWRIRQ_RTC (TWL4030_PWR_IRQ_BASE + 3) */ | ||
308 | /* #define TWL4030_PWRIRQ_HOT_DIE (TWL4030_PWR_IRQ_BASE + 4) */ | ||
309 | /* #define TWL4030_PWRIRQ_PWROK_TIMEOUT (TWL4030_PWR_IRQ_BASE + 5) */ | ||
310 | /* #define TWL4030_PWRIRQ_MBCHG (TWL4030_PWR_IRQ_BASE + 6) */ | ||
311 | /* #define TWL4030_PWRIRQ_SC_DETECT (TWL4030_PWR_IRQ_BASE + 7) */ | ||
312 | |||
313 | /* Rest are unsued currently*/ | ||
314 | |||
315 | /* Offsets to Power Registers */ | 300 | /* Offsets to Power Registers */ |
316 | #define TWL4030_VDAC_DEV_GRP 0x3B | 301 | #define TWL4030_VDAC_DEV_GRP 0x3B |
317 | #define TWL4030_VDAC_DEDICATED 0x3E | 302 | #define TWL4030_VDAC_DEDICATED 0x3E |
@@ -322,10 +307,6 @@ int twl4030_sih_setup(int module); | |||
322 | #define TWL4030_VAUX3_DEV_GRP 0x1F | 307 | #define TWL4030_VAUX3_DEV_GRP 0x1F |
323 | #define TWL4030_VAUX3_DEDICATED 0x22 | 308 | #define TWL4030_VAUX3_DEDICATED 0x22 |
324 | 309 | ||
325 | /* TWL4030 GPIO interrupt definitions */ | ||
326 | |||
327 | #define TWL4030_GPIO_IRQ_NO(n) (TWL4030_GPIO_IRQ_BASE + (n)) | ||
328 | |||
329 | /* | 310 | /* |
330 | * Exported TWL4030 GPIO APIs | 311 | * Exported TWL4030 GPIO APIs |
331 | * | 312 | * |
@@ -340,4 +321,38 @@ int twl4030_set_gpio_debounce(int gpio, int enable); | |||
340 | static inline int twl4030charger_usb_en(int enable) { return 0; } | 321 | static inline int twl4030charger_usb_en(int enable) { return 0; } |
341 | #endif | 322 | #endif |
342 | 323 | ||
324 | /*----------------------------------------------------------------------*/ | ||
325 | |||
326 | /* Linux-specific regulator identifiers ... for now, we only support | ||
327 | * the LDOs, and leave the three buck converters alone. VDD1 and VDD2 | ||
328 | * need to tie into hardware based voltage scaling (cpufreq etc), while | ||
329 | * VIO is generally fixed. | ||
330 | */ | ||
331 | |||
332 | /* EXTERNAL dc-to-dc buck converters */ | ||
333 | #define TWL4030_REG_VDD1 0 | ||
334 | #define TWL4030_REG_VDD2 1 | ||
335 | #define TWL4030_REG_VIO 2 | ||
336 | |||
337 | /* EXTERNAL LDOs */ | ||
338 | #define TWL4030_REG_VDAC 3 | ||
339 | #define TWL4030_REG_VPLL1 4 | ||
340 | #define TWL4030_REG_VPLL2 5 /* not on all chips */ | ||
341 | #define TWL4030_REG_VMMC1 6 | ||
342 | #define TWL4030_REG_VMMC2 7 /* not on all chips */ | ||
343 | #define TWL4030_REG_VSIM 8 /* not on all chips */ | ||
344 | #define TWL4030_REG_VAUX1 9 /* not on all chips */ | ||
345 | #define TWL4030_REG_VAUX2_4030 10 /* (twl4030-specific) */ | ||
346 | #define TWL4030_REG_VAUX2 11 /* (twl5030 and newer) */ | ||
347 | #define TWL4030_REG_VAUX3 12 /* not on all chips */ | ||
348 | #define TWL4030_REG_VAUX4 13 /* not on all chips */ | ||
349 | |||
350 | /* INTERNAL LDOs */ | ||
351 | #define TWL4030_REG_VINTANA1 14 | ||
352 | #define TWL4030_REG_VINTANA2 15 | ||
353 | #define TWL4030_REG_VINTDIG 16 | ||
354 | #define TWL4030_REG_VUSB1V5 17 | ||
355 | #define TWL4030_REG_VUSB1V8 18 | ||
356 | #define TWL4030_REG_VUSB3V1 19 | ||
357 | |||
343 | #endif /* End of __TWL4030_H */ | 358 | #endif /* End of __TWL4030_H */ |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index c7d106ef22e2..34456476e761 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -329,6 +329,7 @@ enum jbd_state_bits { | |||
329 | BH_State, /* Pins most journal_head state */ | 329 | BH_State, /* Pins most journal_head state */ |
330 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ | 330 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ |
331 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ | 331 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ |
332 | BH_JBDPrivateStart, /* First bit available for private use by FS */ | ||
332 | }; | 333 | }; |
333 | 334 | ||
334 | BUFFER_FNS(JBD, jbd) | 335 | BUFFER_FNS(JBD, jbd) |
@@ -1007,6 +1008,35 @@ int __jbd2_journal_clean_checkpoint_list(journal_t *journal); | |||
1007 | int __jbd2_journal_remove_checkpoint(struct journal_head *); | 1008 | int __jbd2_journal_remove_checkpoint(struct journal_head *); |
1008 | void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); | 1009 | void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); |
1009 | 1010 | ||
1011 | |||
1012 | /* | ||
1013 | * Triggers | ||
1014 | */ | ||
1015 | |||
1016 | struct jbd2_buffer_trigger_type { | ||
1017 | /* | ||
1018 | * Fired just before a buffer is written to the journal. | ||
1019 | * mapped_data is a mapped buffer that is the frozen data for | ||
1020 | * commit. | ||
1021 | */ | ||
1022 | void (*t_commit)(struct jbd2_buffer_trigger_type *type, | ||
1023 | struct buffer_head *bh, void *mapped_data, | ||
1024 | size_t size); | ||
1025 | |||
1026 | /* | ||
1027 | * Fired during journal abort for dirty buffers that will not be | ||
1028 | * committed. | ||
1029 | */ | ||
1030 | void (*t_abort)(struct jbd2_buffer_trigger_type *type, | ||
1031 | struct buffer_head *bh); | ||
1032 | }; | ||
1033 | |||
1034 | extern void jbd2_buffer_commit_trigger(struct journal_head *jh, | ||
1035 | void *mapped_data, | ||
1036 | struct jbd2_buffer_trigger_type *triggers); | ||
1037 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, | ||
1038 | struct jbd2_buffer_trigger_type *triggers); | ||
1039 | |||
1010 | /* Buffer IO */ | 1040 | /* Buffer IO */ |
1011 | extern int | 1041 | extern int |
1012 | jbd2_journal_write_metadata_buffer(transaction_t *transaction, | 1042 | jbd2_journal_write_metadata_buffer(transaction_t *transaction, |
@@ -1045,6 +1075,8 @@ extern int jbd2_journal_extend (handle_t *, int nblocks); | |||
1045 | extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *); | 1075 | extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *); |
1046 | extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *); | 1076 | extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *); |
1047 | extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *); | 1077 | extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *); |
1078 | void jbd2_journal_set_triggers(struct buffer_head *, | ||
1079 | struct jbd2_buffer_trigger_type *type); | ||
1048 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); | 1080 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); |
1049 | extern void jbd2_journal_release_buffer (handle_t *, struct buffer_head *); | 1081 | extern void jbd2_journal_release_buffer (handle_t *, struct buffer_head *); |
1050 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); | 1082 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); |
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index bb70ebb6a2d5..525aac3c97df 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h | |||
@@ -12,6 +12,8 @@ | |||
12 | 12 | ||
13 | typedef unsigned int tid_t; /* Unique transaction ID */ | 13 | typedef unsigned int tid_t; /* Unique transaction ID */ |
14 | typedef struct transaction_s transaction_t; /* Compound transaction type */ | 14 | typedef struct transaction_s transaction_t; /* Compound transaction type */ |
15 | |||
16 | |||
15 | struct buffer_head; | 17 | struct buffer_head; |
16 | 18 | ||
17 | struct journal_head { | 19 | struct journal_head { |
@@ -87,6 +89,12 @@ struct journal_head { | |||
87 | * [j_list_lock] | 89 | * [j_list_lock] |
88 | */ | 90 | */ |
89 | struct journal_head *b_cpnext, *b_cpprev; | 91 | struct journal_head *b_cpnext, *b_cpprev; |
92 | |||
93 | /* Trigger type */ | ||
94 | struct jbd2_buffer_trigger_type *b_triggers; | ||
95 | |||
96 | /* Trigger type for the committing transaction's frozen data */ | ||
97 | struct jbd2_buffer_trigger_type *b_frozen_triggers; | ||
90 | }; | 98 | }; |
91 | 99 | ||
92 | #endif /* JOURNAL_HEAD_H_INCLUDED */ | 100 | #endif /* JOURNAL_HEAD_H_INCLUDED */ |
diff --git a/include/linux/mfd/da903x.h b/include/linux/mfd/da903x.h index cad314c12439..115dbe965082 100644 --- a/include/linux/mfd/da903x.h +++ b/include/linux/mfd/da903x.h | |||
@@ -32,6 +32,7 @@ enum { | |||
32 | DA9030_ID_LDO18, | 32 | DA9030_ID_LDO18, |
33 | DA9030_ID_LDO19, | 33 | DA9030_ID_LDO19, |
34 | DA9030_ID_LDO_INT, /* LDO Internal */ | 34 | DA9030_ID_LDO_INT, /* LDO Internal */ |
35 | DA9030_ID_BAT, /* battery charger */ | ||
35 | 36 | ||
36 | DA9034_ID_LED_1, | 37 | DA9034_ID_LED_1, |
37 | DA9034_ID_LED_2, | 38 | DA9034_ID_LED_2, |
@@ -93,6 +94,43 @@ struct da9034_touch_pdata { | |||
93 | int y_inverted; | 94 | int y_inverted; |
94 | }; | 95 | }; |
95 | 96 | ||
97 | /* DA9030 battery charger data */ | ||
98 | struct power_supply_info; | ||
99 | |||
100 | struct da9030_battery_info { | ||
101 | /* battery parameters */ | ||
102 | struct power_supply_info *battery_info; | ||
103 | |||
104 | /* current and voltage to use for battery charging */ | ||
105 | unsigned int charge_milliamp; | ||
106 | unsigned int charge_millivolt; | ||
107 | |||
108 | /* voltage thresholds (in millivolts) */ | ||
109 | int vbat_low; | ||
110 | int vbat_crit; | ||
111 | int vbat_charge_start; | ||
112 | int vbat_charge_stop; | ||
113 | int vbat_charge_restart; | ||
114 | |||
115 | /* battery nominal minimal and maximal voltages in millivolts */ | ||
116 | int vcharge_min; | ||
117 | int vcharge_max; | ||
118 | |||
119 | /* Temperature thresholds. These are DA9030 register values | ||
120 | "as is" and should be measured for each battery type */ | ||
121 | int tbat_low; | ||
122 | int tbat_high; | ||
123 | int tbat_restart; | ||
124 | |||
125 | |||
126 | /* battery monitor interval (seconds) */ | ||
127 | unsigned int batmon_interval; | ||
128 | |||
129 | /* platform callbacks for battery low and critical events */ | ||
130 | void (*battery_low)(void); | ||
131 | void (*battery_critical)(void); | ||
132 | }; | ||
133 | |||
96 | struct da903x_subdev_info { | 134 | struct da903x_subdev_info { |
97 | int id; | 135 | int id; |
98 | const char *name; | 136 | const char *name; |
@@ -190,11 +228,13 @@ extern int da903x_unregister_notifier(struct device *dev, | |||
190 | extern int da903x_query_status(struct device *dev, unsigned int status); | 228 | extern int da903x_query_status(struct device *dev, unsigned int status); |
191 | 229 | ||
192 | 230 | ||
193 | /* NOTE: the two functions below are not intended for use outside | 231 | /* NOTE: the functions below are not intended for use outside |
194 | * of the DA9034 sub-device drivers | 232 | * of the DA903x sub-device drivers |
195 | */ | 233 | */ |
196 | extern int da903x_write(struct device *dev, int reg, uint8_t val); | 234 | extern int da903x_write(struct device *dev, int reg, uint8_t val); |
235 | extern int da903x_writes(struct device *dev, int reg, int len, uint8_t *val); | ||
197 | extern int da903x_read(struct device *dev, int reg, uint8_t *val); | 236 | extern int da903x_read(struct device *dev, int reg, uint8_t *val); |
237 | extern int da903x_reads(struct device *dev, int reg, int len, uint8_t *val); | ||
198 | extern int da903x_update(struct device *dev, int reg, uint8_t val, uint8_t mask); | 238 | extern int da903x_update(struct device *dev, int reg, uint8_t val, uint8_t mask); |
199 | extern int da903x_set_bits(struct device *dev, int reg, uint8_t bit_mask); | 239 | extern int da903x_set_bits(struct device *dev, int reg, uint8_t bit_mask); |
200 | extern int da903x_clr_bits(struct device *dev, int reg, uint8_t bit_mask); | 240 | extern int da903x_clr_bits(struct device *dev, int reg, uint8_t bit_mask); |
diff --git a/include/linux/mfd/wm8350/comparator.h b/include/linux/mfd/wm8350/comparator.h index 053788649452..54bc5d0fd502 100644 --- a/include/linux/mfd/wm8350/comparator.h +++ b/include/linux/mfd/wm8350/comparator.h | |||
@@ -164,4 +164,12 @@ | |||
164 | #define WM8350_AUXADC_BATT 6 | 164 | #define WM8350_AUXADC_BATT 6 |
165 | #define WM8350_AUXADC_TEMP 7 | 165 | #define WM8350_AUXADC_TEMP 7 |
166 | 166 | ||
167 | struct wm8350; | ||
168 | |||
169 | /* | ||
170 | * AUX ADC Readback | ||
171 | */ | ||
172 | int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, | ||
173 | int vref); | ||
174 | |||
167 | #endif | 175 | #endif |
diff --git a/include/linux/mfd/wm8350/core.h b/include/linux/mfd/wm8350/core.h index 6ebf97f2a475..980669d50dca 100644 --- a/include/linux/mfd/wm8350/core.h +++ b/include/linux/mfd/wm8350/core.h | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | #define WM8350_RESET_ID 0x00 | 30 | #define WM8350_RESET_ID 0x00 |
31 | #define WM8350_ID 0x01 | 31 | #define WM8350_ID 0x01 |
32 | #define WM8350_REVISION 0x02 | ||
32 | #define WM8350_SYSTEM_CONTROL_1 0x03 | 33 | #define WM8350_SYSTEM_CONTROL_1 0x03 |
33 | #define WM8350_SYSTEM_CONTROL_2 0x04 | 34 | #define WM8350_SYSTEM_CONTROL_2 0x04 |
34 | #define WM8350_SYSTEM_HIBERNATE 0x05 | 35 | #define WM8350_SYSTEM_HIBERNATE 0x05 |
@@ -57,6 +58,10 @@ | |||
57 | #define WM8350_OVER_CURRENT_INT_STATUS_MASK 0x25 | 58 | #define WM8350_OVER_CURRENT_INT_STATUS_MASK 0x25 |
58 | #define WM8350_GPIO_INT_STATUS_MASK 0x26 | 59 | #define WM8350_GPIO_INT_STATUS_MASK 0x26 |
59 | #define WM8350_COMPARATOR_INT_STATUS_MASK 0x27 | 60 | #define WM8350_COMPARATOR_INT_STATUS_MASK 0x27 |
61 | #define WM8350_CHARGER_OVERRIDES 0xE2 | ||
62 | #define WM8350_MISC_OVERRIDES 0xE3 | ||
63 | #define WM8350_COMPARATOR_OVERRIDES 0xE7 | ||
64 | #define WM8350_STATE_MACHINE_STATUS 0xE9 | ||
60 | 65 | ||
61 | #define WM8350_MAX_REGISTER 0xFF | 66 | #define WM8350_MAX_REGISTER 0xFF |
62 | 67 | ||
@@ -77,6 +82,11 @@ | |||
77 | #define WM8350_CUST_ID_MASK 0x00FF | 82 | #define WM8350_CUST_ID_MASK 0x00FF |
78 | 83 | ||
79 | /* | 84 | /* |
85 | * R2 (0x02) - Revision | ||
86 | */ | ||
87 | #define WM8350_MASK_REV_MASK 0x00FF | ||
88 | |||
89 | /* | ||
80 | * R3 (0x03) - System Control 1 | 90 | * R3 (0x03) - System Control 1 |
81 | */ | 91 | */ |
82 | #define WM8350_CHIP_ON 0x8000 | 92 | #define WM8350_CHIP_ON 0x8000 |
@@ -523,6 +533,35 @@ | |||
523 | #define WM8350_DC2_STS 0x0002 | 533 | #define WM8350_DC2_STS 0x0002 |
524 | #define WM8350_DC1_STS 0x0001 | 534 | #define WM8350_DC1_STS 0x0001 |
525 | 535 | ||
536 | /* | ||
537 | * R226 (0xE2) - Charger status | ||
538 | */ | ||
539 | #define WM8350_CHG_BATT_HOT_OVRDE 0x8000 | ||
540 | #define WM8350_CHG_BATT_COLD_OVRDE 0x4000 | ||
541 | |||
542 | /* | ||
543 | * R227 (0xE3) - Misc Overrides | ||
544 | */ | ||
545 | #define WM8350_USB_LIMIT_OVRDE 0x0400 | ||
546 | |||
547 | /* | ||
548 | * R227 (0xE7) - Comparator Overrides | ||
549 | */ | ||
550 | #define WM8350_USB_FB_OVRDE 0x8000 | ||
551 | #define WM8350_WALL_FB_OVRDE 0x4000 | ||
552 | #define WM8350_BATT_FB_OVRDE 0x2000 | ||
553 | |||
554 | |||
555 | /* | ||
556 | * R233 (0xE9) - State Machinine Status | ||
557 | */ | ||
558 | #define WM8350_USB_SM_MASK 0x0700 | ||
559 | #define WM8350_USB_SM_SHIFT 8 | ||
560 | |||
561 | #define WM8350_USB_SM_100_SLV 1 | ||
562 | #define WM8350_USB_SM_500_SLV 5 | ||
563 | #define WM8350_USB_SM_STDBY_SLV 7 | ||
564 | |||
526 | /* WM8350 wake up conditions */ | 565 | /* WM8350 wake up conditions */ |
527 | #define WM8350_IRQ_WKUP_OFF_STATE 43 | 566 | #define WM8350_IRQ_WKUP_OFF_STATE 43 |
528 | #define WM8350_IRQ_WKUP_HIB_STATE 44 | 567 | #define WM8350_IRQ_WKUP_HIB_STATE 44 |
@@ -536,6 +575,7 @@ | |||
536 | #define WM8350_REV_E 0x4 | 575 | #define WM8350_REV_E 0x4 |
537 | #define WM8350_REV_F 0x5 | 576 | #define WM8350_REV_F 0x5 |
538 | #define WM8350_REV_G 0x6 | 577 | #define WM8350_REV_G 0x6 |
578 | #define WM8350_REV_H 0x7 | ||
539 | 579 | ||
540 | #define WM8350_NUM_IRQ 63 | 580 | #define WM8350_NUM_IRQ 63 |
541 | 581 | ||
@@ -549,6 +589,14 @@ extern const u16 wm8350_mode0_defaults[]; | |||
549 | extern const u16 wm8350_mode1_defaults[]; | 589 | extern const u16 wm8350_mode1_defaults[]; |
550 | extern const u16 wm8350_mode2_defaults[]; | 590 | extern const u16 wm8350_mode2_defaults[]; |
551 | extern const u16 wm8350_mode3_defaults[]; | 591 | extern const u16 wm8350_mode3_defaults[]; |
592 | extern const u16 wm8351_mode0_defaults[]; | ||
593 | extern const u16 wm8351_mode1_defaults[]; | ||
594 | extern const u16 wm8351_mode2_defaults[]; | ||
595 | extern const u16 wm8351_mode3_defaults[]; | ||
596 | extern const u16 wm8352_mode0_defaults[]; | ||
597 | extern const u16 wm8352_mode1_defaults[]; | ||
598 | extern const u16 wm8352_mode2_defaults[]; | ||
599 | extern const u16 wm8352_mode3_defaults[]; | ||
552 | 600 | ||
553 | struct wm8350; | 601 | struct wm8350; |
554 | 602 | ||
@@ -558,8 +606,6 @@ struct wm8350_irq { | |||
558 | }; | 606 | }; |
559 | 607 | ||
560 | struct wm8350 { | 608 | struct wm8350 { |
561 | int rev; /* chip revision */ | ||
562 | |||
563 | struct device *dev; | 609 | struct device *dev; |
564 | 610 | ||
565 | /* device IO */ | 611 | /* device IO */ |
@@ -572,6 +618,8 @@ struct wm8350 { | |||
572 | void *src); | 618 | void *src); |
573 | u16 *reg_cache; | 619 | u16 *reg_cache; |
574 | 620 | ||
621 | struct mutex auxadc_mutex; | ||
622 | |||
575 | /* Interrupt handling */ | 623 | /* Interrupt handling */ |
576 | struct work_struct irq_work; | 624 | struct work_struct irq_work; |
577 | struct mutex irq_mutex; /* IRQ table mutex */ | 625 | struct mutex irq_mutex; /* IRQ table mutex */ |
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h index 69b69e07f62f..96acbfc8aa12 100644 --- a/include/linux/mfd/wm8350/pmic.h +++ b/include/linux/mfd/wm8350/pmic.h | |||
@@ -701,6 +701,10 @@ struct platform_device; | |||
701 | struct regulator_init_data; | 701 | struct regulator_init_data; |
702 | 702 | ||
703 | struct wm8350_pmic { | 703 | struct wm8350_pmic { |
704 | /* Number of regulators of each type on this device */ | ||
705 | int max_dcdc; | ||
706 | int max_isink; | ||
707 | |||
704 | /* ISINK to DCDC mapping */ | 708 | /* ISINK to DCDC mapping */ |
705 | int isink_A_dcdc; | 709 | int isink_A_dcdc; |
706 | int isink_B_dcdc; | 710 | int isink_B_dcdc; |
diff --git a/include/linux/mfd/wm8350/supply.h b/include/linux/mfd/wm8350/supply.h index 1c8f3cde79b0..2b9479310bbd 100644 --- a/include/linux/mfd/wm8350/supply.h +++ b/include/linux/mfd/wm8350/supply.h | |||
@@ -13,7 +13,8 @@ | |||
13 | #ifndef __LINUX_MFD_WM8350_SUPPLY_H_ | 13 | #ifndef __LINUX_MFD_WM8350_SUPPLY_H_ |
14 | #define __LINUX_MFD_WM8350_SUPPLY_H_ | 14 | #define __LINUX_MFD_WM8350_SUPPLY_H_ |
15 | 15 | ||
16 | #include <linux/platform_device.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/power_supply.h> | ||
17 | 18 | ||
18 | /* | 19 | /* |
19 | * Charger registers | 20 | * Charger registers |
@@ -104,8 +105,30 @@ | |||
104 | #define WM8350_IRQ_EXT_WALL_FB 37 | 105 | #define WM8350_IRQ_EXT_WALL_FB 37 |
105 | #define WM8350_IRQ_EXT_BAT_FB 38 | 106 | #define WM8350_IRQ_EXT_BAT_FB 38 |
106 | 107 | ||
108 | /* | ||
109 | * Policy to control charger state machine. | ||
110 | */ | ||
111 | struct wm8350_charger_policy { | ||
112 | |||
113 | /* charger state machine policy - set in machine driver */ | ||
114 | int eoc_mA; /* end of charge current (mA) */ | ||
115 | int charge_mV; /* charge voltage */ | ||
116 | int fast_limit_mA; /* fast charge current limit */ | ||
117 | int fast_limit_USB_mA; /* USB fast charge current limit */ | ||
118 | int charge_timeout; /* charge timeout (mins) */ | ||
119 | int trickle_start_mV; /* trickle charge starts at mV */ | ||
120 | int trickle_charge_mA; /* trickle charge current */ | ||
121 | int trickle_charge_USB_mA; /* USB trickle charge current */ | ||
122 | }; | ||
123 | |||
107 | struct wm8350_power { | 124 | struct wm8350_power { |
108 | struct platform_device *pdev; | 125 | struct platform_device *pdev; |
126 | struct power_supply battery; | ||
127 | struct power_supply usb; | ||
128 | struct power_supply ac; | ||
129 | struct wm8350_charger_policy *policy; | ||
130 | |||
131 | int rev_g_coeff; | ||
109 | }; | 132 | }; |
110 | 133 | ||
111 | #endif | 134 | #endif |
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h index eb1033957486..c1f40c2f7ffb 100644 --- a/include/linux/moduleloader.h +++ b/include/linux/moduleloader.h | |||
@@ -13,6 +13,9 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, | |||
13 | char *secstrings, | 13 | char *secstrings, |
14 | struct module *mod); | 14 | struct module *mod); |
15 | 15 | ||
16 | /* Additional bytes needed by arch in front of individual sections */ | ||
17 | unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section); | ||
18 | |||
16 | /* Allocator used for allocating struct module, core sections and init | 19 | /* Allocator used for allocating struct module, core sections and init |
17 | sections. Returns NULL on failure. */ | 20 | sections. Returns NULL on failure. */ |
18 | void *module_alloc(unsigned long size); | 21 | void *module_alloc(unsigned long size); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 41e1224651cf..c28bbba3c23d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -313,10 +313,11 @@ struct napi_struct { | |||
313 | #ifdef CONFIG_NETPOLL | 313 | #ifdef CONFIG_NETPOLL |
314 | spinlock_t poll_lock; | 314 | spinlock_t poll_lock; |
315 | int poll_owner; | 315 | int poll_owner; |
316 | struct net_device *dev; | ||
317 | #endif | 316 | #endif |
317 | struct net_device *dev; | ||
318 | struct list_head dev_list; | 318 | struct list_head dev_list; |
319 | struct sk_buff *gro_list; | 319 | struct sk_buff *gro_list; |
320 | struct sk_buff *skb; | ||
320 | }; | 321 | }; |
321 | 322 | ||
322 | enum | 323 | enum |
@@ -990,6 +991,9 @@ struct napi_gro_cb { | |||
990 | 991 | ||
991 | /* Number of segments aggregated. */ | 992 | /* Number of segments aggregated. */ |
992 | int count; | 993 | int count; |
994 | |||
995 | /* Free the skb? */ | ||
996 | int free; | ||
993 | }; | 997 | }; |
994 | 998 | ||
995 | #define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb) | 999 | #define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb) |
@@ -1011,6 +1015,14 @@ struct packet_type { | |||
1011 | struct list_head list; | 1015 | struct list_head list; |
1012 | }; | 1016 | }; |
1013 | 1017 | ||
1018 | struct napi_gro_fraginfo { | ||
1019 | skb_frag_t frags[MAX_SKB_FRAGS]; | ||
1020 | unsigned int nr_frags; | ||
1021 | unsigned int ip_summed; | ||
1022 | unsigned int len; | ||
1023 | __wsum csum; | ||
1024 | }; | ||
1025 | |||
1014 | #include <linux/interrupt.h> | 1026 | #include <linux/interrupt.h> |
1015 | #include <linux/notifier.h> | 1027 | #include <linux/notifier.h> |
1016 | 1028 | ||
@@ -1363,6 +1375,8 @@ extern int netif_receive_skb(struct sk_buff *skb); | |||
1363 | extern void napi_gro_flush(struct napi_struct *napi); | 1375 | extern void napi_gro_flush(struct napi_struct *napi); |
1364 | extern int napi_gro_receive(struct napi_struct *napi, | 1376 | extern int napi_gro_receive(struct napi_struct *napi, |
1365 | struct sk_buff *skb); | 1377 | struct sk_buff *skb); |
1378 | extern int napi_gro_frags(struct napi_struct *napi, | ||
1379 | struct napi_gro_fraginfo *info); | ||
1366 | extern void netif_nit_deliver(struct sk_buff *skb); | 1380 | extern void netif_nit_deliver(struct sk_buff *skb); |
1367 | extern int dev_valid_name(const char *name); | 1381 | extern int dev_valid_name(const char *name); |
1368 | extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); | 1382 | extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 709742be02f0..01ca0856caff 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -241,7 +241,8 @@ unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, | |||
241 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, | 241 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, |
242 | int tag, unsigned int nr_pages, struct page **pages); | 242 | int tag, unsigned int nr_pages, struct page **pages); |
243 | 243 | ||
244 | struct page *__grab_cache_page(struct address_space *mapping, pgoff_t index); | 244 | struct page *grab_cache_page_write_begin(struct address_space *mapping, |
245 | pgoff_t index, unsigned flags); | ||
245 | 246 | ||
246 | /* | 247 | /* |
247 | * Returns locked page at given index in given cache, creating it if needed. | 248 | * Returns locked page at given index in given cache, creating it if needed. |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 9007ccdfc112..96bdde36599f 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -30,8 +30,16 @@ struct percpu_counter { | |||
30 | #define FBC_BATCH (NR_CPUS*4) | 30 | #define FBC_BATCH (NR_CPUS*4) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | int percpu_counter_init(struct percpu_counter *fbc, s64 amount); | 33 | int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, |
34 | int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount); | 34 | struct lock_class_key *key); |
35 | |||
36 | #define percpu_counter_init(fbc, value) \ | ||
37 | ({ \ | ||
38 | static struct lock_class_key __key; \ | ||
39 | \ | ||
40 | __percpu_counter_init(fbc, value, &__key); \ | ||
41 | }) | ||
42 | |||
35 | void percpu_counter_destroy(struct percpu_counter *fbc); | 43 | void percpu_counter_destroy(struct percpu_counter *fbc); |
36 | void percpu_counter_set(struct percpu_counter *fbc, s64 amount); | 44 | void percpu_counter_set(struct percpu_counter *fbc, s64 amount); |
37 | void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch); | 45 | void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch); |
@@ -85,8 +93,6 @@ static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount) | |||
85 | return 0; | 93 | return 0; |
86 | } | 94 | } |
87 | 95 | ||
88 | #define percpu_counter_init_irq percpu_counter_init | ||
89 | |||
90 | static inline void percpu_counter_destroy(struct percpu_counter *fbc) | 96 | static inline void percpu_counter_destroy(struct percpu_counter *fbc) |
91 | { | 97 | { |
92 | } | 98 | } |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index f9348cba6dc1..8ff25e0e7f7a 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -45,6 +45,7 @@ enum { | |||
45 | POWER_SUPPLY_HEALTH_DEAD, | 45 | POWER_SUPPLY_HEALTH_DEAD, |
46 | POWER_SUPPLY_HEALTH_OVERVOLTAGE, | 46 | POWER_SUPPLY_HEALTH_OVERVOLTAGE, |
47 | POWER_SUPPLY_HEALTH_UNSPEC_FAILURE, | 47 | POWER_SUPPLY_HEALTH_UNSPEC_FAILURE, |
48 | POWER_SUPPLY_HEALTH_COLD, | ||
48 | }; | 49 | }; |
49 | 50 | ||
50 | enum { | 51 | enum { |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 40401b554484..d72d5d84fde5 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -36,17 +36,7 @@ | |||
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
38 | 38 | ||
39 | #define __DQUOT_VERSION__ "dquot_6.5.1" | 39 | #define __DQUOT_VERSION__ "dquot_6.5.2" |
40 | #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 | ||
41 | |||
42 | /* Size of blocks in which are counted size limits */ | ||
43 | #define QUOTABLOCK_BITS 10 | ||
44 | #define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) | ||
45 | |||
46 | /* Conversion routines from and to quota blocks */ | ||
47 | #define qb2kb(x) ((x) << (QUOTABLOCK_BITS-10)) | ||
48 | #define kb2qb(x) ((x) >> (QUOTABLOCK_BITS-10)) | ||
49 | #define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS) | ||
50 | 40 | ||
51 | #define MAXQUOTAS 2 | 41 | #define MAXQUOTAS 2 |
52 | #define USRQUOTA 0 /* element used for user quotas */ | 42 | #define USRQUOTA 0 /* element used for user quotas */ |
@@ -80,16 +70,34 @@ | |||
80 | #define Q_GETQUOTA 0x800007 /* get user quota structure */ | 70 | #define Q_GETQUOTA 0x800007 /* get user quota structure */ |
81 | #define Q_SETQUOTA 0x800008 /* set user quota structure */ | 71 | #define Q_SETQUOTA 0x800008 /* set user quota structure */ |
82 | 72 | ||
73 | /* Quota format type IDs */ | ||
74 | #define QFMT_VFS_OLD 1 | ||
75 | #define QFMT_VFS_V0 2 | ||
76 | |||
77 | /* Size of block in which space limits are passed through the quota | ||
78 | * interface */ | ||
79 | #define QIF_DQBLKSIZE_BITS 10 | ||
80 | #define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS) | ||
81 | |||
83 | /* | 82 | /* |
84 | * Quota structure used for communication with userspace via quotactl | 83 | * Quota structure used for communication with userspace via quotactl |
85 | * Following flags are used to specify which fields are valid | 84 | * Following flags are used to specify which fields are valid |
86 | */ | 85 | */ |
87 | #define QIF_BLIMITS 1 | 86 | enum { |
88 | #define QIF_SPACE 2 | 87 | QIF_BLIMITS_B = 0, |
89 | #define QIF_ILIMITS 4 | 88 | QIF_SPACE_B, |
90 | #define QIF_INODES 8 | 89 | QIF_ILIMITS_B, |
91 | #define QIF_BTIME 16 | 90 | QIF_INODES_B, |
92 | #define QIF_ITIME 32 | 91 | QIF_BTIME_B, |
92 | QIF_ITIME_B, | ||
93 | }; | ||
94 | |||
95 | #define QIF_BLIMITS (1 << QIF_BLIMITS_B) | ||
96 | #define QIF_SPACE (1 << QIF_SPACE_B) | ||
97 | #define QIF_ILIMITS (1 << QIF_ILIMITS_B) | ||
98 | #define QIF_INODES (1 << QIF_INODES_B) | ||
99 | #define QIF_BTIME (1 << QIF_BTIME_B) | ||
100 | #define QIF_ITIME (1 << QIF_ITIME_B) | ||
93 | #define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) | 101 | #define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) |
94 | #define QIF_USAGE (QIF_SPACE | QIF_INODES) | 102 | #define QIF_USAGE (QIF_SPACE | QIF_INODES) |
95 | #define QIF_TIMES (QIF_BTIME | QIF_ITIME) | 103 | #define QIF_TIMES (QIF_BTIME | QIF_ITIME) |
@@ -172,7 +180,7 @@ enum { | |||
172 | #include <asm/atomic.h> | 180 | #include <asm/atomic.h> |
173 | 181 | ||
174 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ | 182 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ |
175 | typedef __u64 qsize_t; /* Type in which we store sizes */ | 183 | typedef long long qsize_t; /* Type in which we store sizes */ |
176 | 184 | ||
177 | extern spinlock_t dq_data_lock; | 185 | extern spinlock_t dq_data_lock; |
178 | 186 | ||
@@ -187,12 +195,12 @@ extern spinlock_t dq_data_lock; | |||
187 | * Data for one user/group kept in memory | 195 | * Data for one user/group kept in memory |
188 | */ | 196 | */ |
189 | struct mem_dqblk { | 197 | struct mem_dqblk { |
190 | __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ | 198 | qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ |
191 | __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ | 199 | qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */ |
192 | qsize_t dqb_curspace; /* current used space */ | 200 | qsize_t dqb_curspace; /* current used space */ |
193 | __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ | 201 | qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ |
194 | __u32 dqb_isoftlimit; /* preferred inode limit */ | 202 | qsize_t dqb_isoftlimit; /* preferred inode limit */ |
195 | __u32 dqb_curinodes; /* current # allocated inodes */ | 203 | qsize_t dqb_curinodes; /* current # allocated inodes */ |
196 | time_t dqb_btime; /* time limit for excessive disk use */ | 204 | time_t dqb_btime; /* time limit for excessive disk use */ |
197 | time_t dqb_itime; /* time limit for excessive inode use */ | 205 | time_t dqb_itime; /* time limit for excessive inode use */ |
198 | }; | 206 | }; |
@@ -212,10 +220,7 @@ struct mem_dqinfo { | |||
212 | unsigned int dqi_igrace; | 220 | unsigned int dqi_igrace; |
213 | qsize_t dqi_maxblimit; | 221 | qsize_t dqi_maxblimit; |
214 | qsize_t dqi_maxilimit; | 222 | qsize_t dqi_maxilimit; |
215 | union { | 223 | void *dqi_priv; |
216 | struct v1_mem_dqinfo v1_i; | ||
217 | struct v2_mem_dqinfo v2_i; | ||
218 | } u; | ||
219 | }; | 224 | }; |
220 | 225 | ||
221 | struct super_block; | 226 | struct super_block; |
@@ -249,6 +254,11 @@ extern struct dqstats dqstats; | |||
249 | #define DQ_FAKE_B 3 /* no limits only usage */ | 254 | #define DQ_FAKE_B 3 /* no limits only usage */ |
250 | #define DQ_READ_B 4 /* dquot was read into memory */ | 255 | #define DQ_READ_B 4 /* dquot was read into memory */ |
251 | #define DQ_ACTIVE_B 5 /* dquot is active (dquot_release not called) */ | 256 | #define DQ_ACTIVE_B 5 /* dquot is active (dquot_release not called) */ |
257 | #define DQ_LASTSET_B 6 /* Following 6 bits (see QIF_) are reserved\ | ||
258 | * for the mask of entries set via SETQUOTA\ | ||
259 | * quotactl. They are set under dq_data_lock\ | ||
260 | * and the quota format handling dquot can\ | ||
261 | * clear them when it sees fit. */ | ||
252 | 262 | ||
253 | struct dquot { | 263 | struct dquot { |
254 | struct hlist_node dq_hash; /* Hash list in memory */ | 264 | struct hlist_node dq_hash; /* Hash list in memory */ |
@@ -287,11 +297,13 @@ struct dquot_operations { | |||
287 | int (*initialize) (struct inode *, int); | 297 | int (*initialize) (struct inode *, int); |
288 | int (*drop) (struct inode *); | 298 | int (*drop) (struct inode *); |
289 | int (*alloc_space) (struct inode *, qsize_t, int); | 299 | int (*alloc_space) (struct inode *, qsize_t, int); |
290 | int (*alloc_inode) (const struct inode *, unsigned long); | 300 | int (*alloc_inode) (const struct inode *, qsize_t); |
291 | int (*free_space) (struct inode *, qsize_t); | 301 | int (*free_space) (struct inode *, qsize_t); |
292 | int (*free_inode) (const struct inode *, unsigned long); | 302 | int (*free_inode) (const struct inode *, qsize_t); |
293 | int (*transfer) (struct inode *, struct iattr *); | 303 | int (*transfer) (struct inode *, struct iattr *); |
294 | int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ | 304 | int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ |
305 | struct dquot *(*alloc_dquot)(struct super_block *, int); /* Allocate memory for new dquot */ | ||
306 | void (*destroy_dquot)(struct dquot *); /* Free memory for dquot */ | ||
295 | int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */ | 307 | int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */ |
296 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ | 308 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ |
297 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ | 309 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ |
@@ -320,12 +332,42 @@ struct quota_format_type { | |||
320 | struct quota_format_type *qf_next; | 332 | struct quota_format_type *qf_next; |
321 | }; | 333 | }; |
322 | 334 | ||
323 | #define DQUOT_USR_ENABLED 0x01 /* User diskquotas enabled */ | 335 | /* Quota state flags - they actually come in two flavors - for users and groups */ |
324 | #define DQUOT_GRP_ENABLED 0x02 /* Group diskquotas enabled */ | 336 | enum { |
325 | #define DQUOT_USR_SUSPENDED 0x04 /* User diskquotas are off, but | 337 | _DQUOT_USAGE_ENABLED = 0, /* Track disk usage for users */ |
338 | _DQUOT_LIMITS_ENABLED, /* Enforce quota limits for users */ | ||
339 | _DQUOT_SUSPENDED, /* User diskquotas are off, but | ||
326 | * we have necessary info in | 340 | * we have necessary info in |
327 | * memory to turn them on */ | 341 | * memory to turn them on */ |
328 | #define DQUOT_GRP_SUSPENDED 0x08 /* The same for group quotas */ | 342 | _DQUOT_STATE_FLAGS |
343 | }; | ||
344 | #define DQUOT_USAGE_ENABLED (1 << _DQUOT_USAGE_ENABLED) | ||
345 | #define DQUOT_LIMITS_ENABLED (1 << _DQUOT_LIMITS_ENABLED) | ||
346 | #define DQUOT_SUSPENDED (1 << _DQUOT_SUSPENDED) | ||
347 | #define DQUOT_STATE_FLAGS (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED | \ | ||
348 | DQUOT_SUSPENDED) | ||
349 | /* Other quota flags */ | ||
350 | #define DQUOT_QUOTA_SYS_FILE (1 << 6) /* Quota file is a special | ||
351 | * system file and user cannot | ||
352 | * touch it. Filesystem is | ||
353 | * responsible for setting | ||
354 | * S_NOQUOTA, S_NOATIME flags | ||
355 | */ | ||
356 | #define DQUOT_NEGATIVE_USAGE (1 << 7) /* Allow negative quota usage */ | ||
357 | |||
358 | static inline unsigned int dquot_state_flag(unsigned int flags, int type) | ||
359 | { | ||
360 | if (type == USRQUOTA) | ||
361 | return flags; | ||
362 | return flags << _DQUOT_STATE_FLAGS; | ||
363 | } | ||
364 | |||
365 | static inline unsigned int dquot_generic_flag(unsigned int flags, int type) | ||
366 | { | ||
367 | if (type == USRQUOTA) | ||
368 | return flags; | ||
369 | return flags >> _DQUOT_STATE_FLAGS; | ||
370 | } | ||
329 | 371 | ||
330 | struct quota_info { | 372 | struct quota_info { |
331 | unsigned int flags; /* Flags for diskquotas on this device */ | 373 | unsigned int flags; /* Flags for diskquotas on this device */ |
diff --git a/include/linux/quotaio_v1.h b/include/linux/quotaio_v1.h deleted file mode 100644 index 746654b5de70..000000000000 --- a/include/linux/quotaio_v1.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #ifndef _LINUX_QUOTAIO_V1_H | ||
2 | #define _LINUX_QUOTAIO_V1_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* | ||
7 | * The following constants define the amount of time given a user | ||
8 | * before the soft limits are treated as hard limits (usually resulting | ||
9 | * in an allocation failure). The timer is started when the user crosses | ||
10 | * their soft limit, it is reset when they go below their soft limit. | ||
11 | */ | ||
12 | #define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */ | ||
13 | #define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */ | ||
14 | |||
15 | /* | ||
16 | * The following structure defines the format of the disk quota file | ||
17 | * (as it appears on disk) - the file is an array of these structures | ||
18 | * indexed by user or group number. | ||
19 | */ | ||
20 | struct v1_disk_dqblk { | ||
21 | __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ | ||
22 | __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ | ||
23 | __u32 dqb_curblocks; /* current block count */ | ||
24 | __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ | ||
25 | __u32 dqb_isoftlimit; /* preferred inode limit */ | ||
26 | __u32 dqb_curinodes; /* current # allocated inodes */ | ||
27 | time_t dqb_btime; /* time limit for excessive disk use */ | ||
28 | time_t dqb_itime; /* time limit for excessive inode use */ | ||
29 | }; | ||
30 | |||
31 | #define v1_dqoff(UID) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk))) | ||
32 | |||
33 | #endif /* _LINUX_QUOTAIO_V1_H */ | ||
diff --git a/include/linux/quotaio_v2.h b/include/linux/quotaio_v2.h deleted file mode 100644 index 303d7cbe30d4..000000000000 --- a/include/linux/quotaio_v2.h +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Definitions of structures for vfsv0 quota format | ||
3 | */ | ||
4 | |||
5 | #ifndef _LINUX_QUOTAIO_V2_H | ||
6 | #define _LINUX_QUOTAIO_V2_H | ||
7 | |||
8 | #include <linux/types.h> | ||
9 | #include <linux/quota.h> | ||
10 | |||
11 | /* | ||
12 | * Definitions of magics and versions of current quota files | ||
13 | */ | ||
14 | #define V2_INITQMAGICS {\ | ||
15 | 0xd9c01f11, /* USRQUOTA */\ | ||
16 | 0xd9c01927 /* GRPQUOTA */\ | ||
17 | } | ||
18 | |||
19 | #define V2_INITQVERSIONS {\ | ||
20 | 0, /* USRQUOTA */\ | ||
21 | 0 /* GRPQUOTA */\ | ||
22 | } | ||
23 | |||
24 | /* | ||
25 | * The following structure defines the format of the disk quota file | ||
26 | * (as it appears on disk) - the file is a radix tree whose leaves point | ||
27 | * to blocks of these structures. | ||
28 | */ | ||
29 | struct v2_disk_dqblk { | ||
30 | __le32 dqb_id; /* id this quota applies to */ | ||
31 | __le32 dqb_ihardlimit; /* absolute limit on allocated inodes */ | ||
32 | __le32 dqb_isoftlimit; /* preferred inode limit */ | ||
33 | __le32 dqb_curinodes; /* current # allocated inodes */ | ||
34 | __le32 dqb_bhardlimit; /* absolute limit on disk space (in QUOTABLOCK_SIZE) */ | ||
35 | __le32 dqb_bsoftlimit; /* preferred limit on disk space (in QUOTABLOCK_SIZE) */ | ||
36 | __le64 dqb_curspace; /* current space occupied (in bytes) */ | ||
37 | __le64 dqb_btime; /* time limit for excessive disk use */ | ||
38 | __le64 dqb_itime; /* time limit for excessive inode use */ | ||
39 | }; | ||
40 | |||
41 | /* | ||
42 | * Here are header structures as written on disk and their in-memory copies | ||
43 | */ | ||
44 | /* First generic header */ | ||
45 | struct v2_disk_dqheader { | ||
46 | __le32 dqh_magic; /* Magic number identifying file */ | ||
47 | __le32 dqh_version; /* File version */ | ||
48 | }; | ||
49 | |||
50 | /* Header with type and version specific information */ | ||
51 | struct v2_disk_dqinfo { | ||
52 | __le32 dqi_bgrace; /* Time before block soft limit becomes hard limit */ | ||
53 | __le32 dqi_igrace; /* Time before inode soft limit becomes hard limit */ | ||
54 | __le32 dqi_flags; /* Flags for quotafile (DQF_*) */ | ||
55 | __le32 dqi_blocks; /* Number of blocks in file */ | ||
56 | __le32 dqi_free_blk; /* Number of first free block in the list */ | ||
57 | __le32 dqi_free_entry; /* Number of block with at least one free entry */ | ||
58 | }; | ||
59 | |||
60 | /* | ||
61 | * Structure of header of block with quota structures. It is padded to 16 bytes so | ||
62 | * there will be space for exactly 21 quota-entries in a block | ||
63 | */ | ||
64 | struct v2_disk_dqdbheader { | ||
65 | __le32 dqdh_next_free; /* Number of next block with free entry */ | ||
66 | __le32 dqdh_prev_free; /* Number of previous block with free entry */ | ||
67 | __le16 dqdh_entries; /* Number of valid entries in block */ | ||
68 | __le16 dqdh_pad1; | ||
69 | __le32 dqdh_pad2; | ||
70 | }; | ||
71 | |||
72 | #define V2_DQINFOOFF sizeof(struct v2_disk_dqheader) /* Offset of info header in file */ | ||
73 | #define V2_DQBLKSIZE_BITS 10 | ||
74 | #define V2_DQBLKSIZE (1 << V2_DQBLKSIZE_BITS) /* Size of block with quota structures */ | ||
75 | #define V2_DQTREEOFF 1 /* Offset of tree in file in blocks */ | ||
76 | #define V2_DQTREEDEPTH 4 /* Depth of quota tree */ | ||
77 | #define V2_DQSTRINBLK ((V2_DQBLKSIZE - sizeof(struct v2_disk_dqdbheader)) / sizeof(struct v2_disk_dqblk)) /* Number of entries in one blocks */ | ||
78 | |||
79 | #endif /* _LINUX_QUOTAIO_V2_H */ | ||
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index a558a4c1d35a..21b781a3350f 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -24,12 +24,21 @@ void sync_dquots(struct super_block *sb, int type); | |||
24 | 24 | ||
25 | int dquot_initialize(struct inode *inode, int type); | 25 | int dquot_initialize(struct inode *inode, int type); |
26 | int dquot_drop(struct inode *inode); | 26 | int dquot_drop(struct inode *inode); |
27 | int dquot_drop_locked(struct inode *inode); | ||
28 | struct dquot *dqget(struct super_block *sb, unsigned int id, int type); | ||
29 | void dqput(struct dquot *dquot); | ||
30 | int dquot_is_cached(struct super_block *sb, unsigned int id, int type); | ||
31 | int dquot_scan_active(struct super_block *sb, | ||
32 | int (*fn)(struct dquot *dquot, unsigned long priv), | ||
33 | unsigned long priv); | ||
34 | struct dquot *dquot_alloc(struct super_block *sb, int type); | ||
35 | void dquot_destroy(struct dquot *dquot); | ||
27 | 36 | ||
28 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); | 37 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); |
29 | int dquot_alloc_inode(const struct inode *inode, unsigned long number); | 38 | int dquot_alloc_inode(const struct inode *inode, qsize_t number); |
30 | 39 | ||
31 | int dquot_free_space(struct inode *inode, qsize_t number); | 40 | int dquot_free_space(struct inode *inode, qsize_t number); |
32 | int dquot_free_inode(const struct inode *inode, unsigned long number); | 41 | int dquot_free_inode(const struct inode *inode, qsize_t number); |
33 | 42 | ||
34 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | 43 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
35 | int dquot_commit(struct dquot *dquot); | 44 | int dquot_commit(struct dquot *dquot); |
@@ -40,11 +49,14 @@ int dquot_mark_dquot_dirty(struct dquot *dquot); | |||
40 | 49 | ||
41 | int vfs_quota_on(struct super_block *sb, int type, int format_id, | 50 | int vfs_quota_on(struct super_block *sb, int type, int format_id, |
42 | char *path, int remount); | 51 | char *path, int remount); |
52 | int vfs_quota_enable(struct inode *inode, int type, int format_id, | ||
53 | unsigned int flags); | ||
43 | int vfs_quota_on_path(struct super_block *sb, int type, int format_id, | 54 | int vfs_quota_on_path(struct super_block *sb, int type, int format_id, |
44 | struct path *path); | 55 | struct path *path); |
45 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, | 56 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, |
46 | int format_id, int type); | 57 | int format_id, int type); |
47 | int vfs_quota_off(struct super_block *sb, int type, int remount); | 58 | int vfs_quota_off(struct super_block *sb, int type, int remount); |
59 | int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags); | ||
48 | int vfs_quota_sync(struct super_block *sb, int type); | 60 | int vfs_quota_sync(struct super_block *sb, int type); |
49 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 61 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
50 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 62 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
@@ -64,24 +76,22 @@ static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) | |||
64 | * Functions for checking status of quota | 76 | * Functions for checking status of quota |
65 | */ | 77 | */ |
66 | 78 | ||
67 | static inline int sb_has_quota_enabled(struct super_block *sb, int type) | 79 | static inline int sb_has_quota_usage_enabled(struct super_block *sb, int type) |
68 | { | 80 | { |
69 | if (type == USRQUOTA) | 81 | return sb_dqopt(sb)->flags & |
70 | return sb_dqopt(sb)->flags & DQUOT_USR_ENABLED; | 82 | dquot_state_flag(DQUOT_USAGE_ENABLED, type); |
71 | return sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED; | ||
72 | } | 83 | } |
73 | 84 | ||
74 | static inline int sb_any_quota_enabled(struct super_block *sb) | 85 | static inline int sb_has_quota_limits_enabled(struct super_block *sb, int type) |
75 | { | 86 | { |
76 | return sb_has_quota_enabled(sb, USRQUOTA) || | 87 | return sb_dqopt(sb)->flags & |
77 | sb_has_quota_enabled(sb, GRPQUOTA); | 88 | dquot_state_flag(DQUOT_LIMITS_ENABLED, type); |
78 | } | 89 | } |
79 | 90 | ||
80 | static inline int sb_has_quota_suspended(struct super_block *sb, int type) | 91 | static inline int sb_has_quota_suspended(struct super_block *sb, int type) |
81 | { | 92 | { |
82 | if (type == USRQUOTA) | 93 | return sb_dqopt(sb)->flags & |
83 | return sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED; | 94 | dquot_state_flag(DQUOT_SUSPENDED, type); |
84 | return sb_dqopt(sb)->flags & DQUOT_GRP_SUSPENDED; | ||
85 | } | 95 | } |
86 | 96 | ||
87 | static inline int sb_any_quota_suspended(struct super_block *sb) | 97 | static inline int sb_any_quota_suspended(struct super_block *sb) |
@@ -90,6 +100,31 @@ static inline int sb_any_quota_suspended(struct super_block *sb) | |||
90 | sb_has_quota_suspended(sb, GRPQUOTA); | 100 | sb_has_quota_suspended(sb, GRPQUOTA); |
91 | } | 101 | } |
92 | 102 | ||
103 | /* Does kernel know about any quota information for given sb + type? */ | ||
104 | static inline int sb_has_quota_loaded(struct super_block *sb, int type) | ||
105 | { | ||
106 | /* Currently if anything is on, then quota usage is on as well */ | ||
107 | return sb_has_quota_usage_enabled(sb, type); | ||
108 | } | ||
109 | |||
110 | static inline int sb_any_quota_loaded(struct super_block *sb) | ||
111 | { | ||
112 | return sb_has_quota_loaded(sb, USRQUOTA) || | ||
113 | sb_has_quota_loaded(sb, GRPQUOTA); | ||
114 | } | ||
115 | |||
116 | static inline int sb_has_quota_active(struct super_block *sb, int type) | ||
117 | { | ||
118 | return sb_has_quota_loaded(sb, type) && | ||
119 | !sb_has_quota_suspended(sb, type); | ||
120 | } | ||
121 | |||
122 | static inline int sb_any_quota_active(struct super_block *sb) | ||
123 | { | ||
124 | return sb_has_quota_active(sb, USRQUOTA) || | ||
125 | sb_has_quota_active(sb, GRPQUOTA); | ||
126 | } | ||
127 | |||
93 | /* | 128 | /* |
94 | * Operations supported for diskquotas. | 129 | * Operations supported for diskquotas. |
95 | */ | 130 | */ |
@@ -104,7 +139,7 @@ extern struct quotactl_ops vfs_quotactl_ops; | |||
104 | static inline void vfs_dq_init(struct inode *inode) | 139 | static inline void vfs_dq_init(struct inode *inode) |
105 | { | 140 | { |
106 | BUG_ON(!inode->i_sb); | 141 | BUG_ON(!inode->i_sb); |
107 | if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode)) | 142 | if (sb_any_quota_active(inode->i_sb) && !IS_NOQUOTA(inode)) |
108 | inode->i_sb->dq_op->initialize(inode, -1); | 143 | inode->i_sb->dq_op->initialize(inode, -1); |
109 | } | 144 | } |
110 | 145 | ||
@@ -112,7 +147,7 @@ static inline void vfs_dq_init(struct inode *inode) | |||
112 | * a transaction (deadlocks possible otherwise) */ | 147 | * a transaction (deadlocks possible otherwise) */ |
113 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) | 148 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) |
114 | { | 149 | { |
115 | if (sb_any_quota_enabled(inode->i_sb)) { | 150 | if (sb_any_quota_active(inode->i_sb)) { |
116 | /* Used space is updated in alloc_space() */ | 151 | /* Used space is updated in alloc_space() */ |
117 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA) | 152 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA) |
118 | return 1; | 153 | return 1; |
@@ -132,7 +167,7 @@ static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr) | |||
132 | 167 | ||
133 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) | 168 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) |
134 | { | 169 | { |
135 | if (sb_any_quota_enabled(inode->i_sb)) { | 170 | if (sb_any_quota_active(inode->i_sb)) { |
136 | /* Used space is updated in alloc_space() */ | 171 | /* Used space is updated in alloc_space() */ |
137 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA) | 172 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA) |
138 | return 1; | 173 | return 1; |
@@ -152,7 +187,7 @@ static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) | |||
152 | 187 | ||
153 | static inline int vfs_dq_alloc_inode(struct inode *inode) | 188 | static inline int vfs_dq_alloc_inode(struct inode *inode) |
154 | { | 189 | { |
155 | if (sb_any_quota_enabled(inode->i_sb)) { | 190 | if (sb_any_quota_active(inode->i_sb)) { |
156 | vfs_dq_init(inode); | 191 | vfs_dq_init(inode); |
157 | if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) | 192 | if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) |
158 | return 1; | 193 | return 1; |
@@ -162,7 +197,7 @@ static inline int vfs_dq_alloc_inode(struct inode *inode) | |||
162 | 197 | ||
163 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | 198 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
164 | { | 199 | { |
165 | if (sb_any_quota_enabled(inode->i_sb)) | 200 | if (sb_any_quota_active(inode->i_sb)) |
166 | inode->i_sb->dq_op->free_space(inode, nr); | 201 | inode->i_sb->dq_op->free_space(inode, nr); |
167 | else | 202 | else |
168 | inode_sub_bytes(inode, nr); | 203 | inode_sub_bytes(inode, nr); |
@@ -176,7 +211,7 @@ static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) | |||
176 | 211 | ||
177 | static inline void vfs_dq_free_inode(struct inode *inode) | 212 | static inline void vfs_dq_free_inode(struct inode *inode) |
178 | { | 213 | { |
179 | if (sb_any_quota_enabled(inode->i_sb)) | 214 | if (sb_any_quota_active(inode->i_sb)) |
180 | inode->i_sb->dq_op->free_inode(inode, 1); | 215 | inode->i_sb->dq_op->free_inode(inode, 1); |
181 | } | 216 | } |
182 | 217 | ||
@@ -197,12 +232,12 @@ static inline int vfs_dq_off(struct super_block *sb, int remount) | |||
197 | 232 | ||
198 | #else | 233 | #else |
199 | 234 | ||
200 | static inline int sb_has_quota_enabled(struct super_block *sb, int type) | 235 | static inline int sb_has_quota_usage_enabled(struct super_block *sb, int type) |
201 | { | 236 | { |
202 | return 0; | 237 | return 0; |
203 | } | 238 | } |
204 | 239 | ||
205 | static inline int sb_any_quota_enabled(struct super_block *sb) | 240 | static inline int sb_has_quota_limits_enabled(struct super_block *sb, int type) |
206 | { | 241 | { |
207 | return 0; | 242 | return 0; |
208 | } | 243 | } |
@@ -217,6 +252,27 @@ static inline int sb_any_quota_suspended(struct super_block *sb) | |||
217 | return 0; | 252 | return 0; |
218 | } | 253 | } |
219 | 254 | ||
255 | /* Does kernel know about any quota information for given sb + type? */ | ||
256 | static inline int sb_has_quota_loaded(struct super_block *sb, int type) | ||
257 | { | ||
258 | return 0; | ||
259 | } | ||
260 | |||
261 | static inline int sb_any_quota_loaded(struct super_block *sb) | ||
262 | { | ||
263 | return 0; | ||
264 | } | ||
265 | |||
266 | static inline int sb_has_quota_active(struct super_block *sb, int type) | ||
267 | { | ||
268 | return 0; | ||
269 | } | ||
270 | |||
271 | static inline int sb_any_quota_active(struct super_block *sb) | ||
272 | { | ||
273 | return 0; | ||
274 | } | ||
275 | |||
220 | /* | 276 | /* |
221 | * NO-OP when quota not configured. | 277 | * NO-OP when quota not configured. |
222 | */ | 278 | */ |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index a916c6660dfa..355f6e80db0d 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -136,7 +136,7 @@ do { \ | |||
136 | */ | 136 | */ |
137 | static inline void *radix_tree_deref_slot(void **pslot) | 137 | static inline void *radix_tree_deref_slot(void **pslot) |
138 | { | 138 | { |
139 | void *ret = *pslot; | 139 | void *ret = rcu_dereference(*pslot); |
140 | if (unlikely(radix_tree_is_indirect_ptr(ret))) | 140 | if (unlikely(radix_tree_is_indirect_ptr(ret))) |
141 | ret = RADIX_TREE_RETRY; | 141 | ret = RADIX_TREE_RETRY; |
142 | return ret; | 142 | return ret; |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 91f597ad6acc..4046b75563c1 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -145,6 +145,8 @@ struct rtc_class_ops { | |||
145 | int (*irq_set_state)(struct device *, int enabled); | 145 | int (*irq_set_state)(struct device *, int enabled); |
146 | int (*irq_set_freq)(struct device *, int freq); | 146 | int (*irq_set_freq)(struct device *, int freq); |
147 | int (*read_callback)(struct device *, int data); | 147 | int (*read_callback)(struct device *, int data); |
148 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); | ||
149 | int (*update_irq_enable)(struct device *, unsigned int enabled); | ||
148 | }; | 150 | }; |
149 | 151 | ||
150 | #define RTC_DEVICE_NAME_SIZE 20 | 152 | #define RTC_DEVICE_NAME_SIZE 20 |
@@ -181,7 +183,7 @@ struct rtc_device | |||
181 | struct timer_list uie_timer; | 183 | struct timer_list uie_timer; |
182 | /* Those fields are protected by rtc->irq_lock */ | 184 | /* Those fields are protected by rtc->irq_lock */ |
183 | unsigned int oldsecs; | 185 | unsigned int oldsecs; |
184 | unsigned int irq_active:1; | 186 | unsigned int uie_irq_active:1; |
185 | unsigned int stop_uie_polling:1; | 187 | unsigned int stop_uie_polling:1; |
186 | unsigned int uie_task_active:1; | 188 | unsigned int uie_task_active:1; |
187 | unsigned int uie_timer_active:1; | 189 | unsigned int uie_timer_active:1; |
@@ -216,6 +218,10 @@ extern int rtc_irq_set_state(struct rtc_device *rtc, | |||
216 | struct rtc_task *task, int enabled); | 218 | struct rtc_task *task, int enabled); |
217 | extern int rtc_irq_set_freq(struct rtc_device *rtc, | 219 | extern int rtc_irq_set_freq(struct rtc_device *rtc, |
218 | struct rtc_task *task, int freq); | 220 | struct rtc_task *task, int freq); |
221 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); | ||
222 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | ||
223 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | ||
224 | unsigned int enabled); | ||
219 | 225 | ||
220 | typedef struct rtc_task { | 226 | typedef struct rtc_task { |
221 | void (*func)(void *private_data); | 227 | void (*func)(void *private_data); |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 4be01bb44377..82229317753d 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #ifndef __LINUX_SPI_H | 19 | #ifndef __LINUX_SPI_H |
20 | #define __LINUX_SPI_H | 20 | #define __LINUX_SPI_H |
21 | 21 | ||
22 | #include <linux/device.h> | ||
23 | |||
22 | /* | 24 | /* |
23 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 25 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
24 | * (There's no SPI slave support for Linux yet...) | 26 | * (There's no SPI slave support for Linux yet...) |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 74d59a641362..baba3a23a814 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -35,6 +35,24 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | |||
35 | * won't come or go while it's being called. Used by hotplug cpu. | 35 | * won't come or go while it's being called. Used by hotplug cpu. |
36 | */ | 36 | */ |
37 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | 37 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); |
38 | |||
39 | /** | ||
40 | * stop_machine_create: create all stop_machine threads | ||
41 | * | ||
42 | * Description: This causes all stop_machine threads to be created before | ||
43 | * stop_machine actually gets called. This can be used by subsystems that | ||
44 | * need a non failing stop_machine infrastructure. | ||
45 | */ | ||
46 | int stop_machine_create(void); | ||
47 | |||
48 | /** | ||
49 | * stop_machine_destroy: destroy all stop_machine threads | ||
50 | * | ||
51 | * Description: This causes all stop_machine threads which were created with | ||
52 | * stop_machine_create to be destroyed again. | ||
53 | */ | ||
54 | void stop_machine_destroy(void); | ||
55 | |||
38 | #else | 56 | #else |
39 | 57 | ||
40 | static inline int stop_machine(int (*fn)(void *), void *data, | 58 | static inline int stop_machine(int (*fn)(void *), void *data, |
@@ -46,5 +64,9 @@ static inline int stop_machine(int (*fn)(void *), void *data, | |||
46 | local_irq_enable(); | 64 | local_irq_enable(); |
47 | return ret; | 65 | return ret; |
48 | } | 66 | } |
67 | |||
68 | static inline int stop_machine_create(void) { return 0; } | ||
69 | static inline void stop_machine_destroy(void) { } | ||
70 | |||
49 | #endif /* CONFIG_SMP */ | 71 | #endif /* CONFIG_SMP */ |
50 | #endif /* _LINUX_STOP_MACHINE */ | 72 | #endif /* _LINUX_STOP_MACHINE */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 04fb47bfb920..18d0a243a7b3 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -549,7 +549,7 @@ asmlinkage long sys_inotify_init(void); | |||
549 | asmlinkage long sys_inotify_init1(int flags); | 549 | asmlinkage long sys_inotify_init1(int flags); |
550 | asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, | 550 | asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, |
551 | u32 mask); | 551 | u32 mask); |
552 | asmlinkage long sys_inotify_rm_watch(int fd, u32 wd); | 552 | asmlinkage long sys_inotify_rm_watch(int fd, __s32 wd); |
553 | 553 | ||
554 | asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, | 554 | asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, |
555 | __u32 __user *ustatus); | 555 | __u32 __user *ustatus); |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index ce532f2222ce..1459ed3e2697 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -155,9 +155,9 @@ static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, const s | |||
155 | { | 155 | { |
156 | 156 | ||
157 | if (dev) | 157 | if (dev) |
158 | return __neigh_lookup(&nd_tbl, addr, dev, 1); | 158 | return __neigh_lookup_errno(&nd_tbl, addr, dev); |
159 | 159 | ||
160 | return NULL; | 160 | return ERR_PTR(-ENODEV); |
161 | } | 161 | } |
162 | 162 | ||
163 | 163 | ||