]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc: 64k pages vs. U3 iommu
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Nov 2005 03:54:58 +0000 (14:54 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 04:03:37 +0000 (15:03 +1100)
That DART (U3 iommu) code didn't properly scale the number of entries
when using !4k pages. That caused crashes when booting G5s with more
than 2Gb of RAM. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/sysdev/u3_iommu.c

index 543d6590981248ff1ebdff05822c36aaeefe9ca0..f32baf7f4693eb0980c3a42ba366492fb9c0517e 100644 (file)
@@ -226,7 +226,7 @@ static void iommu_table_u3_setup(void)
        iommu_table_u3.it_busno = 0;
        iommu_table_u3.it_offset = 0;
        /* it_size is in number of entries */
-       iommu_table_u3.it_size = dart_tablesize / sizeof(u32);
+       iommu_table_u3.it_size = (dart_tablesize / sizeof(u32)) >> DART_PAGE_FACTOR;
 
        /* Initialize the common IOMMU code */
        iommu_table_u3.it_base = (unsigned long)dart_vbase;