linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <kravetz@us.ibm.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>,
	linux-mm <linux-mm@kvack.org>, "Luck, Tony" <tony.luck@intel.com>,
	ia64 list <linux-ia64@vger.kernel.org>,
	"Martin J. Bligh" <mbligh@mbligh.org>
Subject: Re: [PATCH] gurantee DMA area for alloc_bootmem_low()
Date: Tue, 12 Jul 2005 13:37:09 -0700	[thread overview]
Message-ID: <20050712203709.GA6230@w-mikek2.ibm.com> (raw)
In-Reply-To: <1121196565.5992.2.camel@localhost>

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.

-- 
Mike
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2005-07-12 20:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12  6:50 Yasunori Goto
2005-07-12 14:39 ` Martin J. Bligh
2005-07-13  5:09   ` Yasunori Goto
2005-07-12 18:30 ` Mike Kravetz
2005-07-12 19:29   ` Dave Hansen
2005-07-12 20:37     ` Mike Kravetz [this message]
2005-07-13  6:34   ` Yasunori Goto
2005-07-13 22:03     ` Mike Kravetz
2005-07-15  2:43       ` Yasunori Goto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050712203709.GA6230@w-mikek2.ibm.com \
    --to=kravetz@us.ibm.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@mbligh.org \
    --cc=tony.luck@intel.com \
    --cc=y-goto@jp.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox