Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2084520ybi; Thu, 18 Jul 2019 03:09:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCw8jRioY7qzm9R5+muFcUEhGWhOeImRAdMKxFGc5pUTazOPLe1nJmR7FeasLSKNXsLkd6 X-Received: by 2002:a63:2b0c:: with SMTP id r12mr46898073pgr.206.1563444594780; Thu, 18 Jul 2019 03:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563444594; cv=none; d=google.com; s=arc-20160816; b=laxpbcXJTp+hDy9p3ocfLcsMJje5+KHwSUHJPG4BWygeiqlYvH/MfAJs8nH0/KO/f4 6hnfEt8nodIWdN2bGiNYfbYoWKWkmQBeTinojyyt2UFHmGXdaSdXXq5F8OsBUdJ+lXs+ iU8nLihwqaobBX8uatI1v66iD5JDZhBcfsAbFCwQiO/hRxO0XcJ2pLT2pu04xfbUaDcU P6zqv6ibrGdbRqyOuaeJ61I4b3RLkcDVSx7ZUXArAlaFkjCMx3q5t6mQ4R/108Byw9NG f61u/oM5UWKYAueYA2VzneMY5JNEFWPAAae9PLreo9BcwTwWpAtUOdESDzloa/6N5Vlu jMrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DpK9cOcCwnUVV4wvwsvR2lMiWF49CzbDhGh6JuclBck=; b=FcJB0COOqfIwqGn+sedTZzPpu/9rWUhKVZG8T7UY/LSKpX9gj2ub4Y883tRCnst0Ql Tm0CgE2PPUL5F4T21sRhUvO+pxYAJxSDnE0g3qyYUt0Px/SZPcbjeb7akK/FBgmcQnwe BC+Rs33jsg+mccGfLfOjpis8TkPsUQHenSn2+PrTZ6ewq6QcQTjCsLawxol743CKt8gO DAxUl5J0oP2w1E7Z0zWcXmhFKENF2mPnNmm8S2CDcZafG1/XEf9wRXaJNAEFjB3etJlv o2UmMWeg7zj7WotJ6fctLgDtZ8BiJ/xzOLGqV+asw55dWyfTVWLL33H2Ari3jW/mlsIA 6N1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=N0ZidmIX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13si24320511plp.354.2019.07.18.03.09.38; Thu, 18 Jul 2019 03:09:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=N0ZidmIX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727131AbfGRKIk (ORCPT + 99 others); Thu, 18 Jul 2019 06:08:40 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48328 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfGRKIk (ORCPT ); Thu, 18 Jul 2019 06:08:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DpK9cOcCwnUVV4wvwsvR2lMiWF49CzbDhGh6JuclBck=; b=N0ZidmIXza582uq6AOkTmKwVd /pAdJMRaAkAg+n5RmnYcvCefp+QmiAhy0eouDYAefXZZVW/uHuUv1D1+t7EUzLp7X0c7dc0OMX1or eRFs8aL6FnLebWJxVeqVN/MxqF61Y5sqE3S6nNR1IZC/bTOeMOtreCxxJu79t2SdSgeI+rcM+4RBs iBYr3b/Jb83J5h88exyvMYO36IWiZV7/erAGPIPAJ9PaMx5n7w2+7KIK+8E8rgQpdgYnZZ/4L72jC QjO/P1EjSYczct5HRSKb1NYUn1BjAN+jPVWcA732DjRoIKf6w7luaejig+A88rnPJnsPUnpmjyRqC B46KwMX/Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1ho3L6-0000Rb-14; Thu, 18 Jul 2019 10:08:40 +0000 Date: Thu, 18 Jul 2019 03:08:40 -0700 From: Christoph Hellwig To: John Stultz Cc: lkml , Laura Abbott , Benjamin Gaignard , Sumit Semwal , Liam Mark , Pratik Patel , Brian Starkey , Vincent Donnefort , Sudipto Paul , "Andrew F . Davis" , Xu YiPing , "Chenfeng (puck)" , butao , "Xiaqing (A)" , Yudongbin , Christoph Hellwig , Chenbo Feng , Alistair Strachan , dri-devel@lists.freedesktop.org Subject: Re: [PATCH v6 4/5] dma-buf: heaps: Add CMA heap to dmabuf heaps Message-ID: <20190718100840.GB19666@infradead.org> References: <20190624194908.121273-1-john.stultz@linaro.org> <20190624194908.121273-5-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190624194908.121273-5-john.stultz@linaro.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This and the previous one seem very much duplicated boilerplate code. Why can't just normal branches for allocating and freeing normal pages vs cma? We even have an existing helper for that with dma_alloc_contiguous().