Skip to content

Commit

Permalink
[POWERPC] spufs: fix incorrect interrupt status clearing in backing m…
Browse files Browse the repository at this point in the history
…box stat poll

When doing a poll on the mbox stat file of a swapped-out context, we
clear the class 0 interrupt status, rather than the class 2 interrupt
status.

This change corrects the poll operation to clear the correct interrupt.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Jeremy Kerr authored and Paul Mackerras committed Dec 21, 2007
1 parent cc210b3 commit c40aa47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/cell/spufs/backing_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ static unsigned int spu_backing_mbox_stat_poll(struct spu_context *ctx,
if (stat & 0xff0000)
ret |= POLLIN | POLLRDNORM;
else {
ctx->csa.priv1.int_stat_class0_RW &= ~0x1;
ctx->csa.priv1.int_stat_class2_RW &= ~0x1;
ctx->csa.priv1.int_mask_class2_RW |= 0x1;
}
}
if (events & (POLLOUT | POLLWRNORM)) {
if (stat & 0x00ff00)
ret = POLLOUT | POLLWRNORM;
else {
ctx->csa.priv1.int_stat_class0_RW &= ~0x10;
ctx->csa.priv1.int_stat_class2_RW &= ~0x10;
ctx->csa.priv1.int_mask_class2_RW |= 0x10;
}
}
Expand Down

0 comments on commit c40aa47

Please sign in to comment.