Skip to content

Commit ba57583

Browse files
James BottomleyKyle McMartin
authored andcommitted
[PARISC] Add parisc implementation of flush_kernel_dcache_page()
We need to do a little renaming of our original syntax because of the difference in arguments. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
1 parent ab43227 commit ba57583

5 files changed

Lines changed: 15 additions & 8 deletions

File tree

‎arch/parisc/kernel/cache.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
8989
if (pfn_valid(page_to_pfn(page)) && page_mapping(page) &&
9090
test_bit(PG_dcache_dirty, &page->flags)) {
9191

92-
flush_kernel_dcache_page(page_address(page));
92+
flush_kernel_dcache_page(page);
9393
clear_bit(PG_dcache_dirty, &page->flags);
9494
}
9595
}
@@ -278,7 +278,7 @@ void flush_dcache_page(struct page *page)
278278
return;
279279
}
280280

281-
flush_kernel_dcache_page(page_address(page));
281+
flush_kernel_dcache_page(page);
282282

283283
if (!mapping)
284284
return;
@@ -317,7 +317,7 @@ EXPORT_SYMBOL(flush_dcache_page);
317317

318318
/* Defined in arch/parisc/kernel/pacache.S */
319319
EXPORT_SYMBOL(flush_kernel_dcache_range_asm);
320-
EXPORT_SYMBOL(flush_kernel_dcache_page);
320+
EXPORT_SYMBOL(flush_kernel_dcache_page_asm);
321321
EXPORT_SYMBOL(flush_data_cache_local);
322322
EXPORT_SYMBOL(flush_kernel_icache_range_asm);
323323

‎arch/parisc/kernel/pacache.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,9 @@ __clear_user_page_asm:
621621

622622
.procend
623623

624-
.export flush_kernel_dcache_page
624+
.export flush_kernel_dcache_page_asm
625625

626-
flush_kernel_dcache_page:
626+
flush_kernel_dcache_page_asm:
627627
.proc
628628
.callinfo NO_CALLS
629629
.entry

‎include/asm-parisc/cache.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern void flush_user_icache_range_asm(unsigned long, unsigned long);
4848
extern void flush_kernel_icache_range_asm(unsigned long, unsigned long);
4949
extern void flush_user_dcache_range_asm(unsigned long, unsigned long);
5050
extern void flush_kernel_dcache_range_asm(unsigned long, unsigned long);
51-
extern void flush_kernel_dcache_page(void *);
51+
extern void flush_kernel_dcache_page_asm(void *);
5252
extern void flush_kernel_icache_page(void *);
5353
extern void disable_sr_hashing(void); /* turns off space register hashing */
5454
extern void disable_sr_hashing_asm(int); /* low level support for above */

‎include/asm-parisc/cacheflush.h‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extern void flush_dcache_page(struct page *page);
6262
#define flush_dcache_mmap_unlock(mapping) \
6363
write_unlock_irq(&(mapping)->tree_lock)
6464

65-
#define flush_icache_page(vma,page) do { flush_kernel_dcache_page(page_address(page)); flush_kernel_icache_page(page_address(page)); } while (0)
65+
#define flush_icache_page(vma,page) do { flush_kernel_dcache_page(page); flush_kernel_icache_page(page_address(page)); } while (0)
6666

6767
#define flush_icache_range(s,e) do { flush_kernel_dcache_range_asm(s,e); flush_kernel_icache_range_asm(s,e); } while (0)
6868

@@ -192,6 +192,13 @@ flush_anon_page(struct page *page, unsigned long vmaddr)
192192
}
193193
#define ARCH_HAS_FLUSH_ANON_PAGE
194194

195+
static inline void
196+
flush_kernel_dcache_page(struct page *page)
197+
{
198+
flush_kernel_dcache_page_asm(page_address(page));
199+
}
200+
#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
201+
195202
#ifdef CONFIG_DEBUG_RODATA
196203
void mark_rodata_ro(void);
197204
#endif

‎include/asm-parisc/page.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static inline void
2626
copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg)
2727
{
2828
copy_user_page_asm(vto, vfrom);
29-
flush_kernel_dcache_page(vto);
29+
flush_kernel_dcache_page_asm(vto);
3030
/* XXX: ppc flushes icache too, should we? */
3131
}
3232

0 commit comments

Comments
 (0)