From patchwork Fri Oct 16 20:59:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 7420831 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6B7189F302 for ; Fri, 16 Oct 2015 21:01:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 954DF2084C for ; Fri, 16 Oct 2015 21:01:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC0EC20846 for ; Fri, 16 Oct 2015 21:01:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZnC61-0003qc-7F; Fri, 16 Oct 2015 20:59:25 +0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZnC5y-0003q4-Nv for linux-arm-kernel@lists.infradead.org; Fri, 16 Oct 2015 20:59:23 +0000 Received: from akpm3.mtv.corp.google.com (unknown [216.239.45.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0097392; Fri, 16 Oct 2015 20:59:00 +0000 (UTC) Date: Fri, 16 Oct 2015 13:59:00 -0700 From: Andrew Morton To: Robin Murphy Subject: Re: [PATCH 2/2] arm64: Use gfpflags_allow_blocking() Message-Id: <20151016135900.bc1e10115a866a301dbb0cd8@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151016_135922_823379_9F5B6794 X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, joro@8bytes.org, Mel Gorman , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 16 Oct 2015 16:33:42 +0100 Robin Murphy wrote: > __GFP_WAIT is going away to live its life under a new identity; convert > __iommu_alloc_attrs() to the new helper function instead. > > ... > > --- a/arch/arm64/mm/dma-mapping.c > +++ b/arch/arm64/mm/dma-mapping.c > @@ -566,7 +566,7 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size, > */ > gfp |= __GFP_ZERO; > > - if (gfp & __GFP_WAIT) { > + if (gfpflags_allow_blocking(gfp)) { > struct page **pages; > pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, coherent); Seems unnecessarily elaborate. What's wrong with ? --- a/arch/arm64/mm/dma-mapping.c~mm-page_alloc-rename-__gfp_wait-to-__gfp_reclaim-arm-fix +++ a/arch/arm64/mm/dma-mapping.c @@ -562,7 +562,7 @@ static void *__iommu_alloc_attrs(struct */ gfp |= __GFP_ZERO; - if (gfp & __GFP_WAIT) { + if (gfp & __GFP_RECLAIM) { struct page **pages; pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, coherent);