From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by kanga.kvack.org (Postfix) with ESMTP id 156A26B7F6A for ; Fri, 7 Dec 2018 03:06:15 -0500 (EST) Received: by mail-pf1-f198.google.com with SMTP id l22so2685520pfb.2 for ; Fri, 07 Dec 2018 00:06:15 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id s4si2321066plr.306.2018.12.07.00.06.13 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Dec 2018 00:06:14 -0800 (PST) Date: Fri, 7 Dec 2018 00:05:51 -0800 From: Matthew Wilcox Subject: Re: [PATCH v5 2/3] iommu/io-pgtable-arm-v7s: Request DMA32 memory, and improve debugging Message-ID: <20181207080551.GA15120@bombadil.infradead.org> References: <20181207061620.107881-1-drinkcat@chromium.org> <20181207061620.107881-3-drinkcat@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181207061620.107881-3-drinkcat@chromium.org> Sender: owner-linux-mm@kvack.org List-ID: To: Nicolas Boichat Cc: Will Deacon , Robin Murphy , Joerg Roedel , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Michal Hocko , Mel Gorman , Levin Alexander , Huaisheng Ye , Mike Rapoport , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Yong Wu , Matthias Brugger , Tomasz Figa , yingjoe.chen@mediatek.com, hch@infradead.org On Fri, Dec 07, 2018 at 02:16:19PM +0800, Nicolas Boichat wrote: > +#ifdef CONFIG_ZONE_DMA32 > +#define ARM_V7S_TABLE_GFP_DMA GFP_DMA32 > +#define ARM_V7S_TABLE_SLAB_CACHE SLAB_CACHE_DMA32 This name doesn't make any sense. Why not ARM_V7S_TABLE_SLAB_FLAGS ? > +#else > +#define ARM_V7S_TABLE_GFP_DMA GFP_DMA > +#define ARM_V7S_TABLE_SLAB_CACHE SLAB_CACHE_DMA Can you remind me again why it is, on machines which don't support ZONE_DMA32, why we have to allocate from ZONE_DMA? My understanding is that 64-bit machines have ZONE_DMA32 and 32-bit machines don't. So shouldn't this rather be GFP_KERNEL? Actually, maybe we could centralise this in gfp.h: #ifdef CONFIG_64BIT # ifdef CONFIG_ZONE_DMA32 #define GFP_32BIT GFP_DMA32 # else #define GFP_32BIT GFP_DMA #else /* 32-bit */ #define GFP_32BIT GFP_KERNEL #endif