On Tue, 2005-05-10 at 16:59 -0700, Andrew Morton wrote:
> > +
> > + /* free this memory as we need it with in 4GB range */
> > + free_pages ((unsigned long)pbuf, *ordernum);
> > +
> > + /* try allocating a new buffer from the GFP_DMA range
> > + as it is with in 16MB range.*/
> > + pbuf =(unsigned char *)__get_free_pages(GFP_DMA, *ordernum);
> > +
> > + if (pbuf == NULL)
> > + pr_debug("Failed to get memory of size %ld using GFP_DMA\n", size);
> > + }
> > + }
> > + return pbuf;
> > +}
>
> What architecture is this code designed for? On x86 a GFP_KERNEL
> allocation will never return highmem. I guess x86_64?
>
> I assume this code is here because the x86_64 BIOS will only access the
> lower 4GB? If so, a comment to that extent would be useful.
>
> Sometime I expect that x86_64 will gain a new zone, GFP_DMA32 which will be
> guaranteed to return memory below he 4GB point. When that happens, this
> driver should be converted to use it.
Almost always when this happens the driver actually wanted to use
pci_alloc_consistent memory... (i've not seen the rest of the driver yet
so can't say how appropriate that would be here)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]