* [1/17] cell: SPU register lock
@ 2006-12-12 3:03 Ishizaki Kou
2006-12-12 12:27 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Ishizaki Kou @ 2006-12-12 3:03 UTC (permalink / raw)
To: paulus, linuxppc-dev
spu->register_lock should be held before accessing registers.
Signed-off-by: Kou Ishizaki <kou.ishizaki.co.jp>
---
Index: linux-powerpc-git/arch/powerpc/platforms/cell/spu_base.c
diff -u linux-powerpc-git/arch/powerpc/platforms/cell/spu_base.c:1.1.1.1 linux-powerpc-git/arch/powerpc/platforms/cell/spu_base.c:1.2
--- linux-powerpc-git/arch/powerpc/platforms/cell/spu_base.c:1.1.1.1 Wed Dec 6 08:25:44 2006
+++ linux-powerpc-git/arch/powerpc/platforms/cell/spu_base.c Thu Dec 7 16:24:53 2006
@@ -170,9 +170,11 @@
spu_irq_class_0_bottom(struct spu *spu)
{
unsigned long stat, mask;
+ unsigned long flags;
spu->class_0_pending = 0;
+ spin_lock_irqsave(&spu->register_lock, flags);
mask = spu_int_mask_get(spu, 0);
stat = spu_int_stat_get(spu, 0);
@@ -188,6 +190,7 @@
__spu_trap_error(spu);
spu_int_stat_clear(spu, 0, stat);
+ spin_unlock_irqrestore(&spu->register_lock, flags);
return (stat & 0x7) ? -EIO : 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [1/17] cell: SPU register lock
2006-12-12 3:03 [1/17] cell: SPU register lock Ishizaki Kou
@ 2006-12-12 12:27 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2006-12-12 12:27 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
On Tuesday 12 December 2006 04:03, Ishizaki Kou wrote:
> spu->register_lock should be held before accessing registers.
>
> Signed-off-by: Kou Ishizaki <kou.ishizaki.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de•ibm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-12 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 3:03 [1/17] cell: SPU register lock Ishizaki Kou
2006-12-12 12:27 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox