From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60984 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbcFDSlL (ORCPT ); Sat, 4 Jun 2016 14:41:11 -0400 Subject: Patch "MIPS: Handle highmem pages in __update_cache" has been added to the 4.5-stable tree To: paul.burton@imgtec.com, akpm@linux-foundation.org, gregkh@linuxfoundation.org, jmarchan@redhat.com, kirill.shutemov@linux.intel.com, lars.persson@axis.com, ralf@linux-mips.org Cc: , From: Date: Sat, 04 Jun 2016 11:41:09 -0700 Message-ID: <146506566922219@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled MIPS: Handle highmem pages in __update_cache to the 4.5-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mips-handle-highmem-pages-in-__update_cache.patch and it can be found in the queue-4.5 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From f4281bba818105c7c91799abe40bc05c0dbdaa25 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Tue, 1 Mar 2016 02:37:58 +0000 Subject: MIPS: Handle highmem pages in __update_cache From: Paul Burton commit f4281bba818105c7c91799abe40bc05c0dbdaa25 upstream. The following patch will expose __update_cache to highmem pages. Handle them by mapping them in for the duration of the cache maintenance, just like in __flush_dcache_page. The code for that isn't shared because we need the page address in __update_cache so sharing became messy. Given that the entirity is an extra 5 lines, just duplicate it. Signed-off-by: Paul Burton Cc: Lars Persson Cc: Andrew Morton Cc: Jerome Marchand Cc: Kirill A. Shutemov Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12721/ Signed-off-by: Ralf Baechle Signed-off-by: Greg Kroah-Hartman --- arch/mips/mm/cache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c @@ -143,9 +143,17 @@ void __update_cache(struct vm_area_struc return; page = pfn_to_page(pfn); if (page_mapping(page) && Page_dcache_dirty(page)) { - addr = (unsigned long) page_address(page); + if (PageHighMem(page)) + addr = (unsigned long)kmap_atomic(page); + else + addr = (unsigned long)page_address(page); + if (exec || pages_do_alias(addr, address & PAGE_MASK)) flush_data_cache_page(addr); + + if (PageHighMem(page)) + __kunmap_atomic((void *)addr); + ClearPageDcacheDirty(page); } } Patches currently in stable-queue which might be from paul.burton@imgtec.com are queue-4.5/mips-disable-preemption-during-prctl-pr_set_fp_mode.patch queue-4.5/mips-fix-sigreturn-via-vdso-on-micromips-kernel.patch queue-4.5/mips-handle-highmem-pages-in-__update_cache.patch queue-4.5/mips-fix-watchpoint-restoration.patch queue-4.5/mips-build-micromips-vdso-for-micromips-kernels.patch queue-4.5/mips-math-emu-fix-jalr-emulation-when-rd-0.patch queue-4.5/mips-sync-icache-dcache-in-set_pte_at.patch queue-4.5/mips-fix-msa-ld_-st_-asm-macros-to-use-ptr_addu.patch queue-4.5/mips-prevent-restoration-of-msa-context-in-non-msa-kernels.patch queue-4.5/mips-use-copy_s.fmt-rather-than-copy_u.fmt.patch