From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 395BDC4363D for ; Fri, 25 Sep 2020 11:17:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC6A120936 for ; Fri, 25 Sep 2020 11:17:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="3GSxe7Rd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC6A120936 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GcFY1LEq6s42lz+baYn7hlH1ADBruAPi0dWZ01P0/FM=; b=3GSxe7Rd2BwEF+5qdxxz9qrXY 1g1FboXRXLuzGtso8TlzadwU9XWLnaH7yBeWgrrmUF1o+VqKwNa6KrEZ3llZ6Wg57HFZz7oud96ol GoY+ts0LzAuK8UBIYz/uogc17at7Hzdt0L1gzKi7E03OHpWD3W37JeEIoNG2MjhMwJp7z9xhjwTsA /PMSqpDyqr6Dszo5/OI+FcTFotOcFydkBMA6AXoHf+sASG+iIBQk4kgs9Up0va5cJgoh8Xcbbt+mH aTN23sqBvymAwO1sZ0mkSbECJ5BCB5wy/H5g9uBNGQSD49BhiGhb1B1exI2RzE3EbdNT7CLW1Jk57 /T2TnUDJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLlhe-0002K2-3x; Fri, 25 Sep 2020 11:15:50 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLlha-0002Ie-R4 for linux-arm-kernel@lists.infradead.org; Fri, 25 Sep 2020 11:15:47 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 34B1D101E; Fri, 25 Sep 2020 04:15:42 -0700 (PDT) Received: from [10.57.48.76] (unknown [10.57.48.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 986323F70D; Fri, 25 Sep 2020 04:15:38 -0700 (PDT) Subject: Re: [PATCH 08/18] dma-mapping: add a new dma_alloc_noncoherent API To: Christoph Hellwig , Mauro Carvalho Chehab , Thomas Bogendoerfer , "James E.J. Bottomley" , Joonyoung Shim , Seung-Woo Kim , Ben Skeggs , Marek Szyprowski , Tomasz Figa , Matt Porter , iommu@lists.linux-foundation.org References: <20200915155122.1768241-1-hch@lst.de> <20200915155122.1768241-9-hch@lst.de> From: Robin Murphy Message-ID: Date: Fri, 25 Sep 2020 12:15:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200915155122.1768241-9-hch@lst.de> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200925_071546_922014_D4958621 X-CRM114-Status: GOOD ( 18.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-parisc@vger.kernel.org, linux-doc@vger.kernel.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, Stefan Richter , netdev@vger.kernel.org, linux1394-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-09-15 16:51, Christoph Hellwig wrote: [...] > +These APIs allow to allocate pages in the kernel direct mapping that are > +guaranteed to be DMA addressable. This means that unlike dma_alloc_coherent, > +virt_to_page can be called on the resulting address, and the resulting Nit: if we explicitly describe this as if it's a guarantee that can be relied upon... > +struct page can be used for everything a struct page is suitable for. [...] > +This routine allocates a region of bytes of consistent memory. It > +returns a pointer to the allocated region (in the processor's virtual address > +space) or NULL if the allocation failed. The returned memory may or may not > +be in the kernels direct mapping. Drivers must not call virt_to_page on > +the returned memory region. ...then forbid this document's target audience from relying on it, something seems off. At the very least it's unhelpfully unclear :/ Given patch #17, I suspect that the first paragraph is the one that's no longer true. Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel