]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/sysdev/dart_iommu.c
[POWERPC] Fix CHRP platforms with only 8259
[linux-2.6-omap-h63xx.git] / arch / powerpc / sysdev / dart_iommu.c
index 7c7f34ce4986621808f0d5d731f55f9fe19e6711..03b4477dd7f0a88e4e6ac0797a9a3c4d29cda7bf 100644 (file)
@@ -27,7 +27,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/slab.h>
@@ -140,6 +139,7 @@ wait_more:
 
 static void dart_flush(struct iommu_table *tbl)
 {
+       mb();
        if (dart_dirty) {
                dart_tlb_invalidate_all();
                dart_dirty = 0;
@@ -173,9 +173,13 @@ static void dart_build(struct iommu_table *tbl, long index,
                uaddr += DART_PAGE_SIZE;
        }
 
+       /* make sure all updates have reached memory */
+       mb();
+       in_be32((unsigned __iomem *)dp);
+       mb();
+
        if (dart_is_u4) {
                rpn = index;
-               mb(); /* make sure all updates have reached memory */
                while (npages--)
                        dart_tlb_invalidate_one(rpn++);
        } else {