On Jan 18, 2007, at 4:26 PM, Hollis Blanchard wrote:

On Thu, 2007-01-18 at 16:18 -0500, Jimi Xenidis wrote:

Hey, wouldn't virt_addr_valid() do?

I can pass a perfectly "valid" virtual address that is within a
physically discontiguous area of memory, and this function would return
0.

hmm, I thought the page allocate in linux was contiguous, and:
fastcall void free_pages(unsigned long addr, unsigned int order)
{
        if (addr != 0) {
                BUG_ON(!virt_addr_valid((void *)addr));
                __free_pages(virt_to_page((void *)addr), order);
        }
}

-JX


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to