From: Dan Malek <dan@embeddededge.com>

There is a problem with large amounts of spurious IRQs on PowerPC 82xx
systems.

The problem is corrected by adding sync at the end of cpm2_mask_and_ack. 
This may be needed on 8xx as well but has not yet been confirmed.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Dan Malek <dan@embeddedalley.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 arch/ppc/syslib/cpm2_pic.c |    5 +++++
 1 files changed, 5 insertions(+)

diff -puN arch/ppc/syslib/cpm2_pic.c~ppc32-workaround-for-spurious-irqs-on-pq2 arch/ppc/syslib/cpm2_pic.c
--- 25/arch/ppc/syslib/cpm2_pic.c~ppc32-workaround-for-spurious-irqs-on-pq2	2005-04-29 18:29:26.494150936 -0700
+++ 25-akpm/arch/ppc/syslib/cpm2_pic.c	2005-04-29 18:30:44.437301776 -0700
@@ -107,6 +107,11 @@ static void cpm2_end_irq(unsigned int ir
 		simr = &(cpm2_immr->im_intctl.ic_simrh);
 		ppc_cached_irq_mask[word] |= 1 << bit;
 		simr[word] = ppc_cached_irq_mask[word];
+		/*
+		 * Work around large numbers of spurious IRQs on PowerPC 82xx
+		 * systems.
+		 */
+		mb();
 	}
 }
 
_