Re: [PATCH] gurantee DMA area for alloc_bootmem_low()

From: Mike Kravetz <>
Date: 2005-07-13 06:37:09
On Tue, Jul 12, 2005 at 12:29:25PM -0700, Dave Hansen wrote:
> On Tue, 2005-07-12 at 11:30 -0700, Mike Kravetz wrote:
> > FYI - While hacking on the memory hotplug code, I added a special
> > '#define MAX_DMA_PHYSADDR' to get around this issue on such architectures.
> > Most likely, this isn't elegant enough as a real solution.  But it does
> > point out that __pa(MAX_DMA_ADDRESS) doesn't always give you what you
> > expect.
> Didn't we create a MAX_DMA_PHYSADDR or something, so that people could
> do this if they want?

Yes, but that only 'exists' in the hotplug patch set.

My point was simply that __pa(MAX_DMA_ADDRESS) doesn't give you what
you want on all archs.  This patch could add something like MAX_DMA_ADDRESS
to get around the issue.  

I believe that __pa(MAX_DMA_ADDRESS) is also 'incorrectly' used in
the bootmem macros.

#define alloc_bootmem(x) \
        __alloc_bootmem((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
#define alloc_bootmem_pages(x) \
        __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))

But, in these cases __pa(MAX_DMA_ADDRESS) is the 'goal' argument.  And
as such, being 'incorrect' is not much of an issue.  Especially on archs
that can do DMA anywhere.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Jul 12 16:41:12 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:40 EST