summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-10-06 18:57:22 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-10-07 14:13:00 +0200
commit3257f43d9296ed7adcc84e48f6ddf5313cf29266 (patch)
tree97cfb5a7bcd2d21452a7716c4daa8ea512fc1ab7 /arch/arm
parentARM: 5746/1: Handle possible translation errors in ARMv6/v7 coherent_user_range (diff)
downloadlinux-3257f43d9296ed7adcc84e48f6ddf5313cf29266.tar.xz
linux-3257f43d9296ed7adcc84e48f6ddf5313cf29266.zip
ARM: 5747/1: Fix the start_pg value in free_memmap()
If sparsemem is enabled, the start_pfn passed to the free_memmap() function corresponds to an area of memory not known to the kernel and pfn_to_page returns a wrong value. The (start_pfn - 1), however, is known to the kernel. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mm/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 877c492f8e10..40940d7ce4ff 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -483,7 +483,7 @@ free_memmap(int node, unsigned long start_pfn, unsigned long end_pfn)
/*
* Convert start_pfn/end_pfn to a struct page pointer.
*/
- start_pg = pfn_to_page(start_pfn);
+ start_pg = pfn_to_page(start_pfn - 1) + 1;
end_pg = pfn_to_page(end_pfn);
/*