linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Johannes Weiner <hannes@saeurebad.de>,
	Andy Whitcroft <apw@shadowen.org>, linux-mm <linux-mm@kvack.org>
Subject: [PATCH 6/8] powerpc: mem_map/max_mapnr -- definition is specific to FLATMEM
Date: Thu, 10 Apr 2008 11:41:19 +0100	[thread overview]
Message-ID: <1207824079.0@pinky> (raw)
In-Reply-To: 20080410103306.GA29831@shadowen.org

The max_mapnr variable is only used FLATMEM memory model, use the
appropriate defines.  Note that HIGHMEM is only valid on PPC32, and that
only supports FLATMEM.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/powerpc/mm/mem.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index fcbae37..09d275e 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -319,9 +319,11 @@ void __init mem_init(void)
 		}
 	}
 #else
-	max_mapnr = max_pfn;
 	totalram_pages += free_all_bootmem();
 #endif
+#ifdef CONFIG_FLATMEM
+	max_mapnr = max_pfn;
+#endif
 	for_each_online_pgdat(pgdat) {
 		for (i = 0; i < pgdat->node_spanned_pages; i++) {
 			if (!pfn_valid(pgdat->node_start_pfn + i))
@@ -337,7 +339,7 @@ void __init mem_init(void)
 	initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin;
 	bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start;
 
-#ifdef CONFIG_HIGHMEM
+#if defined(CONFIG_FLATMEM) && defined(CONFIG_HIGHMEM)
 	{
 		unsigned long pfn, highmem_mapnr;
 
@@ -356,7 +358,7 @@ void __init mem_init(void)
 		printk(KERN_DEBUG "High memory: %luk\n",
 		       totalhigh_pages << (PAGE_SHIFT-10));
 	}
-#endif /* CONFIG_HIGHMEM */
+#endif /* CONFIG_FLATMEM/CONFIG_HIGHMEM */
 
 	printk(KERN_INFO "Memory: %luk/%luk available (%luk kernel code, "
 	       "%luk reserved, %luk data, %luk bss, %luk init)\n",

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-04-10 10:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1207340609.26869.20.camel@nimitz.home.sr71.net>
2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
2008-04-10 10:40   ` [PATCH 1/8] alpha: mem_map/max_mapnr -- init is FLATMEM use correct defines Andy Whitcroft
2008-04-10 10:41   ` [PATCH 2/8] arm: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 3/8] m32r: mem_map/max_mapnr -- definition is specific to FLATMEM Andy Whitcroft
2008-04-10 10:41   ` [PATCH 4/8] mips: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 5/8] parisc: " Andy Whitcroft
2008-04-10 10:41   ` Andy Whitcroft [this message]
2008-04-10 10:41   ` [PATCH 7/8] sparc64: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 8/8] mem_map/max_mapnr are specific to the FLATMEM memory model Andy Whitcroft
2008-06-02 15:13     ` Jeremy Fitzhardinge
     [not found] ` <20080407091756.GC17915@shadowen.org>
     [not found]   ` <87iqyuhth2.fsf@saeurebad.de>
     [not found]     ` <20080408105137.GD17915@shadowen.org>
2008-05-23 13:09       ` max_mapnr config option apw
2008-05-23 19:52         ` Johannes Weiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1207824079.0@pinky \
    --to=apw@shadowen.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=hannes@saeurebad.de \
    --cc=jeremy@goop.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).