diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:26:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:26:14 -0400 |
| commit | 0cf744bc7ae8e0072159a901f6e1a159bbc30ffa (patch) | |
| tree | fc8222a3a5af4f42226070c3f76462cfcf0b4e50 /include | |
| parent | b528392669415dc1e53a047215e5ad6c2de879fc (diff) | |
| parent | 7f8998c7aef3ac9c5f3f2943e083dfa6302e90d0 (diff) | |
Merge branch 'akpm' (fixes from Andrew Morton)
Merge patch-bomb from Andrew Morton:
- part of OCFS2 (review is laggy again)
- procfs
- slab
- all of MM
- zram, zbud
- various other random things: arch, filesystems.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (164 commits)
nosave: consolidate __nosave_{begin,end} in <asm/sections.h>
include/linux/screen_info.h: remove unused ORIG_* macros
kernel/sys.c: compat sysinfo syscall: fix undefined behavior
kernel/sys.c: whitespace fixes
acct: eliminate compile warning
kernel/async.c: switch to pr_foo()
include/linux/blkdev.h: use NULL instead of zero
include/linux/kernel.h: deduplicate code implementing clamp* macros
include/linux/kernel.h: rewrite min3, max3 and clamp using min and max
alpha: use Kbuild logic to include <asm-generic/sections.h>
frv: remove deprecated IRQF_DISABLED
frv: remove unused cpuinfo_frv and friends to fix future build error
zbud: avoid accessing last unused freelist
zsmalloc: simplify init_zspage free obj linking
mm/zsmalloc.c: correct comment for fullness group computation
zram: use notify_free to account all free notifications
zram: report maximum used memory
zram: zram memory size limitation
zsmalloc: change return value unit of zs_get_total_size_bytes
zsmalloc: move pages_allocated to zs_pool
...
Diffstat (limited to 'include')
29 files changed, 238 insertions, 404 deletions
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index de8bf89940f8..a9fd248f5d48 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h | |||
| @@ -179,6 +179,15 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
| 179 | extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, | 179 | extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, |
| 180 | void *cpu_addr, dma_addr_t dma_addr, size_t size); | 180 | void *cpu_addr, dma_addr_t dma_addr, size_t size); |
| 181 | 181 | ||
| 182 | void *dma_common_contiguous_remap(struct page *page, size_t size, | ||
| 183 | unsigned long vm_flags, | ||
| 184 | pgprot_t prot, const void *caller); | ||
| 185 | |||
| 186 | void *dma_common_pages_remap(struct page **pages, size_t size, | ||
| 187 | unsigned long vm_flags, pgprot_t prot, | ||
| 188 | const void *caller); | ||
| 189 | void dma_common_free_remap(void *cpu_addr, size_t size, unsigned long vm_flags); | ||
| 190 | |||
| 182 | /** | 191 | /** |
| 183 | * dma_mmap_attrs - map a coherent DMA allocation into user space | 192 | * dma_mmap_attrs - map a coherent DMA allocation into user space |
| 184 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 193 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 977e545a64c3..081ff8826bf6 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
| @@ -664,11 +664,12 @@ static inline int pmd_trans_unstable(pmd_t *pmd) | |||
| 664 | } | 664 | } |
| 665 | 665 | ||
| 666 | #ifdef CONFIG_NUMA_BALANCING | 666 | #ifdef CONFIG_NUMA_BALANCING |
| 667 | #ifdef CONFIG_ARCH_USES_NUMA_PROT_NONE | ||
| 668 | /* | 667 | /* |
| 669 | * _PAGE_NUMA works identical to _PAGE_PROTNONE (it's actually the | 668 | * _PAGE_NUMA distinguishes between an unmapped page table entry, an entry that |
| 670 | * same bit too). It's set only when _PAGE_PRESET is not set and it's | 669 | * is protected for PROT_NONE and a NUMA hinting fault entry. If the |
| 671 | * never set if _PAGE_PRESENT is set. | 670 | * architecture defines __PAGE_PROTNONE then it should take that into account |
| 671 | * but those that do not can rely on the fact that the NUMA hinting scanner | ||
| 672 | * skips inaccessible VMAs. | ||
| 672 | * | 673 | * |
| 673 | * pte/pmd_present() returns true if pte/pmd_numa returns true. Page | 674 | * pte/pmd_present() returns true if pte/pmd_numa returns true. Page |
| 674 | * fault triggers on those regions if pte/pmd_numa returns true | 675 | * fault triggers on those regions if pte/pmd_numa returns true |
| @@ -677,16 +678,14 @@ static inline int pmd_trans_unstable(pmd_t *pmd) | |||
| 677 | #ifndef pte_numa | 678 | #ifndef pte_numa |
| 678 | static inline int pte_numa(pte_t pte) | 679 | static inline int pte_numa(pte_t pte) |
| 679 | { | 680 | { |
| 680 | return (pte_flags(pte) & | 681 | return ptenuma_flags(pte) == _PAGE_NUMA; |
| 681 | (_PAGE_NUMA|_PAGE_PROTNONE|_PAGE_PRESENT)) == _PAGE_NUMA; | ||
| 682 | } | 682 | } |
| 683 | #endif | 683 | #endif |
| 684 | 684 | ||
| 685 | #ifndef pmd_numa | 685 | #ifndef pmd_numa |
| 686 | static inline int pmd_numa(pmd_t pmd) | 686 | static inline int pmd_numa(pmd_t pmd) |
| 687 | { | 687 | { |
| 688 | return (pmd_flags(pmd) & | 688 | return pmdnuma_flags(pmd) == _PAGE_NUMA; |
| 689 | (_PAGE_NUMA|_PAGE_PROTNONE|_PAGE_PRESENT)) == _PAGE_NUMA; | ||
| 690 | } | 689 | } |
| 691 | #endif | 690 | #endif |
| 692 | 691 | ||
| @@ -726,6 +725,8 @@ static inline pte_t pte_mknuma(pte_t pte) | |||
| 726 | { | 725 | { |
| 727 | pteval_t val = pte_val(pte); | 726 | pteval_t val = pte_val(pte); |
| 728 | 727 | ||
| 728 | VM_BUG_ON(!(val & _PAGE_PRESENT)); | ||
| 729 | |||
| 729 | val &= ~_PAGE_PRESENT; | 730 | val &= ~_PAGE_PRESENT; |
| 730 | val |= _PAGE_NUMA; | 731 | val |= _PAGE_NUMA; |
| 731 | 732 | ||
| @@ -769,16 +770,6 @@ static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, | |||
| 769 | } | 770 | } |
| 770 | #endif | 771 | #endif |
| 771 | #else | 772 | #else |
| 772 | extern int pte_numa(pte_t pte); | ||
| 773 | extern int pmd_numa(pmd_t pmd); | ||
| 774 | extern pte_t pte_mknonnuma(pte_t pte); | ||
| 775 | extern pmd_t pmd_mknonnuma(pmd_t pmd); | ||
| 776 | extern pte_t pte_mknuma(pte_t pte); | ||
| 777 | extern pmd_t pmd_mknuma(pmd_t pmd); | ||
| 778 | extern void ptep_set_numa(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | ||
| 779 | extern void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp); | ||
| 780 | #endif /* CONFIG_ARCH_USES_NUMA_PROT_NONE */ | ||
| 781 | #else | ||
| 782 | static inline int pmd_numa(pmd_t pmd) | 773 | static inline int pmd_numa(pmd_t pmd) |
| 783 | { | 774 | { |
| 784 | return 0; | 775 | return 0; |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index f1a24b5c3b90..b58fd667f87b 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | /* References to section boundaries */ | 4 | /* References to section boundaries */ |
| 5 | 5 | ||
| 6 | #include <linux/compiler.h> | ||
| 7 | |||
| 6 | /* | 8 | /* |
| 7 | * Usage guidelines: | 9 | * Usage guidelines: |
| 8 | * _text, _data: architecture specific, don't use them in arch-independent code | 10 | * _text, _data: architecture specific, don't use them in arch-independent code |
| @@ -37,6 +39,8 @@ extern char __start_rodata[], __end_rodata[]; | |||
| 37 | /* Start and end of .ctors section - used for constructor calls. */ | 39 | /* Start and end of .ctors section - used for constructor calls. */ |
| 38 | extern char __ctors_start[], __ctors_end[]; | 40 | extern char __ctors_start[], __ctors_end[]; |
| 39 | 41 | ||
| 42 | extern __visible const void __nosave_begin, __nosave_end; | ||
| 43 | |||
| 40 | /* function descriptor handling (if any). Override | 44 | /* function descriptor handling (if any). Override |
| 41 | * in asm/sections.h */ | 45 | * in asm/sections.h */ |
| 42 | #ifndef dereference_function_descriptor | 46 | #ifndef dereference_function_descriptor |
diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h index 089743ade734..9b0a15d06a4f 100644 --- a/include/linux/balloon_compaction.h +++ b/include/linux/balloon_compaction.h | |||
| @@ -27,10 +27,13 @@ | |||
| 27 | * counter raised only while it is under our special handling; | 27 | * counter raised only while it is under our special handling; |
| 28 | * | 28 | * |
| 29 | * iii. after the lockless scan step have selected a potential balloon page for | 29 | * iii. after the lockless scan step have selected a potential balloon page for |
| 30 | * isolation, re-test the page->mapping flags and the page ref counter | 30 | * isolation, re-test the PageBalloon mark and the PagePrivate flag |
| 31 | * under the proper page lock, to ensure isolating a valid balloon page | 31 | * under the proper page lock, to ensure isolating a valid balloon page |
| 32 | * (not yet isolated, nor under release procedure) | 32 | * (not yet isolated, nor under release procedure) |
| 33 | * | 33 | * |
| 34 | * iv. isolation or dequeueing procedure must clear PagePrivate flag under | ||
| 35 | * page lock together with removing page from balloon device page list. | ||
| 36 | * | ||
| 34 | * The functions provided by this interface are placed to help on coping with | ||
