On Fri, Jan 13, 2012 at 4:05 PM, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> wrote: > +phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align) > +{ > + phys_addr_t phys; > + > + if (!arm_memblock_steal_permitted) > + panic("arm_memblock_steal used in an unsafe manner\n"); > + > + phys = memblock_alloc(size, align); > + memblock_free(phys, size); > + memblock_remove(phys, size); > + > + return phys; > +} Excellent! I think I suggested a function like that at some point. But I wonder about the 'align' argument. I think most people just copy-pasted SZ_1M, although I think originally you suggested SZ_2M, maybe it would make sense to align 'align' to SZ_1M, or set SZ_1M if it's 0 for convenience. Also, what about people that need memblock_alloc_base? AFAIK OMAP 3 secure ram needs to be below certain area (I wonder why the current code is not handling that). Cheers. -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html