aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:26:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:26:14 -0400
commit0cf744bc7ae8e0072159a901f6e1a159bbc30ffa (patch)
treefc8222a3a5af4f42226070c3f76462cfcf0b4e50 /include/asm-generic
parentb528392669415dc1e53a047215e5ad6c2de879fc (diff)
parent7f8998c7aef3ac9c5f3f2943e083dfa6302e90d0 (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/asm-generic')
-rw-r--r--include/asm-generic/dma-mapping-common.h9
-rw-r--r--include/asm-generic/pgtable.h27
-rw-r--r--include/asm-generic/sections.h4
3 files changed, 22 insertions, 18 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,
179extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, 179extern 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
182void *dma_common_contiguous_remap(struct page *page, size_t size,
183 unsigned long vm_flags,
184 pgprot_t prot, const void *caller);
185
186void *dma_common_pages_remap(struct page **pages, size_t size,
187 unsigned long vm_flags, pgprot_t prot,
188 const void *caller);
189void 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
678static inline int pte_numa(pte_t pte) 679static 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
686static inline int pmd_numa(pmd_t pmd) 686static 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
772extern int pte_numa(pte_t pte);
773extern int pmd_numa(pmd_t pmd);
774extern pte_t pte_mknonnuma(pte_t pte);
775extern pmd_t pmd_mknonnuma(pmd_t pmd);
776extern pte_t pte_mknuma(pte_t pte);
777extern pmd_t pmd_mknuma(pmd_t pmd);
778extern void ptep_set_numa(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
779extern void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp);
780#endif /* CONFIG_ARCH_USES_NUMA_PROT_NONE */
781#else
782static inline int pmd_numa(pmd_t pmd) 773static 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. */
38extern char __ctors_start[], __ctors_end[]; 40extern char __ctors_start[], __ctors_end[];
39 41
42extern __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