linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Milton Miller <miltonm@bga.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] numa: enforce iommu-off memory address limit
Date: Sat, 16 Jun 2007 14:34:13 +1000	[thread overview]
Message-ID: <1181968453.21287.5.camel@concordia.ozlabs.ibm.com> (raw)
In-Reply-To: <111819287886b8b45671.846930886.miltonm@bga.com>

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

On Fri, 2007-06-15 at 12:33 -0500, Milton Miller wrote:
> Don't short circuit the lmb_end_of_DRAM if iommu_is_off.
> 
> If linux,iommu-off is in /chosen (because iommu=off was on the command
> line), we limit the memory when adding it to the lmbs and page tables,
> but not when numa parses the device tree for numa affinity.  When we
> free bootmem, we then try to use these pages without mapping them or
> allocating supporting data structures resulting in bad_page and/or data
> storage interrupts.
> 
> Signed-off-by: Milton Miller <miltonm@bga.com>
> --- 
> Paul, I think this can wait for 2.6.23 although its small enough
> if you want to send it for 2.6.22.
> 
> Index: kernel/arch/powerpc/mm/numa.c
> ===================================================================
> --- kernel.orig/arch/powerpc/mm/numa.c	2007-06-15 01:10:19.000000000 -0500
> +++ kernel/arch/powerpc/mm/numa.c	2007-06-15 01:41:32.000000000 -0500
> @@ -21,6 +21,7 @@
>  #include <asm/lmb.h>
>  #include <asm/system.h>
>  #include <asm/smp.h>
> +#include <asm/iommu.h>
>  
>  static int numa_enabled = 1;
>  
> @@ -286,7 +287,7 @@ static unsigned long __init numa_enforce
>  	 * having memory holes below the limit.
>  	 */
>  
> -	if (! memory_limit)
> +	if (!memory_limit && !iommu_is_off)
>  		return size;

I'd rather just remove the check entirely, and rename the routine -
numa_check_end_of_ram() or something.

cheers


-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2007-06-16  4:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-15 17:33 [PATCH] numa: enforce iommu-off memory address limit Milton Miller
2007-06-16  4:34 ` Michael Ellerman [this message]

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=1181968453.21287.5.camel@concordia.ozlabs.ibm.com \
    --to=michael@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=paulus@samba.org \
    /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).