diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:23:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:23:15 -0400 |
commit | 9e2d8656f5e8aa214e66b462680cf86b210b74a8 (patch) | |
tree | f67d62e896cedf75599ea45f9ecf9999c6ad24cd /arch/powerpc | |
parent | 1ea4f4f8405cc1ceec23f2d261bc3775785e6712 (diff) | |
parent | 9e695d2ecc8451cc2c1603d60b5c8e7f5581923a (diff) |
Merge branch 'akpm' (Andrew's patch-bomb)
Merge patches from Andrew Morton:
"A few misc things and very nearly all of the MM tree. A tremendous
amount of stuff (again), including a significant rbtree library
rework."
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (160 commits)
sparc64: Support transparent huge pages.
mm: thp: Use more portable PMD clearing sequenece in zap_huge_pmd().
mm: Add and use update_mmu_cache_pmd() in transparent huge page code.
sparc64: Document PGD and PMD layout.
sparc64: Eliminate PTE table memory wastage.
sparc64: Halve the size of PTE tables
sparc64: Only support 4MB huge pages and 8KB base pages.
memory-hotplug: suppress "Trying to free nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning
mm: memcg: clean up mm_match_cgroup() signature
mm: document PageHuge somewhat
mm: use %pK for /proc/vmallocinfo
mm, thp: fix mlock statistics
mm, thp: fix mapped pages avoiding unevictable list on mlock
memory-hotplug: update memory block's state and notify userspace
memory-hotplug: preparation to notify memory block's state at memory hot remove
mm: avoid section mismatch warning for memblock_type_name
make GFP_NOTRACK definition unconditional
cma: decrease cc.nr_migratepages after reclaiming pagelist
CMA: migrate mlocked pages
kpageflags: fix wrong KPF_THP on non-huge compound pages
...
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Kconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/atomic.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 4 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/fault.c | 1 | ||||
-rw-r--r-- | arch/powerpc/oprofile/cell/spu_task_sync.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-memory.c | 13 |
7 files changed, 22 insertions, 16 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4ce0be32d153..df7edb887a04 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -99,6 +99,7 @@ config PPC | |||
99 | select HAVE_DYNAMIC_FTRACE | 99 | select HAVE_DYNAMIC_FTRACE |
100 | select HAVE_FUNCTION_TRACER | 100 | select HAVE_FUNCTION_TRACER |
101 | select HAVE_FUNCTION_GRAPH_TRACER | 101 | select HAVE_FUNCTION_GRAPH_TRACER |
102 | select SYSCTL_EXCEPTION_TRACE | ||
102 | select ARCH_WANT_OPTIONAL_GPIOLIB | 103 | select ARCH_WANT_OPTIONAL_GPIOLIB |
103 | select HAVE_IDE | 104 | select HAVE_IDE |
104 | select HAVE_IOREMAP_PROT | 105 | select HAVE_IOREMAP_PROT |
@@ -113,6 +114,7 @@ config PPC | |||
113 | select HAVE_DMA_API_DEBUG | 114 | select HAVE_DMA_API_DEBUG |
114 | select USE_GENERIC_SMP_HELPERS if SMP | 115 | select USE_GENERIC_SMP_HELPERS if SMP |
115 | select HAVE_OPROFILE | 116 | select HAVE_OPROFILE |
117 | select HAVE_DEBUG_KMEMLEAK | ||
116 | select HAVE_SYSCALL_WRAPPERS if PPC64 | 118 | select HAVE_SYSCALL_WRAPPERS if PPC64 |
117 | select GENERIC_ATOMIC64 if PPC32 | 119 | select GENERIC_ATOMIC64 if PPC32 |
118 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 120 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h index da29032ae38f..e3b1d41c89be 100644 --- a/arch/powerpc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h | |||
@@ -268,6 +268,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
268 | 268 | ||
269 | return t; | 269 | return t; |
270 | } | 270 | } |
271 | #define atomic_dec_if_positive atomic_dec_if_positive | ||
271 | 272 | ||
272 | #define smp_mb__before_atomic_dec() smp_mb() | 273 | #define smp_mb__before_atomic_dec() smp_mb() |
273 | #define smp_mb__after_atomic_dec() smp_mb() | 274 | #define smp_mb__after_atomic_dec() smp_mb() |
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index dfdb95bc59a5..62e11a32c4c2 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -151,6 +151,10 @@ static inline void arch_release_hugepage(struct page *page) | |||
151 | { | 151 | { |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
155 | { | ||
156 | } | ||
157 | |||
154 | #else /* ! CONFIG_HUGETLB_PAGE */ | 158 | #else /* ! CONFIG_HUGETLB_PAGE */ |
155 | static inline void flush_hugetlb_page(struct vm_area_struct *vma, | 159 | static inline void flush_hugetlb_page(struct vm_area_struct *vma, |
156 | unsigned long vmaddr) | 160 | unsigned long vmaddr) |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 83e929e66f9d..721d4603a235 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -1183,7 +1183,7 @@ static const struct vm_operations_struct kvm_rma_vm_ops = { | |||
1183 | 1183 | ||
1184 | static int kvm_rma_mmap(struct file *file, struct vm_area_struct *vma) | 1184 | static int kvm_rma_mmap(struct file *file, struct vm_area_struct *vma) |
1185 | { | 1185 | { |
1186 | vma->vm_flags |= VM_RESERVED; | 1186 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
1187 | vma->vm_ops = &kvm_rma_vm_ops; | 1187 | vma->vm_ops = &kvm_rma_vm_ops; |
1188 | return 0; | 1188 | return 0; |
1189 | } | 1189 | } |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 5495ebe983a2..0a6b28336eb0 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -451,6 +451,7 @@ good_area: | |||
451 | /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk | 451 | /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk |
452 | * of starvation. */ | 452 | * of starvation. */ |
453 | flags &= ~FAULT_FLAG_ALLOW_RETRY; | 453 | flags &= ~FAULT_FLAG_ALLOW_RETRY; |
454 | flags |= FAULT_FLAG_TRIED; | ||
454 | goto retry; | 455 | goto retry; |
455 | } | 456 | } |
456 | } | 457 | } |
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c index 642fca137ccb..28f1af2db1f5 100644 --- a/arch/powerpc/oprofile/cell/spu_task_sync.c +++ b/arch/powerpc/oprofile/cell/spu_task_sync.c | |||
@@ -304,7 +304,7 @@ static inline unsigned long fast_get_dcookie(struct path *path) | |||
304 | return cookie; | 304 | return cookie; |
305 | } | 305 | } |
306 | 306 | ||
307 | /* Look up the dcookie for the task's first VM_EXECUTABLE mapping, | 307 | /* Look up the dcookie for the task's mm->exe_file, |
308 | * which corresponds loosely to "application name". Also, determine | 308 | * which corresponds loosely to "application name". Also, determine |
309 | * the offset for the SPU ELF object. If computed offset is | 309 | * the offset for the SPU ELF object. If computed offset is |
310 | * non-zero, it implies an embedded SPU object; otherwise, it's a | 310 | * non-zero, it implies an embedded SPU object; otherwise, it's a |
@@ -321,7 +321,6 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp, | |||
321 | { | 321 | { |
322 | unsigned long app_cookie = 0; | 322 | unsigned long app_cookie = 0; |
323 | unsigned int my_offset = 0; | 323 | unsigned int my_offset = 0; |
324 | struct file *app = NULL; | ||
325 | struct vm_area_struct *vma; | 324 | struct vm_area_struct *vma; |
326 | struct mm_struct *mm = spu->mm; | 325 | struct mm_struct *mm = spu->mm; |
327 | 326 | ||
@@ -330,16 +329,10 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp, | |||
330 | 329 | ||
331 | down_read(&mm->mmap_sem); | 330 | down_read(&mm->mmap_sem); |
332 | 331 | ||
333 | for (vma = mm->mmap; vma; vma = vma->vm_next) { | 332 | if (mm->exe_file) { |
334 | if (!vma->vm_file) | 333 | app_cookie = fast_get_dcookie(&mm->exe_file->f_path); |
335 | continue; | ||
336 | if (!(vma->vm_flags & VM_EXECUTABLE)) | ||
337 | continue; | ||
338 | app_cookie = fast_get_dcookie(&vma->vm_file->f_path); | ||
339 | pr_debug("got dcookie for %s\n", | 334 | pr_debug("got dcookie for %s\n", |
340 | vma->vm_file->f_dentry->d_name.name); | 335 | mm->exe_file->f_dentry->d_name.name); |
341 | app = vma->vm_file; | ||
342 | break; | ||
343 | } | 336 | } |
344 | 337 | ||
345 | for (vma = mm->mmap; vma; vma = vma->vm_next) { | 338 | for (vma = mm->mmap; vma; vma = vma->vm_next) { |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index 11d8e0544ac0..dc0a035e63bb 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -77,7 +77,8 @@ static int pseries_remove_memblock(unsigned long base, unsigned int memblock_siz | |||
77 | { | 77 | { |
78 | unsigned long start, start_pfn; | 78 | unsigned long start, start_pfn; |
79 | struct zone *zone; | 79 | struct zone *zone; |
80 | int ret; | 80 | int i, ret; |
81 | int sections_to_remove; | ||
81 | 82 | ||
82 | start_pfn = base >> PAGE_SHIFT; | 83 | start_pfn = base >> PAGE_SHIFT; |
83 | 84 | ||
@@ -97,9 +98,13 @@ static int pseries_remove_memblock(unsigned long base, unsigned int memblock_siz | |||
97 | * to sysfs "state" file and we can't remove sysfs entries | 98 | * to sysfs "state" file and we can't remove sysfs entries |
98 | * while writing to it. So we have to defer it to here. | 99 | * while writing to it. So we have to defer it to here. |
99 | */ | 100 | */ |
100 | ret = __remove_pages(zone, start_pfn, memblock_size >> PAGE_SHIFT); | 101 | sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION; |
101 | if (ret) | 102 | for (i = 0; i < sections_to_remove; i++) { |
102 | return ret; | 103 | unsigned long pfn = start_pfn + i * PAGES_PER_SECTION; |
104 | ret = __remove_pages(zone, start_pfn, PAGES_PER_SECTION); | ||
105 | if (ret) | ||
106 | return ret; | ||
107 | } | ||
103 | 108 | ||
104 | /* | 109 | /* |
105 | * Update memory regions for memory remove | 110 | * Update memory regions for memory remove |