From patchwork Tue Jan 12 17:01:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12014137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35E63C433E0 for ; Tue, 12 Jan 2021 17:04:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A468D23132 for ; Tue, 12 Jan 2021 17:04:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A468D23132 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DC5398D00FB; Tue, 12 Jan 2021 12:04:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D4D048D00F6; Tue, 12 Jan 2021 12:04:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C15168D00FB; Tue, 12 Jan 2021 12:04:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id A90F98D00F6 for ; Tue, 12 Jan 2021 12:04:51 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 69782181AEF23 for ; Tue, 12 Jan 2021 17:04:51 +0000 (UTC) X-FDA: 77697747582.14.stop87_5e0abf727517 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 458A91822987A for ; Tue, 12 Jan 2021 17:04:51 +0000 (UTC) X-HE-Tag: stop87_5e0abf727517 X-Filterd-Recvd-Size: 3504 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 17:04:50 +0000 (UTC) Message-Id: <20210112170410.905976187@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1610471089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=BjHyx3TQA52ByPsCeTq6N8/6SlSmPZzIU106dD0/fYw=; b=ORqdfppD06eQ0ZtlbH7MYyPKjna93z9ENP0IyxUC4Iw+h8mTmFOQEoeWffNqPwJ05tpoTf BxSBtF0qLne6qr+iL9EF/A2QjbTRAvrPrA803FWgEdZ3cx74FSjnNeeCHqsml+N5I0eSlK Y1m+lZE8U9RRJxBqUeoPi8PANlp2ZUfN3FoMXFuwzT0271iX6iIIePHqCZ5FT4LdgqabFo boArQRMp3xXzOvXBeXDsoKUvbI8AjYR2vOvjCyJWmgTpopFj+73MUQj/VKElVv7DgMIiIu HVXrTc2BdN9e0ttqxo1T9zkDesqgXxOvpuA9ceXRlD5ek2kdBO8rK4uq5D5NEQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1610471089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=BjHyx3TQA52ByPsCeTq6N8/6SlSmPZzIU106dD0/fYw=; b=J0FN5ZDzaq16C8M0zmNKp9Th8jxUyTdPHrkY+b/W+4Hf8ZWFnW/gJMBR3JEy3Xo18wKTAQ Rcs6OW9e4Kkiz/Dw== Date: Tue, 12 Jan 2021 18:01:37 +0100 From: Thomas Gleixner To: LKML Cc: Andrew Morton , linux-mm@kvack.org, Peter Zijlstra , Andreas Larsson , "David S. Miller" , sparclinux@vger.kernel.org, Paul Cercueil , Thomas Bogendoerfer , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [patch 1/4] sparc/mm/highmem: Flush cache and TLB References: <20210112170136.078559026@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The recent conversion to the generic kmap_local infrastructure failed to assign the proper pre/post map/unmap flush operations for sparc. Sparc requires cache flush before map/unmap and tlb flush afterwards. Fixes: 3293efa97807 ("sparc/mm/highmem: Switch to generic kmap atomic") Reported-by: Andreas Larsson Signed-off-by: Thomas Gleixner Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Tested-by: Andreas Larsson --- arch/sparc/include/asm/highmem.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/arch/sparc/include/asm/highmem.h +++ b/arch/sparc/include/asm/highmem.h @@ -50,10 +50,11 @@ extern pte_t *pkmap_page_table; #define flush_cache_kmaps() flush_cache_all() -/* FIXME: Use __flush_tlb_one(vaddr) instead of flush_cache_all() -- Anton */ -#define arch_kmap_local_post_map(vaddr, pteval) flush_cache_all() -#define arch_kmap_local_post_unmap(vaddr) flush_cache_all() - +/* FIXME: Use __flush_*_one(vaddr) instead of flush_*_all() -- Anton */ +#define arch_kmap_local_pre_map(vaddr, pteval) flush_cache_all() +#define arch_kmap_local_pre_unmap(vaddr) flush_cache_all() +#define arch_kmap_local_post_map(vaddr, pteval) flush_tlb_all() +#define arch_kmap_local_post_unmap(vaddr) flush_tlb_all() #endif /* __KERNEL__ */