Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: Remove __flush_dcache_page()

This function is only used in __sync_icache_dcache(), so remove it and
call __flush_dcache_area() directly. The flush_icache_user_range()
function is not used in the arm64 kernel.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Will Deacon <will.deacon@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>

+1 -10
-3
arch/arm64/include/asm/cacheflush.h
··· 123 123 #define flush_dcache_mmap_unlock(mapping) \ 124 124 spin_unlock_irq(&(mapping)->tree_lock) 125 125 126 - #define flush_icache_user_range(vma,page,addr,len) \ 127 - flush_dcache_page(page) 128 - 129 126 /* 130 127 * We don't appear to need to do anything here. In fact, if we did, we'd 131 128 * duplicate cache flushing elsewhere performed by flush_dcache_page().
+1 -6
arch/arm64/mm/flush.c
··· 70 70 #endif 71 71 } 72 72 73 - void __flush_dcache_page(struct page *page) 74 - { 75 - __flush_dcache_area(page_address(page), PAGE_SIZE); 76 - } 77 - 78 73 void __sync_icache_dcache(pte_t pte, unsigned long addr) 79 74 { 80 75 struct page *page = pte_page(pte); ··· 79 84 return; 80 85 81 86 if (!test_and_set_bit(PG_dcache_clean, &page->flags)) { 82 - __flush_dcache_page(page); 87 + __flush_dcache_area(page_address(page), PAGE_SIZE); 83 88 __flush_icache_all(); 84 89 } else if (icache_is_aivivt()) { 85 90 __flush_icache_all();
-1
arch/arm64/mm/mm.h
··· 1 - extern void __flush_dcache_page(struct page *page); 2 1 extern void __init bootmem_init(void); 3 2 extern void __init arm64_swiotlb_init(void);