Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp933435ybk; Sun, 10 May 2020 00:58:23 -0700 (PDT) X-Google-Smtp-Source: APiQypLgRII9bMX3IhEdY1kGmb1GyUdYJlCMXuVfkQcasX/iIHry31OrQ3NI6hh3KNN5pkVNdk/U X-Received: by 2002:a05:6402:17e3:: with SMTP id t3mr8769542edy.203.1589097503651; Sun, 10 May 2020 00:58:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589097503; cv=none; d=google.com; s=arc-20160816; b=gXPuEojiyiHgDGOQYoFeYF1ncX+3iB7jjEfXOcj4Q3YrWjXPHO6xkH1cLq2Sjji4Oc d1OqZ9j8y8sOhz4vHdPJZUT/mm9S62V3gRf/OnG6veUwRdKdKxTQ2Oo6kBQ+l1e2m0Za dCPubANtVO1N7v+tNXsYWvKJuaxYqE5j1DncAAF6CLIoo456OpJvfASZO4X78MuCvoBN w7by7FOcIvNRqcK+bgtIy9LbV97BZB6OyZyuZzNu/+fLWcjAVW5b1Z4ZVmiOrMM1Qneq Ghiw7dFnbiZkANtuLFURHigL+HvhFqOtJALvOwFha7KEAazLXQirDhXOSWdqvsjIjDoL v5yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kQS44H8EzM8k3vQYjLlTfkfNkLQiGixe7Bw6b6gouAo=; b=QwZuRoQEWquiTB/uFmXSTWpvba+iegfUhfzGDNrODKuUy7/Df4p6iVr9/tmQJs3spb xj7pMt3VKh/MzfIZ62PYV4wAvaefapeoJmfde+qQHn1Y1hh9DqjDQtd91XXjCW7kqbpz dXKyEbG+7ljNbJkNGSHzHW4r3yK/y3Wn7SeHGXVd6umT6XxV9IhNYHTMhX+jY0MWjHmB V3LsZAHtDaAGyyXZU3i68N/RBauHLCQp5wE1TljTVdB2o8LSiK0BZQf9MQleuLx9jhaz yC+upojbfmeTU/WD0tXAdcf4HFg7joNK5b7tk3i53zWhdTSCXq2xoaM13juCjSkrojPF 21Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Apqi088v; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch6si3739819edb.412.2020.05.10.00.58.01; Sun, 10 May 2020 00:58:23 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Apqi088v; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729218AbgEJH4Y (ORCPT + 99 others); Sun, 10 May 2020 03:56:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729201AbgEJH4W (ORCPT ); Sun, 10 May 2020 03:56:22 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F52AC061A0C; Sun, 10 May 2020 00:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=kQS44H8EzM8k3vQYjLlTfkfNkLQiGixe7Bw6b6gouAo=; b=Apqi088v9IbaXI+ysOcZwBByJ0 UwIn/y4rIZLqcupMJqfH8Z4vj/1wSAgtdjdO98IpQwE93og6uEsRJeYVo+hVYJ0CgaTDmr/ICH5Vt LQbV71XZQLLET7CjWqQygiGPeUdQO2Jf3tF4c8fki4C1yiiwsqbb3oX/QMQFRUMcJMRDYnPl7FBIc IAvbDQyvW16udyJqJtkPnjUDFPrFBhcN/HxyYEHF5OsDd69kLUUmadgqDxUJocUaW3dFoxMpFDoKA lR9YojVM5Pygy+KSr7C+oN1MuxJJE+oHa539PuonIM/looVNu28DCk5vuULpKTCqkjgxJvPQWFLL5 K5mJYCwg==; Received: from [2001:4bb8:180:9d3f:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jXgog-0000NJ-Vl; Sun, 10 May 2020 07:56:07 +0000 From: Christoph Hellwig To: Andrew Morton , Arnd Bergmann , Roman Zippel Cc: Jessica Yu , Michal Simek , x86@kernel.org, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 17/31] openrisc: use asm-generic/cacheflush.h Date: Sun, 10 May 2020 09:54:56 +0200 Message-Id: <20200510075510.987823-18-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200510075510.987823-1-hch@lst.de> References: <20200510075510.987823-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org OpenRISC needs almost no cache flushing routines of its own. Rely on asm-generic/cacheflush.h for the defaults. Signed-off-by: Christoph Hellwig --- arch/openrisc/include/asm/cacheflush.h | 31 +++++--------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/arch/openrisc/include/asm/cacheflush.h b/arch/openrisc/include/asm/cacheflush.h index 79d5d7753fe4b..74d1fce4e8839 100644 --- a/arch/openrisc/include/asm/cacheflush.h +++ b/arch/openrisc/include/asm/cacheflush.h @@ -62,31 +62,12 @@ static inline void flush_dcache_page(struct page *page) clear_bit(PG_dc_clean, &page->flags); } -/* - * Other interfaces are not required since we do not have virtually - * indexed or tagged caches. So we can use the default here. - */ -#define flush_cache_all() do { } while (0) -#define flush_cache_mm(mm) do { } while (0) -#define flush_cache_dup_mm(mm) do { } while (0) -#define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) -#define flush_dcache_mmap_lock(mapping) do { } while (0) -#define flush_dcache_mmap_unlock(mapping) do { } while (0) -#define flush_icache_range(start, end) do { } while (0) -#define flush_icache_page(vma, pg) do { } while (0) -#define flush_icache_user_range(vma, pg, adr, len) do { } while (0) -#define flush_cache_vmap(start, end) do { } while (0) -#define flush_cache_vunmap(start, end) do { } while (0) - -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - memcpy(dst, src, len); \ - if (vma->vm_flags & VM_EXEC) \ - sync_icache_dcache(page); \ - } while (0) +#define flush_icache_user_range(vma, page, addr, len) \ +do { \ + if (vma->vm_flags & VM_EXEC) \ + sync_icache_dcache(page); \ +} while (0) -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - memcpy(dst, src, len) +#include #endif /* __ASM_CACHEFLUSH_H */ -- 2.26.2