[PATCH] Fix ppc64 smu driver locking

The SMU driver has a small mistake in the locking of the interrupt code,
if polled access and interrupt access race, interrupt may take a lock
and return without releasing it. This fixes it. With that patch, the
driver is rock solid with my experimental thermal control (which bangs
it pretty hard) racing with real time clock and cpufreq handling.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Benjamin Herrenschmidt and committed by Linus Torvalds a44fe13e 7644143c

+3 -1
+3 -1
drivers/macintosh/smu.c
··· 153 spin_lock_irqsave(&smu->lock, flags); 154 155 gpio = pmac_do_feature_call(PMAC_FTR_READ_GPIO, NULL, smu->doorbell); 156 - if ((gpio & 7) != 7) 157 return IRQ_HANDLED; 158 159 cmd = smu->cmd_cur; 160 smu->cmd_cur = NULL;
··· 153 spin_lock_irqsave(&smu->lock, flags); 154 155 gpio = pmac_do_feature_call(PMAC_FTR_READ_GPIO, NULL, smu->doorbell); 156 + if ((gpio & 7) != 7) { 157 + spin_unlock_irqrestore(&smu->lock, flags); 158 return IRQ_HANDLED; 159 + } 160 161 cmd = smu->cmd_cur; 162 smu->cmd_cur = NULL;