diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 11:37:49 -0400 |
|---|---|---|
| committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 11:54:19 -0400 |
| commit | c032862fba51a3ca504752d3a25186b324c5ce83 (patch) | |
| tree | 955dc2ba4ab3df76ecc2bb780ee84aca04967e8d /include/asm-generic | |
| parent | fda76e074c7737fc57855dd17c762e50ed526052 (diff) | |
| parent | 8700c95adb033843fc163d112b9d21d4fda78018 (diff) | |
Merge commit '8700c95adb03' into timers/nohz
The full dynticks tree needs the latest RCU and sched
upstream updates in order to fix some dependencies.
Merge a common upstream merge point that has these
updates.
Conflicts:
include/linux/perf_event.h
kernel/rcutree.h
kernel/rcutree_plugin.h
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/atomic.h | 6 | ||||
| -rw-r--r-- | include/asm-generic/cmpxchg.h | 10 | ||||
| -rw-r--r-- | include/asm-generic/hugetlb.h | 40 | ||||
| -rw-r--r-- | include/asm-generic/pgtable.h | 10 | ||||
| -rw-r--r-- | include/asm-generic/tlb.h | 7 |
5 files changed, 66 insertions, 7 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 1ced6413ea03..33bd2de3bc1e 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
| @@ -136,12 +136,6 @@ static inline void atomic_dec(atomic_t *v) | |||
| 136 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) | 136 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) |
| 137 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 137 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) |
| 138 | 138 | ||
| 139 | #define cmpxchg_local(ptr, o, n) \ | ||
| 140 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
| 141 | (unsigned long)(n), sizeof(*(ptr)))) | ||
| 142 | |||
| 143 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
| 144 | |||
| 145 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) | 139 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) |
| 146 | { | 140 | { |
| 147 | int c, old; | 141 | int c, old; |
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h index 14883026015d..811fb1e9b061 100644 --- a/include/asm-generic/cmpxchg.h +++ b/include/asm-generic/cmpxchg.h | |||
| @@ -92,6 +92,16 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | |||
| 92 | */ | 92 | */ |
| 93 | #include <asm-generic/cmpxchg-local.h> | 93 | #include <asm-generic/cmpxchg-local.h> |
| 94 | 94 | ||
| 95 | #ifndef cmpxchg_local | ||
| 96 | #define cmpxchg_local(ptr, o, n) \ | ||
| 97 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
| 98 | (unsigned long)(n), sizeof(*(ptr)))) | ||
| 99 | #endif | ||
| 100 | |||
| 101 | #ifndef cmpxchg64_local | ||
| 102 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
| 103 | #endif | ||
| 104 | |||
| 95 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) | 105 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) |
| 96 | #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n)) | 106 | #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n)) |
| 97 | 107 | ||
diff --git a/include/asm-generic/hugetlb.h b/include/asm-generic/hugetlb.h new file mode 100644 index 000000000000..d06079c774a0 --- /dev/null +++ b/include/asm-generic/hugetlb.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #ifndef _ASM_GENERIC_HUGETLB_H | ||
| 2 | #define _ASM_GENERIC_HUGETLB_H | ||
| 3 | |||
| 4 | static inline pte_t mk_huge_pte(struct page *page, pgprot_t pgprot) | ||
| 5 | { | ||
| 6 | return mk_pte(page, pgprot); | ||
| 7 | } | ||
| 8 | |||
| 9 | static inline int huge_pte_write(pte_t pte) | ||
| 10 | { | ||
| 11 | return pte_write(pte); | ||
| 12 | } | ||
| 13 | |||
| 14 | static inline int huge_pte_dirty(pte_t pte) | ||
| 15 | { | ||
| 16 | return pte_dirty(pte); | ||
| 17 | } | ||
| 18 | |||
| 19 | static inline pte_t huge_pte_mkwrite(pte_t pte) | ||
| 20 | { | ||
| 21 | return pte_mkwrite(pte); | ||
| 22 | } | ||
| 23 | |||
| 24 | static inline pte_t huge_pte_mkdirty(pte_t pte) | ||
| 25 | { | ||
| 26 | return pte_mkdirty(pte); | ||
| 27 | } | ||
| 28 | |||
| 29 | static inline pte_t huge_pte_modify(pte_t pte, pgprot_t newprot) | ||
| 30 | { | ||
| 31 | return pte_modify(pte, newprot); | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, | ||
| 35 | pte_t *ptep) | ||
| 36 | { | ||
| 37 | pte_clear(mm, addr, ptep); | ||
| 38 | } | ||
| 39 | |||
| 40 | #endif /* _ASM_GENERIC_HUGETLB_H */ | ||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index bfd87685fc1f..a59ff51b0166 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
| @@ -7,6 +7,16 @@ | |||
| 7 | #include <linux/mm_types.h> | 7 | #include <linux/mm_types.h> |
| 8 | #include <linux/bug.h> | 8 | #include <linux/bug.h> |
| 9 | 9 | ||
| 10 | /* | ||
| 11 | * On almost all architectures and configurations, 0 can be used as the | ||
| 12 | * upper ceiling to free_pgtables(): on many architectures it has the same | ||
| 13 | * effect as using TASK_SIZE. However, there is one configuration which | ||
| 14 | * must impose a more careful limit, to avoid freeing kernel pgtables. | ||
| 15 | */ | ||
| 16 | #ifndef USER_PGTABLES_CEILING | ||
| 17 | #define USER_PGTABLES_CEILING 0UL | ||
| 18 | #endif | ||
| 19 | |||
| 10 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 20 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
| 11 | extern int ptep_set_access_flags(struct vm_area_struct *vma, | 21 | extern int ptep_set_access_flags(struct vm_area_struct *vma, |
| 12 | unsigned long address, pte_t *ptep, | 22 | unsigned long address, pte_t *ptep, |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 25f01d0bc149..b1b1fa6ffffe 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
| @@ -99,7 +99,12 @@ struct mmu_gather { | |||
| 99 | unsigned int need_flush : 1, /* Did free PTEs */ | 99 | unsigned int need_flush : 1, /* Did free PTEs */ |
| 100 | fast_mode : 1; /* No batching */ | 100 | fast_mode : 1; /* No batching */ |
| 101 | 101 | ||
| 102 | unsigned int fullmm; | 102 | /* we are in the middle of an operation to clear |
| 103 | * a full mm and can make some optimizations */ | ||
| 104 | unsigned int fullmm : 1, | ||
| 105 | /* we have performed an operation which | ||
| 106 | * requires a complete flush of the tlb */ | ||
| 107 | need_flush_all : 1; | ||
| 103 | 108 | ||
| 104 | struct mmu_gather_batch *active; | 109 | struct mmu_gather_batch *active; |
| 105 | struct mmu_gather_batch local; | 110 | struct mmu_gather_batch local; |
