From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org
Subject: Re: [PATCH 2/3] Allocate the hash table under 1G on cell
Date: Tue, 05 Feb 2008 11:23:00 +1100 [thread overview]
Message-ID: <1202170980.7079.34.camel@pasglop> (raw)
In-Reply-To: <f7985e5b32565961444283819eaeeda86f471fc8.1201257905.git.michael@ellerman.id.au>
On Fri, 2008-01-25 at 21:45 +1100, Michael Ellerman wrote:
> In order to support our IOMMU performance trick, we need the hash table to be
> inside the DMA window. This is usually 2G, but let's make sure the hash table
> is under 1G as that will satisfy the IOMMU requirements and also means the
> hash table will be on node 0.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> arch/powerpc/mm/hash_utils_64.c | 12 +++++++++---
> 1 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
> index 9326a69..487c5e2 100644
> --- a/arch/powerpc/mm/hash_utils_64.c
> +++ b/arch/powerpc/mm/hash_utils_64.c
> @@ -471,7 +471,7 @@ void __init htab_initialize(void)
> unsigned long table;
> unsigned long pteg_count;
> unsigned long mode_rw;
> - unsigned long base = 0, size = 0;
> + unsigned long base = 0, size = 0, limit;
> int i;
>
> extern unsigned long tce_alloc_start, tce_alloc_end;
> @@ -505,9 +505,15 @@ void __init htab_initialize(void)
> _SDR1 = 0;
> } else {
> /* Find storage for the HPT. Must be contiguous in
> - * the absolute address space.
> + * the absolute address space. On cell we want it to be
> + * in the first 1 Gig.
> */
> - table = lmb_alloc(htab_size_bytes, htab_size_bytes);
> + if (machine_is(cell))
> + limit = 0x40000000;
> + else
> + limit = 0;
> +
> + table = lmb_alloc_base(htab_size_bytes, htab_size_bytes, limit);
>
> DBG("Hash table allocated at %lx, size: %lx\n", table,
> htab_size_bytes);
next prev parent reply other threads:[~2008-02-05 0:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-25 10:45 [PATCH 1/3] Add set_dma_ops() to match get_dma_ops() Michael Ellerman
2008-01-25 10:45 ` [PATCH 2/3] Allocate the hash table under 1G on cell Michael Ellerman
2008-02-05 0:23 ` Benjamin Herrenschmidt [this message]
2008-01-25 10:45 ` [PATCH 3/3] Cell IOMMU static mapping support Michael Ellerman
2008-01-25 13:12 ` [Cbe-oss-dev] " Geert Uytterhoeven
2008-01-26 2:51 ` Olof Johansson
2008-01-28 11:41 ` [Cbe-oss-dev] " Arnd Bergmann
2008-01-28 16:23 ` Olof Johansson
2008-01-28 21:16 ` Benjamin Herrenschmidt
2008-01-28 21:48 ` Olof Johansson
2008-01-28 21:37 ` Benjamin Herrenschmidt
2008-01-28 21:18 ` Benjamin Herrenschmidt
2008-02-05 0:23 ` [PATCH 1/3] Add set_dma_ops() to match get_dma_ops() Benjamin Herrenschmidt
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=1202170980.7079.34.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=cbe-oss-dev@ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
/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;
as well as URLs for NNTP newsgroup(s).