diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Makefile | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso.c | 9 | ||||
-rw-r--r-- | arch/powerpc/mm/4xx_mmu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 10 | ||||
-rw-r--r-- | arch/powerpc/mm/mem.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/tlb_32.c | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/tlb_64.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/dart.h | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/u3_iommu.c | 4 |
12 files changed, 31 insertions, 31 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 98f67c78d1bd..a13eb575f834 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -61,15 +61,17 @@ endif | |||
61 | LDFLAGS_vmlinux := -Bstatic | 61 | LDFLAGS_vmlinux := -Bstatic |
62 | 62 | ||
63 | # The -Iarch/$(ARCH)/include is temporary while we are merging | 63 | # The -Iarch/$(ARCH)/include is temporary while we are merging |
64 | CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include | 64 | CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include |
65 | AFLAGS += -Iarch/$(ARCH) | 65 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
66 | CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe | ||
67 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc | 66 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc |
68 | CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple | 67 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple |
69 | CFLAGS += $(CFLAGS-y) | 68 | CPPFLAGS += $(CPPFLAGS-y) |
69 | AFLAGS += $(AFLAGS-y) | ||
70 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) | ||
70 | CPP = $(CC) -E $(CFLAGS) | 71 | CPP = $(CC) -E $(CFLAGS) |
71 | # Temporary hack until we have migrated to asm-powerpc | 72 | # Temporary hack until we have migrated to asm-powerpc |
72 | LINUXINCLUDE += -Iarch/$(ARCH)/include | 73 | LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include |
74 | LINUXINCLUDE += $(LINUXINCLUDE-y) | ||
73 | 75 | ||
74 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ | 76 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ |
75 | 77 | ||
@@ -173,11 +175,13 @@ archclean: | |||
173 | 175 | ||
174 | archprepare: checkbin | 176 | archprepare: checkbin |
175 | 177 | ||
178 | ifeq ($(CONFIG_PPC32),y) | ||
176 | # Temporary hack until we have migrated to asm-powerpc | 179 | # Temporary hack until we have migrated to asm-powerpc |
177 | include/asm: arch/$(ARCH)/include/asm | 180 | include/asm: arch/$(ARCH)/include/asm |
178 | arch/$(ARCH)/include/asm: FORCE | 181 | arch/$(ARCH)/include/asm: FORCE |
179 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi | 182 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi |
180 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm | 183 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm |
184 | endif | ||
181 | 185 | ||
182 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output | 186 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output |
183 | # to stdout and these checks are run even on install targets. | 187 | # to stdout and these checks are run even on install targets. |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index de69fb37c731..a5a7542a8ff3 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -457,7 +457,6 @@ void flush_thread(void) | |||
457 | if (t->flags & _TIF_ABI_PENDING) | 457 | if (t->flags & _TIF_ABI_PENDING) |
458 | t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); | 458 | t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); |
459 | #endif | 459 | #endif |
460 | kprobe_flush_task(current); | ||
461 | 460 | ||
462 | #ifndef CONFIG_SMP | 461 | #ifndef CONFIG_SMP |
463 | if (last_task_used_math == current) | 462 | if (last_task_used_math == current) |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 0d4d8bec0df4..f0c47dab0903 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -145,8 +145,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma) | |||
145 | struct page *pg = virt_to_page(vdso32_kbase + | 145 | struct page *pg = virt_to_page(vdso32_kbase + |
146 | i*PAGE_SIZE); | 146 | i*PAGE_SIZE); |
147 | struct page *upg = (vma && vma->vm_mm) ? | 147 | struct page *upg = (vma && vma->vm_mm) ? |
148 | follow_page(vma->vm_mm, vma->vm_start + | 148 | follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0) |
149 | i*PAGE_SIZE, 0) | ||
150 | : NULL; | 149 | : NULL; |
151 | dump_one_vdso_page(pg, upg); | 150 | dump_one_vdso_page(pg, upg); |
152 | } | 151 | } |
@@ -157,8 +156,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma) | |||
157 | struct page *pg = virt_to_page(vdso64_kbase + | 156 | struct page *pg = virt_to_page(vdso64_kbase + |
158 | i*PAGE_SIZE); | 157 | i*PAGE_SIZE); |
159 | struct page *upg = (vma && vma->vm_mm) ? | 158 | struct page *upg = (vma && vma->vm_mm) ? |
160 | follow_page(vma->vm_mm, vma->vm_start + | 159 | follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0) |
161 | i*PAGE_SIZE, 0) | ||
162 | : NULL; | 160 | : NULL; |
163 | dump_one_vdso_page(pg, upg); | 161 | dump_one_vdso_page(pg, upg); |
164 | } | 162 | } |
@@ -285,8 +283,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, | |||
285 | * It's fine to use that for setting breakpoints in the vDSO code | 283 | * It's fine to use that for setting breakpoints in the vDSO code |
286 | * pages though | 284 | * pages though |
287 | */ | 285 | */ |
288 | vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | | 286 | vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; |
289 | VM_MAYEXEC | VM_RESERVED; | ||
290 | vma->vm_flags |= mm->def_flags; | 287 | vma->vm_flags |= mm->def_flags; |
291 | vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; | 288 | vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; |
292 | vma->vm_ops = &vdso_vmops; | 289 | vma->vm_ops = &vdso_vmops; |
diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/4xx_mmu.c index b7bcbc232f39..4d006aa1a0d1 100644 --- a/arch/powerpc/mm/4xx_mmu.c +++ b/arch/powerpc/mm/4xx_mmu.c | |||
@@ -110,13 +110,11 @@ unsigned long __init mmu_mapin_ram(void) | |||
110 | pmd_t *pmdp; | 110 | pmd_t *pmdp; |
111 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 111 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
112 | 112 | ||
113 | spin_lock(&init_mm.page_table_lock); | ||
114 | pmdp = pmd_offset(pgd_offset_k(v), v); | 113 | pmdp = pmd_offset(pgd_offset_k(v), v); |
115 | pmd_val(*pmdp++) = val; | 114 | pmd_val(*pmdp++) = val; |
116 | pmd_val(*pmdp++) = val; | 115 | pmd_val(*pmdp++) = val; |
117 | pmd_val(*pmdp++) = val; | 116 | pmd_val(*pmdp++) = val; |
118 | pmd_val(*pmdp++) = val; | 117 | pmd_val(*pmdp++) = val; |
119 | spin_unlock(&init_mm.page_table_lock); | ||
120 | 118 | ||
121 | v += LARGE_PAGE_SIZE_16M; | 119 | v += LARGE_PAGE_SIZE_16M; |
122 | p += LARGE_PAGE_SIZE_16M; | 120 | p += LARGE_PAGE_SIZE_16M; |
@@ -127,10 +125,8 @@ unsigned long __init mmu_mapin_ram(void) | |||
127 | pmd_t *pmdp; | 125 | pmd_t *pmdp; |
128 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 126 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
129 | 127 | ||
130 | spin_lock(&init_mm.page_table_lock); | ||
131 | pmdp = pmd_offset(pgd_offset_k(v), v); | 128 | pmdp = pmd_offset(pgd_offset_k(v), v); |
132 | pmd_val(*pmdp) = val; | 129 | pmd_val(*pmdp) = val; |
133 | spin_unlock(&init_mm.page_table_lock); | ||
134 | 130 | ||
135 | v += LARGE_PAGE_SIZE_4M; | 131 | v += LARGE_PAGE_SIZE_4M; |
136 | p += LARGE_PAGE_SIZE_4M; | 132 | p += LARGE_PAGE_SIZE_4M; |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 426c269e552e..6bc9dbad7dea 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -287,15 +287,15 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas) | |||
287 | 287 | ||
288 | int prepare_hugepage_range(unsigned long addr, unsigned long len) | 288 | int prepare_hugepage_range(unsigned long addr, unsigned long len) |
289 | { | 289 | { |
290 | int err; | 290 | int err = 0; |
291 | 291 | ||
292 | if ( (addr+len) < addr ) | 292 | if ( (addr+len) < addr ) |
293 | return -EINVAL; | 293 | return -EINVAL; |
294 | 294 | ||
295 | if ((addr + len) < 0x100000000UL) | 295 | if (addr < 0x100000000UL) |
296 | err = open_low_hpage_areas(current->mm, | 296 | err = open_low_hpage_areas(current->mm, |
297 | LOW_ESID_MASK(addr, len)); | 297 | LOW_ESID_MASK(addr, len)); |
298 | else | 298 | if ((addr + len) > 0x100000000UL) |
299 | err = open_high_hpage_areas(current->mm, | 299 | err = open_high_hpage_areas(current->mm, |
300 | HTLB_AREA_MASK(addr, len)); | 300 | HTLB_AREA_MASK(addr, len)); |
301 | if (err) { | 301 | if (err) { |
@@ -754,9 +754,7 @@ repeat: | |||
754 | } | 754 | } |
755 | 755 | ||
756 | /* | 756 | /* |
757 | * No need to use ldarx/stdcx here because all who | 757 | * No need to use ldarx/stdcx here |
758 | * might be updating the pte will hold the | ||
759 | * page_table_lock | ||
760 | */ | 758 | */ |
761 | *ptep = __pte(new_pte & ~_PAGE_BUSY); | 759 | *ptep = __pte(new_pte & ~_PAGE_BUSY); |
762 | 760 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 4bd7b0a70996..ed6ed2e30dac 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -495,7 +495,7 @@ EXPORT_SYMBOL(flush_icache_user_range); | |||
495 | * We use it to preload an HPTE into the hash table corresponding to | 495 | * We use it to preload an HPTE into the hash table corresponding to |
496 | * the updated linux PTE. | 496 | * the updated linux PTE. |
497 | * | 497 | * |
498 | * This must always be called with the mm->page_table_lock held | 498 | * This must always be called with the pte lock held. |
499 | */ | 499 | */ |
500 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | 500 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, |
501 | pte_t pte) | 501 | pte_t pte) |
diff --git a/arch/powerpc/mm/tlb_32.c b/arch/powerpc/mm/tlb_32.c index 6c3dc3c44c86..ad580f3742e5 100644 --- a/arch/powerpc/mm/tlb_32.c +++ b/arch/powerpc/mm/tlb_32.c | |||
@@ -149,6 +149,12 @@ void flush_tlb_mm(struct mm_struct *mm) | |||
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | 151 | ||
152 | /* | ||
153 | * It is safe to go down the mm's list of vmas when called | ||
154 | * from dup_mmap, holding mmap_sem. It would also be safe from | ||
155 | * unmap_region or exit_mmap, but not from vmtruncate on SMP - | ||
156 | * but it seems dup_mmap is the only SMP case which gets here. | ||
157 | */ | ||
152 | for (mp = mm->mmap; mp != NULL; mp = mp->vm_next) | 158 | for (mp = mm->mmap; mp != NULL; mp = mp->vm_next) |
153 | flush_range(mp->vm_mm, mp->vm_start, mp->vm_end); | 159 | flush_range(mp->vm_mm, mp->vm_start, mp->vm_end); |
154 | FINISH_FLUSH; | 160 | FINISH_FLUSH; |
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index 53e31b834ace..859d29a0cac5 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -95,7 +95,7 @@ static void pte_free_submit(struct pte_freelist_batch *batch) | |||
95 | 95 | ||
96 | void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) | 96 | void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) |
97 | { | 97 | { |
98 | /* This is safe as we are holding page_table_lock */ | 98 | /* This is safe since tlb_gather_mmu has disabled preemption */ |
99 | cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id()); | 99 | cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id()); |
100 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); | 100 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); |
101 | 101 | ||
@@ -206,7 +206,7 @@ void __flush_tlb_pending(struct ppc64_tlb_batch *batch) | |||
206 | 206 | ||
207 | void pte_free_finish(void) | 207 | void pte_free_finish(void) |
208 | { | 208 | { |
209 | /* This is safe as we are holding page_table_lock */ | 209 | /* This is safe since tlb_gather_mmu has disabled preemption */ |
210 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); | 210 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); |
211 | 211 | ||
212 | if (*batchp == NULL) | 212 | if (*batchp == NULL) |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index bf081b345820..2b54eeb2c899 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Rewrite, cleanup: | 4 | * Rewrite, cleanup: |
5 | * | 5 | * |
6 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 6 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
7 | * | 7 | * |
8 | * Dynamic DMA mapping support, iSeries-specific parts. | 8 | * Dynamic DMA mapping support, iSeries-specific parts. |
9 | * | 9 | * |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 97ba5214417f..c78f2b290a73 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Rewrite, cleanup: | 6 | * Rewrite, cleanup: |
7 | * | 7 | * |
8 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 8 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
9 | * | 9 | * |
10 | * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. | 10 | * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. |
11 | * | 11 | * |
diff --git a/arch/powerpc/sysdev/dart.h b/arch/powerpc/sysdev/dart.h index ea8f0d9eed8a..33ed9ed7fc1e 100644 --- a/arch/powerpc/sysdev/dart.h +++ b/arch/powerpc/sysdev/dart.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 2 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c index f32baf7f4693..5c1a26a6d00c 100644 --- a/arch/powerpc/sysdev/u3_iommu.c +++ b/arch/powerpc/sysdev/u3_iommu.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * arch/powerpc/sysdev/u3_iommu.c | 2 | * arch/powerpc/sysdev/u3_iommu.c |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 4 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
5 | * | 5 | * |
6 | * Based on pSeries_iommu.c: | 6 | * Based on pSeries_iommu.c: |
7 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 7 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
8 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 8 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
9 | * | 9 | * |
10 | * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. | 10 | * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. |
11 | * | 11 | * |