linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Yinghai Lu <yinghai@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	yinghai@kernel.org, tglx@linutronix.de
Subject: [tip:x86/urgent] bootmem, x86: Fix 32bit numa system without RAM on node 0
Date: Thu, 1 Apr 2010 22:57:59 GMT	[thread overview]
Message-ID: <tip-aa235fc712f379d4194cff9217f07026c452c141@git.kernel.org> (raw)
In-Reply-To: <4BB416D7.6090203@kernel.org>

Commit-ID:  aa235fc712f379d4194cff9217f07026c452c141
Gitweb:     http://git.kernel.org/tip/aa235fc712f379d4194cff9217f07026c452c141
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Wed, 31 Mar 2010 20:45:27 -0700
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 1 Apr 2010 14:41:19 -0700

bootmem, x86: Fix 32bit numa system without RAM on node 0

When 32bit numa is used, free_all_bootmem() will still only go over with
node id 0.

If node 0 doesn't have RAM installed, the lowest populated node
becomes low RAM.

This one fixes BOOTMEM path by iterating over the bdata_list.

-v3: add more comments, and fix bootmem path too.
-v4: seperate from one big patch

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4BB416D7.6090203@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 mm/bootmem.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/mm/bootmem.c b/mm/bootmem.c
index 2058cb7..ba37d62 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -312,7 +312,13 @@ unsigned long __init free_all_bootmem(void)
 	 */
 	return free_all_memory_core_early(MAX_NUMNODES);
 #else
-	return free_all_bootmem_core(NODE_DATA(0)->bdata);
+	unsigned long total_pages = 0;
+	bootmem_data_t *bdata;
+
+	list_for_each_entry(bdata, &bdata_list, list)
+		total_pages += free_all_bootmem_core(bdata);
+
+	return total_pages;
 #endif
 }
 

  reply	other threads:[~2010-04-01 22:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31  4:49 Config NO_BOOTMEM breaks my amd64 box James Morris
2010-03-31  6:26 ` H. Peter Anvin
2010-03-31  6:47   ` James Morris
2010-03-31 16:25     ` Yinghai Lu
2010-03-31 18:59     ` Ingo Molnar
2010-03-31 20:57       ` Dave Airlie
2010-03-31 21:02         ` Linus Torvalds
2010-03-31 21:40           ` Ingo Molnar
2010-03-31 21:47         ` Ingo Molnar
2010-03-31 21:14       ` Dave Airlie
2010-03-31 22:02         ` Yinghai Lu
2010-03-31 22:28         ` H. Peter Anvin
2010-03-31 22:58       ` James Morris
2010-03-31 23:02         ` Ingo Molnar
2010-03-31 23:35         ` H. Peter Anvin
2010-03-31 23:43           ` James Morris
2010-03-31 23:48             ` H. Peter Anvin
2010-04-01  1:00               ` James Morris
2010-04-01 12:52                 ` Ingo Molnar
2010-04-08  6:32                   ` Ingo Molnar
2010-04-08  7:00                     ` Yinghai
2010-04-08  7:27                       ` Ingo Molnar
2010-04-09  2:43                         ` Dave Airlie
2010-04-08  8:05                     ` James Morris
2010-04-08  8:22                       ` Ingo Molnar
2010-03-31 22:05     ` Yinghai Lu
2010-03-31 22:13       ` Ingo Molnar
2010-03-31 22:16         ` Yinghai Lu
2010-03-31 22:41           ` Ingo Molnar
2010-03-31 22:47             ` Yinghai Lu
2010-03-31 22:56               ` Ingo Molnar
2010-04-01  0:01                 ` Johannes Weiner
2010-03-31 23:34               ` H. Peter Anvin
2010-03-31 23:54                 ` Yinghai Lu
2010-04-01  0:35                   ` H. Peter Anvin
2010-04-01  1:07                     ` Yinghai Lu
2010-04-01  2:02                     ` [PATCH -v3] nobootmem/bootmem, x86: Fix 32bit numa system without RAM on Node0 Yinghai Lu
2010-04-01  3:18                       ` H. Peter Anvin
2010-04-01  3:30                         ` Yinghai Lu
2010-04-01  3:44                         ` [PATCH -v4 1/2] nobootmem, " Yinghai Lu
2010-04-01  3:45                           ` [PATCH -v4 2/2] bootmem, " Yinghai Lu
2010-04-01 22:57                             ` tip-bot for Yinghai Lu [this message]
2010-04-01 22:57                           ` [tip:x86/urgent] nobootmem, x86: Fix 32bit numa system without RAM on node 0 tip-bot for Yinghai Lu
2010-03-31 10:51 ` Config NO_BOOTMEM breaks my amd64 box Stefan Richter

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=tip-aa235fc712f379d4194cff9217f07026c452c141@git.kernel.org \
    --to=yinghai@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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).