diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/highmem.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_pr.c | 4 | ||||
-rw-r--r-- | arch/powerpc/mm/dma-noncoherent.c | 5 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 4 | ||||
-rw-r--r-- | arch/powerpc/mm/mem.c | 4 |
5 files changed, 9 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h index dbc264010d0b..caaf6e00630d 100644 --- a/arch/powerpc/include/asm/highmem.h +++ b/arch/powerpc/include/asm/highmem.h | |||
@@ -79,7 +79,7 @@ static inline void kunmap(struct page *page) | |||
79 | kunmap_high(page); | 79 | kunmap_high(page); |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline void *__kmap_atomic(struct page *page) | 82 | static inline void *kmap_atomic(struct page *page) |
83 | { | 83 | { |
84 | return kmap_atomic_prot(page, kmap_prot); | 84 | return kmap_atomic_prot(page, kmap_prot); |
85 | } | 85 | } |
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index e2cfb9e1e20e..220fcdf26978 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -227,14 +227,14 @@ static void kvmppc_patch_dcbz(struct kvm_vcpu *vcpu, struct kvmppc_pte *pte) | |||
227 | hpage_offset /= 4; | 227 | hpage_offset /= 4; |
228 | 228 | ||
229 | get_page(hpage); | 229 | get_page(hpage); |
230 | page = kmap_atomic(hpage, KM_USER0); | 230 | page = kmap_atomic(hpage); |
231 | 231 | ||
232 | /* patch dcbz into reserved instruction, so we trap */ | 232 | /* patch dcbz into reserved instruction, so we trap */ |
233 | for (i=hpage_offset; i < hpage_offset + (HW_PAGE_SIZE / 4); i++) | 233 | for (i=hpage_offset; i < hpage_offset + (HW_PAGE_SIZE / 4); i++) |
234 | if ((page[i] & 0xff0007ff) == INS_DCBZ) | 234 | if ((page[i] & 0xff0007ff) == INS_DCBZ) |
235 | page[i] &= 0xfffffff7; | 235 | page[i] &= 0xfffffff7; |
236 | 236 | ||
237 | kunmap_atomic(page, KM_USER0); | 237 | kunmap_atomic(page); |
238 | put_page(hpage); | 238 | put_page(hpage); |
239 | } | 239 | } |
240 | 240 | ||
diff --git a/arch/powerpc/mm/dma-noncoherent.c b/arch/powerpc/mm/dma-noncoherent.c index 329be36c0a8d..6747eece84af 100644 --- a/arch/powerpc/mm/dma-noncoherent.c +++ b/arch/powerpc/mm/dma-noncoherent.c | |||
@@ -365,12 +365,11 @@ static inline void __dma_sync_page_highmem(struct page *page, | |||
365 | local_irq_save(flags); | 365 | local_irq_save(flags); |
366 | 366 | ||
367 | do { | 367 | do { |
368 | start = (unsigned long)kmap_atomic(page + seg_nr, | 368 | start = (unsigned long)kmap_atomic(page + seg_nr) + seg_offset; |
369 | KM_PPC_SYNC_PAGE) + seg_offset; | ||
370 | 369 | ||
371 | /* Sync this buffer segment */ | 370 | /* Sync this buffer segment */ |
372 | __dma_sync((void *)start, seg_size, direction); | 371 | __dma_sync((void *)start, seg_size, direction); |
373 | kunmap_atomic((void *)start, KM_PPC_SYNC_PAGE); | 372 | kunmap_atomic((void *)start); |
374 | seg_nr++; | 373 | seg_nr++; |
375 | 374 | ||
376 | /* Calculate next buffer segment size */ | 375 | /* Calculate next buffer segment size */ |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index a8b3cc7d90fe..57c7465e656e 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -910,9 +910,9 @@ void flush_dcache_icache_hugepage(struct page *page) | |||
910 | if (!PageHighMem(page)) { | 910 | if (!PageHighMem(page)) { |
911 | __flush_dcache_icache(page_address(page+i)); | 911 | __flush_dcache_icache(page_address(page+i)); |
912 | } else { | 912 | } else { |
913 | start = kmap_atomic(page+i, KM_PPC_SYNC_ICACHE); | 913 | start = kmap_atomic(page+i); |
914 | __flush_dcache_icache(start); | 914 | __flush_dcache_icache(start); |
915 | kunmap_atomic(start, KM_PPC_SYNC_ICACHE); | 915 | kunmap_atomic(start); |
916 | } | 916 | } |
917 | } | 917 | } |
918 | } | 918 | } |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index d974b79a3068..baaafde7d135 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -458,9 +458,9 @@ void flush_dcache_icache_page(struct page *page) | |||
458 | #endif | 458 | #endif |
459 | #ifdef CONFIG_BOOKE | 459 | #ifdef CONFIG_BOOKE |
460 | { | 460 | { |
461 | void *start = kmap_atomic(page, KM_PPC_SYNC_ICACHE); | 461 | void *start = kmap_atomic(page); |
462 | __flush_dcache_icache(start); | 462 | __flush_dcache_icache(start); |
463 | kunmap_atomic(start, KM_PPC_SYNC_ICACHE); | 463 | kunmap_atomic(start); |
464 | } | 464 | } |
465 | #elif defined(CONFIG_8xx) || defined(CONFIG_PPC64) | 465 | #elif defined(CONFIG_8xx) || defined(CONFIG_PPC64) |
466 | /* On 8xx there is no need to kmap since highmem is not supported */ | 466 | /* On 8xx there is no need to kmap since highmem is not supported */ |