Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3059294pxj; Mon, 7 Jun 2021 00:48:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtYOFl5VS8AS0+PKc8dEtAXu/4tlMMhIuB03ZerP0YXk4G4/Go/XASz0oXUA+4Y2tOMpf+ X-Received: by 2002:a05:6402:695:: with SMTP id f21mr18187910edy.96.1623052107996; Mon, 07 Jun 2021 00:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623052107; cv=none; d=google.com; s=arc-20160816; b=CPJDmDF0bDu8scgYa5A6evpJZuhyqqi0CIx57fnkSPKz8qy1tSXuLlDm6jvUN7XcUJ tk3p1rxcWCMbK7ObVb6a7t9+ZmpSNh0e26zIn85ck6eegHOQCqyza/ULBwPTV/cipOWz 2aGlyzfJqjyYhEAa5B0cB/M4ZBIvtX/s6+dYfn0IO0YNvpLNtGLr+wnQfVqYaw7UHsjM /meG1zaksUOvPfiuaTPmlhZkG6lHfG78Wa1xyuUwrCQwdnzrKJ9YvJWe9e21phSFzpMa JFudQnHylWWPoa5EG+z7ZsRTMkKCCc9TSSL2ViUc3sQwajdM/Ieo+Ho/pyX2dGo9Z+oj ab/w== 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=pnNv97nW9p1WNPQq3RFafLnfgqP749hqgAh4W2bErW0=; b=dPPIJamQSscu/NOjVXHXdv7aJlCDCP4crH6nKyjx4l07WP3pimhSNOSUZ5Z0OvEDEl MRMc/tDRWDQGdBxanx3rRSzN7qdeAz4nB8xl/Y2MHICEZcVwJNINa6mFAXB0XKbeBCLm kqHgdEBy6Ur4qaV7S6vzCzWvSG5rBEzFIpx98l0+IOL+jmYDdkg/V45I156bUBxey2rz 1Qm4o2b5T3qzuyiU9ctu70UlIpwH7O+lywgRI5cflvyHAtJQNsVlvkSCfI7tXC/vRJvS yiLh5aUqUONxryP5ModHewtzrT1hqkXVtv72Mp1av8fLl9lx/KRquPNA66CCwRWIjokt bZ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FxmLOZM5; 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 3si8100391ejm.442.2021.06.07.00.47.56; Mon, 07 Jun 2021 00:48:27 -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=FxmLOZM5; 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 S230197AbhFGHsV (ORCPT + 99 others); Mon, 7 Jun 2021 03:48:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:52610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbhFGHsU (ORCPT ); Mon, 7 Jun 2021 03:48:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C26596127C; Mon, 7 Jun 2021 07:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623051989; bh=2HlV8yHs2q1qjoHRDtJoVGUfxTgO4byPz6D2uYNRljQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FxmLOZM5r4Z7GtFixysiILFJTjRWbjbsEs7+jojonhIuOUMLae2X86XjlksRQ5ItZ Kp2HLKf3hcq7htEBpNBiljaaA0b8EQt5akMDMCJIotNGyl5UPwG+jI6yUpPh3et0b2 Nr4zEMKyO2dzXmvFuISpk7OjS+IoUa1mw+c32lciZ1Yz69tEKRHYivY0wXJB8VvxuV 2KACYptzrizLvKJH8Ke9yVZ7BXy3dT1r+E+my3CVoV61LYAgNUm5oWIMfGhVgRNc1l GDHIoWE7a8/w4ZcUjJJZHCGPyL6q7GBOTQsOP+QqXJzGgdW7CR6Ol3csV4KeLNJqw8 aWtYQYO0/o0yg== Received: by mail-lj1-f173.google.com with SMTP id n17so3748857ljg.2; Mon, 07 Jun 2021 00:46:29 -0700 (PDT) X-Gm-Message-State: AOAM531y3EwWMFNguwEO8o7tWaGMxeW4MoFgy+rAAi6ocSXDrpekQkLY /Jx1XltuY6cz61rkwSyrwQBNcJzpdfyfVNqmGQA= X-Received: by 2002:a2e:900f:: with SMTP id h15mr12585106ljg.285.1623051988136; Mon, 07 Jun 2021 00:46:28 -0700 (PDT) MIME-Version: 1.0 References: <20210519064435.GA3076809@x1> <20210519065352.GA31590@lst.de> <29733b0931d9dd6a2f0b6919067c7efe@mailhost.ics.forth.gr> <20210607062701.GB24060@lst.de> <20210607065108.GA24872@lst.de> In-Reply-To: <20210607065108.GA24872@lst.de> From: Guo Ren Date: Mon, 7 Jun 2021 15:46:16 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC 0/3] riscv: Add DMA_COHERENT support To: Christoph Hellwig Cc: Nick Kossifidis , Drew Fustini , Anup Patel , Palmer Dabbelt , wefu@redhat.com, =?UTF-8?B?V2VpIFd1ICjlkLTkvJ8p?= , linux-riscv , Linux Kernel Mailing List , linux-arch , linux-sunxi@lists.linux.dev, Guo Ren , Paul Walmsley , Benjamin Koch , Matteo Croce , Wei Fu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 7, 2021 at 2:51 PM Christoph Hellwig wrote: > > On Mon, Jun 07, 2021 at 02:41:14PM +0800, Guo Ren wrote: > > Double/Triple the size of physical memory regions can't be accepted by > > SOC vendors, because it wastes HW resources. > > Some cost-down soc interconnects only have 32bit~34bit width of > > physical address, are you sure you could force them to expand it? (I > > can't) > > > > > or somewhat dynamic. > > How can HW implement with dynamic modifying PMA? What's the granularity? > > I'm just stating the requirements from the Linux DMA perspective. You > also do not need tripple the address space, just double. With double, you only got "strong order + non-cache" for the DMA descriptor. How about write-combine scenario? Even, double physical memory address space also wastes HW resources. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/