Subject: [PATCH] kdump: Fix for machine checkstop on DMA fault

From: Haren Myneni <[email-masked]>
Date: Wed, 22 Mar 2006 20:30:26 -0800

Paul, If you are OK with this fix, please send it upstream.

Thanks
Haren

- Some machines checkstop on dma protection fault for ongoing DMA left 
in the first kernel. Since, we do not shutdown devices before the kdump 
boot, let them continue DMA to old kernel space.

Signed-off-by: Haren Myneni <[email-masked]>

--- 2616-git5-k1/arch/powerpc/kernel/iommu.c.orig	2006-04-04 19:08:02.000000000 -0700
+++ 2616-git5-k1/arch/powerpc/kernel/iommu.c	2006-04-04 10:50:45.000000000 -0700
@@ -427,8 +427,10 @@ struct iommu_table *iommu_init_table(str
 	tbl->it_largehint = tbl->it_halfpoint;
 	spin_lock_init(&tbl->it_lock);
 
+#ifndef CONFIG_CRASH_DUMP
 	/* Clear the hardware table in case firmware left allocations in it */
 	ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size);
+#endif
 
 	if (!welcomed) {
 		printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n",