diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-11 03:16:20 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-11 03:16:20 -0500 |
| commit | 45b86a96f17cb2900f291129b0e67287400e45b2 (patch) | |
| tree | f7968bf36e3947ee42251f7eebc6ea5f24aca202 /include | |
| parent | 072ba49838b42c873c496d72c91bb237914cf3b6 (diff) | |
| parent | 4143c5cb36331155a1823af8b3a8c761a59fed71 (diff) | |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/memory_model.h | 2 | ||||
| -rw-r--r-- | include/linux/bio.h | 6 | ||||
| -rw-r--r-- | include/linux/cnt32_to_63.h | 22 | ||||
| -rw-r--r-- | include/linux/cpumask.h | 559 | ||||
| -rw-r--r-- | include/linux/hrtimer.h | 2 | ||||
| -rw-r--r-- | include/linux/if_vlan.h | 7 | ||||
| -rw-r--r-- | include/linux/libata.h | 3 | ||||
| -rw-r--r-- | include/linux/mmc/card.h | 2 | ||||
| -rw-r--r-- | include/linux/mmc/host.h | 2 | ||||
| -rw-r--r-- | include/linux/mmc/sdio_func.h | 2 | ||||
| -rw-r--r-- | include/linux/msdos_fs.h | 281 | ||||
| -rw-r--r-- | include/linux/mtd/cfi.h | 22 | ||||
| -rw-r--r-- | include/linux/pci.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 2 | ||||
| -rw-r--r-- | include/linux/smp.h | 9 | ||||
| -rw-r--r-- | include/linux/timer.h | 5 | ||||
| -rw-r--r-- | include/linux/topology.h | 8 | ||||
| -rw-r--r-- | include/linux/workqueue.h | 8 | ||||
| -rw-r--r-- | include/net/af_unix.h | 1 | ||||
| -rw-r--r-- | include/net/scm.h | 5 | ||||
| -rw-r--r-- | include/sound/core.h | 10 |
21 files changed, 654 insertions, 306 deletions
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index ae060c62aff1..18546d8eb78e 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | 34 | ||
| 35 | #define __pfn_to_page(pfn) \ | 35 | #define __pfn_to_page(pfn) \ |
| 36 | ({ unsigned long __pfn = (pfn); \ | 36 | ({ unsigned long __pfn = (pfn); \ |
| 37 | unsigned long __nid = arch_pfn_to_nid(pfn); \ | 37 | unsigned long __nid = arch_pfn_to_nid(__pfn); \ |
| 38 | NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\ | 38 | NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\ |
| 39 | }) | 39 | }) |
| 40 | 40 | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index 1c91a176b9ae..6a642098e5c3 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -236,12 +236,16 @@ static inline void *bio_data(struct bio *bio) | |||
| 236 | #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) | 236 | #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) |
| 237 | #define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) | 237 | #define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) |
| 238 | 238 | ||
| 239 | /* Default implementation of BIOVEC_PHYS_MERGEABLE */ | ||
| 240 | #define __BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | ||
| 241 | ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) | ||
| 242 | |||
| 239 | /* | 243 | /* |
| 240 | * allow arch override, for eg virtualized architectures (put in asm/io.h) | 244 | * allow arch override, for eg virtualized architectures (put in asm/io.h) |
| 241 | */ | 245 | */ |
| 242 | #ifndef BIOVEC_PHYS_MERGEABLE | 246 | #ifndef BIOVEC_PHYS_MERGEABLE |
| 243 | #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | 247 | #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ |
| 244 | ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) | 248 | __BIOVEC_PHYS_MERGEABLE(vec1, vec2) |
| 245 | #endif | 249 | #endif |
| 246 | 250 | ||
| 247 | #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \ | 251 | #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \ |
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h index 8c0f9505b48c..7605fdd1eb65 100644 --- a/include/linux/cnt32_to_63.h +++ b/include/linux/cnt32_to_63.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
| 17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
| 18 | #include <asm/byteorder.h> | 18 | #include <asm/byteorder.h> |
| 19 | #include <asm/system.h> | ||
| 19 | 20 | ||
| 20 | /* this is used only to give gcc a clue about good code generation */ | 21 | /* this is used only to give gcc a clue about good code generation */ |
| 21 | union cnt32_to_63 { | 22 | union cnt32_to_63 { |
| @@ -53,11 +54,19 @@ union cnt32_to_63 { | |||
| 53 | * needed increment. And any race in updating the value in memory is harmless | 54 | * needed increment. And any race in updating the value in memory is harmless |
| 54 | * as the same value would simply be stored more than once. | 55 | * as the same value would simply be stored more than once. |
| 55 | * | 56 | * |
| 56 | * The only restriction for the algorithm to work properly is that this | 57 | * The restrictions for the algorithm to work properly are: |
| 57 | * code must be executed at least once per each half period of the 32-bit | 58 | * |
| 58 | * counter to properly update the state bit in memory. This is usually not a | 59 | * 1) this code must be called at least once per each half period of the |
| 59 | * problem in practice, but if it is then a kernel timer could be scheduled | 60 | * 32-bit counter; |
| 60 | * to manage for this code to be executed often enough. | 61 | * |
| 62 | * 2) this code must not be preempted for a duration longer than the | ||
| 63 | * 32-bit counter half period minus the longest period between two | ||
| 64 | * calls to this code. | ||
| 65 | * | ||
| 66 | * Those requirements ensure proper update to the state bit in memory. | ||
| 67 | * This is usually not a problem in practice, but if it is then a kernel | ||
| 68 | * timer should be scheduled to manage for this code to be executed often | ||
| 69 | * enough. | ||
| 61 | * | 70 | * |
| 62 | * Note that the top bit (bit 63) in the returned value should be considered | 71 | * Note that the top bit (bit 63) in the returned value should be considered |
| 63 | * as garbage. It is not cleared here because callers are likely to use a | 72 | * as garbage. It is not cleared here because callers are likely to use a |
| @@ -68,9 +77,10 @@ union cnt32_to_63 { | |||
| 68 | */ | 77 | */ |
| 69 | #define cnt32_to_63(cnt_lo) \ | 78 | #define cnt32_to_63(cnt_lo) \ |
| 70 | ({ \ | 79 | ({ \ |
| 71 | static volatile u32 __m_cnt_hi; \ | 80 | static u32 __m_cnt_hi; \ |
| 72 | union cnt32_to_63 __x; \ | 81 | union cnt32_to_63 __x; \ |
| 73 | __x.hi = __m_cnt_hi; \ | 82 | __x.hi = __m_cnt_hi; \ |
| 83 | smp_rmb(); \ | ||
| 74 | __x.lo = (cnt_lo); \ | 84 | __x.lo = (cnt_lo); \ |
| 75 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ | 85 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ |
| 76 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ | 86 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index d3219d73f8e6..21e1dd43e52a 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -5,6 +5,9 @@ | |||
| 5 | * Cpumasks provide a bitmap suitable for representing the | 5 | * Cpumasks provide a bitmap suitable for representing the |
| 6 | * set of CPU's in a system, one bit position per CPU number. | 6 | * set of CPU's in a system, one bit position per CPU number. |
| 7 | * | 7 | * |
| 8 | * The new cpumask_ ops take a "struct cpumask *"; the old ones | ||
| 9 | * use cpumask_t. | ||
| 10 | * | ||
| 8 | * See detailed comments in the file linux/bitmap.h describing the | 11 | * See detailed comments in the file linux/bitmap.h describing the |
| 9 | * data type on which these cpumasks are based. | 12 | * data type on which these cpumasks are based. |
| 10 | * | 13 | * |
| @@ -31,7 +34,7 @@ | |||
| 31 | * will span the entire range of NR_CPUS. | 34 | * will span the entire range of NR_CPUS. |
| 32 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | 35 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| 33 | * | 36 | * |
| 34 | * The available cpumask operations are: | 37 | * The obsolescent cpumask operations are: |
| 35 | * | 38 | * |
| 36 | * void cpu_set(cpu, mask) turn on bit 'cpu' in mask | 39 | * void cpu_set(cpu, mask) turn on bit 'cpu' in mask |
| 37 | * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask | 40 | * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask |
| @@ -138,7 +141,7 @@ | |||
| 138 | #include <linux/threads.h> | 141 | #include <linux/threads.h> |
| 139 | #include <linux/bitmap.h> | 142 | #include <linux/bitmap.h> |
| 140 | 143 | ||
| 141 | typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; | 144 | typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; |
| 142 | extern cpumask_t _unused_cpumask_arg_; | 145 | extern cpumask_t _unused_cpumask_arg_; |
| 143 | 146 | ||
| 144 | #define cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) | 147 | #define cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) |
| @@ -527,4 +530,556 @@ extern cpumask_t cpu_active_map; | |||
| 527 | #define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map) | 530 | #define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map) |
| 528 | #define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map) | 531 | #define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map) |
| 529 | 532 | ||
| 533 | /* These are the new versions of the cpumask operators: passed by pointer. | ||
| 534 | * The older versions will be implemented in terms of these, then deleted. */ | ||
| 535 | #define cpumask_bits(maskp) ((maskp)->bits) | ||
| 536 | |||
| 537 | #if NR_CPUS <= BITS_PER_LONG | ||
| 538 | #define CPU_BITS_ALL \ | ||
| 539 | { \ | ||
| 540 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 541 | } | ||
| 542 | |||
| 543 | /* This produces more efficient code. */ | ||
| 544 | #define nr_cpumask_bits NR_CPUS | ||
| 545 | |||
| 546 | #else /* NR_CPUS > BITS_PER_LONG */ | ||
| 547 | |||
| 548 | #define CPU_BITS_ALL \ | ||
| 549 | { \ | ||
| 550 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ | ||
| 551 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
| 552 | } | ||
| 553 | |||
| 554 | #define nr_cpumask_bits nr_cpu_ids | ||
| 555 | #endif /* NR_CPUS > BITS_PER_LONG */ | ||
| 556 | |||
| 557 | /* verify cpu argument to cpumask_* operators */ | ||
| 558 | static inline unsigned int cpumask_check(unsigned int cpu) | ||
| 559 | { | ||
| 560 | #ifdef CONFIG_DEBUG_PER_CPU_MAPS | ||
| 561 | WARN_ON_ONCE(cpu >= nr_cpumask_bits); | ||
| 562 | #endif /* CONFIG_DEBUG_PER_CPU_MAPS */ | ||
| 563 | return cpu; | ||
| 564 | } | ||
| 565 | |||
| 566 | #if NR_CPUS == 1 | ||
| 567 | /* Uniprocessor. Assume all masks are "1". */ | ||
| 568 | static inline unsigned int cpumask_first(const struct cpumask *srcp) | ||
| 569 | { | ||
| 570 | return 0; | ||
| 571 | } | ||
| 572 | |||
| 573 | /* Valid inputs for n are -1 and 0. */ | ||
| 574 | static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) | ||
| 575 | { | ||
| 576 | return n+1; | ||
| 577 | } | ||
| 578 | |||
| 579 | static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) | ||
| 580 | { | ||
| 581 | return n+1; | ||
| 582 | } | ||
| 583 | |||
| 584 | static inline unsigned int cpumask_next_and(int n, | ||
| 585 | const struct cpumask *srcp, | ||
| 586 | const struct cpumask *andp) | ||
| 587 | { | ||
| 588 | return n+1; | ||
| 589 | } | ||
| 590 | |||
| 591 | /* cpu must be a valid cpu, ie 0, so there's no other choice. */ | ||
| 592 | static inline unsigned int cpumask_any_but(const struct cpumask *mask, | ||
| 593 | unsigned int cpu) | ||
| 594 | { | ||
| 595 | return 1; | ||
| 596 | } | ||
| 597 | |||
| 598 | #define for_each_cpu(cpu, mask) \ | ||
| 599 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) | ||
| 600 | #define for_each_cpu_and(cpu, mask, and) \ | ||
| 601 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and) | ||
| 602 | #else | ||
| 603 | /** | ||
| 604 | * cpumask_first - get the first cpu in a cpumask | ||
| 605 | * @srcp: the cpumask pointer | ||
| 606 | * | ||
| 607 | * Returns >= nr_cpu_ids if no cpus set. | ||
| 608 | */ | ||
| 609 | static inline unsigned int cpumask_first(const struct cpumask *srcp) | ||
| 610 | { | ||
| 611 | return find_first_bit(cpumask_bits(srcp), nr_cpumask_bits); | ||
| 612 | } | ||
| 613 | |||
| 614 | /** | ||
| 615 | * cpumask_next - get the next cpu in a cpumask | ||
| 616 | * @n: the cpu prior to the place to search (ie. return will be > @n) | ||
| 617 | * @srcp: the cpumask pointer | ||
| 618 | * | ||
| 619 | * Returns >= nr_cpu_ids if no further cpus set. | ||
| 620 | */ | ||
| 621 | static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) | ||
| 622 | { | ||
| 623 | /* -1 is a legal arg here. */ | ||
| 624 | if (n != -1) | ||
| 625 | cpumask_check(n); | ||
| 626 | return find_next_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); | ||
| 627 | } | ||
| 628 | |||
| 629 | /** | ||
| 630 | * cpumask_next_zero - get the next unset cpu in a cpumask | ||
| 631 | * @n: the cpu prior to the place to search (ie. return will be > @n) | ||
| 632 | * @srcp: the cpumask pointer | ||
| 633 | * | ||
| 634 | * Returns >= nr_cpu_ids if no further cpus unset. | ||
| 635 | */ | ||
| 636 | static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) | ||
| 637 | { | ||
| 638 | /* -1 is a legal arg here. */ | ||
| 639 | if (n != -1) | ||
| 640 | cpumask_check(n); | ||
| 641 | return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); | ||
| 642 | } | ||
| 643 | |||
| 644 | int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); | ||
| 645 | int cpumask_any_but(const struct cpumask *mask, unsigned int cpu); | ||
| 646 | |||
| 647 | /** | ||
| 648 | * for_each_cpu - iterate over every cpu in a mask | ||
| 649 | * @cpu: the (optionally unsigned) integer iterator | ||
| 650 | * @mask: the cpumask pointer | ||
| 651 | * | ||
| 652 | * After the loop, cpu is >= nr_cpu_ids. | ||
| 653 | */ | ||
| 654 | #define for_each_cpu(cpu, mask) \ | ||
| 655 | for ((cpu) = -1; \ | ||
| 656 | (cpu) = cpumask_next((cpu), (mask)), \ | ||
| 657 | (cpu) < nr_cpu_ids;) | ||
| 658 | |||
| 659 | /** | ||
| 660 | * for_each_cpu_and - iterate over every cpu in both masks | ||
| 661 | * @cpu: the (optionally unsigned) integer iterator | ||
| 662 | * @mask: the first cpumask pointer | ||
| 663 | * @and: the second cpumask pointer | ||
| 664 | * | ||
| 665 | * This saves a temporary CPU mask in many places. It is equivalent to: | ||
| 666 | * struct cpumask tmp; | ||
| 667 | * cpumask_and(&tmp, &mask, &and); | ||
| 668 | * for_each_cpu(cpu, &tmp) | ||
| 669 | * ... | ||
| 670 | * | ||
| 671 | * After the loop, cpu is >= nr_cpu_ids. | ||
| 672 | */ | ||
| 673 | #define for_each_cpu_and(cpu, mask, and) \ | ||
| 674 | for ((cpu) = -1; \ | ||
| 675 | (cpu) = cpumask_next_and((cpu), (mask), (and)), \ | ||
| 676 | (cpu) < nr_cpu_ids;) | ||
| 677 | #endif /* SMP */ | ||
| 678 | |||
| 679 | #define CPU_BITS_NONE \ | ||
| 680 | { \ | ||
| 681 | [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \ | ||
| 682 | } | ||
| 683 | |||
| 684 | #define CPU_BITS_CPU0 \ | ||
| 685 | { \ | ||
| 686 | [0] = 1UL \ | ||
| 687 | } | ||
| 688 | |||
| 689 | /** | ||
| 690 | * cpumask_set_cpu - set a cpu in a cpumask | ||
| 691 | * @cpu: cpu number (< nr_cpu_ids) | ||
| 692 | * @dstp: the cpumask pointer | ||
| 693 | */ | ||
| 694 | static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) | ||
| 695 | { | ||
| 696 | set_bit(cpumask_check(cpu), cpumask_bits(dstp)); | ||
| 697 | } | ||
| 698 | |||
| 699 | /** | ||
| 700 | * cpumask_clear_cpu - clear a cpu in a cpumask | ||
| 701 | * @cpu: cpu number (< nr_cpu_ids) | ||
| 702 | * @dstp: the cpumask pointer | ||
| 703 | */ | ||
| 704 | static inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp) | ||
| 705 | { | ||
| 706 | clear_bit(cpumask_check(cpu), cpumask_bits(dstp)); | ||
| 707 | } | ||
| 708 | |||
| 709 | /** | ||
| 710 | * cpumask_test_cpu - test for a cpu in a cpumask | ||
| 711 | * @cpu: cpu number (< nr_cpu_ids) | ||
| 712 | * @cpumask: the cpumask pointer | ||
| 713 | * | ||
| 714 | * No static inline type checking - see Subtlety (1) above. | ||
| 715 | */ | ||
| 716 | #define cpumask_test_cpu(cpu, cpumask) \ | ||
| 717 | test_bit(cpumask_check(cpu), (cpumask)->bits) | ||
| 718 | |||
| 719 | /** | ||
| 720 | * cpumask_test_and_set_cpu - atomically test and set a cpu in a cpumask | ||
| 721 | * @cpu: cpu number (< nr_cpu_ids) | ||
| 722 | * @cpumask: the cpumask pointer | ||
| 723 | * | ||
| 724 | * test_and_set_bit wrapper for cpumasks. | ||
| 725 | */ | ||
| 726 | static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) | ||
| 727 | { | ||
| 728 | return test_and_set_bit(cpumask_check(cpu), cpumask_bits(cpumask)); | ||
| 729 | } | ||
| 730 | |||
| 731 | /** | ||
| 732 | * cpumask_setall - set all cpus (< nr_cpu_ids) in a cpumask | ||
| 733 | * @dstp: the cpumask pointer | ||
| 734 | */ | ||
| 735 | static inline void cpumask_setall(struct cpumask *dstp) | ||
| 736 | { | ||
| 737 | bitmap_fill(cpumask_bits(dstp), nr_cpumask_bits); | ||
| 738 | } | ||
| 739 | |||
| 740 | /** | ||
| 741 | * cpumask_clear - clear all cpus (< nr_cpu_ids) in a cpumask | ||
| 742 | * @dstp: the cpumask pointer | ||
| 743 | */ | ||
| 744 | static inline void cpumask_clear(struct cpumask *dstp) | ||
| 745 | { | ||
| 746 | bitmap_zero(cpumask_bits(dstp), nr_cpumask_bits); | ||
| 747 | } | ||
| 748 | |||
| 749 | /** | ||
| 750 | * cpumask_and - *dstp = *src1p & *src2p | ||
| 751 | * @dstp: the cpumask result | ||
| 752 | * @src1p: the first input | ||
| 753 | * @src2p: the second input | ||
| 754 | */ | ||
| 755 | static inline void cpumask_and(struct cpumask *dstp, | ||
| 756 | const struct cpumask *src1p, | ||
| 757 | const struct cpumask *src2p) | ||
| 758 | { | ||
| 759 | bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), | ||
| 760 | cpumask_bits(src2p), nr_cpumask_bits); | ||
| 761 | } | ||
| 762 | |||
| 763 | /** | ||
| 764 | * cpumask_or - *dstp = *src1p | *src2p | ||
| 765 | * @dstp: the cpumask result | ||
| 766 | * @src1p: the first input | ||
| 767 | * @src2p: the second input | ||
| 768 | */ | ||
| 769 | static inline void cpumask_or(struct cpumask *dstp, const struct cpumask *src1p, | ||
| 770 | const struct cpumask *src2p) | ||
| 771 | { | ||
| 772 | bitmap_or(cpumask_bits(dstp), cpumask_bits(src1p), | ||
| 773 | cpumask_bits(src2p), nr_cpumask_bits); | ||
| 774 | } | ||
| 775 | |||
| 776 | /** | ||
| 777 | * cpumask_xor - *dstp = *src1p ^ *src2p | ||
| 778 | * @dstp: the cpumask result | ||
| 779 | * @src1p: the first input | ||
| 780 | * @src2p: the second input | ||
| 781 | */ | ||
| 782 | static inline void cpumask_xor(struct cpumask *dstp, | ||
| 783 | const struct cpumask *src1p, | ||
| 784 | const struct cpumask *src2p) | ||
| 785 | { | ||
| 786 | bitmap_xor(cpumask_bits(dstp), cpumask_bits(src1p), | ||
| 787 | cpumask_bits(src2p), nr_cpumask_bits); | ||
| 788 | } | ||
| 789 | |||
| 790 | /** | ||
| 791 | * cpumask_andnot - *dstp = *src1p & ~*src2p | ||
| 792 | * @dstp: the cpumask result | ||
| 793 | * @src1p: the first input | ||
| 794 | * @src2p: the second input | ||
| 795 | */ | ||
| 796 | static inline void cpumask_andnot(struct cpumask *dstp, | ||
| 797 | const struct cpumask *src1p, | ||
| 798 | const struct cpumask *src2p) | ||
| 799 | { | ||
| 800 | bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), | ||
| 801 | cpumask_bits(src2p), nr_cpumask_bits); | ||
| 802 | } | ||
| 803 | |||
| 804 | /** | ||
| 805 | * cpumask_complement - *dstp = ~*srcp | ||
| 806 | * @dstp: the cpumask result | ||
| 807 | * @srcp: the input to invert | ||
| 808 | */ | ||
| 809 | static inline void cpumask_complement(struct cpumask *dstp, | ||
| 810 | const struct cpumask *srcp) | ||
| 811 | { | ||
| 812 | bitmap_complement(cpumask_bits(dstp), cpumask_bits(srcp), | ||
| 813 | nr_cpumask_bits); | ||
| 814 | } | ||
| 815 | |||
| 816 | /** | ||
| 817 | * cpumask_equal - *src1p == *src2p | ||
| 818 | * @src1p: the first input | ||
| 819 | * @src2p: the second input | ||
| 820 | */ | ||
| 821 | static inline bool cpumask_equal(const struct cpumask *src1p, | ||
| 822 | const struct cpumask *src2p) | ||
| 823 | { | ||
| 824 | return bitmap_equal(cpumask_bits(src1p), cpumask_bits(src2p), | ||
| 825 | nr_cpumask_bits); | ||
| 826 | } | ||
| 827 | |||
| 828 | /** | ||
| 829 | * cpumask_intersects - (*src1p & *src2p) != 0 | ||
| 830 | * @src1p: the first input | ||
| 831 | * @src2p: the second input | ||
| 832 | */ | ||
| 833 | static inline bool cpumask_intersects(const struct cpumask *src1p, | ||
| 834 | const struct cpumask *src2p) | ||
| 835 | { | ||
| 836 | return bitmap_intersects(cpumask_bits(src1p), cpumask_bits(src2p), | ||
| 837 | nr_cpumask_bits); | ||
| 838 | } | ||
| 839 | |||
| 840 | /** | ||
| 841 | * cpumask_subset - (*src1p & ~*src2p) == 0 | ||
| 842 | * @src1p: the first input | ||
| 843 | * @src2p: the second input | ||
| 844 | */ | ||
| 845 | static inline int cpumask_subset(const struct cpumask *src1p, | ||
| 846 | const struct cpumask *src2p) | ||
| 847 | { | ||
| 848 | return bitmap_subset(cpumask_bits(src1p), cpumask_bits(src2p), | ||
| 849 | nr_cpumask_bits); | ||
| 850 | } | ||
| 851 | |||
| 852 | /** | ||
| 853 | * cpumask_empty - *srcp == 0 | ||
| 854 | * @srcp: the cpumask to that all cpus < nr_cpu_ids are clear. | ||
| 855 | */ | ||
| 856 | static inline bool cpumask_empty(const struct cpumask *srcp) | ||
| 857 | { | ||
| 858 | return bitmap_empty(cpumask_bits(srcp), nr_cpumask_bits); | ||
| 859 | } | ||
| 860 | |||
| 861 | /** | ||
| 862 | * cpumask_full - *srcp == 0xFFFFFFFF... | ||
| 863 | * @srcp: the cpumask to that all cpus < nr_cpu_ids are set. | ||
| 864 | */ | ||
| 865 | static inline bool cpumask_full(const struct cpumask *srcp) | ||
| 866 | { | ||
| 867 | return bitmap_full(cpumask_bits(srcp), nr_cpumask_bits); | ||
| 868 | } | ||
| 869 | |||
| 870 | /** | ||
| 871 | * cpumask_weight - Count of bits in *srcp | ||
| 872 | * @srcp: the cpumask to count bits (< nr_cpu_ids) in. | ||
| 873 | */ | ||
| 874 | static inline unsigned int cpumask_weight(const struct cpumask *srcp) | ||
| 875 | { | ||
| 876 | return bitmap_weight(cpumask_bits(srcp), nr_cpumask_bits); | ||
| 877 | } | ||
| 878 | |||
| 879 | /** | ||
| 880 | * cpumask_shift_right - *dstp = *srcp >> n | ||
| 881 | * @dstp: the cpumask result | ||
| 882 | * @srcp: the input to shift | ||
| 883 | * @n: the number of bits to shift by | ||
| 884 | */ | ||
| 885 | static inline void cpumask_shift_right(struct cpumask *dstp, | ||
| 886 | const struct cpumask *srcp, int n) | ||
| 887 | { | ||
| 888 | bitmap_shift_right(cpumask_bits(dstp), cpumask_bits(srcp), n, | ||
| 889 | nr_cpumask_bits); | ||
| 890 | } | ||
| 891 | |||
| 892 | /** | ||
| 893 | * cpumask_shift_left - *dstp = *srcp << n | ||
| 894 | * @dstp: the cpumask result | ||
| 895 | * @srcp: the input to shift | ||
| 896 | * @n: the number of bits to shift by | ||
| 897 | */ | ||
| 898 | static inline void cpumask_shift_left(struct cpumask *dstp, | ||
| 899 | const struct cpumask *srcp, int n) | ||
| 900 | { | ||
| 901 | bitmap_shift_left(cpumask_bits(dstp), cpumask_bits(srcp), n, | ||
| 902 | nr_cpumask_bits); | ||
| 903 | } | ||
| 904 | |||
| 905 | /** | ||
| 906 | * cpumask_copy - *dstp = *srcp | ||
| 907 | * @dstp: the result | ||
| 908 | * @srcp: the input cpumask | ||
| 909 | */ | ||
| 910 | static inline void cpumask_copy(struct cpumask *dstp, | ||
| 911 | const struct cpumask *srcp) | ||
| 912 | { | ||
| 913 | bitmap_copy(cpumask_bits(dstp), cpumask_bits(srcp), nr_cpumask_bits); | ||
| 914 | } | ||
| 915 | |||
| 916 | /** | ||
| 917 | * cpumask_any - pick a "random" cpu from *srcp | ||
| 918 | * @srcp: the input cpumask | ||
| 919 | * | ||
| 920 | * Returns >= nr_cpu_ids if no cpus set. | ||
| 921 | */ | ||
| 922 | #define cpumask_any(srcp) cpumask_first(srcp) | ||
| 923 | |||
| 924 | /** | ||
| 925 | * cpumask_first_and - return the first cpu from *srcp1 & *srcp2 | ||
| 926 | * @src1p: the first input | ||
| 927 | * @src2p: the second input | ||
| 928 | * | ||
| 929 | * Returns >= nr_cpu_ids if no cpus set in both. See also cpumask_next_and(). | ||
| 930 | */ | ||
| 931 | #define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p)) | ||
| 932 | |||
| 933 | /** | ||
| 934 | * cpumask_any_and - pick a "random" cpu from *mask1 & *mask2 | ||
| 935 | * @mask1: the first input cpumask | ||
| 936 | * @mask2: the second input cpumask | ||
| 937 | * | ||
| 938 | * Returns >= nr_cpu_ids if no cpus set. | ||
| 939 | */ | ||
| 940 | #define cpumask_any_and(mask1, mask2) cpumask_first_and((mask1), (mask2)) | ||
| 941 | |||
| 942 | /** | ||
| 943 | * cpumask_of - the cpumask containing just a given cpu | ||
| 944 | * @cpu: the cpu (<= nr_cpu_ids) | ||
| 945 | */ | ||
| 946 | #define cpumask_of(cpu) (get_cpu_mask(cpu)) | ||
| 947 | |||
| 948 | /** | ||
| 949 | * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * | ||
| 950 | * @bitmap: the bitmap | ||
| 951 | * | ||
| 952 | * There are a few places where cpumask_var_t isn't appropriate and | ||
| 953 | * static cpumasks must be used (eg. very early boot), yet we don't | ||
| 954 | * expose the definition of 'struct cpumask'. | ||
| 955 | * | ||
| 956 | * This does the conversion, and can be used as a constant initializer. | ||
| 957 | */ | ||
| 958 | #define to_cpumask(bitmap) \ | ||
| 959 | ((struct cpumask *)(1 ? (bitmap) \ | ||
| 960 | : (void *)sizeof(__check_is_bitmap(bitmap)))) | ||
| 961 | |||
| 962 | static inline int __check_is_bitmap(const unsigned long *bitmap) | ||
| 963 | { | ||
| 964 | return 1; | ||
| 965 | } | ||
| 966 | |||
| 967 | /** | ||
| 968 | * cpumask_size - size to allocate for a 'struct cpumask' in bytes | ||
| 969 | * | ||
| 970 | * This will eventually be a runtime variable, depending on nr_cpu_ids. | ||
| 971 | */ | ||
| 972 | static inline size_t cpumask_size(void) | ||
| 973 | { | ||
| 974 | /* FIXME: Once all cpumask assignments are eliminated, this | ||
| 975 | * can be nr_cpumask_bits */ | ||
| 976 | return BITS_TO_LONGS(NR_CPUS) * sizeof(long); | ||
| 977 | } | ||
| 978 | |||
| 979 | /* | ||
| 980 | * cpumask_var_t: struct cpumask for stack usage. | ||
| 981 | * | ||
| 982 | * Oh, the wicked games we play! In order to make kernel coding a | ||
| 983 | * little more difficult, we typedef cpumask_var_t to an array or a | ||
| 984 | * pointer: doing &mask on an array is a noop, so it still works. | ||
| 985 | * | ||
| 986 | * ie. | ||
| 987 | * cpumask_var_t tmpmask; | ||
| 988 | * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL)) | ||
| 989 | * return -ENOMEM; | ||
| 990 | * | ||
| 991 | * ... use 'tmpmask' like a normal struct cpumask * ... | ||
| 992 | * | ||
| 993 | * free_cpumask_var(tmpmask); | ||
| 994 | */ | ||
| 995 | #ifdef CONFIG_CPUMASK_OFFSTACK | ||
| 996 | typedef struct cpumask *cpumask_var_t; | ||
| 997 | |||
| 998 | bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags); | ||
| 999 | void alloc_bootmem_cpumask_var(cpumask_var_t *mask); | ||
| 1000 | void free_cpumask_var(cpumask_var_t mask); | ||
| 1001 | void free_bootmem_cpumask_var(cpumask_var_t mask); | ||
| 1002 | |||
| 1003 | #else | ||
| 1004 | typedef struct cpumask cpumask_var_t[1]; | ||
| 1005 | |||
| 1006 | static inline bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) | ||
| 1007 | { | ||
| 1008 | return true; | ||
| 1009 | } | ||
| 1010 | |||
| 1011 | static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask) | ||
| 1012 | { | ||
| 1013 | } | ||
| 1014 | |||
| 1015 | static inline void free_cpumask_var(cpumask_var_t mask) | ||
| 1016 | { | ||
| 1017 | } | ||
| 1018 | |||
| 1019 | static inline void free_bootmem_cpumask_var(cpumask_var_t mask) | ||
| 1020 | { | ||
| 1021 | } | ||
| 1022 | #endif /* CONFIG_CPUMASK_OFFSTACK */ | ||
| 1023 | |||
| 1024 | /* The pointer versions of the maps, these will become the primary versions. */ | ||
| 1025 | #define cpu_possible_mask ((const struct cpumask *)&cpu_possible_map) | ||
| 1026 | #define cpu_online_mask ((const struct cpumask *)&cpu_online_map) | ||
| 1027 | #define cpu_present_mask ((const struct cpumask *)&cpu_present_map) | ||
| 1028 | #define cpu_active_mask ((const struct cpumask *)&cpu_active_map) | ||
| 1029 | |||
| 1030 | /* It's common to want to use cpu_all_mask in struct member initializers, | ||
| 1031 | * so it has to refer to an address rather than a pointer. */ | ||
| 1032 | extern const DECLARE_BITMAP(cpu_all_bits, NR_CPUS); | ||
| 1033 | #define cpu_all_mask to_cpumask(cpu_all_bits) | ||
| 1034 | |||
| 1035 | /* First bits of cpu_bit_bitmap are in fact unset. */ | ||
| 1036 | #define cpu_none_mask to_cpumask(cpu_bit_bitmap[0]) | ||
| 1037 | |||
| 1038 | /* Wrappers for arch boot code to manipulate normally-constant masks */ | ||
| 1039 | static inline void set_cpu_possible(unsigned int cpu, bool possible) | ||
| 1040 | { | ||
| 1041 | if (possible) | ||
| 1042 | cpumask_set_cpu(cpu, &cpu_possible_map); | ||
| 1043 | else | ||
| 1044 | cpumask_clear_cpu(cpu, &cpu_possible_map); | ||
| 1045 | } | ||
| 1046 | |||
| 1047 | static inline void set_cpu_present(unsigned int cpu, bool present) | ||
| 1048 | { | ||
| 1049 | if (present) | ||
| 1050 | cpumask_set_cpu(cpu, &cpu_present_map); | ||
| 1051 | else | ||
| 1052 | cpumask_clear_cpu(cpu, &cpu_present_map); | ||
| 1053 | } | ||
| 1054 | |||
| 1055 | static inline void set_cpu_online(unsigned int cpu, bool online) | ||
| 1056 | { | ||
| 1057 | if (online) | ||
| 1058 | cpumask_set_cpu(cpu, &cpu_online_map); | ||
| 1059 | else | ||
| 1060 | cpumask_clear_cpu(cpu, &cpu_online_map); | ||
| 1061 | } | ||
| 1062 | |||
| 1063 | static inline void set_cpu_active(unsigned int cpu, bool active) | ||
| 1064 | { | ||
| 1065 | if (active) | ||
| 1066 | cpumask_set_cpu(cpu, &cpu_active_map); | ||
| 1067 | else | ||
| 1068 | cpumask_clear_cpu(cpu, &cpu_active_map); | ||
| 1069 | } | ||
| 1070 | |||
| 1071 | static inline void init_cpu_present(const struct cpumask *src) | ||
| 1072 | { | ||
| 1073 | cpumask_copy(&cpu_present_map, src); | ||
| 1074 | } | ||
| 1075 | |||
| 1076 | static inline void init_cpu_possible(const struct cpumask *src) | ||
| 1077 | { | ||
| 1078 | cpumask_copy(&cpu_possible_map, src); | ||
| 1079 | } | ||
| 1080 | |||
| 1081 | static inline void init_cpu_online(const struct cpumask *src) | ||
| 1082 | { | ||
| 1083 | cpumask_copy(&cpu_online_map, src); | ||
| 1084 | } | ||
| 530 | #endif /* __LINUX_CPUMASK_H */ | 1085 | #endif /* __LINUX_CPUMASK_H */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 2b3645b1acf4..07e510a3b00a 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -239,7 +239,7 @@ static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) | |||
| 239 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); | 239 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, unsigned long ns) | 242 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) |
| 243 | { | 243 | { |
| 244 | timer->_expires = ktime_add_ns(timer->_expires, ns); | 244 | timer->_expires = ktime_add_ns(timer->_expires, ns); |
| 245 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); | 245 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 9e7b49b8062d..a5cb0c3f6dcf 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
| @@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | |||
| 114 | 114 | ||
| 115 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 115 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
| 116 | u16 vlan_tci, int polling); | 116 | u16 vlan_tci, int polling); |
| 117 | extern int vlan_hwaccel_do_receive(struct sk_buff *skb); | ||
| 118 | |||
| 117 | #else | 119 | #else |
| 118 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) | 120 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) |
| 119 | { | 121 | { |
| @@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | |||
| 133 | BUG(); | 135 | BUG(); |
| 134 | return NET_XMIT_SUCCESS; | 136 | return NET_XMIT_SUCCESS; |
| 135 | } | 137 | } |
| 138 | |||
| 139 | static inline int vlan_hwaccel_do_receive(struct sk_buff *skb) | ||
| 140 | { | ||
| 141 | return 0; | ||
| 142 | } | ||
| 136 | #endif | 143 | #endif |
| 137 | 144 | ||
| 138 | /** | 145 | /** |
diff --git a/include/linux/libata.h b/include/linux/libata.h index f5441edee55f..59b0f1c807b5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -373,6 +373,8 @@ enum { | |||
| 373 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | 373 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ |
| 374 | ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ | 374 | ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ |
| 375 | ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ | 375 | ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ |
| 376 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands | ||
| 377 | not multiple of 16 bytes */ | ||
| 376 | 378 | ||
| 377 | /* DMA mask for user DMA control: User visible values; DO NOT | 379 | /* DMA mask for user DMA control: User visible values; DO NOT |
| 378 | renumber */ | 380 | renumber */ |
| @@ -696,6 +698,7 @@ struct ata_port { | |||
| 696 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ | 698 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ |
| 697 | 699 | ||
| 698 | struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; | 700 | struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; |
| 701 | unsigned long qc_allocated; | ||
| 699 | unsigned int qc_active; | 702 | unsigned int qc_active; |
| 700 | int nr_active_links; /* #links with active qcs */ | 703 | int nr_active_links; /* #links with active qcs */ |
| 701 | 704 | ||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index ee6e822d5994..403aa505f27e 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -130,7 +130,7 @@ struct mmc_card { | |||
| 130 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | 130 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) |
| 131 | 131 | ||
| 132 | #define mmc_card_name(c) ((c)->cid.prod_name) | 132 | #define mmc_card_name(c) ((c)->cid.prod_name) |
| 133 | #define mmc_card_id(c) ((c)->dev.bus_id) | 133 | #define mmc_card_id(c) (dev_name(&(c)->dev)) |
| 134 | 134 | ||
| 135 | #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) | 135 | #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) |
| 136 | #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) | 136 | #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index bde891f64591..f842f234e44f 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -176,7 +176,7 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
| 176 | 176 | ||
| 177 | #define mmc_dev(x) ((x)->parent) | 177 | #define mmc_dev(x) ((x)->parent) |
| 178 | #define mmc_classdev(x) (&(x)->class_dev) | 178 | #define mmc_classdev(x) (&(x)->class_dev) |
| 179 | #define mmc_hostname(x) ((x)->class_dev.bus_id) | 179 | #define mmc_hostname(x) (dev_name(&(x)->class_dev)) |
| 180 | 180 | ||
| 181 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 181 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
| 182 | extern int mmc_resume_host(struct mmc_host *); | 182 | extern int mmc_resume_host(struct mmc_host *); |
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index 07bee4a0d457..451bdfc85830 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
| @@ -63,7 +63,7 @@ struct sdio_func { | |||
| 63 | 63 | ||
| 64 | #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) | 64 | #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) |
| 65 | 65 | ||
| 66 | #define sdio_func_id(f) ((f)->dev.bus_id) | 66 | #define sdio_func_id(f) (dev_name(&(f)->dev)) |
| 67 | 67 | ||
| 68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) | 68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) |
| 69 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) | 69 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index ba63858056c7..e0a9b207920d 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
| @@ -46,11 +46,6 @@ | |||
| 46 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ | 46 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ |
| 47 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) | 47 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) |
| 48 | 48 | ||
| 49 | /* valid file mode bits */ | ||
| 50 | #define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO) | ||
| 51 | /* Convert attribute bits and a mask to the UNIX mode. */ | ||
| 52 | #define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO)) | ||
| 53 | |||
| 54 | #define MSDOS_NAME 11 /* maximum name length */ | 49 | #define MSDOS_NAME 11 /* maximum name length */ |
| 55 | #define MSDOS_LONGNAME 256 /* maximum name length */ | 50 | #define MSDOS_LONGNAME 256 /* maximum name length */ |
| 56 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ | 51 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ |
| @@ -167,282 +162,10 @@ struct msdos_dir_slot { | |||
| 167 | }; | 162 | }; |
| 168 | 163 | ||
| 169 | #ifdef __KERNEL__ | 164 | #ifdef __KERNEL__ |
| 170 | |||
| 171 | #include <linux/buffer_head.h> | ||
| 172 | #include <linux/string.h> | ||
| 173 | #include <linux/nls.h> | ||
| 174 | #include <linux/fs.h> | ||
| 175 | #include <linux/mutex.h> | ||
| 176 | |||
| 177 | /* | ||
| 178 | * vfat shortname flags | ||
| 179 | */ | ||
| 180 | #define VFAT_SFN_DISPLAY_LOWER 0x0001 /* convert to lowercase for display */ | ||
| 181 | #define VFAT_SFN_DISPLAY_WIN95 0x0002 /* emulate win95 rule for display */ | ||
| 182 | #define VFAT_SFN_DISPLAY_WINNT 0x0004 /* emulate winnt rule for display */ | ||
| 183 | #define VFAT_SFN_CREATE_WIN95 0x0100 /* emulate win95 rule for create */ | ||
| 184 | #define VFAT_SFN_CREATE_WINNT 0x0200 /* emulate winnt rule for create */ | ||
| 185 | |||
| 186 | struct fat_mount_options { | ||
| 187 | uid_t fs_uid; | ||
| 188 | gid_t fs_gid; | ||
| 189 | unsigned short fs_fmask; | ||
| 190 | unsigned short fs_dmask; | ||
| 191 | unsigned short codepage; /* Codepage for shortname conversions */ | ||
| 192 | char *iocharset; /* Charset used for filename input/display */ | ||
| 193 | unsigned short shortname; /* flags for shortname display/create rule */ | ||
| 194 | unsigned char name_check; /* r = relaxed, n = normal, s = strict */ | ||
| 195 | unsigned short allow_utime;/* permission for setting the [am]time */ | ||
| 196 | unsigned quiet:1, /* set = fake successful chmods and chowns */ | ||
| 197 | showexec:1, /* set = only set x bit for com/exe/bat */ | ||
| 198 | sys_immutable:1, /* set = system files are immutable */ | ||
| 199 | dotsOK:1, /* set = hidden and system files are named '.filename' */ | ||
| 200 | isvfat:1, /* 0=no vfat long filename support, 1=vfat support */ | ||
| 201 | utf8:1, /* Use of UTF-8 character set (Default) */ | ||
| 202 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ | ||
| 203 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ | ||
| 204 | flush:1, /* write things quickly */ | ||
| 205 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ | ||
| 206 | usefree:1, /* Use free_clusters for FAT32 */ | ||
| 207 | tz_utc:1; /* Filesystem timestamps are in UTC */ | ||
| 208 | }; | ||
| 209 | |||
| 210 | #define FAT_HASH_BITS 8 | ||
| 211 | #define FAT_HASH_SIZE (1UL << FAT_HASH_BITS) | ||
| 212 | #define FAT_HASH_MASK (FAT_HASH_SIZE-1) | ||
| 213 | |||
| 214 | /* | ||
| 215 | * MS-DOS file system in-core superblock data | ||
| 216 | */ | ||
| 217 | struct msdos_sb_info { | ||
| 218 | unsigned short sec_per_clus; /* sectors/cluster */ | ||
| 219 | unsigned short cluster_bits; /* log2(cluster_size) */ | ||
| 220 | unsigned int cluster_size; /* cluster size */ | ||
| 221 | unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */ | ||
| 222 | unsigned short fat_start; | ||
| 223 | unsigned long fat_length; /* FAT start & length (sec.) */ | ||
| 224 | unsigned long dir_start; | ||
| 225 | unsigned short dir_entries; /* root dir start & entries */ | ||
| 226 | unsigned long data_start; /* first data sector */ | ||
| 227 | unsigned long max_cluster; /* maximum cluster number */ | ||
| 228 | unsigned long root_cluster; /* first cluster of the root directory */ | ||
| 229 | unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */ | ||
| 230 | struct mutex fat_lock; | ||
| 231 | unsigned int prev_free; /* previously allocated cluster number */ | ||
| 232 | unsigned int free_clusters; /* -1 if undefined */ | ||
| 233 | unsigned int free_clus_valid; /* is free_clusters valid? */ | ||
| 234 | struct fat_mount_options options; | ||
| 235 | struct nls_table *nls_disk; /* Codepage used on disk */ | ||
| 236 | struct nls_table *nls_io; /* Charset used for input and display */ | ||
| 237 | const void *dir_ops; /* Opaque; default directory operations */ | ||
| 238 | int dir_per_block; /* dir entries per block */ | ||
| 239 | int dir_per_block_bits; /* log2(dir_per_block) */ | ||
| 240 | |||
| 241 | int fatent_shift; | ||
| 242 | struct fatent_operations *fatent_ops; | ||
| 243 | |||
| 244 | spinlock_t inode_hash_lock; | ||
| 245 | struct hlist_head inode_hashtable[FAT_HASH_SIZE]; | ||
| 246 | }; | ||
| 247 | |||
| 248 | #define FAT_CACHE_VALID 0 /* special case for valid cache */ | ||
| 249 | |||
| 250 | /* | ||
| 251 | * MS-DOS file system inode data in memory | ||
| 252 | */ | ||
| 253 | struct msdos_inode_info { | ||
| 254 | spinlock_t cache_lru_lock; | ||
| 255 | struct list_head cache_lru; | ||
| 256 | int nr_caches; | ||
| 257 | /* for avoiding the race between fat_free() and fat_get_cluster() */ | ||
| 258 | unsigned int cache_valid_id; | ||
| 259 | |||
| 260 | loff_t mmu_private; | ||
| 261 | int i_start; /* first cluster or 0 */ | ||
| 262 | int i_logstart; /* logical first cluster */ | ||
| 263 | int i_attrs; /* unused attribute bits */ | ||
| 264 | loff_t i_pos; /* on-disk position of directory entry or 0 */ | ||
| 265 | struct hlist_node i_fat_hash; /* hash by i_location */ | ||
| 266 | struct inode vfs_inode; | ||
| 267 | }; | ||
| 268 | |||
| 269 | struct fat_slot_info { | ||
| 270 | loff_t i_pos; /* on-disk position of directory entry */ | ||
| 271 | loff_t slot_off; /* offset for slot or de start */ | ||
| 272 | int nr_slots; /* number of slots + 1(de) in filename */ | ||
| 273 | struct msdos_dir_entry *de; | ||
| 274 | struct buffer_head *bh; | ||
| 275 | }; | ||
| 276 | |||
| 277 | static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb) | ||
| 278 | { | ||
| 279 | return sb->s_fs_info; | ||
| 280 | } | ||
| 281 | |||
| 282 | static inline struct msdos_inode_info *MSDOS_I(struct inode *inode) | ||
| 283 | { | ||
| 284 | return container_of(inode, struct msdos_inode_info, vfs_inode); | ||
| 285 | } | ||
| 286 | |||
| 287 | /* Return the FAT attribute byte for this inode */ | ||
| 288 | static inline u8 fat_attr(struct inode *inode) | ||
| 289 | { | ||
| 290 | return ((inode->i_mode & S_IWUGO) ? ATTR_NONE : ATTR_RO) | | ||
| 291 | (S_ISDIR(inode->i_mode) ? ATTR_DIR : ATTR_NONE) | | ||
| 292 | MSDOS_I(inode)->i_attrs; | ||
| 293 | } | ||
| 294 | |||
| 295 | static inline unsigned char fat_checksum(const __u8 *name) | ||
| 296 | { | ||
| 297 | unsigned char s = name[0]; | ||
| 298 | s = (s<<7) + (s>>1) + name[1]; s = (s<<7) + (s>>1) + name[2]; | ||
| 299 | s = (s<<7) + (s>>1) + name[3]; s = (s<<7) + (s>>1) + name[4]; | ||
| 300 | s = (s<<7) + (s>>1) + name[5]; s = (s<<7) + (s>>1) + name[6]; | ||
| 301 | s = (s<<7) + (s>>1) + name[7]; s = (s<<7) + (s>>1) + name[8]; | ||
| 302 | s = (s<<7) + (s>>1) + name[9]; s = (s<<7) + (s>>1) + name[10]; | ||
| 303 | return s; | ||
| 304 | } | ||
| 305 | |||
| 306 | static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus) | ||
| 307 | { | ||
| 308 | return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus | ||
| 309 | + sbi->data_start; | ||
| 310 | } | ||
| 311 | |||
| 312 | static inline void fat16_towchar(wchar_t *dst, const __u8 *src, size_t len) | ||
| 313 | { | ||
| 314 | #ifdef __BIG_ENDIAN | ||
| 315 | while (len--) { | ||
| 316 | *dst++ = src[0] | (src[1] << 8); | ||
| 317 | src += 2; | ||
| 318 | } | ||
| 319 | #else | ||
| 320 | memcpy(dst, src, len * 2); | ||
| 321 | #endif | ||
| 322 | } | ||
| 323 | |||
| 324 | static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | ||
| 325 | { | ||
| 326 | #ifdef __BIG_ENDIAN | ||
| 327 | while (len--) { | ||
| 328 | dst[0] = *src & 0x00FF; | ||
| 329 | dst[1] = (*src & 0xFF00) >> 8; | ||
| 330 | dst += 2; | ||
| 331 | src++; | ||
| 332 | } | ||
| 333 | #else | ||
| 334 | memcpy(dst, src, len * 2); | ||
| 335 | #endif | ||
| 336 | } | ||
| 337 | |||
| 338 | /* media of boot sector */ | 165 | /* media of boot sector */ |
| 339 | static inline int fat_valid_media(u8 media) | 166 | static inline int fat_valid_media(u8 media) |
| 340 | { | 167 | { |
| 341 | return 0xf8 <= media || media == 0xf0; | 168 | return 0xf8 <= media || media == 0xf0; |
| 342 | } | 169 | } |
| 343 | 170 | #endif /* !__KERNEL__ */ | |
| 344 | /* fat/cache.c */ | 171 | #endif /* !_LINUX_MSDOS_FS_H */ |
| 345 | extern void fat_cache_inval_inode(struct inode *inode); | ||
| 346 | extern int fat_get_cluster(struct inode *inode, int cluster, | ||
| 347 | int *fclus, int *dclus); | ||
| 348 | extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, | ||
| 349 | unsigned long *mapped_blocks); | ||
| 350 | |||
| 351 | /* fat/dir.c */ | ||
| 352 | extern const struct file_operations fat_dir_operations; | ||
| 353 | extern int fat_search_long(struct inode *inode, const unsigned char *name, | ||
| 354 | int name_len, struct fat_slot_info *sinfo); | ||
| 355 | extern int fat_dir_empty(struct inode *dir); | ||
| 356 | extern int fat_subdirs(struct inode *dir); | ||
| 357 | extern int fat_scan(struct inode *dir, const unsigned char *name, | ||
| 358 | struct fat_slot_info *sinfo); | ||
| 359 | extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh, | ||
| 360 | struct msdos_dir_entry **de, loff_t *i_pos); | ||
| 361 | extern int fat_alloc_new_dir(struct inode *dir, struct timespec *ts); | ||
| 362 | extern int fat_add_entries(struct inode *dir, void *slots, int nr_slots, | ||
| 363 | struct fat_slot_info *sinfo); | ||
| 364 | extern int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo); | ||
| 365 | |||
| 366 | /* fat/fatent.c */ | ||
| 367 | struct fat_entry { | ||
| 368 | int entry; | ||
| 369 | union { | ||
| 370 | u8 *ent12_p[2]; | ||
| 371 | __le16 *ent16_p; | ||
| 372 | __le32 *ent32_p; | ||
| 373 | } u; | ||
| 374 | int nr_bhs; | ||
| 375 | struct buffer_head *bhs[2]; | ||
| 376 | }; | ||
| 377 | |||
| 378 | static inline void fatent_init(struct fat_entry *fatent) | ||
| 379 | { | ||
| 380 | fatent->nr_bhs = 0; | ||
| 381 | fatent->entry = 0; | ||
| 382 | fatent->u.ent32_p = NULL; | ||
| 383 | fatent->bhs[0] = fatent->bhs[1] = NULL; | ||
| 384 | } | ||
| 385 | |||
| 386 | static inline void fatent_set_entry(struct fat_entry *fatent, int entry) | ||
| 387 | { | ||
| 388 | fatent->entry = entry; | ||
| 389 | fatent->u.ent32_p = NULL; | ||
| 390 | } | ||
| 391 | |||
| 392 | static inline void fatent_brelse(struct fat_entry *fatent) | ||
| 393 | { | ||
| 394 | int i; | ||
| 395 | fatent->u.ent32_p = NULL; | ||
| 396 | for (i = 0; i < fatent->nr_bhs; i++) | ||
| 397 | brelse(fatent->bhs[i]); | ||
| 398 | fatent->nr_bhs = 0; | ||
| 399 | fatent->bhs[0] = fatent->bhs[1] = NULL; | ||
| 400 | } | ||
| 401 | |||
| 402 | extern void fat_ent_access_init(struct super_block *sb); | ||
| 403 | extern int fat_ent_read(struct inode *inode, struct fat_entry *fatent, | ||
| 404 | int entry); | ||
| 405 | extern int fat_ent_write(struct inode *inode, struct fat_entry *fatent, | ||
| 406 | int new, int wait); | ||
| 407 | extern int fat_alloc_clusters(struct inode *inode, int *cluster, | ||
| 408 | int nr_cluster); | ||
| 409 | extern int fat_free_clusters(struct inode *inode, int cluster); | ||
| 410 | extern int fat_count_free_clusters(struct super_block *sb); | ||
| 411 | |||
| 412 | /* fat/file.c */ | ||
| 413 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, | ||
| 414 | unsigned int cmd, unsigned long arg); | ||
| 415 | extern const struct file_operations fat_file_operations; | ||
| 416 | extern const struct inode_operations fat_file_inode_operations; | ||
| 417 | extern int fat_setattr(struct dentry * dentry, struct iattr * attr); | ||
| 418 | extern void fat_truncate(struct inode *inode); | ||
| 419 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, | ||
| 420 | struct kstat *stat); | ||
| 421 | |||
| 422 | /* fat/inode.c */ | ||
| 423 | extern void fat_attach(struct inode *inode, loff_t i_pos); | ||
| 424 | extern void fat_detach(struct inode *inode); | ||
| 425 | extern struct inode *fat_iget(struct super_block *sb, loff_t i_pos); | ||
| 426 | extern struct inode *fat_build_inode(struct super_block *sb, | ||
| 427 | struct msdos_dir_entry *de, loff_t i_pos); | ||
| 428 | extern int fat_sync_inode(struct inode *inode); | ||
| 429 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, | ||
| 430 | const struct inode_operations *fs_dir_inode_ops, int isvfat); | ||
| 431 | |||
| 432 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | ||
| 433 | struct inode *i2); | ||
| 434 | /* fat/misc.c */ | ||
| 435 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); | ||
| 436 | extern void fat_clusters_flush(struct super_block *sb); | ||
| 437 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); | ||
| 438 | extern int date_dos2unix(unsigned short time, unsigned short date, int tz_utc); | ||
| 439 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date, | ||
| 440 | int tz_utc); | ||
| 441 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); | ||
| 442 | |||
| 443 | int fat_cache_init(void); | ||
| 444 | void fat_cache_destroy(void); | ||
| 445 | |||
| 446 | #endif /* __KERNEL__ */ | ||
| 447 | |||
| 448 | #endif | ||
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index ee5124ec319e..00e2b575021f 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
| @@ -282,9 +282,25 @@ struct cfi_private { | |||
| 282 | /* | 282 | /* |
| 283 | * Returns the command address according to the given geometry. | 283 | * Returns the command address according to the given geometry. |
| 284 | */ | 284 | */ |
| 285 | static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, int interleave, int type) | 285 | static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, |
| 286 | struct map_info *map, struct cfi_private *cfi) | ||
| 286 | { | 287 | { |
| 287 | return (cmd_ofs * type) * interleave; | 288 | unsigned bankwidth = map_bankwidth(map); |
| 289 | unsigned interleave = cfi_interleave(cfi); | ||
| 290 | unsigned type = cfi->device_type; | ||
| 291 | uint32_t addr; | ||
| 292 | |||
| 293 | addr = (cmd_ofs * type) * interleave; | ||
| 294 | |||
| 295 | /* Modify the unlock address if we are in compatiblity mode. | ||
| 296 | * For 16bit devices on 8 bit busses | ||
| 297 | * and 32bit devices on 16 bit busses | ||
| 298 | * set the low bit of the alternating bit sequence of the address. | ||
| 299 | */ | ||
| 300 | if (((type * interleave) > bankwidth) && ((uint8_t)cmd_ofs == 0xaa)) | ||
| 301 | addr |= (type >> 1)*interleave; | ||
| 302 | |||
| 303 | return addr; | ||
| 288 | } | 304 | } |
| 289 | 305 | ||
| 290 | /* | 306 | /* |
| @@ -430,7 +446,7 @@ static inline uint32_t cfi_send_gen_cmd(u_char cmd, uint32_t cmd_addr, uint32_t | |||
| 430 | int type, map_word *prev_val) | 446 | int type, map_word *prev_val) |
| 431 | { | 447 | { |
| 432 | map_word val; | 448 | map_word val; |
| 433 | uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, cfi_interleave(cfi), type); | 449 | uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, map, cfi); |
| 434 | val = cfi_build_cmd(cmd, map, cfi); | 450 | val = cfi_build_cmd(cmd, map, cfi); |
| 435 | 451 | ||
| 436 | if (prev_val) | 452 | if (prev_val) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index c75b82bda327..feb4657bb043 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1136,7 +1136,7 @@ static inline void pci_mmcfg_late_init(void) { } | |||
| 1136 | #endif | 1136 | #endif |
| 1137 | 1137 | ||
| 1138 | #ifdef CONFIG_HAS_IOMEM | 1138 | #ifdef CONFIG_HAS_IOMEM |
| 1139 | static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar) | 1139 | static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) |
| 1140 | { | 1140 | { |
| 1141 | /* | 1141 | /* |
| 1142 | * Make sure the BAR is actually a memory resource, not an IO resource | 1142 | * Make sure the BAR is actually a memory resource, not an IO resource |
diff --git a/include/linux/sched.h b/include/linux/sched.h index b483f39a7112..295b7c756ca6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1349,6 +1349,8 @@ struct task_struct { | |||
| 1349 | */ | 1349 | */ |
| 1350 | unsigned long timer_slack_ns; | 1350 | unsigned long timer_slack_ns; |
| 1351 | unsigned long default_timer_slack_ns; | 1351 | unsigned long default_timer_slack_ns; |
| 1352 | |||
| 1353 | struct list_head *scm_work_list; | ||
| 1352 | }; | 1354 | }; |
| 1353 | 1355 | ||
| 1354 | /* | 1356 | /* |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 2e4d58b26c06..3f9a60043a97 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -64,8 +64,17 @@ extern void smp_cpus_done(unsigned int max_cpus); | |||
| 64 | * Call a function on all other processors | 64 | * Call a function on all other processors |
| 65 | */ | 65 | */ |
| 66 | int smp_call_function(void(*func)(void *info), void *info, int wait); | 66 | int smp_call_function(void(*func)(void *info), void *info, int wait); |
| 67 | /* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */ | ||
| 67 | int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, | 68 | int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, |
| 68 | int wait); | 69 | int wait); |
| 70 | |||
| 71 | static inline void smp_call_function_many(const struct cpumask *mask, | ||
| 72 | void (*func)(void *info), void *info, | ||
| 73 | int wait) | ||
| 74 | { | ||
| 75 | smp_call_function_mask(*mask, func, info, wait); | ||
| 76 | } | ||
| 77 | |||
| 69 | int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | 78 | int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, |
| 70 | int wait); | 79 | int wait); |
| 71 | void __smp_call_function_single(int cpuid, struct call_single_data *data); | 80 | void __smp_call_function_single(int cpuid, struct call_single_data *data); |
diff --git a/include/linux/timer.h b/include/linux/timer.h index d4ba79248a27..daf9685b861c 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -186,4 +186,9 @@ unsigned long __round_jiffies_relative(unsigned long j, int cpu); | |||
| 186 | unsigned long round_jiffies(unsigned long j); | 186 | unsigned long round_jiffies(unsigned long j); |
| 187 | unsigned long round_jiffies_relative(unsigned long j); | 187 | unsigned long round_jiffies_relative(unsigned long j); |
| 188 | 188 | ||
| 189 | unsigned long __round_jiffies_up(unsigned long j, int cpu); | ||
| 190 | unsigned long __round_jiffies_up_relative(unsigned long j, int cpu); | ||
| 191 | unsigned long round_jiffies_up(unsigned long j); | ||
| 192 | unsigned long round_jiffies_up_relative(unsigned long j); | ||
| 193 | |||
| 189 | #endif | 194 | #endif |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 2158fc0d5a56..117f1b7405cf 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
| @@ -99,7 +99,7 @@ void arch_update_cpu_topology(void); | |||
| 99 | | SD_BALANCE_FORK \ | 99 | | SD_BALANCE_FORK \ |
| 100 | | SD_BALANCE_EXEC \ | 100 | | SD_BALANCE_EXEC \ |
| 101 | | SD_WAKE_AFFINE \ | 101 | | SD_WAKE_AFFINE \ |
| 102 | | SD_WAKE_IDLE \ | 102 | | SD_WAKE_BALANCE \ |
| 103 | | SD_SHARE_CPUPOWER, \ | 103 | | SD_SHARE_CPUPOWER, \ |
| 104 | .last_balance = jiffies, \ | 104 | .last_balance = jiffies, \ |
| 105 | .balance_interval = 1, \ | 105 | .balance_interval = 1, \ |
| @@ -120,10 +120,10 @@ void arch_update_cpu_topology(void); | |||
| 120 | .wake_idx = 1, \ | 120 | .wake_idx = 1, \ |
| 121 | .forkexec_idx = 1, \ | 121 | .forkexec_idx = 1, \ |
| 122 | .flags = SD_LOAD_BALANCE \ | 122 | .flags = SD_LOAD_BALANCE \ |
| 123 | | SD_BALANCE_NEWIDLE \ | ||
| 124 | | SD_BALANCE_FORK \ | 123 | | SD_BALANCE_FORK \ |
| 125 | | SD_BALANCE_EXEC \ | 124 | | SD_BALANCE_EXEC \ |
| 126 | | SD_WAKE_AFFINE \ | 125 | | SD_WAKE_AFFINE \ |
| 126 | | SD_WAKE_BALANCE \ | ||
| 127 | | SD_SHARE_PKG_RESOURCES\ | 127 | | SD_SHARE_PKG_RESOURCES\ |
| 128 | | BALANCE_FOR_MC_POWER, \ | 128 | | BALANCE_FOR_MC_POWER, \ |
| 129 | .last_balance = jiffies, \ | 129 | .last_balance = jiffies, \ |
| @@ -146,10 +146,10 @@ void arch_update_cpu_topology(void); | |||
| 146 | .wake_idx = 1, \ | 146 | .wake_idx = 1, \ |
| 147 | .forkexec_idx = 1, \ | 147 | .forkexec_idx = 1, \ |
| 148 | .flags = SD_LOAD_BALANCE \ | 148 | .flags = SD_LOAD_BALANCE \ |
| 149 | | SD_BALANCE_NEWIDLE \ | ||
| 150 | | SD_BALANCE_FORK \ | ||
| 151 | | SD_BALANCE_EXEC \ | 149 | | SD_BALANCE_EXEC \ |
| 150 | | SD_BALANCE_FORK \ | ||
| 152 | | SD_WAKE_AFFINE \ | 151 | | SD_WAKE_AFFINE \ |
| 152 | | SD_WAKE_BALANCE \ | ||
| 153 | | BALANCE_FOR_PKG_POWER,\ | 153 | | BALANCE_FOR_PKG_POWER,\ |
| 154 | .last_balance = jiffies, \ | 154 | .last_balance = jiffies, \ |
| 155 | .balance_interval = 1, \ | 155 | .balance_interval = 1, \ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 89a5a1231ffb..b36291130f22 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -240,4 +240,12 @@ void cancel_rearming_delayed_work(struct delayed_work *work) | |||
| 240 | cancel_delayed_work_sync(work); | 240 | cancel_delayed_work_sync(work); |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | #ifndef CONFIG_SMP | ||
| 244 | static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) | ||
| 245 | { | ||
| 246 | return fn(arg); | ||
| 247 | } | ||
| 248 | #else | ||
| 249 | long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); | ||
| 250 | #endif /* CONFIG_SMP */ | ||
| 243 | #endif | 251 | #endif |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 7dd29b7e461d..c29ff1da8a18 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
| @@ -54,6 +54,7 @@ struct unix_sock { | |||
| 54 | atomic_long_t inflight; | 54 | atomic_long_t inflight; |
| 55 | spinlock_t lock; | 55 | spinlock_t lock; |
| 56 | unsigned int gc_candidate : 1; | 56 | unsigned int gc_candidate : 1; |
| 57 | unsigned int gc_maybe_cycle : 1; | ||
| 57 | wait_queue_head_t peer_wait; | 58 | wait_queue_head_t peer_wait; |
| 58 | }; | 59 | }; |
| 59 | #define unix_sk(__sk) ((struct unix_sock *)__sk) | 60 | #define unix_sk(__sk) ((struct unix_sock *)__sk) |
diff --git a/include/net/scm.h b/include/net/scm.h index 06df126103ca..33e9986beb86 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
| @@ -14,8 +14,9 @@ | |||
| 14 | 14 | ||
| 15 | struct scm_fp_list | 15 | struct scm_fp_list |
| 16 | { | 16 | { |
| 17 | int count; | 17 | struct list_head list; |
| 18 | struct file *fp[SCM_MAX_FD]; | 18 | int count; |
| 19 | struct file *fp[SCM_MAX_FD]; | ||
| 19 | }; | 20 | }; |
| 20 | 21 | ||
| 21 | struct scm_cookie | 22 | struct scm_cookie |
diff --git a/include/sound/core.h b/include/sound/core.h index 35424a971b7a..1508c4ec1ba9 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
| @@ -385,9 +385,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
| 385 | 385 | ||
| 386 | #else /* !CONFIG_SND_DEBUG */ | 386 | #else /* !CONFIG_SND_DEBUG */ |
| 387 | 387 | ||
| 388 | #define snd_printd(fmt, args...) /* nothing */ | 388 | #define snd_printd(fmt, args...) do { } while (0) |
| 389 | #define snd_BUG() /* nothing */ | 389 | #define snd_BUG() do { } while (0) |
| 390 | #define snd_BUG_ON(cond) ({/*(void)(cond);*/ 0;}) /* always false */ | 390 | static inline int __snd_bug_on(void) |
| 391 | { | ||
| 392 | return 0; | ||
| 393 | } | ||
| 394 | #define snd_BUG_ON(cond) __snd_bug_on() /* always false */ | ||
| 391 | 395 | ||
| 392 | #endif /* CONFIG_SND_DEBUG */ | 396 | #endif /* CONFIG_SND_DEBUG */ |
| 393 | 397 | ||
