From patchwork Thu Jul 17 22:06:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 4579041 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 341229F37C for ; Thu, 17 Jul 2014 22:10:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 684392018E for ; Thu, 17 Jul 2014 22:10:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84AF52011E for ; Thu, 17 Jul 2014 22:10:01 +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 1X7tpD-0007Ax-R2; Thu, 17 Jul 2014 22:06:51 +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 1X7tpA-00078N-8Q for linux-arm-kernel@lists.infradead.org; Thu, 17 Jul 2014 22:06:49 +0000 Received: from akpm3.mtv.corp.google.com (unknown [216.239.45.95]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 44C8BA55; Thu, 17 Jul 2014 22:06:16 +0000 (UTC) Date: Thu, 17 Jul 2014 15:06:15 -0700 From: Andrew Morton To: Marek Szyprowski Subject: Re: [PATCH] CMA: generalize CMA reserved area management functionality (fixup) Message-Id: <20140717150615.32c48786b6bdbc880bdc5ed4@linux-foundation.org> In-Reply-To: <1405589767-17513-1-git-send-email-m.szyprowski@samsung.com> References: <53C78ED7.7030002@samsung.com> <1405589767-17513-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; 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-20140717_150648_341600_0CB2FCF3 X-CRM114-Status: GOOD ( 14.54 ) X-Spam-Score: -2.3 (--) Cc: kvm-ppc@vger.kernel.org, Russell King - ARM Linux , kvm@vger.kernel.org, linux-mm@kvack.org, Gleb Natapov , Greg Kroah-Hartman , Alexander Graf , Michal Nazarewicz , linux-kernel@vger.kernel.org, Minchan Kim , Paul Mackerras , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , Paolo Bonzini , Joonsoo Kim , Zhang Yanfei , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Thu, 17 Jul 2014 11:36:07 +0200 Marek Szyprowski wrote: > MAX_CMA_AREAS is used by other subsystems (i.e. arch/arm/mm/dma-mapping.c), > so we need to provide correct definition even if CMA is disabled. > This patch fixes this issue. > > Reported-by: Sylwester Nawrocki > Signed-off-by: Marek Szyprowski > --- > include/linux/cma.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/linux/cma.h b/include/linux/cma.h > index 9a18a2b1934c..c077635cad76 100644 > --- a/include/linux/cma.h > +++ b/include/linux/cma.h > @@ -5,7 +5,11 @@ > * There is always at least global CMA area and a few optional > * areas configured in kernel .config. > */ > +#ifdef CONFIG_CMA > #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS) > +#else > +#define MAX_CMA_AREAS (0) > +#endif > > struct cma; Joonsoo already fixed this up, a bit differently: http://ozlabs.org/~akpm/mmots/broken-out/cma-generalize-cma-reserved-area-management-functionality-fix.patch Which approach makes more sense? From: Joonsoo Kim Subject: CMA: fix ARM build failure related to MAX_CMA_AREAS definition If CMA is disabled, CONFIG_CMA_AREAS isn't defined so compile error happens. To fix it, define MAX_CMA_AREAS if CONFIG_CMA_AREAS isn't defined. Signed-off-by: Joonsoo Kim Reported-by: Stephen Rothwell Signed-off-by: Andrew Morton --- include/linux/cma.h | 6 ++++++ 1 file changed, 6 insertions(+) diff -puN include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix include/linux/cma.h --- a/include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix +++ a/include/linux/cma.h @@ -5,8 +5,14 @@ * There is always at least global CMA area and a few optional * areas configured in kernel .config. */ +#ifdef CONFIG_CMA_AREAS #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS) +#else +#define MAX_CMA_AREAS (0) + +#endif + struct cma; extern phys_addr_t cma_get_base(struct cma *cma);