[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 04/24] xen/dts: Constify device_tree_flattened
On Thu, 2013-08-22 at 14:35 +0100, Julien Grall wrote: > On 08/22/2013 02:05 PM, Ian Campbell wrote: > > On Fri, 2013-08-16 at 22:05 +0100, Julien Grall wrote: > >> The Flat Device Tree is given by the bootloader. Xen doesn't need to > >> modify it. > >> > >> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> > > > > Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > > > >> @@ -363,8 +364,9 @@ static void __init setup_mm(unsigned long dtb_paddr, > >> size_t dtb_size) > >> * > >> * 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, > >> BUFFERABLE); > >> + fdt = mfn_to_virt(alloc_boot_pages(dtb_pages, 1)); > >> + copy_from_paddr(fdt, dtb_paddr, dtb_size, BUFFERABLE); > >> + device_tree_flattened = fdt; > > > > Not related to this patch but I wonder if we ought to alloc_boot_pages > > (order_of(dtb_size)) or at least BUG_ON(dtb_size > PAGE_SIZE). > > The last solution can't work. The size of device tree is about 32K, so > greater than one page. I was being thick, I thought the "1" was the allocation size, missing the fact that "dtb_pages" was right there staring me in the face. (FTR 1 is the alignment...) Ian _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |