android_kernel_xiaomi_sm8350/arch/powerpc/platforms/cell/spufs
HyeonSeung Jang 28347bce8a [POWERPC] spufs: fix context switch during page fault
For better explanation, I break down the page fault handling into steps:

1) There is a page fault caused by DMA operation initiated by SPU and
DMA is suspended.

2) The interrupt handler 'spu_irq_class_1()/__spu_trap_data_map()' is
called and it just wakes up the sleeping spe-manager thread.

3) by PPE scheduler, the corresponding bottom half,
spu_irq_class_1_bottom() is called in process context and DMA is
restarted.

There can be a quite large time gap between 2) and 3) and I found
the following problem:

Between 2) and 3) If the context becomes unbound, 3) is not executed
because when the spe-manager thread is awaken, the context is already
saved. (This situation can happen, for example, when a high priority spe
thread newly started in that time gap)

But the actual problem is that the corresponding SPU context does not
work even if it is bound again to a SPU.

Besides I can see the following warning in mambo simulator when the
context becomes
unbound(in save_mfc_cmd()), i.e. when unbind() is called for the
context after step 2) before 3) :

'WARNING: 61392752237: SPE2: MFC_CMD_QUEUE channel count of 15 is
inconsistent with number of available DMA queue entries of 16'

After I go through available documents, I found that the problem is
because the suspended DMA is not restarted when it is bound again.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-05 09:21:01 +10:00
..
backing_ops.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
context.c [PATCH] powerpc: cell: use kzalloc in alloc_spu_context() 2006-04-29 18:08:03 +10:00
file.c [POWERPC] spufs: cell spu problem state mapping updates 2006-10-05 09:21:00 +10:00
hw_ops.c [POWERPC] cell spufs iomem annotations 2006-09-26 15:25:33 +10:00
inode.c [PATCH] inode-diet: Eliminate i_blksize from the inode structure 2006-09-27 08:26:18 -07:00
Makefile [POWERPC] spufs: one more fix for 64k pages 2006-06-21 15:01:32 +10:00
run.c [PATCH] powerpc/cell: compile fixes 2006-04-01 22:37:14 +11:00
sched.c [POWERPC] spufs: scheduler support for NUMA. 2006-10-05 09:21:00 +10:00
spu_restore_crt0.S
spu_restore_dump.h_shipped [POWERPC] spufs: one more fix for 64k pages 2006-06-21 15:01:32 +10:00
spu_restore.c
spu_save_crt0.S
spu_save_dump.h_shipped [POWERPC] spufs: one more fix for 64k pages 2006-06-21 15:01:32 +10:00
spu_save.c
spu_utils.h
spufs.h [PATCH] spufs: enable SPE problem state MMIO access. 2006-03-27 14:48:28 +11:00
switch.c [POWERPC] spufs: fix context switch during page fault 2006-10-05 09:21:01 +10:00
syscalls.c