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=-5.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 B09CCC433FF for ; Wed, 14 Aug 2019 14:29:08 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 231B92083B for ; Wed, 14 Aug 2019 14:29:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=c-s.fr header.i=@c-s.fr header.b="tw9y0mDZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 231B92083B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=c-s.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 467sQn2g62zDqlP for ; Thu, 15 Aug 2019 00:29:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=c-s.fr (client-ip=93.17.236.30; helo=pegase1.c-s.fr; envelope-from=christophe.leroy@c-s.fr; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=c-s.fr header.i=@c-s.fr header.b="tw9y0mDZ"; dkim-atps=neutral Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 467sGQ1kw6zDqXR for ; Thu, 15 Aug 2019 00:21:49 +1000 (AEST) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 467sGH235Bz9v0cP; Wed, 14 Aug 2019 16:21:43 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=tw9y0mDZ; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id ihWuT0UDAHpD; Wed, 14 Aug 2019 16:21:43 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 467sGH0zzDz9v0cN; Wed, 14 Aug 2019 16:21:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1565792503; bh=WbfBX1iNlYYIE151XGSpJjY4OxfwXsdR+UkX1qdNpbQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=tw9y0mDZbaE5/e0Zdt6u9X/nGttQLRJ+l1EguSYqUjxHiaQ48pOTME7NT1lPZPaHm ASKLCWVPbADRh78PfFsjwR0hlpSeqXTfGVuzdMNeo061xCtutH+x2+OnRzxFnYVbJm 1FZ6ZvZlnQi/T54/VCgwJJyT5JSMo6nqDa2S6Hlg= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C32E18B7F9; Wed, 14 Aug 2019 16:21:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id fXoh92ifn8SY; Wed, 14 Aug 2019 16:21:44 +0200 (CEST) Received: from [172.25.230.101] (po15451.idsi0.si.c-s.fr [172.25.230.101]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 94EC68B761; Wed, 14 Aug 2019 16:21:44 +0200 (CEST) Subject: Re: [PATCH] powerpc: use the generic dma coherent remap allocator To: Christoph Hellwig , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman References: <20190814132230.31874-1-hch@lst.de> <20190814132230.31874-2-hch@lst.de> From: Christophe Leroy Message-ID: Date: Wed, 14 Aug 2019 16:21:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190814132230.31874-2-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Le 14/08/2019 à 15:22, Christoph Hellwig a écrit : > This switches to using common code for the DMA allocations, including > potential use of the CMA allocator if configured. > > Switching to the generic code enables DMA allocations from atomic > context, which is required by the DMA API documentation, and also > adds various other minor features drivers start relying upon. It > also makes sure we have on tested code base for all architectures > that require uncached pte bits for coherent DMA allocations. > > Another advantage is that consistent memory allocations now share > the general vmalloc pool instead of needing an explicit careout > from it. > > Signed-off-by: Christoph Hellwig Tested-by: Christophe Leroy # tested on 8xx > --- > arch/powerpc/Kconfig | 12 - > arch/powerpc/include/asm/book3s/32/pgtable.h | 12 +- > arch/powerpc/include/asm/nohash/32/pgtable.h | 12 +- > arch/powerpc/mm/dma-noncoherent.c | 318 +------------------ > arch/powerpc/mm/mem.c | 4 - > arch/powerpc/mm/ptdump/ptdump.c | 9 - > arch/powerpc/platforms/Kconfig.cputype | 2 + > 7 files changed, 17 insertions(+), 352 deletions(-) >