summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/setup.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-17 01:51:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-17 01:51:27 +0200
commit8f949b9a7e0bac3a9c3c29dc27c476a87e21db3e (patch)
tree88cd7852d59ebae54fcc2f57019ea13284042962 /arch/x86/xen/setup.c
parentdriver-core: Shut up dev_dbg_reatelimited() without DEBUG (diff)
parentLinux 3.6-rc6 (diff)
downloadlinux-8f949b9a7e0bac3a9c3c29dc27c476a87e21db3e.tar.xz
linux-8f949b9a7e0bac3a9c3c29dc27c476a87e21db3e.zip
Merge 3.6-rc7 into driver-core-next
This pulls in the fixes in that branch that are needed here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/xen/setup.c')
-rw-r--r--arch/x86/xen/setup.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index ead85576d54a..d11ca11d14fc 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -78,9 +78,16 @@ static void __init xen_add_extra_mem(u64 start, u64 size)
memblock_reserve(start, size);
xen_max_p2m_pfn = PFN_DOWN(start + size);
+ for (pfn = PFN_DOWN(start); pfn < xen_max_p2m_pfn; pfn++) {
+ unsigned long mfn = pfn_to_mfn(pfn);
+
+ if (WARN(mfn == pfn, "Trying to over-write 1-1 mapping (pfn: %lx)\n", pfn))
+ continue;
+ WARN(mfn != INVALID_P2M_ENTRY, "Trying to remove %lx which has %lx mfn!\n",
+ pfn, mfn);
- for (pfn = PFN_DOWN(start); pfn <= xen_max_p2m_pfn; pfn++)
__set_phys_to_machine(pfn, INVALID_P2M_ENTRY);
+ }
}
static unsigned long __init xen_do_chunk(unsigned long start,