public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Becky Bruce <beckyb@kernel.crashing.org>
To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: david@gibson.dropbear.id.au, galak@kernel.crashing.org,
	wli@holomorphy.com, benh@kernel.crashing.org
Subject: [PATCH 3/5] powerpc: mem_init should call memblock_is_reserved with phys_addr_t
Date: Tue, 28 Jun 2011 14:54:46 -0500	[thread overview]
Message-ID: <13092910702553-git-send-email-beckyb@kernel.crashing.org> (raw)
In-Reply-To: <13092910103675-git-send-email-beckyb@kernel.crashing.org>

From: Becky Bruce <beckyb@kernel.crashing.org>

This has been broken for a while but hasn't been an issue until
now because nobody was reserving regions at high addresses.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
---
 arch/powerpc/mm/mem.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 57e545b..097b288 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -337,8 +337,9 @@ void __init mem_init(void)
 
 		highmem_mapnr = lowmem_end_addr >> PAGE_SHIFT;
 		for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
+			phys_addr_t paddr = (phys_addr_t)pfn << PAGE_SHIFT;
 			struct page *page = pfn_to_page(pfn);
-			if (memblock_is_reserved(pfn << PAGE_SHIFT))
+			if (memblock_is_reserved(paddr))
 				continue;
 			ClearPageReserved(page);
 			init_page_count(page);
-- 
1.5.6.5


  reply	other threads:[~2011-06-28 19:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 19:54 [PATCH 0/5] Hugetlb for 32-bit FSL PowerPC BookE Becky Bruce
2011-06-28 19:54 ` [PATCH 1/5] fs/hugetlbfs/inode.c: Fix pgoff alignment checking on 32-bit Becky Bruce
2011-06-28 19:54   ` [PATCH 2/5] hugetlb: add phys addr to struct huge_bootmem_page Becky Bruce
2011-06-28 19:54     ` Becky Bruce [this message]
2011-06-28 19:54       ` [PATCH 4/5] powerpc: Create next_tlbcam_idx percpu variable for FSL_BOOKE Becky Bruce
2011-06-28 19:54         ` [PATCH 5/5] powerpc: Hugetlb for BookE Becky Bruce
2011-07-08  4:13         ` [PATCH 4/5] powerpc: Create next_tlbcam_idx percpu variable for FSL_BOOKE Kumar Gala
2011-06-28 21:39     ` [PATCH 2/5] hugetlb: add phys addr to struct huge_bootmem_page Benjamin Herrenschmidt
2011-06-30 18:50       ` Becky Bruce
2011-07-24 16:48         ` Tabi Timur-B04825
2011-07-21 22:44     ` Andrew Morton
2011-07-22 21:08       ` Becky Bruce
2011-07-19  4:43   ` [PATCH 1/5] fs/hugetlbfs/inode.c: Fix pgoff alignment checking on 32-bit Benjamin Herrenschmidt

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=13092910702553-git-send-email-beckyb@kernel.crashing.org \
    --to=beckyb@kernel.crashing.org \
    --cc=benh@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=wli@holomorphy.com \
    /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