From patchwork Sun Oct 10 17:40:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 244531 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9AHew5n005560 for ; Sun, 10 Oct 2010 17:40:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754838Ab0JJRk5 (ORCPT ); Sun, 10 Oct 2010 13:40:57 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:63650 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237Ab0JJRk4 (ORCPT ); Sun, 10 Oct 2010 13:40:56 -0400 Received: by mail-bw0-f46.google.com with SMTP id 15so1272773bwz.19 for ; Sun, 10 Oct 2010 10:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=4/jn98rPWAcnBZnt565yE+q8bVQ1txRonPuangmT8Es=; b=W6BcW4oc7+zQ03pQLCFpeJKTjZ/Dvd7sbTj7M0/EMFMz/PLIykzdNtyBmGSU8DTsFJ DCtnuMV9+HKnn9WX35pKxkMjf1d1XgT2xJV/Dzvd2qRpRj+eUQz5+9U738YjvMKhUnIn YOe2BR85/XnCsACyqPAL+NUJAESBYheLq+o3w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=KpyqThyaQ9qUZLbGUNfJ8o7y0kfVCXNobmh6h01Of+7UHT7dSIHG7aVNXVEpYSK6U+ c11WKhTv513pIKk3OXwjdKkLobKnru75UUGD4w6WzK++VeUv32iBN9oBrrTDvKr40IWF QDs12kkxMnRLL5QXv7cKzhp96+Gw0E3WRC9Lc= Received: by 10.204.68.10 with SMTP id t10mr4018732bki.77.1286732456037; Sun, 10 Oct 2010 10:40:56 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id q19sm1751026bkb.16.2010.10.10.10.40.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 10 Oct 2010 10:40:55 -0700 (PDT) From: Felipe Contreras To: linux-arm , linux-omap , Greg KH Cc: Omar Ramirez Luna , Russell King , Felipe Contreras Subject: [PATCH 1/3] arm: mm: allow boards to fiddle with meminfo Date: Sun, 10 Oct 2010 20:40:38 +0300 Message-Id: <1286732440-28644-2-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.3.1.2.g7fe2b In-Reply-To: <1286732440-28644-1-git-send-email-felipe.contreras@gmail.com> References: <1286732440-28644-1-git-send-email-felipe.contreras@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 10 Oct 2010 17:40:59 +0000 (UTC) diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 8a0dd18..408e4d5 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h @@ -38,7 +38,7 @@ struct machine_desc { void (*fixup)(struct machine_desc *, struct tag *, char **, struct meminfo *); - void (*reserve)(void);/* reserve mem blocks */ + void (*reserve)(struct meminfo *);/* reserve mem blocks */ void (*map_io)(void);/* IO mapping function */ void (*init_irq)(void); struct sys_timer *timer; /* system tick timer */ diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 7185b00..4b5c117 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -272,8 +272,6 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) int i; memblock_init(); - for (i = 0; i < mi->nr_banks; i++) - memblock_add(mi->bank[i].start, mi->bank[i].size); /* Register the kernel text, kernel data and initrd with memblock. */ #ifdef CONFIG_XIP_KERNEL @@ -295,7 +293,10 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) /* reserve any platform specific memblock areas */ if (mdesc->reserve) - mdesc->reserve(); + mdesc->reserve(mi); + + for (i = 0; i < mi->nr_banks; i++) + memblock_add(mi->bank[i].start, mi->bank[i].size); memblock_analyze(); memblock_dump_all();