Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3722667ybl; Fri, 20 Dec 2019 14:30:24 -0800 (PST) X-Google-Smtp-Source: APXvYqy7wctRWxMcQDh4r7XFnoLvHYKQPN9SNZ6AViK1PVpPCbZyQamDNSebAqiy2wDo8bBnWG+R X-Received: by 2002:a9d:674f:: with SMTP id w15mr17883879otm.243.1576881024147; Fri, 20 Dec 2019 14:30:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576881024; cv=none; d=google.com; s=arc-20160816; b=jj4dTsvtxAFMy44izbgvreQEyjWAx1P0OfrgaGVbysN7AXjgcDF6ixK99iT6rDJqHj mw3P3pAF8bf8lDoahj1ffQW/QypAxBJn0hM/8iILCsogRgj/Q5f0HwmP+Ha5OhNDdTZL Yt+ZW9X25ytiQg+8b42TPTCxMJLy7wQV200Xr0XmtDdR4dJ7Ro1gVLXkScSv/KJ9lrPY wsEVr63Pg7wfGIv032Zsr5BJtf647nOweyOcwFK+bXL0yqGBjtoU7zhpKQ4nCcOjqOfa 4tfHTZqPPyy0SNrguekjAX11CQgqGT4qFiM4Dwti/og0ABCtngEeBTBDletBxP8zVzzY 2/Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SxT9S/D7O//cYzKYLsrhvKwwVG4SCgEZz+NAdL3+U5Q=; b=aK3EgLfFZIqDIDyHCbmiW4mzs+hqpryKCYYlGSZevMTWktWAtiJMMBbhAi54s7WIK7 8qQSGoRUzeZdra0BX04xXWMXliBP3QBJjq2lT1tBkwIx3pQTp9sGb72LUFV5s3TV8Ffq vT8qGIDfvCuEZ6NGcYYCga/gpibXcUc2T+tbdIfVYkzp5YJojqeHIHn/1HniglzCBDHl iVtc5GJBAnTlSLFXLIQb62ug5kZUWoYm2CfExN4O3SX5ob3dHRVFzUkMZd3QycMzRNcs kYbfdxpmGfEAVLDq+Ecm/i5snrernUqK9o5YownNH7gBS0xl6mvqRVXxkFUl9wFhXxOb olHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b="X/akbPBW"; 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 h14si6337918otn.6.2019.12.20.14.30.12; Fri, 20 Dec 2019 14:30:24 -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=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b="X/akbPBW"; 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 S1727210AbfLTW3c (ORCPT + 99 others); Fri, 20 Dec 2019 17:29:32 -0500 Received: from mail-il1-f195.google.com ([209.85.166.195]:33091 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbfLTW3c (ORCPT ); Fri, 20 Dec 2019 17:29:32 -0500 Received: by mail-il1-f195.google.com with SMTP id v15so9282819iln.0 for ; Fri, 20 Dec 2019 14:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SxT9S/D7O//cYzKYLsrhvKwwVG4SCgEZz+NAdL3+U5Q=; b=X/akbPBWsfdZSp5G+j8P28Aelh08kzfqaYSSeV7+y19Zi1sV/RL/eCdWnV27FHLG2P EQRJdTjbSHdcV/ApCLjSWGWjqZvmzYs6dScyi4K4xpQybh/mlAzaWbvhTtb8Ju8a3M++ qYFouGgxLMhvdLNAM1zSqJpeoY5qcxHAhZuuafFitcFS1pcYJxLy3yfoBN7+IVIjnPAU Lo42qgzVk6MKHeoMx/ow0YHO2B+UYq1bf2JWUI9jdIG7IOfnSjZBLEQwE1GpNs8s8IJk M+Qn8NlFKu4U+W5/r3EWTzUCZfMmc7HksPCXtYOQWQhp7Ql5z7ZD6Gw/dZBmhwIyPQAm L7qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SxT9S/D7O//cYzKYLsrhvKwwVG4SCgEZz+NAdL3+U5Q=; b=Iqj8uMPOlZRFEFr7VxdRYARYItfgFNytygVAp6LYLpyrqHq0POaU8fn88TSdHzc1hT Y8B17PJs1ZYclwpBd634lCezvYzLhkc6yrdqNEFSIXLhRuIDHzApODeSXb3bz++3K8DR 71SGPiy+9WJMbB5EUCdxcjz6S3BLLoEnrlX5LbT4XTolN3aSeEjTcVneg4gBXLKTMN+8 HRjASP4F92HXkv+SFZQY9VkAPR6VpkV/1cT2fjmJA0+bCP4JvjbOrqEvWgwTS1mjAXD9 MV2raBHR1CxZrDkf1EutRhhJ9/uXxLvjRAzdhYapDWrcgK8A+PwggNBlmUVh9yCRyoTs IaUA== X-Gm-Message-State: APjAAAXHcORT5hjGCt3SDoFuY8E7omAwj9Iaub3LH5QxfxYfDZ3WPoRy sHKgILF3t9JxTzuVD2cNF07PD6v0YxLa6P4jEaQxqA== X-Received: by 2002:a92:afc5:: with SMTP id v66mr13507241ill.123.1576880971835; Fri, 20 Dec 2019 14:29:31 -0800 (PST) MIME-Version: 1.0 References: <20191217040704.91995-1-olof@lixom.net> In-Reply-To: From: Olof Johansson Date: Fri, 20 Dec 2019 14:29:20 -0800 Message-ID: Subject: Re: [PATCH] riscv: export flush_icache_all to modules To: Paul Walmsley Cc: Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Linux Kernel Mailing List , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. :( -Olof