From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by kanga.kvack.org (Postfix) with ESMTP id 7BB088E0002 for ; Fri, 18 Jan 2019 07:46:53 -0500 (EST) Received: by mail-wr1-f71.google.com with SMTP id y1so6584368wrd.7 for ; Fri, 18 Jan 2019 04:46:53 -0800 (PST) Received: from mo6-p01-ob.smtp.rzone.de (mo6-p01-ob.smtp.rzone.de. [2a01:238:20a:202:5301::2]) by mx.google.com with ESMTPS id o145si26742189wme.188.2019.01.18.04.46.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 04:46:51 -0800 (PST) Subject: Re: use generic DMA mapping code in powerpc V4 References: <21f72a6a-9095-7034-f169-95e876228b2a@xenosoft.de> <27148ac2-2a92-5536-d886-2c0971ab43d9@xenosoft.de> <20190115133558.GA29225@lst.de> <685f0c06-af1b-0bec-ac03-f9bf1f7a2b35@xenosoft.de> <20190115151732.GA2325@lst.de> <20190118083539.GA30479@lst.de> <871403f2-fa7d-de15-89eb-070432e15c69@xenosoft.de> <20190118112842.GA9115@lst.de> <20190118121810.GA13327@lst.de> From: Christian Zigotzky Message-ID: Date: Fri, 18 Jan 2019 13:46:46 +0100 MIME-Version: 1.0 In-Reply-To: <20190118121810.GA13327@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: de-DE Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Hellwig Cc: linux-arch@vger.kernel.org, Darren Stevens , linux-kernel@vger.kernel.org, Julian Margetson , linux-mm@kvack.org, iommu@lists.linux-foundation.org, Paul Mackerras , Olof Johansson , linuxppc-dev@lists.ozlabs.org Sorry, it's not possible to patch '257002094bc5935dd63207a380d9698ab81f0775' with your patch. I also tried it manually but without any success. -- Christian On 18 January 2019 at 1:18PM, Christoph Hellwig wrote: > On Fri, Jan 18, 2019 at 01:07:54PM +0100, Christian Zigotzky wrote: >> git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a >> >> git checkout 257002094bc5935dd63207a380d9698ab81f0775 >> >> >> I get the following error message with your patch: > Hmm. Did I attached the wrong patch? Here is the one I want and just > applied to that revision: > > diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c > index 355d16acee6d..e46c9b64ec0d 100644 > --- a/kernel/dma/direct.c > +++ b/kernel/dma/direct.c > @@ -118,8 +118,11 @@ struct page *__dma_direct_alloc_pages(struct device *dev, size_t size, > page = NULL; > } > } > - if (!page) > + if (!page) { > page = alloc_pages_node(dev_to_node(dev), gfp, page_order); > + if (!page) > + pr_warn("failed to allocate memory with gfp 0x%x\n", gfp); > + } > > if (page && !dma_coherent_ok(dev, page_to_phys(page), size)) { > __free_pages(page, page_order); > @@ -139,6 +142,10 @@ struct page *__dma_direct_alloc_pages(struct device *dev, size_t size, > } > } > > + if (!page) { > + pr_warn("failed to allocate DMA memory!\n"); > + dump_stack(); > + } > return page; > } > >