From patchwork Wed Sep 28 08:32:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Palsson X-Patchwork-Id: 4391 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 73B4123F58 for ; Wed, 28 Sep 2011 08:32:44 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 64AEDA18305 for ; Wed, 28 Sep 2011 08:32:44 +0000 (UTC) Received: by fxe23 with SMTP id 23so482064fxe.11 for ; Wed, 28 Sep 2011 01:32:44 -0700 (PDT) Received: by 10.223.57.17 with SMTP id a17mr9062636fah.65.1317198764177; Wed, 28 Sep 2011 01:32:44 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.3.234 with SMTP id f10cs103724laf; Wed, 28 Sep 2011 01:32:43 -0700 (PDT) Received: by 10.204.150.86 with SMTP id x22mr5656668bkv.376.1317198763537; Wed, 28 Sep 2011 01:32:43 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by mx.google.com with ESMTPS id n1si16848316bke.54.2011.09.28.01.32.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 28 Sep 2011 01:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) smtp.mail=triad@df.lth.se Received: from mer.df.lth.se (mer.df.lth.se [194.47.250.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPS id F074765D77; Wed, 28 Sep 2011 10:32:41 +0200 (CEST) Received: from mer.df.lth.se (triad@localhost.localdomain [127.0.0.1]) by mer.df.lth.se (8.14.3/8.14.3/Debian-9.4) with ESMTP id p8S8WfGR017735; Wed, 28 Sep 2011 10:32:41 +0200 Received: (from triad@localhost) by mer.df.lth.se (8.14.3/8.14.3/Submit) id p8S8We3G017733; Wed, 28 Sep 2011 10:32:40 +0200 From: Johan Palsson To: linux-arm-kernel@lists.infradead.org Cc: Johan Palsson , stable@kernel.org, Russell King , Michael Bohan , Nicolas Pitre , Rabin Vincent , Linus Walleij Subject: [PATCH] ARM: mm: Align bank start to MAX_ORDER_NR_PAGES Date: Wed, 28 Sep 2011 10:32:28 +0200 Message-Id: <1317198748-17705-1-git-send-email-johan.palsson@stericsson.com> X-Mailer: git-send-email 1.7.2.5 The VM subsystem assumes that there are valid memmap entries from the bank start aligned to MAX_ORDER_NR_PAGES. Cc: stable@kernel.org Cc: Russell King Cc: Michael Bohan Cc: Nicolas Pitre Signed-off-by: Johan Palsson Signed-off-by: Rabin Vincent Signed-off-by: Linus Walleij --- arch/arm/mm/init.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index cc7e2d8..f8037ba 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -496,6 +496,13 @@ static void __init free_unused_memmap(struct meminfo *mi) */ bank_start = min(bank_start, ALIGN(prev_bank_end, PAGES_PER_SECTION)); +#else + /* + * Align down here since the VM subsystem insists that the + * memmap entries are valid from the bank start aligned to + * MAX_ORDER_NR_PAGES. + */ + bank_start = round_down(bank_start, MAX_ORDER_NR_PAGES); #endif /* * If we had a previous bank, and there is a space