Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26126
b: refs/heads/master
c: 2889773
h: refs/heads/master
v: v3
  • Loading branch information
Olof Johansson authored and Paul Mackerras committed Apr 21, 2006
1 parent 3763606 commit 70ccd11
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7daa411b810d7eadfaabe3765ec5f827893dbb30
refs/heads/master: 28897731318dc8f63f683eed9091e446916ad706
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int __initdata dt_root_addr_cells;
static int __initdata dt_root_size_cells;

#ifdef CONFIG_PPC64
static int __initdata iommu_is_off;
int __initdata iommu_is_off;
int __initdata iommu_force_on;
unsigned long tce_alloc_start, tce_alloc_end;
#endif
Expand Down
12 changes: 10 additions & 2 deletions trunk/arch/powerpc/sysdev/dart_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

#include "dart.h"

extern int iommu_is_off;
extern int iommu_force_on;

/* Physical base address and size of the DART table */
Expand Down Expand Up @@ -329,10 +330,17 @@ 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 (iommu_is_off)
return;

if (!iommu_force_on && lmb_end_of_DRAM() <= 0x40000000ull)
return;

/* 512 pages (2MB) is max DART tablesize. */
Expand Down

0 comments on commit 70ccd11

Please sign in to comment.