aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-09-29 18:25:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-29 18:42:58 -0400
commita44fe13eab664ac488ced0845d9885b019bd24c5 (patch)
tree83da95a5b4b6a9b30c7c3dd0e129b589082b61aa /drivers/macintosh
parent7644143cd6f7e029f3a8ea64f5fb0ab33ec39f72 (diff)
[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>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/smu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index a85ac18dd21d..9b38674fbf75 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -153,8 +153,10 @@ static irqreturn_t smu_db_intr(int irq, void *arg, struct pt_regs *regs)
153 spin_lock_irqsave(&smu->lock, flags); 153 spin_lock_irqsave(&smu->lock, flags);
154 154
155 gpio = pmac_do_feature_call(PMAC_FTR_READ_GPIO, NULL, smu->doorbell); 155 gpio = pmac_do_feature_call(PMAC_FTR_READ_GPIO, NULL, smu->doorbell);
156 if ((gpio & 7) != 7) 156 if ((gpio & 7) != 7) {
157 spin_unlock_irqrestore(&smu->lock, flags);
157 return IRQ_HANDLED; 158 return IRQ_HANDLED;
159 }
158 160
159 cmd = smu->cmd_cur; 161 cmd = smu->cmd_cur;
160 smu->cmd_cur = NULL; 162 smu->cmd_cur = NULL;