From patchwork Thu Jan 16 10:07:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 3497811 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 992599F32F for ; Thu, 16 Jan 2014 10:09:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F35B20142 for ; Thu, 16 Jan 2014 10:09:17 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 AE2022011B for ; Thu, 16 Jan 2014 10:09:12 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3jsQ-0000LT-Ha; Thu, 16 Jan 2014 10:08:42 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3jsJ-0001Ih-JT; Thu, 16 Jan 2014 10:08:35 +0000 Received: from mail-wi0-f179.google.com ([209.85.212.179]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3jsC-0001Gd-V1 for linux-arm-kernel@lists.infradead.org; Thu, 16 Jan 2014 10:08:30 +0000 Received: by mail-wi0-f179.google.com with SMTP id hr1so3407158wib.12 for ; Thu, 16 Jan 2014 02:08:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2mWFQ6t8Gm4Gyo7OetiYTjPvQb1Q1CEGYTp7BAUom3I=; b=bK/S1RVkn4ttdZqK53+ylZpLoxXoppKojZzInL0YivAtpTOU3sUFiQ5x3BytqS2ycC zXKOtuWZ6ODhiJfPC7PCDxk3JUmVO2lJErbPhVodISS4v5csedcCGgcstp8m6xKiUuVq dgYyA2XBUhauAY1igbYGgZwFMcZoh1VnBhNRoARqNSp8KJZfvb0zsHlp8+5B/DRKtoR5 sksG1bcTvfYno+l59oSLahbHFgD5FVFFmsGurh5WOQIr52SjpKpEciYDLGHtP8N+XFMb JfDcret+0lR9ByxSMhXzSHmg3FbTTSPTdI5Br8rB5KkmqqJ4yZI/6VZ0Y+BrCFQHhKt6 VhMw== X-Gm-Message-State: ALoCoQlnlVW/DFIG8Azt58J7ASg9kJTBJt8q2R/0TYQm5Pdx3n7tgkADCiuJ43BE9DmbpZi45zrY X-Received: by 10.181.5.133 with SMTP id cm5mr7039353wid.59.1389866884694; Thu, 16 Jan 2014 02:08:04 -0800 (PST) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id v7sm32748751wix.5.2014.01.16.02.08.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jan 2014 02:08:04 -0800 (PST) From: Steve Capper To: linux@arm.linux.org.uk Subject: [PATCH V2] arm: mm: Remove hugetlb warning from Coherent DMA allocator Date: Thu, 16 Jan 2014 10:07:43 +0000 Message-Id: <1389866863-24460-1-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140116_050829_142691_18299A12 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: nicolas.pitre@linaro.org, Steve Capper , patches@linaro.org, kim.phillips@linaro.org, will.deacon@arm.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 The Coherant DMA allocator allocates pages of high order then splits them up into smaller pages. This splitting logic would run into problems if the allocator was given compound pages. Thus the Coherant DMA allocator was originally incompatible with compound pages existing and, by extension, huge pages. A compile #error was put in place whenever huge pages were enabled. Compatibility with compound pages has since been introduced by the following commit (which merely excludes GFP_COMP pages from being requested by the coherant DMA allocator): ea2e705 ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations When huge page support was introduced to ARM, the compile #error in dma-mapping.c was replaced by a #warning when it should have been removed instead. This patch removes the compile #warning in dma-mapping.c when huge pages are enabled. Signed-off-by: Steve Capper --- Changed in V2: commit message completely re-written to give a better justification. --- arch/arm/mm/dma-mapping.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index f61a570..8edd1b5 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -284,9 +284,6 @@ static void __dma_free_buffer(struct page *page, size_t size) } #ifdef CONFIG_MMU -#ifdef CONFIG_HUGETLB_PAGE -#warning ARM Coherent DMA allocator does not (yet) support huge TLB -#endif static void *__alloc_from_contiguous(struct device *dev, size_t size, pgprot_t prot, struct page **ret_page,