|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [IA64] Cleanup duplicate kdump_find_rsvd_
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1200596744 25200
# Node ID 003036d7db0fa5e3b988a4011655db411be8ed06
# Parent 8977f087351a11be55eab7671d53d69f04b3c9ff
[IA64] Cleanup duplicate kdump_find_rsvd_region()
Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
---
xen/arch/ia64/linux-xen/efi.c | 52 +++---------------------------------------
1 files changed, 4 insertions(+), 48 deletions(-)
diff -r 8977f087351a -r 003036d7db0f xen/arch/ia64/linux-xen/efi.c
--- a/xen/arch/ia64/linux-xen/efi.c Thu Jan 17 12:05:44 2008 -0700
+++ b/xen/arch/ia64/linux-xen/efi.c Thu Jan 17 12:05:44 2008 -0700
@@ -1211,8 +1211,9 @@ efi_initialize_iomem_resources(struct re
}
}
}
-
-#ifdef CONFIG_KEXEC
+#endif /* XEN */
+
+#if defined(CONFIG_KEXEC) || defined(XEN)
/* find a block of memory aligned to 64M exclude reserved regions
rsvd_regions are sorted
*/
@@ -1258,6 +1259,7 @@ kdump_find_rsvd_region (unsigned long si
}
#endif
+#ifndef XEN
#ifdef CONFIG_PROC_VMCORE
/* locate the size find a the descriptor at a certain address */
unsigned long
@@ -1288,49 +1290,3 @@ vmcore_find_descriptor_size (unsigned lo
}
#endif
#endif /* XEN */
-
-#ifdef XEN
-/* find a block of memory aligned to 64M exclude reserved regions
- * rsvd_regions are sorted
- */
-unsigned long
-kdump_find_rsvd_region(unsigned long size, struct rsvd_region *r, int n)
-{
- int i;
- u64 start, end;
- u64 alignment = 1UL << _PAGE_SIZE_64M;
- void *efi_map_start, *efi_map_end, *p;
- efi_memory_desc_t *md;
- u64 efi_desc_size;
-
- efi_map_start = __va(ia64_boot_param->efi_memmap);
- efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
- efi_desc_size = ia64_boot_param->efi_memdesc_size;
-
- for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
- md = p;
- if (!efi_wb(md))
- continue;
- start = ALIGN(md->phys_addr, alignment);
- end = efi_md_end(md);
- for (i = 0; i < n; i++) {
- if (__pa(r[i].start) >= start && __pa(r[i].end) < end) {
- if (__pa(r[i].start) > start + size)
- return start;
- start = ALIGN(__pa(r[i].end), alignment);
- if (i < n - 1
- && __pa(r[i + 1].start) < start + size)
- continue;
- else
- break;
- }
- }
- if (end > start + size)
- return start;
- }
-
- printk(KERN_WARNING
- "Cannot reserve 0x%lx byte of memory for crashdump\n", size);
- return ~0UL;
-}
-#endif
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [IA64] Cleanup duplicate kdump_find_rsvd_region(),
Xen patchbot-unstable <=
|
|
|
|
|