Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1721466pxj; Wed, 19 May 2021 12:18:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6pOcJa8wZb6hH47W6NJSybt4mHkiW36PM2StiNglPtm2xe8a+qKtWyhNkeUn6/pvud83I X-Received: by 2002:a17:907:dab:: with SMTP id go43mr698142ejc.164.1621451926349; Wed, 19 May 2021 12:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621451926; cv=none; d=google.com; s=arc-20160816; b=GUukPZbOwAb9m4BddyaiTZubeHfV3ttX+HkPLqrjO4tFcwMnk4XJE3ofUy9UKeTfL3 R17iyRzgVKPAsddZQM2cDDkJ9aK7yFJhMo8e/S0VRUzkqbBmn/7ZWnBJGhRIU4LpNull 4ix6iGxP6e4e4FWikmb/7E8GbJx0KZcftQSyPDyDHT6Ym5uf2krD/WWrvAmcPYYxhF8y B1ucqTi0dp+RnZaxTdWrZ8PbK9rfiIYlrLj76QloKUgC7U3Bp6zw3YJ1xYaSmoAjZ+Zx i967IVWsmqhdZVy7y3z1HQ6AycS2rNJLN2EX/IVKMEPxL5+qEuJXFMQ/8+a4Ozn5xwEp vs4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=p+XpRqw4dfP4ss+e2zahskjK4m9y8ZnIzEAB35uG9Ik=; b=IVep4EO/RwtTtYY03jhjhgE+r43Sqvm6JkMbBRfKos6yoDU46Y9ReTLQNN/5pYhf4R oZ7h8N0z3QAZA5qMVjCfKWjGcEPLQ//VtqPa6vlCnBacGYfHtrXDZyBHZqfHOWamaCWG 57sV3EKzoovD8OzqMoEAk4HrjJ8YB+uSyn9y+r6/+E1+NGoqBQsDx6tk2l2tjPES3TfQ 6XO8bNWDqido2HBPU1DFyoqHJnd/Sgi6sBlsZJGtTlsTXeV23+0Kf/V4+HzBJJlXS08W 01eMUI1o4S+tvZ+ovMrotI9vrJ88NH5Rki2EMZDBa2CE9Ccu9ryC5n2QlghzU4B/V7Ms B9nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kcQhiZ9B; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si417648ejq.133.2021.05.19.12.18.20; Wed, 19 May 2021 12:18:46 -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=pass header.i=@kernel.org header.s=k20201202 header.b=kcQhiZ9B; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231127AbhESGGd (ORCPT + 99 others); Wed, 19 May 2021 02:06:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:48910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbhESGGc (ORCPT ); Wed, 19 May 2021 02:06:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 67BBB61364; Wed, 19 May 2021 06:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621404313; bh=Xwr5QpNNsC32N22bkt85qEAJwNFX8RrXNiNTTm93wus=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kcQhiZ9BBe8gjdEzlwZcHnMhmtCas71Aga6bxkQmMcZEQ7gZ3t0i05nXSz55Gjtn7 ViOJzkMJNM37yOkUz9jGlDDu7g41vlC8LyQRu8OdaYQ+W9s+dUHWSWctXYKgWNS1ZD ewv4eKQiyGJbMeeP4jHCB/2jKglATyFDI68hCn3awXLdScWbTda9sBsCeh8Mb+gpn9 aBalxBJrYQow0qfDQ3gUKV+6LpiaKYaFRIrpYWjiub9eA00XKtsE0tiSklRGd0dHGv CA/nFwOVVOmpYYPGmCbCh/zhjuiXOBSG/ltWkrxsnDJiI/SwlVQbZxEuNDfTG7FAIH 49w4XUdqBbJIQ== Received: by mail-lj1-f171.google.com with SMTP id w15so14180692ljo.10; Tue, 18 May 2021 23:05:13 -0700 (PDT) X-Gm-Message-State: AOAM531Vy4MRaZeyPWmt/VyECBc/8LBAiQsH9y14rHuhy8E3SmaWNN9m CglgasdM0EFsSfDmcAN4R3rpfyXlnB0T6hPWWs4= X-Received: by 2002:a2e:504f:: with SMTP id v15mr7695318ljd.18.1621404311670; Tue, 18 May 2021 23:05:11 -0700 (PDT) MIME-Version: 1.0 References: <1621400656-25678-1-git-send-email-guoren@kernel.org> <20210519052048.GA24853@lst.de> In-Reply-To: <20210519052048.GA24853@lst.de> From: Guo Ren Date: Wed, 19 May 2021 14:05:00 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC 0/3] riscv: Add DMA_COHERENT support To: Christoph Hellwig Cc: Anup Patel , Palmer Dabbelt , drew@beagleboard.org, wefu@redhat.com, lazyparser@gmail.com, linux-riscv , Linux Kernel Mailing List , linux-arch , linux-sunxi@lists.linux.dev, Guo Ren Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 1:20 PM Christoph Hellwig wrote: > > On Wed, May 19, 2021 at 05:04:13AM +0000, guoren@kernel.org wrote: > > From: Guo Ren > > > > The RISC-V ISA doesn't yet specify how to query or modify PMAs, so let > > vendors define the custom properties of memory regions in PTE. > > Err, hell no. The ISA needs to gets this fixed first. Then we can > talk about alternatives patching things in or trapping in the SBI. > But if the RISC-V ISA can't get these basic done after years we can't > support it in Linux at all. This is the lightest solution I could imagine, it avoids conflicts with RISC-V ISA. Since the existing RISC-V ISA cannot solve this problem, it is better to provide some configuration for the SOC vendor to customize. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/