public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org, benh@kernel.crashing.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] [2/2] POWERPC: Lower threshold for DART enablement to 1GB
Date: Wed, 12 Apr 2006 21:28:09 -0500	[thread overview]
Message-ID: <20060413022809.GD24769@pb15.lixom.net> (raw)
In-Reply-To: <20060413020559.GC24769@pb15.lixom.net>

Hi,

This goes with the previous dma_mask patch -- enable DART at 1GB due to
Airport Extreme cards needing it. Please consider for 2.6.17.


Thanks,

Olof


---

Turn on the DART already at 1GB. This is needed because of crippled
devices in some systems, i.e. Airport Extreme cards, only supporting
30-bit DMA addresses.

Otherwise, users with between 1 and 2GB of memory will need to manually
enable it with iommu=force, and that's no good.

Some simple performance tests show that there's a slight impact of
enabling DART, but it's in the 1-3% range (kernel build with disk I/O
as well as over NFS).

iommu=off can still be used for those who don't want to deal with the
overhead (and don't need it for any devices).


Signed-off-by: Olof Johansson <olof@lixom.net>

Index: 2.6/arch/powerpc/sysdev/dart_iommu.c
===================================================================
--- 2.6.orig/arch/powerpc/sysdev/dart_iommu.c
+++ 2.6/arch/powerpc/sysdev/dart_iommu.c
@@ -329,10 +329,14 @@ void iommu_init_early_dart(void)
 
 void __init alloc_dart_table(void)
 {
-	/* Only reserve DART space if machine has more than 2GB of RAM
+	/* Only reserve DART space if machine has more than 1GB of RAM
 	 * or if requested with iommu=on on cmdline.
+	 *
+	 * 1GB of RAM is picked as limit because some default devices
+	 * (i.e. Airport Extreme) have 30 bit address range limits.
 	 */
-	if (lmb_end_of_DRAM() <= 0x80000000ull && !iommu_force_on)
+
+	if (lmb_end_of_DRAM() <= 0x40000000ull && !iommu_force_on)
 		return;
 
 	/* 512 pages (2MB) is max DART tablesize. */

  reply	other threads:[~2006-04-13  2:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13  2:05 [PATCH] [1/2] POWERPC: IOMMU support for honoring dma_mask Olof Johansson
2006-04-13  2:28 ` Olof Johansson [this message]
2006-04-13  2:52   ` [PATCH] [2/2] POWERPC: Lower threshold for DART enablement to 1GB, V2 Olof Johansson
2006-04-13  6:40     ` Muli Ben-Yehuda
2006-04-13 10:45       ` Benjamin Herrenschmidt
2006-04-13 16:07         ` Olof Johansson
2006-04-13 17:31           ` Muli Ben-Yehuda
2006-04-13 20:52             ` Benjamin Herrenschmidt
2006-04-14 14:48               ` Muli Ben-Yehuda
2006-04-14 20:57                 ` Benjamin Herrenschmidt
2006-04-15  7:45                   ` Muli Ben-Yehuda
2006-04-15 13:09                     ` Jimi Xenidis
2006-04-15 13:37                   ` Jon Mason
2006-04-15 20:28                     ` Benjamin Herrenschmidt
2006-04-13 20:51           ` Benjamin Herrenschmidt
2006-04-13 22:27             ` Olof Johansson
2006-04-13 22:38               ` Benjamin Herrenschmidt
2006-04-13 15:57       ` Olof Johansson
2006-04-14 18:55 ` [PATCH] [1/2] POWERPC: IOMMU support for honoring dma_mask Olof Johansson

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=20060413022809.GD24769@pb15.lixom.net \
    --to=olof@lixom.net \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --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