diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/binfmts.h | 3 | ||||
| -rw-r--r-- | include/linux/compat.h | 4 | ||||
| -rw-r--r-- | include/linux/genalloc.h | 2 | ||||
| -rw-r--r-- | include/linux/init.h | 6 | ||||
| -rw-r--r-- | include/linux/jump_label.h | 4 | ||||
| -rw-r--r-- | include/linux/kernel-page-flags.h | 1 | ||||
| -rw-r--r-- | include/linux/list.h | 79 | ||||
| -rw-r--r-- | include/linux/memblock.h | 24 | ||||
| -rw-r--r-- | include/linux/memory_hotplug.h | 11 | ||||
| -rw-r--r-- | include/linux/mempolicy.h | 5 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/core.h | 1 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/rtc.h | 11 | ||||
| -rw-r--r-- | include/linux/mm.h | 4 | ||||
| -rw-r--r-- | include/linux/mman.h | 2 | ||||
| -rw-r--r-- | include/linux/msg.h | 6 | ||||
| -rw-r--r-- | include/linux/oom.h | 5 | ||||
| -rw-r--r-- | include/linux/platform_data/lm3630_bl.h | 57 | ||||
| -rw-r--r-- | include/linux/platform_data/lm3630a_bl.h | 65 | ||||
| -rw-r--r-- | include/linux/platform_data/lp855x.h | 19 | ||||
| -rw-r--r-- | include/linux/rbtree.h | 16 | ||||
| -rw-r--r-- | include/linux/sched.h | 13 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 4 | ||||
| -rw-r--r-- | include/linux/vm_event_item.h | 1 | ||||
| -rw-r--r-- | include/linux/writeback.h | 2 |
24 files changed, 223 insertions, 122 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 790d3305a5a7..fd8bf3219ef7 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -100,9 +100,6 @@ extern void setup_new_exec(struct linux_binprm * bprm); | |||
| 100 | extern void would_dump(struct linux_binprm *, struct file *); | 100 | extern void would_dump(struct linux_binprm *, struct file *); |
| 101 | 101 | ||
| 102 | extern int suid_dumpable; | 102 | extern int suid_dumpable; |
| 103 | #define SUID_DUMP_DISABLE 0 /* No setuid dumping */ | ||
| 104 | #define SUID_DUMP_USER 1 /* Dump as user of process */ | ||
| 105 | #define SUID_DUMP_ROOT 2 /* Dump as root */ | ||
| 106 | 103 | ||
| 107 | /* Stack area protections */ | 104 | /* Stack area protections */ |
| 108 | #define EXSTACK_DEFAULT 0 /* Whatever the arch defaults to */ | 105 | #define EXSTACK_DEFAULT 0 /* Whatever the arch defaults to */ |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 78cdf51ff5ba..eb8a49d75ab3 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -41,14 +41,14 @@ | |||
| 41 | COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) | 41 | COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) |
| 42 | 42 | ||
| 43 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | 43 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ |
| 44 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ | 44 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\ |
| 45 | __attribute__((alias(__stringify(compat_SyS##name)))); \ | ||
| 45 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ | 46 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ |
| 46 | asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\ | 47 | asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\ |
| 47 | asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\ | 48 | asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\ |
| 48 | { \ | 49 | { \ |
| 49 | return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \ | 50 | return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \ |
| 50 | } \ | 51 | } \ |
| 51 | SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \ | ||
| 52 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) | 52 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
| 53 | 53 | ||
| 54 | #ifndef compat_user_stack_pointer | 54 | #ifndef compat_user_stack_pointer |
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h index f8d41cb1cbe0..1eda33d7cb10 100644 --- a/include/linux/genalloc.h +++ b/include/linux/genalloc.h | |||
| @@ -94,6 +94,8 @@ static inline int gen_pool_add(struct gen_pool *pool, unsigned long addr, | |||
| 94 | } | 94 | } |
| 95 | extern void gen_pool_destroy(struct gen_pool *); | 95 | extern void gen_pool_destroy(struct gen_pool *); |
| 96 | extern unsigned long gen_pool_alloc(struct gen_pool *, size_t); | 96 | extern unsigned long gen_pool_alloc(struct gen_pool *, size_t); |
| 97 | extern void *gen_pool_dma_alloc(struct gen_pool *pool, size_t size, | ||
| 98 | dma_addr_t *dma); | ||
| 97 | extern void gen_pool_free(struct gen_pool *, unsigned long, size_t); | 99 | extern void gen_pool_free(struct gen_pool *, unsigned long, size_t); |
| 98 | extern void gen_pool_for_each_chunk(struct gen_pool *, | 100 | extern void gen_pool_for_each_chunk(struct gen_pool *, |
| 99 | void (*)(struct gen_pool *, struct gen_pool_chunk *, void *), void *); | 101 | void (*)(struct gen_pool *, struct gen_pool_chunk *, void *), void *); |
diff --git a/include/linux/init.h b/include/linux/init.h index f1c27a71d03c..8e68a64bfe00 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -26,8 +26,8 @@ | |||
| 26 | * extern int initialize_foobar_device(int, int, int) __init; | 26 | * extern int initialize_foobar_device(int, int, int) __init; |
| 27 | * | 27 | * |
| 28 | * For initialized data: | 28 | * For initialized data: |
| 29 | * You should insert __initdata between the variable name and equal | 29 | * You should insert __initdata or __initconst between the variable name |
| 30 | * sign followed by value, e.g.: | 30 | * and equal sign followed by value, e.g.: |
| 31 | * | 31 | * |
| 32 | * static int init_variable __initdata = 0; | 32 | * static int init_variable __initdata = 0; |
| 33 | * static const char linux_logo[] __initconst = { 0x32, 0x36, ... }; | 33 | * static const char linux_logo[] __initconst = { 0x32, 0x36, ... }; |
| @@ -35,8 +35,6 @@ | |||
| 35 | * Don't forget to initialize data not at file scope, i.e. within a function, | 35 | * Don't forget to initialize data not at file scope, i.e. within a function, |
| 36 | * as gcc otherwise puts the data into the bss section and not into the init | 36 | * as gcc otherwise puts the data into the bss section and not into the init |
| 37 | * section. | 37 | * section. |
| 38 | * | ||
| 39 | * Also note, that this data cannot be "const". | ||
| 40 | */ | 38 | */ |
| 41 | 39 | ||
| 42 | /* These are for everybody (although not all archs will actually | 40 | /* These are for everybody (although not all archs will actually |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index a5079072da66..cf08540d6204 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
| @@ -132,14 +132,14 @@ static __always_inline void jump_label_init(void) | |||
| 132 | 132 | ||
| 133 | static __always_inline bool static_key_false(struct static_key *key) | 133 | static __always_inline bool static_key_false(struct static_key *key) |
| 134 | { | 134 | { |
| 135 | if (unlikely(atomic_read(&key->enabled)) > 0) | 135 | if (unlikely(atomic_read(&key->enabled) > 0)) |
| 136 | return true; | 136 | return true; |
| 137 | return false; | 137 | return false; |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | static __always_inline bool static_key_true(struct static_key *key) | 140 | static __always_inline bool static_key_true(struct static_key *key) |
| 141 | { | 141 | { |
| 142 | if (likely(atomic_read(&key->enabled)) > 0) | 142 | if (likely(atomic_read(&key->enabled) > 0)) |
| 143 | return true; | 143 | return true; |
| 144 | return false; | 144 | return false; |
| 145 | } | 145 | } |
diff --git a/include/linux/kernel-page-flags.h b/include/linux/kernel-page-flags.h index 546eb6a76934..f65ce09784f1 100644 --- a/include/linux/kernel-page-flags.h +++ b/include/linux/kernel-page-flags.h | |||
| @@ -15,5 +15,6 @@ | |||
| 15 | #define KPF_OWNER_PRIVATE 37 | 15 | #define KPF_OWNER_PRIVATE 37 |
| 16 | #define KPF_ARCH 38 | 16 | #define KPF_ARCH 38 |
| 17 | #define KPF_UNCACHED 39 | 17 | #define KPF_UNCACHED 39 |
| 18 | #define KPF_SOFTDIRTY 40 | ||
| 18 | 19 | ||
| 19 | #endif /* LINUX_KERNEL_PAGE_FLAGS_H */ | 20 | #endif /* LINUX_KERNEL_PAGE_FLAGS_H */ |
diff --git a/include/linux/list.h b/include/linux/list.h index f4d8a2f12a33..ef9594171062 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
| @@ -362,6 +362,17 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 362 | list_entry((ptr)->next, type, member) | 362 | list_entry((ptr)->next, type, member) |
| 363 | 363 | ||
| 364 | /** | 364 | /** |
| 365 | * list_last_entry - get the last element from a list | ||
| 366 | * @ptr: the list head to take the element from. | ||
| 367 | * @type: the type of the struct this is embedded in. | ||
| 368 | * @member: the name of the list_struct within the struct. | ||
| 369 | * | ||
| 370 | * Note, that list is expected to be not empty. | ||
| 371 | */ | ||
| 372 | #define list_last_entry(ptr, type, member) \ | ||
| 373 | list_entry((ptr)->prev, type, member) | ||
| 374 | |||
| 375 | /** | ||
| 365 | * list_first_entry_or_null - get the first element from a list | 376 | * list_first_entry_or_null - get the first element from a list |
| 366 | * @ptr: the list head to take the element from. | 377 | * @ptr: the list head to take the element from. |
| 367 | * @type: the type of the struct this is embedded in. | 378 | * @type: the type of the struct this is embedded in. |
| @@ -373,6 +384,22 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 373 | (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL) | 384 | (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL) |
| 374 | 385 | ||
| 375 | /** | 386 | /** |
| 387 | * list_next_entry - get the next element in list | ||
| 388 | * @pos: the type * to cursor | ||
| 389 | * @member: the name of the list_struct within the struct. | ||
| 390 | */ | ||
| 391 | #define list_next_entry(pos, member) \ | ||
| 392 | list_entry((pos)->member.next, typeof(*(pos)), member) | ||
| 393 | |||
| 394 | /** | ||
| 395 | * list_prev_entry - get the prev element in list | ||
| 396 | * @pos: the type * to cursor | ||
| 397 | * @member: the name of the list_struct within the struct. | ||
| 398 | */ | ||
| 399 | #define list_prev_entry(pos, member) \ | ||
| 400 | list_entry((pos)->member.prev, typeof(*(pos)), member) | ||
| 401 | |||
| 402 | /** | ||
| 376 | * list_for_each - iterate over a list | 403 | * list_for_each - iterate over a list |
| 377 | * @pos: the &struct list_head to use as a loop cursor. | 404 | * @pos: the &struct list_head to use as a loop cursor. |
| 378 | * @head: the head for your list. | 405 | * @head: the head for your list. |
| @@ -416,9 +443,9 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 416 | * @member: the name of the list_struct within the struct. | 443 | * @member: the name of the list_struct within the struct. |
| 417 | */ | 444 | */ |
| 418 | #define list_for_each_entry(pos, head, member) \ | 445 | #define list_for_each_entry(pos, head, member) \ |
| 419 | for (pos = list_entry((head)->next, typeof(*pos), member); \ | 446 | for (pos = list_first_entry(head, typeof(*pos), member); \ |
| 420 | &pos->member != (head); \ | 447 | &pos->member != (head); \ |
| 421 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 448 | pos = list_next_entry(pos, member)) |
| 422 | 449 | ||
| 423 | /** | 450 | /** |
| 424 | * list_for_each_entry_reverse - iterate backwards over list of given type. | 451 | * list_for_each_entry_reverse - iterate backwards over list of given type. |
| @@ -427,9 +454,9 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 427 | * @member: the name of the list_struct within the struct. | 454 | * @member: the name of the list_struct within the struct. |
| 428 | */ | 455 | */ |
| 429 | #define list_for_each_entry_reverse(pos, head, member) \ | 456 | #define list_for_each_entry_reverse(pos, head, member) \ |
| 430 | for (pos = list_entry((head)->prev, typeof(*pos), member); \ | 457 | for (pos = list_last_entry(head, typeof(*pos), member); \ |
| 431 | &pos->member != (head); \ | 458 | &pos->member != (head); \ |
| 432 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 459 | pos = list_prev_entry(pos, member)) |
| 433 | 460 | ||
| 434 | /** | 461 | /** |
| 435 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() | 462 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() |
| @@ -452,9 +479,9 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 452 | * the current position. | 479 | * the current position. |
| 453 | */ | 480 | */ |
| 454 | #define list_for_each_entry_continue(pos, head, member) \ | 481 | #define list_for_each_entry_continue(pos, head, member) \ |
| 455 | for (pos = list_entry(pos->member.next, typeof(*pos), member); \ | 482 | for (pos = list_next_entry(pos, member); \ |
| 456 | &pos->member != (head); \ | 483 | &pos->member != (head); \ |
| 457 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 484 | pos = list_next_entry(pos, member)) |
| 458 | 485 | ||
| 459 | /** | 486 | /** |
| 460 | * list_for_each_entry_continue_reverse - iterate backwards from the given point | 487 | * list_for_each_entry_continue_reverse - iterate backwards from the given point |
| @@ -466,9 +493,9 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 466 | * the current position. | 493 | * the current position. |
| 467 | */ | 494 | */ |
| 468 | #define list_for_each_entry_continue_reverse(pos, head, member) \ | 495 | #define list_for_each_entry_continue_reverse(pos, head, member) \ |
| 469 | for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ | 496 | for (pos = list_prev_entry(pos, member); \ |
| 470 | &pos->member != (head); \ | 497 | &pos->member != (head); \ |
| 471 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 498 | pos = list_prev_entry(pos, member)) |
| 472 | 499 | ||
| 473 | /** | 500 | /** |
| 474 | * list_for_each_entry_from - iterate over list of given type from the current point | 501 | * list_for_each_entry_from - iterate over list of given type from the current point |
| @@ -479,8 +506,8 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 479 | * Iterate over list of given type, continuing from current position. | 506 | * Iterate over list of given type, continuing from current position. |
| 480 | */ | 507 | */ |
| 481 | #define list_for_each_entry_from(pos, head, member) \ | 508 | #define list_for_each_entry_from(pos, head, member) \ |
| 482 | for (; &pos->member != (head); \ | 509 | for (; &pos->member != (head); \ |
| 483 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 510 | pos = list_next_entry(pos, member)) |
| 484 | 511 | ||
| 485 | /** | 512 | /** |
| 486 | * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry | 513 | * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry |
| @@ -490,10 +517,10 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 490 | * @member: the name of the list_struct within the struct. | 517 | * @member: the name of the list_struct within the struct. |
| 491 | */ | 518 | */ |
| 492 | #define list_for_each_entry_safe(pos, n, head, member) \ | 519 | #define list_for_each_entry_safe(pos, n, head, member) \ |
| 493 | for (pos = list_entry((head)->next, typeof(*pos), member), \ | 520 | for (pos = list_first_entry(head, typeof(*pos), member), \ |
| 494 | n = list_entry(pos->member.next, typeof(*pos), member); \ | 521 | n = list_next_entry(pos, member); \ |
| 495 | &pos->member != (head); \ | 522 | &pos->member != (head); \ |
| 496 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | 523 | pos = n, n = list_next_entry(n, member)) |
| 497 | 524 | ||
| 498 | /** | 525 | /** |
| 499 | * list_for_each_entry_safe_continue - continue list iteration safe against removal | 526 | * list_for_each_entry_safe_continue - continue list iteration safe against removal |
| @@ -506,10 +533,10 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 506 | * safe against removal of list entry. | 533 | * safe against removal of list entry. |
| 507 | */ | 534 | */ |
| 508 | #define list_for_each_entry_safe_continue(pos, n, head, member) \ | 535 | #define list_for_each_entry_safe_continue(pos, n, head, member) \ |
| 509 | for (pos = list_entry(pos->member.next, typeof(*pos), member), \ | 536 | for (pos = list_next_entry(pos, member), \ |
| 510 | n = list_entry(pos->member.next, typeof(*pos), member); \ | 537 | n = list_next_entry(pos, member); \ |
| 511 | &pos->member != (head); \ | 538 | &pos->member != (head); \ |
| 512 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | 539 | pos = n, n = list_next_entry(n, member)) |
| 513 | 540 | ||
| 514 | /** | 541 | /** |
| 515 | * list_for_each_entry_safe_from - iterate over list from current point safe against removal | 542 | * list_for_each_entry_safe_from - iterate over list from current point safe against removal |
| @@ -522,9 +549,9 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 522 | * removal of list entry. | 549 | * removal of list entry. |
| 523 | */ | 550 | */ |
| 524 | #define list_for_each_entry_safe_from(pos, n, head, member) \ | 551 | #define list_for_each_entry_safe_from(pos, n, head, member) \ |
| 525 | for (n = list_entry(pos->member.next, typeof(*pos), member); \ | 552 | for (n = list_next_entry(pos, member); \ |
| 526 | &pos->member != (head); \ | 553 | &pos->member != (head); \ |
| 527 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | 554 | pos = n, n = list_next_entry(n, member)) |
| 528 | 555 | ||
| 529 | /** | 556 | /** |
| 530 | * list_for_each_entry_safe_reverse - iterate backwards over list safe against removal | 557 | * list_for_each_entry_safe_reverse - iterate backwards over list safe against removal |
| @@ -537,10 +564,10 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 537 | * of list entry. | 564 | * of list entry. |
| 538 | */ | 565 | */ |
| 539 | #define list_for_each_entry_safe_reverse(pos, n, head, member) \ | 566 | #define list_for_each_entry_safe_reverse(pos, n, head, member) \ |
| 540 | for (pos = list_entry((head)->prev, typeof(*pos), member), \ | 567 | for (pos = list_last_entry(head, typeof(*pos), member), \ |
| 541 | n = list_entry(pos->member.prev, typeof(*pos), member); \ | 568 | n = list_prev_entry(pos, member); \ |
| 542 | &pos->member != (head); \ | 569 | &pos->member != (head); \ |
| 543 | pos = n, n = list_entry(n->member.prev, typeof(*n), member)) | 570 | pos = n, n = list_prev_entry(n, member)) |
| 544 | 571 | ||
| 545 | /** | 572 | /** |
| 546 | * list_safe_reset_next - reset a stale list_for_each_entry_safe loop | 573 | * list_safe_reset_next - reset a stale list_for_each_entry_safe loop |
| @@ -555,7 +582,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 555 | * completing the current iteration of the loop body. | 582 | * completing the current iteration of the loop body. |
| 556 | */ | 583 | */ |
| 557 | #define list_safe_reset_next(pos, n, member) \ | 584 | #define list_safe_reset_next(pos, n, member) \ |
| 558 | n = list_entry(pos->member.next, typeof(*pos), member) | 585 | n = list_next_entry(pos, member) |
| 559 | 586 | ||
| 560 | /* | 587 | /* |
| 561 | * Double linked lists with a single pointer list head. | 588 | * Double linked lists with a single pointer list head. |
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 31e95acddb4d..77c60e52939d 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
| @@ -35,6 +35,7 @@ struct memblock_type { | |||
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | struct memblock { | 37 | struct memblock { |
| 38 | bool bottom_up; /* is bottom up direction? */ | ||
| 38 | phys_addr_t current_limit; | 39 | phys_addr_t current_limit; |
| 39 | struct memblock_type memory; | 40 | struct memblock_type memory; |
| 40 | struct memblock_type reserved; | 41 | struct memblock_type reserved; |
| @@ -148,6 +149,29 @@ phys_addr_t memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, int nid) | |||
| 148 | 149 | ||
| 149 | phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align); | 150 | phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align); |
| 150 | 151 | ||
| 152 | #ifdef CONFIG_MOVABLE_NODE | ||
| 153 | /* | ||
| 154 | * Set the allocation direction to bottom-up or top-down. | ||
| 155 | */ | ||
| 156 | static inline void memblock_set_bottom_up(bool enable) | ||
| 157 | { | ||
| 158 | memblock.bottom_up = enable; | ||
| 159 | } | ||
| 160 | |||
| 161 | /* | ||
| 162 | * Check if the allocation direction is bottom-up or not. | ||
| 163 | * if this is true, that said, memblock will allocate memory | ||
| 164 | * in bottom-up direction. | ||
| 165 | */ | ||
| 166 | static inline bool memblock_bottom_up(void) | ||
| 167 | { | ||
| 168 | return memblock.bottom_up; | ||
| 169 | } | ||
| 170 | #else | ||
| 171 | static inline void memblock_set_bottom_up(bool enable) {} | ||
| 172 | static inline bool memblock_bottom_up(void) { return false; } | ||
| 173 | #endif | ||
| 174 | |||
| 151 | /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ | 175 | /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ |
| 152 | #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) | 176 | #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) |
| 153 | #define MEMBLOCK_ALLOC_ACCESSIBLE 0 | 177 | #define MEMBLOCK_ALLOC_ACCESSIBLE 0 |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index dd38e62b84d2..4ca3d951fe91 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -94,6 +94,8 @@ extern void __online_page_set_limits(struct page *page); | |||
| 94 | extern void __online_page_increment_counters(struct page *page); | 94 | extern void __online_page_increment_counters(struct page *page); |
| 95 | extern void __online_page_free(struct page *page); | 95 | extern void __online_page_free(struct page *page); |
| 96 | 96 | ||
| 97 | extern int try_online_node(int nid); | ||
| 98 | |||
| 97 | #ifdef CONFIG_MEMORY_HOTREMOVE | 99 | #ifdef CONFIG_MEMORY_HOTREMOVE |
| 98 | extern bool is_pageblock_removable_nolock(struct page *page); | 100 | extern bool is_pageblock_removable_nolock(struct page *page); |
| 99 | extern int arch_remove_memory(u64 start, u64 size); | 101 | extern int arch_remove_memory(u64 start, u64 size); |
| @@ -225,6 +227,11 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
| 225 | { | 227 | { |
| 226 | } | 228 | } |
| 227 | 229 | ||
| 230 | static inline int try_online_node(int nid) | ||
| 231 | { | ||
| 232 | return 0; | ||
| 233 | } | ||
| 234 | |||
| 228 | static inline void lock_memory_hotplug(void) {} | 235 | static inline void lock_memory_hotplug(void) {} |
| 229 | static inline void unlock_memory_hotplug(void) {} | 236 | static inline void unlock_memory_hotplug(void) {} |
| 230 | 237 | ||
| @@ -256,14 +263,12 @@ static inline void remove_memory(int nid, u64 start, u64 size) {} | |||
| 256 | 263 | ||
| 257 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, | 264 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, |
| 258 | void *arg, int (*func)(struct memory_block *, void *)); | 265 | void *arg, int (*func)(struct memory_block *, void *)); |
| 259 | extern int mem_online_node(int nid); | ||
| 260 | extern int add_memory(int nid, u64 start, u64 size); | 266 | extern int add_memory(int nid, u64 start, u64 size); |
| 261 | extern int arch_add_memory(int nid, u64 start, u64 size); | 267 | extern int arch_add_memory(int nid, u64 start, u64 size); |
| 262 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); | 268 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); |
| 263 | extern bool is_memblock_offlined(struct memory_block *mem); | 269 | extern bool is_memblock_offlined(struct memory_block *mem); |
| 264 | extern void remove_memory(int nid, u64 start, u64 size); | 270 | extern void remove_memory(int nid, u64 start, u64 size); |
| 265 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, | 271 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn); |
| 266 | int nr_pages); | ||
| 267 | extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); | 272 | extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); |
| 268 | extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map, | 273 | extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map, |
| 269 | unsigned long pnum); | 274 | unsigned long pnum); |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index ea4d2495c646..9fe426b30a41 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
| @@ -169,7 +169,7 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, | |||
| 169 | extern int mpol_parse_str(char *str, struct mempolicy **mpol); | 169 | extern int mpol_parse_str(char *str, struct mempolicy **mpol); |
| 170 | #endif | 170 | #endif |
| 171 | 171 | ||
| 172 | extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol); | 172 | extern void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol); |
| 173 | 173 | ||
| 174 | /* Check if a vma is migratable */ | 174 | /* Check if a vma is migratable */ |
| 175 | static inline int vma_migratable(struct vm_area_struct *vma) | 175 | static inline int vma_migratable(struct vm_area_struct *vma) |
| @@ -307,9 +307,8 @@ static inline int mpol_parse_str(char *str, struct mempolicy **mpol) | |||
| 307 | } | 307 | } |
| 308 | #endif | 308 | #endif |
| 309 | 309 | ||
| 310 | static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) | 310 | static inline void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) |
| 311 | { | 311 | { |
| 312 | return 0; | ||
| 313 | } | 312 | } |
| 314 | 313 | ||
| 315 | static inline int mpol_misplaced(struct page *page, struct vm_area_struct *vma, | 314 | static inline int mpol_misplaced(struct page *page, struct vm_area_struct *vma, |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 378ae8a04c6a..2d0c9071bcfb 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -51,6 +51,7 @@ struct sec_pmic_dev { | |||
| 51 | int ono; | 51 | int ono; |
| 52 | int type; | 52 | int type; |
| 53 | bool wakeup; | 53 | bool wakeup; |
| 54 | bool wtsr_smpl; | ||
| 54 | }; | 55 | }; |
| 55 | 56 | ||
| 56 | int sec_irq_init(struct sec_pmic_dev *sec_pmic); | 57 | int sec_irq_init(struct sec_pmic_dev *sec_pmic); |
diff --git a/include/linux/mfd/samsung/rtc.h b/include/linux/mfd/samsung/rtc.h index 71597e20cddb..94b7cd6d8891 100644 --- a/include/linux/mfd/samsung/rtc.h +++ b/include/linux/mfd/samsung/rtc.h | |||
| @@ -62,6 +62,11 @@ enum sec_rtc_reg { | |||
| 62 | /* RTC Update Register1 */ | 62 | /* RTC Update Register1 */ |
| 63 | #define RTC_UDR_SHIFT 0 | 63 | #define RTC_UDR_SHIFT 0 |
| 64 | #define RTC_UDR_MASK (1 << RTC_UDR_SHIFT) | 64 | #define RTC_UDR_MASK (1 << RTC_UDR_SHIFT) |
| 65 | #define RTC_TCON_SHIFT 1 | ||
| 66 | #define RTC_TCON_MASK (1 << RTC_TCON_SHIFT) | ||
| 67 | #define RTC_TIME_EN_SHIFT 3 | ||
| 68 | #define RTC_TIME_EN_MASK (1 << RTC_TIME_EN_SHIFT) | ||
| 69 | |||
| 65 | /* RTC Hour register */ | 70 | /* RTC Hour register */ |
| 66 | #define HOUR_PM_SHIFT 6 | 71 | #define HOUR_PM_SHIFT 6 |
| 67 | #define HOUR_PM_MASK (1 << HOUR_PM_SHIFT) | 72 | #define HOUR_PM_MASK (1 << HOUR_PM_SHIFT) |
| @@ -69,6 +74,12 @@ enum sec_rtc_reg { | |||
| 69 | #define ALARM_ENABLE_SHIFT 7 | 74 | #define ALARM_ENABLE_SHIFT 7 |
| 70 | #define ALARM_ENABLE_MASK (1 << ALARM_ENABLE_SHIFT) | 75 | #define ALARM_ENABLE_MASK (1 << ALARM_ENABLE_SHIFT) |
| 71 | 76 | ||
| 77 | #define SMPL_ENABLE_SHIFT 7 | ||
| 78 | #define SMPL_ENABLE_MASK (1 << SMPL_ENABLE_SHIFT) | ||
| 79 | |||
| 80 | #define WTSR_ENABLE_SHIFT 6 | ||
| 81 | #define WTSR_ENABLE_MASK (1 << WTSR_ENABLE_SHIFT) | ||
| 82 | |||
| 72 | enum { | 83 | enum { |
| 73 | RTC_SEC = 0, | 84 | RTC_SEC = 0, |
| 74 | RTC_MIN, | 85 | RTC_MIN, |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8aa4006b9636..42a35d94b82c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -50,6 +50,10 @@ extern int sysctl_legacy_va_layout; | |||
| 50 | #include <asm/pgtable.h> | 50 | #include <asm/pgtable.h> |
| 51 | #include <asm/processor.h> | 51 | #include <asm/processor.h> |
| 52 | 52 | ||
| 53 | #ifndef __pa_symbol | ||
| 54 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) | ||
| 55 | #endif | ||
| 56 | |||
| 53 | extern unsigned long sysctl_user_reserve_kbytes; | 57 | extern unsigned long sysctl_user_reserve_kbytes; |
| 54 | extern unsigned long sysctl_admin_reserve_kbytes; | 58 | extern unsigned long sysctl_admin_reserve_kbytes; |
| 55 | 59 | ||
diff --git a/include/linux/mman.h b/include/linux/mman.h index 92dc257251e4..7f7f8dae4b1d 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
| @@ -87,4 +87,6 @@ calc_vm_flag_bits(unsigned long flags) | |||
| 87 | _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | | 87 | _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | |
| 88 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); | 88 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); |
| 89 | } | 89 | } |
| 90 | |||
| 91 | unsigned long vm_commit_limit(void); | ||
| 90 | #endif /* _LINUX_MMAN_H */ | 92 | #endif /* _LINUX_MMAN_H */ |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 391af8d11cce..e21f9d44307f 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
| @@ -6,9 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | /* one msg_msg structure for each message */ | 7 | /* one msg_msg structure for each message */ |
| 8 | struct msg_msg { | 8 | struct msg_msg { |
| 9 | struct list_head m_list; | 9 | struct list_head m_list; |
| 10 | long m_type; | 10 | long m_type; |
| 11 | int m_ts; /* message text size */ | 11 | size_t m_ts; /* message text size */ |
| 12 | struct msg_msgseg* next; | 12 | struct msg_msgseg* next; |
| 13 | void *security; | 13 | void *security; |
| 14 | /* the actual message follows immediately */ | 14 | /* the actual message follows immediately */ |
diff --git a/include/linux/oom.h b/include/linux/oom.h index da60007075b5..4cd62677feb9 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
| @@ -82,6 +82,11 @@ static inline void oom_killer_enable(void) | |||
| 82 | oom_killer_disabled = false; | 82 | oom_killer_disabled = false; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | static inline bool oom_gfp_allowed(gfp_t gfp_mask) | ||
| 86 | { | ||
| 87 | return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY); | ||
| 88 | } | ||
| 89 | |||
| 85 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); | 90 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); |
| 86 | 91 | ||
| 87 | /* sysctls */ | 92 | /* sysctls */ |
diff --git a/include/linux/platform_data/lm3630_bl.h b/include/linux/platform_data/lm3630_bl.h deleted file mode 100644 index 9176dd3f2d63..000000000000 --- a/include/linux/platform_data/lm3630_bl.h +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Simple driver for Texas Instruments LM3630 LED Flash driver chip | ||
| 3 | * Copyright (C) 2012 Texas Instruments | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __LINUX_LM3630_H | ||
| 12 | #define __LINUX_LM3630_H | ||
| 13 | |||
| 14 | #define LM3630_NAME "lm3630_bl" | ||
| 15 | |||
| 16 | enum lm3630_pwm_ctrl { | ||
| 17 | PWM_CTRL_DISABLE = 0, | ||
| 18 | PWM_CTRL_BANK_A, | ||
| 19 | PWM_CTRL_BANK_B, | ||
| 20 | PWM_CTRL_BANK_ALL, | ||
| 21 | }; | ||
| 22 | |||
| 23 | enum lm3630_pwm_active { | ||
| 24 | PWM_ACTIVE_HIGH = 0, | ||
| 25 | PWM_ACTIVE_LOW, | ||
| 26 | }; | ||
| 27 | |||
| 28 | enum lm3630_bank_a_ctrl { | ||
| 29 | BANK_A_CTRL_DISABLE = 0x0, | ||
| 30 | BANK_A_CTRL_LED1 = 0x4, | ||
| 31 | BANK_A_CTRL_LED2 = 0x1, | ||
| 32 | BANK_A_CTRL_ALL = 0x5, | ||
| 33 | }; | ||
| 34 | |||
| 35 | enum lm3630_bank_b_ctrl { | ||
| 36 | BANK_B_CTRL_DISABLE = 0, | ||
| 37 | BANK_B_CTRL_LED2, | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct lm3630_platform_data { | ||
| 41 | |||
| 42 | /* maximum brightness */ | ||
| 43 | int max_brt_led1; | ||
| 44 | int max_brt_led2; | ||
| 45 | |||
| 46 | /* initial on brightness */ | ||
| 47 | int init_brt_led1; | ||
| 48 | int init_brt_led2; | ||
| 49 | enum lm3630_pwm_ctrl pwm_ctrl; | ||
| 50 | enum lm3630_pwm_active pwm_active; | ||
| 51 | enum lm3630_bank_a_ctrl bank_a_ctrl; | ||
| 52 | enum lm3630_bank_b_ctrl bank_b_ctrl; | ||
| 53 | unsigned int pwm_period; | ||
| 54 | void (*pwm_set_intensity) (int brightness, int max_brightness); | ||
| 55 | }; | ||
| 56 | |||
| 57 | #endif /* __LINUX_LM3630_H */ | ||
diff --git a/include/linux/platform_data/lm3630a_bl.h b/include/linux/platform_data/lm3630a_bl.h new file mode 100644 index 000000000000..7538e38e270b --- /dev/null +++ b/include/linux/platform_data/lm3630a_bl.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* | ||
| 2 | * Simple driver for Texas Instruments LM3630A LED Flash driver chip | ||
| 3 | * Copyright (C) 2012 Texas Instruments | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __LINUX_LM3630A_H | ||
| 12 | #define __LINUX_LM3630A_H | ||
| 13 | |||
| 14 | #define LM3630A_NAME "lm3630a_bl" | ||
| 15 | |||
| 16 | enum lm3630a_pwm_ctrl { | ||
| 17 | LM3630A_PWM_DISABLE = 0x00, | ||
| 18 | LM3630A_PWM_BANK_A, | ||
| 19 | LM3630A_PWM_BANK_B, | ||
| 20 | LM3630A_PWM_BANK_ALL, | ||
| 21 | LM3630A_PWM_BANK_A_ACT_LOW = 0x05, | ||
| 22 | LM3630A_PWM_BANK_B_ACT_LOW, | ||
| 23 | LM3630A_PWM_BANK_ALL_ACT_LOW, | ||
| 24 | }; | ||
| 25 | |||
| 26 | enum lm3630a_leda_ctrl { | ||
| 27 | LM3630A_LEDA_DISABLE = 0x00, | ||
| 28 | LM3630A_LEDA_ENABLE = 0x04, | ||
| 29 | LM3630A_LEDA_ENABLE_LINEAR = 0x14, | ||
| 30 | }; | ||
| 31 | |||
| 32 | enum lm3630a_ledb_ctrl { | ||
| 33 | LM3630A_LEDB_DISABLE = 0x00, | ||
| 34 | LM3630A_LEDB_ON_A = 0x01, | ||
| 35 | LM3630A_LEDB_ENABLE = 0x02, | ||
| 36 | LM3630A_LEDB_ENABLE_LINEAR = 0x0A, | ||
| 37 | }; | ||
| 38 | |||
| 39 | #define LM3630A_MAX_BRIGHTNESS 255 | ||
| 40 | /* | ||
| 41 | *@leda_init_brt : led a init brightness. 4~255 | ||
| 42 | *@leda_max_brt : led a max brightness. 4~255 | ||
| 43 | *@leda_ctrl : led a disable, enable linear, enable exponential | ||
| 44 | *@ledb_init_brt : led b init brightness. 4~255 | ||
| 45 | *@ledb_max_brt : led b max brightness. 4~255 | ||
| 46 | *@ledb_ctrl : led b disable, enable linear, enable exponential | ||
| 47 | *@pwm_period : pwm period | ||
| 48 | *@pwm_ctrl : pwm disable, bank a or b, active high or low | ||
| 49 | */ | ||
| 50 | struct lm3630a_platform_data { | ||
| 51 | |||
| 52 | /* led a config. */ | ||
| 53 | int leda_init_brt; | ||
| 54 | int leda_max_brt; | ||
| 55 | enum lm3630a_leda_ctrl leda_ctrl; | ||
| 56 | /* led b config. */ | ||
| 57 | int ledb_init_brt; | ||
| 58 | int ledb_max_brt; | ||
| 59 | enum lm3630a_ledb_ctrl ledb_ctrl; | ||
| 60 | /* pwm config. */ | ||
| 61 | unsigned int pwm_period; | ||
| 62 | enum lm3630a_pwm_ctrl pwm_ctrl; | ||
| 63 | }; | ||
| 64 | |||
| 65 | #endif /* __LINUX_LM3630A_H */ | ||
diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h index ea3200527dd3..1b2ba24e4e03 100644 --- a/include/linux/platform_data/lp855x.h +++ b/include/linux/platform_data/lp855x.h | |||
| @@ -40,6 +40,17 @@ | |||
| 40 | #define LP8553_PWM_CONFIG LP8550_PWM_CONFIG | 40 | #define LP8553_PWM_CONFIG LP8550_PWM_CONFIG |
| 41 | #define LP8553_I2C_CONFIG LP8550_I2C_CONFIG | 41 | #define LP8553_I2C_CONFIG LP8550_I2C_CONFIG |
| 42 | 42 | ||
| 43 | /* CONFIG register - LP8555 */ | ||
| 44 | #define LP8555_PWM_STANDBY BIT(7) | ||
| 45 | #define LP8555_PWM_FILTER BIT(6) | ||
| 46 | #define LP8555_RELOAD_EPROM BIT(3) /* use it if EPROMs should be reset | ||
| 47 | when the backlight turns on */ | ||
| 48 | #define LP8555_OFF_OPENLEDS BIT(2) | ||
| 49 | #define LP8555_PWM_CONFIG LP8555_PWM_ONLY | ||
| 50 | #define LP8555_I2C_CONFIG LP8555_I2C_ONLY | ||
| 51 | #define LP8555_COMB1_CONFIG LP8555_COMBINED1 | ||
| 52 | #define LP8555_COMB2_CONFIG LP8555_COMBINED2 | ||
| 53 | |||
| 43 | /* DEVICE CONTROL register - LP8556 */ | 54 | /* DEVICE CONTROL register - LP8556 */ |
| 44 | #define LP8556_PWM_CONFIG (LP8556_PWM_ONLY << BRT_MODE_SHFT) | 55 | #define LP8556_PWM_CONFIG (LP8556_PWM_ONLY << BRT_MODE_SHFT) |
| 45 | #define LP8556_COMB1_CONFIG (LP8556_COMBINED1 << BRT_MODE_SHFT) | 56 | #define LP8556_COMB1_CONFIG (LP8556_COMBINED1 << BRT_MODE_SHFT) |
| @@ -65,6 +76,7 @@ enum lp855x_chip_id { | |||
| 65 | LP8551, | 76 | LP8551, |
| 66 | LP8552, | 77 | LP8552, |
| 67 | LP8553, | 78 | LP8553, |
| 79 | LP8555, | ||
| 68 | LP8556, | 80 | LP8556, |
| 69 | LP8557, | 81 | LP8557, |
| 70 | }; | 82 | }; |
| @@ -89,6 +101,13 @@ enum lp8553_brighntess_source { | |||
| 89 | LP8553_I2C_ONLY = LP8550_I2C_ONLY, | 101 | LP8553_I2C_ONLY = LP8550_I2C_ONLY, |
| 90 | }; | 102 | }; |
| 91 | 103 | ||
| 104 | enum lp8555_brightness_source { | ||
| 105 | LP8555_PWM_ONLY, | ||
| 106 | LP8555_I2C_ONLY, | ||
| 107 | LP8555_COMBINED1, /* Brightness register with shaped PWM */ | ||
| 108 | LP8555_COMBINED2, /* PWM with shaped brightness register */ | ||
| 109 | }; | ||
| 110 | |||
| 92 | enum lp8556_brightness_source { | 111 | enum lp8556_brightness_source { |
| 93 | LP8556_PWM_ONLY, | 112 | LP8556_PWM_ONLY, |
| 94 | LP8556_COMBINED1, /* pwm + i2c before the shaper block */ | 113 | LP8556_COMBINED1, /* pwm + i2c before the shaper block */ |
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index aa870a4ddf54..57e75ae9910f 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
| @@ -85,6 +85,11 @@ static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, | |||
| 85 | *rb_link = node; | 85 | *rb_link = node; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | #define rb_entry_safe(ptr, type, member) \ | ||
| 89 | ({ typeof(ptr) ____ptr = (ptr); \ | ||
| 90 | ____ptr ? rb_entry(____ptr, type, member) : NULL; \ | ||
| 91 | }) | ||
| 92 | |||
| 88 | /** | 93 | /** |
| 89 | * rbtree_postorder_for_each_entry_safe - iterate over rb_root in post order of | 94 | * rbtree_postorder_for_each_entry_safe - iterate over rb_root in post order of |
| 90 | * given type safe against removal of rb_node entry | 95 | * given type safe against removal of rb_node entry |
| @@ -95,12 +100,9 @@ static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, | |||
| 95 | * @field: the name of the rb_node field within 'type'. | 100 | * @field: the name of the rb_node field within 'type'. |
| 96 | */ | 101 | */ |
| 97 | #define rbtree_postorder_for_each_entry_safe(pos, n, root, field) \ | 102 | #define rbtree_postorder_for_each_entry_safe(pos, n, root, field) \ |
| 98 | for (pos = rb_entry(rb_first_postorder(root), typeof(*pos), field),\ | 103 | for (pos = rb_entry_safe(rb_first_postorder(root), typeof(*pos), field); \ |
| 99 | n = rb_entry(rb_next_postorder(&pos->field), \ | 104 | pos && ({ n = rb_entry_safe(rb_next_postorder(&pos->field), \ |
| 100 | typeof(*pos), field); \ | 105 | typeof(*pos), field); 1; }); \ |
| 101 | &pos->field; \ | 106 | pos = n) |
| 102 | pos = n, \ | ||
| 103 | n = rb_entry(rb_next_postorder(&pos->field), \ | ||
| 104 | typeof(*pos), field)) | ||
| 105 | 107 | ||
| 106 | #endif /* _LINUX_RBTREE_H */ | 108 | #endif /* _LINUX_RBTREE_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 045b0d227846..f7efc8604652 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -323,6 +323,10 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | |||
| 323 | extern void set_dumpable(struct mm_struct *mm, int value); | 323 | extern void set_dumpable(struct mm_struct *mm, int value); |
| 324 | extern int get_dumpable(struct mm_struct *mm); | 324 | extern int get_dumpable(struct mm_struct *mm); |
| 325 | 325 | ||
| 326 | #define SUID_DUMP_DISABLE 0 /* No setuid dumping */ | ||
| 327 | #define SUID_DUMP_USER 1 /* Dump as user of process */ | ||
| 328 | #define SUID_DUMP_ROOT 2 /* Dump as root */ | ||
| 329 | |||
| 326 | /* mm flags */ | 330 | /* mm flags */ |
| 327 | /* dumpable bits */ | 331 | /* dumpable bits */ |
| 328 | #define MMF_DUMPABLE 0 /* core dump is permitted */ | 332 | #define MMF_DUMPABLE 0 /* core dump is permitted */ |
| @@ -1062,15 +1066,6 @@ struct task_struct { | |||
| 1062 | struct hlist_head preempt_notifiers; | 1066 | struct hlist_head preempt_notifiers; |
| 1063 | #endif | 1067 | #endif |
| 1064 | 1068 | ||
| 1065 | /* | ||
| 1066 | * fpu_counter contains the number of consecutive context switches | ||
| 1067 | * that the FPU is used. If this is over a threshold, the lazy fpu | ||
| 1068 | * saving becomes unlazy to save the trap. This is an unsigned char | ||
| 1069 | * so that after 256 times the counter wraps and the behavior turns | ||
| 1070 | * lazy again; this to deal with bursty apps that only use FPU for | ||
| 1071 | * a short time | ||
| 1072 | */ | ||
| 1073 | unsigned char fpu_counter; | ||
| 1074 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 1069 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
| 1075 | unsigned int btrace_seq; | 1070 | unsigned int btrace_seq; |
| 1076 | #endif | 1071 | #endif |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 7fac04e7ff6e..c27f846f6b71 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -184,7 +184,8 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 184 | 184 | ||
| 185 | #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) | 185 | #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) |
| 186 | #define __SYSCALL_DEFINEx(x, name, ...) \ | 186 | #define __SYSCALL_DEFINEx(x, name, ...) \ |
| 187 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ | 187 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ |
| 188 | __attribute__((alias(__stringify(SyS##name)))); \ | ||
| 188 | static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ | 189 | static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ |
| 189 | asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ | 190 | asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ |
| 190 | asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ | 191 | asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ |
| @@ -194,7 +195,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 194 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ | 195 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ |
| 195 | return ret; \ | 196 | return ret; \ |
| 196 | } \ | 197 | } \ |
| 197 | SYSCALL_ALIAS(sys##name, SyS##name); \ | ||
| 198 | static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) | 198 | static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
| 199 | 199 | ||
| 200 | asmlinkage long sys_time(time_t __user *tloc); | 200 | asmlinkage long sys_time(time_t __user *tloc); |
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index 1855f0a22add..c557c6d096de 100644 --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h | |||
| @@ -39,6 +39,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
| 39 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, | 39 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, |
| 40 | #ifdef CONFIG_NUMA_BALANCING | 40 | #ifdef CONFIG_NUMA_BALANCING |
| 41 | NUMA_PTE_UPDATES, | 41 | NUMA_PTE_UPDATES, |
| 42 | NUMA_HUGE_PTE_UPDATES, | ||
| 42 | NUMA_HINT_FAULTS, | 43 | NUMA_HINT_FAULTS, |
| 43 | NUMA_HINT_FAULTS_LOCAL, | 44 | NUMA_HINT_FAULTS_LOCAL, |
| 44 | NUMA_PAGE_MIGRATE, | 45 | NUMA_PAGE_MIGRATE, |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 021b8a319b9e..fc0e4320aa6d 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -97,7 +97,7 @@ void writeback_inodes_sb_nr(struct super_block *, unsigned long nr, | |||
| 97 | int try_to_writeback_inodes_sb(struct super_block *, enum wb_reason reason); | 97 | int try_to_writeback_inodes_sb(struct super_block *, enum wb_reason reason); |
| 98 | int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr, | 98 | int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr, |
| 99 | enum wb_reason reason); | 99 | enum wb_reason reason); |
| 100 | void sync_inodes_sb(struct super_block *); | 100 | void sync_inodes_sb(struct super_block *sb, unsigned long older_than_this); |
| 101 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); | 101 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); |
| 102 | void inode_wait_for_writeback(struct inode *inode); | 102 | void inode_wait_for_writeback(struct inode *inode); |
| 103 | 103 | ||
