Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753179AbeACPBk (ORCPT + 1 other); Wed, 3 Jan 2018 10:01:40 -0500 Received: from smtprelay0217.hostedemail.com ([216.40.44.217]:57405 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751290AbeACPBi (ORCPT ); Wed, 3 Jan 2018 10:01:38 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: offer67_6577c789dd815 X-Filterd-Recvd-Size: 1722 Message-ID: <1514991695.31497.12.camel@perches.com> Subject: Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v3 From: Joe Perches To: Christian =?ISO-8859-1?Q?K=F6nig?= , konrad.wilk@oracle.com Cc: linux-kernel@vger.kernel.org Date: Wed, 03 Jan 2018 07:01:35 -0800 In-Reply-To: <20180103100955.17182-1-christian.koenig@amd.com> References: <20180103100955.17182-1-christian.koenig@amd.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 2018-01-03 at 11:09 +0100, Christian K?nig wrote: > TTM tries to allocate coherent memory in chunks of 2MB first to improve > TLB efficiency and falls back to allocating 4K pages if that fails. > > Suppress the warning when the 2MB allocations fails since there is a > valid fall back path. [] > diff --git a/lib/swiotlb.c b/lib/swiotlb.c [] > @@ -490,11 +490,11 @@ static void swiotlb_bounce(phys_addr_t orig_addr, phys_addr_t tlb_addr, > } > } > > -phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, > - dma_addr_t tbl_dma_addr, > - phys_addr_t orig_addr, size_t size, > - enum dma_data_direction dir, > - unsigned long attrs) > +phys_addr_t tbl_map_single(struct device *hwdev, > + dma_addr_t tbl_dma_addr, > + phys_addr_t orig_addr, size_t size, > + enum dma_data_direction dir, > + unsigned long attrs, bool warn) shouldn't this be static?