Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3219514pxb; Tue, 12 Jan 2021 09:08:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXrMf9j5V23hvXXWeTSv9QXTIzcveops4n+AxG2Kld18Ro9hq2DMETRJUQQXKOOeDziOCk X-Received: by 2002:a17:906:f905:: with SMTP id lc5mr3866194ejb.177.1610471312498; Tue, 12 Jan 2021 09:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610471312; cv=none; d=google.com; s=arc-20160816; b=H/uNwQH6xiStYtT7L09ZEpT8kHxZs63WNOrvBhUWqkNS2oaDuZahaKQKynsSVZqa/n lZ+rzM0mFin2s4O1GJLkpEZpMe9lJprflgiv7wBEBw5R3JBIaCOpAoFdRGJiYjptRMgv Wu0wr9QfnSwlw7VDHBZ/1W37Y+rFL4MkevRLuGOh2hyOUzry/MIIIMGObE+wMY0qoQqd DFY3qyEnKXB9TJZB6hf9ZrZH9DKolPZF67TAk5NX9T+fQn/lOUlE7j8iNQkZniO1ElaU /vIqiwOzrBGpuciMn0NKEYVZnUUFiGvlEz5ipbbQuVLq+OIpMDRojpmejpKdb0h6VaDz cdbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:subject:cc:to:from:date:dkim-signature:dkim-signature :message-id; bh=BjHyx3TQA52ByPsCeTq6N8/6SlSmPZzIU106dD0/fYw=; b=mkI5MvllVbk7cv0dgpyecZPaM+M/UEfeaqWTpRjNX2OL4ZL0JosvuCBveoXm+MkZdT qlLrMBtJAwM2d6bPf/Mt4YEniihvlVkIkU3D1T9pwOS4WJliRGwrAdVoAPWvoFfcf0Jh 4Stvvhr30PE+WboZ6HbK9Sf6ZU8F8iFEzZWBjGgEb/BZGoBU7aRWFNZDkhJQkbHWc++8 UkG7gsg8Fm7VfOXKVsByIQAgG8hSUgPqX9i+oKmblwHctsuB60hf9PoDeoJ62pT5tpkY OUhEHHWdg2k5+8R/plAUjqCsJmNsyd/ayA5/vLy3sc7CuLtJi+PHiPKTBzorxmv/Ll1W ttpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ORqdfppD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=J0FN5ZDz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si1580410edv.345.2021.01.12.09.08.08; Tue, 12 Jan 2021 09:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ORqdfppD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=J0FN5ZDz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392332AbhALRFl (ORCPT + 99 others); Tue, 12 Jan 2021 12:05:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392242AbhALRFb (ORCPT ); Tue, 12 Jan 2021 12:05:31 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB8E6C061794; Tue, 12 Jan 2021 09:04:50 -0800 (PST) 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-Type: text/plain; charset=UTF-8 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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__ */