From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751406AbcCACil (ORCPT ); Mon, 29 Feb 2016 21:38:41 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:49243 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751281AbcCACij (ORCPT ); Mon, 29 Feb 2016 21:38:39 -0500 From: Paul Burton To: CC: Paul Burton , Ralf Baechle , Lars Persson , Subject: [PATCH 1/4] MIPS: Flush dcache for flush_kernel_dcache_page Date: Tue, 1 Mar 2016 02:37:56 +0000 Message-ID: <1456799879-14711-2-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1456799879-14711-1-git-send-email-paul.burton@imgtec.com> References: <1456799879-14711-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.100.200.88] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The flush_kernel_dcache_page function was previously essentially a nop. This is incorrect for MIPS, where if a page has been modified & either it aliases or it's executable & the icache doesn't fill from dcache then the content needs to be written back from dcache to the next level of the cache hierarchy (which is shared with the icache). Implement this by simply calling flush_dcache_page, treating this kmapped cache flush function (flush_kernel_dcache_page) exactly the same as its non-kmapped counterpart (flush_dcache_page). Signed-off-by: Paul Burton --- arch/mips/include/asm/cacheflush.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h index 723229f..7e9f468 100644 --- a/arch/mips/include/asm/cacheflush.h +++ b/arch/mips/include/asm/cacheflush.h @@ -132,6 +132,7 @@ static inline void kunmap_noncoherent(void) static inline void flush_kernel_dcache_page(struct page *page) { BUG_ON(cpu_has_dc_aliases && PageHighMem(page)); + flush_dcache_page(page); } /* -- 2.7.1