From patchwork Thu Jan 15 06:24:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 5637101 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6B8519F357 for ; Thu, 15 Jan 2015 06:19:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 610D42013D for ; Thu, 15 Jan 2015 06:18:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 208B22013A for ; Thu, 15 Jan 2015 06:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751183AbbAOGSv (ORCPT ); Thu, 15 Jan 2015 01:18:51 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:54476 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbbAOGSv (ORCPT ); Thu, 15 Jan 2015 01:18:51 -0500 Received: by mail-pd0-f170.google.com with SMTP id p10so2942061pdj.1 for ; Wed, 14 Jan 2015 22:18:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=W0wpyLShuCqjD4iWiBHzGL4CHTCQQSdEzG9kR6ncM/4=; b=iU4QRhaYVNY3QEn9EU+Q1xC5YyyEwkzDgy4vBZWTfviEgElzHFH1gBi6ze6w6H3jnn YVtnsLz2Y8E1lzygW6S50TDo/ViRnkjq20ZU0ij6BM2083NPDJA2ZmxJXwpxYY025a3k wiurj2GhUGwPjix4ZW+qy4kaXdGVkqMYIKlD9t2i8ieHbVGbmAGVOHNmj6YUV4L5moLq BU1v8wKL+ZlkzoncuI0vRBUgKzNha1Qhc1ycwBCZs8czuFAWqzbHvyabf0Z4gHfISACx NrDzW5HbWk3AkkbWLabVt7VncymGDHmHUp/Tip+9jOnybrbM1XJUyWlm4X5K2DOF8xGH lqEg== X-Received: by 10.68.191.101 with SMTP id gx5mr11857780pbc.108.1421302730564; Wed, 14 Jan 2015 22:18:50 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id h2sm546619pat.20.2015.01.14.22.18.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jan 2015 22:18:49 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , horms@verge.net.au Date: Thu, 15 Jan 2015 15:24:46 +0900 Message-Id: <20150115062446.452.7702.sendpatchset@little-apple> Subject: [PATCH] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Magnus Damm Allow R-Car Gen2 platforms to boot with CMA enabled and HIGHMEM disabled. This patch adds code to check if the R-Car Gen2 specific memory reservation window is included in the kernel memory range or not. When HIGHMEM is disabled the R-Car Gen2 reservation area is outside the kernel memory range and in such case the memory reservation is simply skipped over. Without this patch the kernel boot hangs when CMA is enabled and HIGHMEM is disabled on the r8a7791 Koelsch hardware platform. In the current shmobile_defconfig HIGHMEM is enabled while CMA is disabled, so to trigger this the kernel configuration for both CMA and HIGHMEM needs to be adjusted. Signed-off-by: Magnus Damm Tested-by: Geert Uytterhoeven --- Written on top of renesas-devel-20150114v2-v3.19-rc4 arch/arm/mach-shmobile/setup-rcar-gen2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c 2015-01-15 14:20:47.089397114 +0900 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -197,7 +198,7 @@ void __init rcar_gen2_reserve(void) of_scan_flat_dt(rcar_gen2_scan_mem, &mrc); #ifdef CONFIG_DMA_CMA - if (mrc.size) + if (mrc.size && memblock_is_region_memory(mrc.base, mrc.size)) dma_contiguous_reserve_area(mrc.size, mrc.base, 0, &rcar_gen2_dma_contiguous, true); #endif