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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 AC56AC169C4 for ; Mon, 11 Feb 2019 20:16:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87342217FA for ; Mon, 11 Feb 2019 20:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388502AbfBKUQ3 (ORCPT ); Mon, 11 Feb 2019 15:16:29 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:55632 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727302AbfBKUQ1 (ORCPT ); Mon, 11 Feb 2019 15:16:27 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 989A2D810; Mon, 11 Feb 2019 20:16:25 +0000 (UTC) Date: Mon, 11 Feb 2019 12:16:24 -0800 From: Andrew Morton To: Jesper Dangaard Brouer Cc: netdev@vger.kernel.org, linux-mm@kvack.org, Toke =?ISO-8859-1?Q?H=F8il?= =?ISO-8859-1?Q?and-J=F8rgensen?= , Ilias Apalodimas , willy@infradead.org, Saeed Mahameed , mgorman@techsingularity.net, "David S. Miller" , Tariq Toukan Subject: Re: [net-next PATCH 1/2] mm: add dma_addr_t to struct page Message-Id: <20190211121624.30c601d0fa4c0f972eeaf1c6@linux-foundation.org> In-Reply-To: <154990120685.24530.15350136329514629029.stgit@firesoul> References: <154990116432.24530.10541030990995303432.stgit@firesoul> <154990120685.24530.15350136329514629029.stgit@firesoul> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 11 Feb 2019 17:06:46 +0100 Jesper Dangaard Brouer wrote: > The page_pool API is using page->private to store DMA addresses. > As pointed out by David Miller we can't use that on 32-bit architectures > with 64-bit DMA > > This patch adds a new dma_addr_t struct to allow storing DMA addresses > > .. > > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -95,6 +95,14 @@ struct page { > */ > unsigned long private; > }; > + struct { /* page_pool used by netstack */ > + /** > + * @dma_addr: Page_pool need to store DMA-addr, and > + * cannot use @private, as DMA-mappings can be 64-bit > + * even on 32-bit Architectures. > + */ This comment is a bit awkward. The discussion about why it doesn't use ->private is uninteresting going forward and is more material for a changelog. How about /** * @dma_addr: page_pool requires a 64-bit value even on * 32-bit architectures. */ Otherwise, Acked-by: Andrew Morton