Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3746880ybl; Fri, 20 Dec 2019 15:01:45 -0800 (PST) X-Google-Smtp-Source: APXvYqyHDo0URmsIKod/zeLvoCtXd6PgQg17QWDZEOeGOa7IVjTLZwv/tW+x4Wf7OUIh6yUdVAvl X-Received: by 2002:a05:6830:1ec9:: with SMTP id c9mr4790399otj.59.1576882905567; Fri, 20 Dec 2019 15:01:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576882905; cv=none; d=google.com; s=arc-20160816; b=fTQlyYAR0jlTTBBo0vQwzwow5+O8kJwQAgHstdodVEzkscwuISPmbbmf72+Joa0YaC clOMyyR09qhbqqTMlpyuaTCpptL4bv3Yf4zT81H6m/11MVFiHJrYN3Q9dW0p4X2xiQgh YKSNnm6G6niF0i2Y2WqehcYUoomXmsO7yfSmCKPJPbYfEbiEI1uPUwomNDL9Tjyzfo6J aBe76+dLUnAG5rVPRrwofo7gQmGnkC9jVnJfFuhn1pZVRQZtYdorz2jdd6uRNC4kBhDF 5yl0t/xlhhDybbIufzHT24dj2iGYLuxZIB3M3ePRaT9MK5mzI77/Y4YBfxBIA8C0//MX Jd9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=kYpUFg+g66OYb+0+NDvmD3uzMBedPiin3i8BKFrTBZw=; b=LokpZ68rMtXyLrhI7Gdo0z+pLP8RyOAutu+J+GstU4qeu/SvwyJYeunz6VxF9+bF6S qP2TVFhXa3qrgAaEJ5jS7RYQWAFo1z7sG+NtNcRP1dpjAlI+dg1s4m/5chcvDi19sPh9 rmMaD7by7NrIpfgwVtVd2R/+umphUzIaQv3ELYI0abNiHBiIImBgOg1sUZ7jv8BkpB7O Mcu0OiJj1HKOV0VvwYnq65kDz3lrQ8a2OX1OMI2c3ahx36gE3zeNp6N+okKFzu8n7L00 R5tdIWtBzdAB8Zin9qsoEo0ERGzQoKFvf3UGmjvf9rx3dguFBrhC0WJtFafQd+yoGoWC 1NJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Dg9+0JwC; 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 21si2455808oty.33.2019.12.20.15.01.30; Fri, 20 Dec 2019 15:01:45 -0800 (PST) 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; dkim=pass header.i=@sifive.com header.s=google header.b=Dg9+0JwC; 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 S1726571AbfLTXAo (ORCPT + 99 others); Fri, 20 Dec 2019 18:00:44 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:33562 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726030AbfLTXAo (ORCPT ); Fri, 20 Dec 2019 18:00:44 -0500 Received: by mail-il1-f194.google.com with SMTP id v15so9334567iln.0 for ; Fri, 20 Dec 2019 15:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=kYpUFg+g66OYb+0+NDvmD3uzMBedPiin3i8BKFrTBZw=; b=Dg9+0JwC0nl7+te1/6kqnsS0yw2ym/KBliialLPLp3KLENQXrsQ4hs3MFdyjzlKqld vpzcmhBHAeVo3JiNOTOyT/5OIaLPkflMLAg4itd7iEy48e5e8vjRSNXw2KmuWLpDVen5 u8m+o6D6Ce1KBC1GYrdSC66voxU6MWkOuVGk3PbdmodUuWlMmW70Htw1XT4hiqGRAf8b 46RX3autdlYKZy4ZamcrjI7G2dJDRScbr1MSx5z5aPoC6bVuo9qd4iyRCZ2dZBOzr+yc 9LAp5wSkwuGE01uyjAyCBKszam+XUgI6Y0SZMSFT0rVe0zYxU1Y7vvTDPbhdDcA/cTxQ KV5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=kYpUFg+g66OYb+0+NDvmD3uzMBedPiin3i8BKFrTBZw=; b=eFjqQXPHlQg9FFZpMp6RPb99MaB73VZky+IqaiiaxFXY4URA8VVZ/dhkCRciSIBVvL bJCYXsB9L9dwoCsbqCIQ3NskgsNsKCa//RIoDxh/HxjJpJJpy1L8579HeQE4NCeJGr/c Wc94cmWMQZWPouE0ar9R0P15fLvLcCKhqVJQrjDTDCs+XYb3k3lfKC8S8xhO8qXHpANi W+dNTRZW8w0aU0R7hZ77z/HQ+YDTEcnDaLNAgrB8NnhKe02ogV9XAGEBbCcwc6cvWJvW Ngg82Xj+dRZcFPHfmNjgOOKzSdQFNkfRwJGpu6Gqh/wZDWFHUogOi+Es/sBPRxKhrSE6 c2eg== X-Gm-Message-State: APjAAAWYFjbOPH96pDODSMx3VOL41TZkxDig/bUuWCBjRuo8NNCOF3IX 3yu8I4S0xSczp2lrRsPiKcclWA== X-Received: by 2002:a92:d708:: with SMTP id m8mr14116422iln.244.1576882843543; Fri, 20 Dec 2019 15:00:43 -0800 (PST) Received: from localhost ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id h23sm5524854ilf.57.2019.12.20.15.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 15:00:43 -0800 (PST) Date: Fri, 20 Dec 2019 15:00:41 -0800 (PST) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Olof Johansson cc: Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Linux Kernel Mailing List , Christoph Hellwig Subject: Re: [PATCH] riscv: export flush_icache_all to modules In-Reply-To: Message-ID: References: <20191217040704.91995-1-olof@lixom.net> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Dec 2019, Olof Johansson wrote: > On Fri, Dec 20, 2019 at 3:05 AM Paul Walmsley wrote: > > > > On Mon, 16 Dec 2019, Olof Johansson wrote: > > > > > This is needed by LKDTM (crash dump test module), it calls > > > flush_icache_range(), which on RISC-V turns into flush_icache_all(). On > > > other architectures, the actual implementation is exported, so follow > > > that precedence and export it here too. > > > > > > Fixes build of CONFIG_LKDTM that fails with: > > > ERROR: "flush_icache_all" [drivers/misc/lkdtm/lkdtm.ko] undefined! > > > > In the past we've resisted doing this; see > > > > https://lore.kernel.org/linux-riscv/20190611134945.GA28532@lst.de/ > > > > under the principle that we don't want modules to be able to flush the I$ > > directly via this interface. But maybe, like moving the L2 related code > > out of arch/riscv, we should just do it. > > So you are aware that all other architectures that don't have coherent > icache already exports this, right? > > Being more puritan on RISC-V buys nothing w.r.t. keeping modules from > doing anything, you'll just end up having to mark a bunch of them > broken on your architecture. :( Yep, we'll pick it up. - Paul