Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp264072pxb; Wed, 8 Sep 2021 23:53:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGdrRMwWcC6fJOe/hF/jqixN3VO4CkaxM9M67TpA3g9DzBPqC2ecWLbwJ3d4VjFy44HUwJ X-Received: by 2002:a17:906:5795:: with SMTP id k21mr1839434ejq.158.1631170401842; Wed, 08 Sep 2021 23:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631170401; cv=none; d=google.com; s=arc-20160816; b=gunajpBRHPDuWuLr6ll8wrGJQnZDRnTXa7J4j+ccbtZrTnrTNldyklN5wI52mV+H94 6GCxNUkukhyz3jdQHYr7UVkkZU4T5m5L++9dzC/EtKuACQBlXQVIEi0HnlI70fsvURbD n6MjrS4wu+IogjZUWCOkTtBISU59WjW8u3lbsBHD0wsA3//yKPuwDUi5iFLMaIHz9L4S 6kM1xG0ictLjLprsqvSGJCf1ToBFJclRvvKfWOsBRd16j9M4l/bv+IPkNVfgH+n+2Uj9 F852YF5J2Na2I0EHZrlQeEkySgjR7X+74OHakXQT6cfCn+aIT2zf1WQ0HTXpvJpN7RgP HatA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=GyS+tYFdwiLpPBrpGYBc53wreADSWqF+hJZelgqhvOE=; b=WcKDqhuKEs4BM6xqMMAtJLtvrIHf3w1sUT6w4ngkBn4inedhIImH3UvwM4+XCeKFyc sTifNvs60OpG0WguBk+Xj/0dCiJuMrG92L69Xeiub985JDlnPdqgJYPs/c35pTlYgtik 5DDq6K76SAzEa6j63MNADJnoCBxUSHZMNkasAoIOZzKjtKhAq1TpEfAPL6NFBAA2yRnw FJibhgSNc7ZU2Bz/ksp9KOsa0Ohuq6f9Bs16Twv2ZwkdMavl+6vBnAsS9LzGIcqd/lbY THMlXmeJABDLg5QByC/SrEnmHtuawa6C9Gs/dZGA/Ekhp7sgCxqElKxoerL0gyREwrzU j+OQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b23si1123728edv.199.2021.09.08.23.52.58; Wed, 08 Sep 2021 23:53:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351090AbhIIGIZ (ORCPT + 99 others); Thu, 9 Sep 2021 02:08:25 -0400 Received: from verein.lst.de ([213.95.11.211]:41357 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231438AbhIIGIY (ORCPT ); Thu, 9 Sep 2021 02:08:24 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 127A367373; Thu, 9 Sep 2021 08:07:13 +0200 (CEST) Date: Thu, 9 Sep 2021 08:07:12 +0200 From: Christoph Hellwig To: Andreas Larsson Cc: David Miller , sparclinux@vger.kernel.org, Christoph Hellwig , Sam Ravnborg , linux-kernel@vger.kernel.org, software@gaisler.com Subject: Re: [PATCH] sparc32: Page align size in arch_dma_alloc Message-ID: <20210909060712.GA25485@lst.de> References: <20210908074822.16793-1-andreas@gaisler.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210908074822.16793-1-andreas@gaisler.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 09:48:22AM +0200, Andreas Larsson wrote: > Commit 53b7670e5735 ("sparc: factor the dma coherent mapping into > helper") lost the page align for the calls to dma_make_coherent and > srmmu_unmapiorange. The latter cannot handle a non page aligned len > argument. > > Signed-off-by: Andreas Larsson Looks good, Reviewed-by: Christoph Hellwig Andreas - while I've got your attention: I've been looking into fully converting sparc32 to the generic DMA code. Do you have any documentation for the Leon cache handling in dma_make_coherent, and more importantly how that applies to the dma coherent handling? I could see how a flush might be required for the streaming DMA mappings, that is mapping normal cached memory for I/O. But for the coherent allocations which can be accessed from the device and the cpu without another DMA mapping call this seems really strange.