]> err.no Git - linux-2.6/commitdiff
powerpc/spufs: remove class_0_dsisr from spu exception handling
authorLuke Browning <lukebrowning@us.ibm.com>
Thu, 5 Jun 2008 09:30:25 +0000 (17:30 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 16 Jun 2008 04:35:00 +0000 (14:35 +1000)
According to the CBEA, the SPU dsisr is not updated for class 0
exceptions.

spu_stopped() is testing the dsisr that was passed to it from the class
0 exception handler, so we return a false positive here.

This patch cleans up the interrupt handler and erroneous tests in
spu_stopped. It also removes the fields from the csa since it is not
needed to process class 0 events.

Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spu_base.c
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/xmon/xmon.c
include/asm-powerpc/spu.h
include/asm-powerpc/spu_csa.h

index 70c660121ec4d0d2da4a36071d851a1acd3e7870..96b5f0f1c11ec7f73b4dcc074c1856325eb39c99 100644 (file)
@@ -324,14 +324,12 @@ spu_irq_class_0(int irq, void *data)
        stat = spu_int_stat_get(spu, 0) & mask;
 
        spu->class_0_pending |= stat;
-       spu->class_0_dsisr = spu_mfc_dsisr_get(spu);
        spu->class_0_dar = spu_mfc_dar_get(spu);
        spin_unlock(&spu->register_lock);
 
        spu->stop_callback(spu, 0);
 
        spu->class_0_pending = 0;
-       spu->class_0_dsisr = 0;
        spu->class_0_dar = 0;
 
        spu_int_stat_clear(spu, 0, stat);
index 0046bcfe495a32bad1003e6662ffdbb6f1664acf..f7edba6cb795d55944009cc376ff171cdddefa09 100644 (file)
@@ -27,7 +27,6 @@ void spufs_stop_callback(struct spu *spu, int irq)
                switch(irq) {
                case 0 :
                        ctx->csa.class_0_pending = spu->class_0_pending;
-                       ctx->csa.class_0_dsisr = spu->class_0_dsisr;
                        ctx->csa.class_0_dar = spu->class_0_dar;
                        break;
                case 1 :
@@ -69,10 +68,6 @@ top:
        if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
                return 1;
 
-       dsisr = ctx->csa.class_0_dsisr;
-       if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
-               return 1;
-
        dsisr = ctx->csa.class_1_dsisr;
        if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
                return 1;
index 1702de9395eeee96b02d686e20550dbc98b8d63d..bfcf70ee8959357dd3d76250e435160883734c67 100644 (file)
@@ -2844,7 +2844,6 @@ static void dump_spu_fields(struct spu *spu)
        DUMP_FIELD(spu, "0x%lx", flags);
        DUMP_FIELD(spu, "%d", class_0_pending);
        DUMP_FIELD(spu, "0x%lx", class_0_dar);
-       DUMP_FIELD(spu, "0x%lx", class_0_dsisr);
        DUMP_FIELD(spu, "0x%lx", class_1_dar);
        DUMP_FIELD(spu, "0x%lx", class_1_dsisr);
        DUMP_FIELD(spu, "0x%lx", irqs[0]);
index 6abead6e681aacd732efc40c5fd0431824af8f37..99348c1f4cab3360ff697ead7cd21a55acf39c5a 100644 (file)
@@ -131,7 +131,6 @@ struct spu {
        u64 flags;
        u64 class_0_pending;
        u64 class_0_dar;
-       u64 class_0_dsisr;
        u64 class_1_dar;
        u64 class_1_dsisr;
        size_t ls_size;
index 129ec148d4512b1a63ac6dbcbf3321ac07712ba9..a40fd491250c2f18f259568d3b4703d3b73c93c4 100644 (file)
@@ -254,7 +254,7 @@ struct spu_state {
        u64 spu_chnldata_RW[32];
        u32 spu_mailbox_data[4];
        u32 pu_mailbox_data[1];
-       u64 class_0_dar, class_0_dsisr, class_0_pending;
+       u64 class_0_dar, class_0_pending;
        u64 class_1_dar, class_1_dsisr;
        unsigned long suspend_time;
        spinlock_t register_lock;