Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1855855ybn; Thu, 26 Sep 2019 03:16:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyN7ZHCgHSpCptniTpPzcnTZMlca285Fz5JLz7YhwuiLTD6a7ysAGyuN5Lh15S57H0+N5/N X-Received: by 2002:a17:907:215a:: with SMTP id rk26mr2302142ejb.49.1569492990801; Thu, 26 Sep 2019 03:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569492990; cv=none; d=google.com; s=arc-20160816; b=i4X/y0U3ef1/fCWmypS5Ifl7hr3qcw601O5V+8loKnWZmPtUnFkgjTPMVDo9cwd6uj LbpKG/j0Qbkfb80fd/8b+hybvyeaNIO4OVUV0dlwIgeMsqqSFpTcdxCPR96Yb0rd8vpe Xed0lkJnLKNpAMe3bfIbbqE4xb2QQegbhkJwPPKybcG/liLuNBiFWEatiA/yV2krnriq 5HOrRtrZBg3FZj6ZZmc7pUh5NVL6LZl/2ixn9/J4FLYnB/hGFUI/T90RY0uMP56A4bDH 0qXR5LIoot85Xo5oh0F335smJe/G8jgqIRbkt3DCHmZzIfgn6Mx1Tph2F6usR/ldO5nW +GAg== 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 :message-id:date:subject:cc:to:from; bh=5R8EXSXckEpwpXRpPREQpyjONUgCsK36WERXfnfQE+M=; b=xsuqHomdlDL+3To573MejDIf43jLUlWwY4QIyoqBXaQSkqMWcHegjhE+JTaCOMwBO7 zEKoHLTfPCrYGItUCGEAHSVvVJ5Q8m7HLif8b1Ahmif0srF+jJz6bLD0pZd3B7dC8IS+ FHZ9fCs+1dBz0WyweDVcwIGqRsg++m8peM/rSybqyTtEl8ArgJ5Khpf9bQr9lVpNnK/Z RNYJTABZnwHnOaD3W4g5bJIzO3mfN8xcoqUuwhnYMr+z0Lpu7vD8Ckk8d54cmdSBYbHZ lAPqzTZFE4ALyKKAvAj9M5IVFCOg7SxyJGEVwTJNGMsM+mvVJSNUS8OOW6EaCNG9Y4qI Q4ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id om23si742315ejb.194.2019.09.26.03.16.07; Thu, 26 Sep 2019 03:16:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731171AbfIZCND (ORCPT + 99 others); Wed, 25 Sep 2019 22:13:03 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57100 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727403AbfIZCND (ORCPT ); Wed, 25 Sep 2019 22:13:03 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7D8DB27A7017405A031A; Thu, 26 Sep 2019 10:13:00 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Thu, 26 Sep 2019 10:12:54 +0800 From: Kefeng Wang To: , , "Palmer Dabbelt" CC: Kefeng Wang , Paul Walmsley , Albert Ou Subject: [PATCH] riscv: move flush_icache_range/user_range() after flush_icache_all() Date: Thu, 26 Sep 2019 10:29:38 +0800 Message-ID: <20190926022938.58568-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When build lkdtm module, which used flush_icache_range(), error occurred, ERROR: "flush_icache_all" [drivers/misc/lkdtm/lkdtm.ko] undefined! Fix it. Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Signed-off-by: Kefeng Wang --- arch/riscv/include/asm/cacheflush.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/riscv/include/asm/cacheflush.h b/arch/riscv/include/asm/cacheflush.h index 555b20b11dc3..f6ec26589620 100644 --- a/arch/riscv/include/asm/cacheflush.h +++ b/arch/riscv/include/asm/cacheflush.h @@ -80,13 +80,6 @@ static inline void flush_dcache_page(struct page *page) clear_bit(PG_dcache_clean, &page->flags); } -/* - * RISC-V doesn't have an instruction to flush parts of the instruction cache, - * so instead we just flush the whole thing. - */ -#define flush_icache_range(start, end) flush_icache_all() -#define flush_icache_user_range(vma, pg, addr, len) flush_icache_all() - #ifndef CONFIG_SMP #define flush_icache_all() local_flush_icache_all() @@ -99,6 +92,13 @@ void flush_icache_mm(struct mm_struct *mm, bool local); #endif /* CONFIG_SMP */ +/* + * RISC-V doesn't have an instruction to flush parts of the instruction cache, + * so instead we just flush the whole thing. + */ +#define flush_icache_range(start, end) flush_icache_all() +#define flush_icache_user_range(vma, pg, addr, len) flush_icache_all() + /* * Bits in sys_riscv_flush_icache()'s flags argument. */ -- 2.20.1