[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] arm: use correct attributes for mappings in copy_from_paddr()
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1341309143 -3600 # Node ID 6a89e6f4eadcf763a904a298e82c281f90aba896 # Parent 51ad440f9efd92e640cccceed8c7f1c2da9684a9 arm: use correct attributes for mappings in copy_from_paddr() The DTB is in RAM (hence bufferable), kernel is in flash and therefor requires a device type mapping (hence dev shared). Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: David Vrabel <david.vrabel@xxxxxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 51ad440f9efd -r 6a89e6f4eadc xen/arch/arm/kernel.c --- a/xen/arch/arm/kernel.c Tue Jul 03 10:52:22 2012 +0100 +++ b/xen/arch/arm/kernel.c Tue Jul 03 10:52:23 2012 +0100 @@ -39,7 +39,7 @@ struct minimal_dtb_header { * @paddr: source physical address * @len: length to copy */ -void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len) +void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx) { void *src = (void *)FIXMAP_ADDR(FIXMAP_MISC); @@ -51,7 +51,7 @@ void copy_from_paddr(void *dst, paddr_t s = paddr & (PAGE_SIZE-1); l = min(PAGE_SIZE - s, len); - set_fixmap(FIXMAP_MISC, p, DEV_SHARED); + set_fixmap(FIXMAP_MISC, p, attrindx); memcpy(dst, src + s, l); paddr += l; @@ -111,7 +111,7 @@ static int kernel_try_zimage_prepare(str /* * Check for an appended DTB. */ - copy_from_paddr(&dtb_hdr, KERNEL_FLASH_ADDRESS + end - start, sizeof(dtb_hdr)); + copy_from_paddr(&dtb_hdr, KERNEL_FLASH_ADDRESS + end - start, sizeof(dtb_hdr), DEV_SHARED); if (be32_to_cpu(dtb_hdr.magic) == DTB_MAGIC) { end += be32_to_cpu(dtb_hdr.total_size); } @@ -151,7 +151,7 @@ static int kernel_try_elf_prepare(struct if ( info->kernel_img == NULL ) panic("Cannot allocate temporary buffer for kernel.\n"); - copy_from_paddr(info->kernel_img, KERNEL_FLASH_ADDRESS, KERNEL_FLASH_SIZE); + copy_from_paddr(info->kernel_img, KERNEL_FLASH_ADDRESS, KERNEL_FLASH_SIZE, DEV_SHARED); if ( (rc = elf_init(&info->elf.elf, info->kernel_img, KERNEL_FLASH_SIZE )) != 0 ) return rc; diff -r 51ad440f9efd -r 6a89e6f4eadc xen/arch/arm/setup.c --- a/xen/arch/arm/setup.c Tue Jul 03 10:52:22 2012 +0100 +++ b/xen/arch/arm/setup.c Tue Jul 03 10:52:23 2012 +0100 @@ -122,7 +122,7 @@ static void __init setup_mm(unsigned lon * TODO: handle other payloads too. */ device_tree_flattened = mfn_to_virt(alloc_boot_pages(dtb_pages, 1)); - copy_from_paddr(device_tree_flattened, dtb_paddr, dtb_size); + copy_from_paddr(device_tree_flattened, dtb_paddr, dtb_size, BUFFERABLE); /* Add non-xenheap memory */ init_boot_pages(pfn_to_paddr(xenheap_mfn_start + xenheap_pages), diff -r 51ad440f9efd -r 6a89e6f4eadc xen/include/asm-arm/setup.h --- a/xen/include/asm-arm/setup.h Tue Jul 03 10:52:22 2012 +0100 +++ b/xen/include/asm-arm/setup.h Tue Jul 03 10:52:23 2012 +0100 @@ -3,7 +3,7 @@ #include <public/version.h> -void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len); +void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx); void arch_get_xen_caps(xen_capabilities_info_t *info); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |