lkml.org 
[lkml]   [2008]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch]x86: arch_add_memory round up address
From
Date
Round up address to a page, otherwise the last page isn't mapped.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
arch/x86/mm/init_64.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/arch/x86/mm/init_64.c
===================================================================
--- linux.orig/arch/x86/mm/init_64.c 2008-10-09 11:42:33.000000000 +0800
+++ linux/arch/x86/mm/init_64.c 2008-10-09 11:43:22.000000000 +0800
@@ -721,7 +721,8 @@ int arch_add_memory(int nid, u64 start,
unsigned long nr_pages = size >> PAGE_SHIFT;
int ret;

- last_mapped_pfn = init_memory_mapping(start, start + size-1);
+ last_mapped_pfn = init_memory_mapping(start,
+ round_up(start + size-1, PAGE_SIZE));
if (last_mapped_pfn > max_pfn_mapped)
max_pfn_mapped = last_mapped_pfn;




\
 
 \ /
  Last update: 2008-10-09 07:33    [W:0.039 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site