Subject: [PATCH] powerpc: Fix pseries IOMMU allocations

From: Anton Blanchard <[email-masked]>
Date: Sat, 10 Jun 2006 20:00:09 +1000

> Make sure dma_alloc_coherent allocates memory from the local node.  This
> is important on Cell where we avoid going through the slow cpu
> interconnect.
> 
> Note:  I could only test this patch on Cell, it should be verified on
> some pseries machine by thos that have the hardware.

Looks like this patch is merged in Pauls tree and breaking pseries boot.
The patch below should fix it.

--

The arguments to alloc_pages_node were reversed, resulting in IOMMU
allocation failures. Fix it.

Signed-off-by: Anton Blanchard <[email-masked]>
---

Index: build/arch/powerpc/kernel/iommu.c
===================================================================
--- build.orig/arch/powerpc/kernel/iommu.c	2006-06-10 19:49:51.000000000 +1000
+++ build/arch/powerpc/kernel/iommu.c	2006-06-10 19:52:12.000000000 +1000
@@ -561,7 +561,7 @@ void *iommu_alloc_coherent(struct iommu_
 		return NULL;
 
 	/* Alloc enough pages (and possibly more) */
-	page = alloc_pages_node(flag, order, node);
+	page = alloc_pages_node(node, flag, order);
 	if (!page)
 		return NULL;
 	ret = page_address(page);