1
linux/arch/powerpc/platforms
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
..
4xx ppc: Various minor compile fixes 2005-10-11 22:08:12 +10:00
8xx powerpc: Merge enough to start building in arch/powerpc. 2005-09-26 16:04:21 +10:00
82xx POWERPC: mpc82xx merge: board-specific/platform stuff(resend) 2006-10-03 21:36:14 +04:00
83xx Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/configh 2006-10-04 09:59:57 -07:00
85xx Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
86xx Merge branch 'linux-2.6' 2006-09-14 07:07:18 +10:00
apus powerpc: Merge enough to start building in arch/powerpc. 2005-09-26 16:04:21 +10:00
cell [POWERPC] spufs: fix context switch during page fault 2006-10-05 09:21:01 +10:00
chrp [POWERPC] chrp: Constify & voidify get_property() 2006-07-31 15:55:05 +10:00
embedded6xx Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
iseries Merge branch 'master' of git://oak/home/sfr/kernels/iseries/work 2006-10-04 15:02:27 +10:00
maple [POWERPC] maple/pci iomem annotations 2006-09-26 15:41:02 +10:00
pasemi Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
powermac [POWERPC] Get default baud rate in udbg_scc 2006-10-04 14:52:31 +10:00
prep powerpc: Merge enough to start building in arch/powerpc. 2005-09-26 16:04:21 +10:00
pseries [POWERPC] Fix a printk in pseries_mpic_init_IRQ 2006-10-04 14:52:35 +10:00
Makefile [POWERPC] powerpc: PA Semi PWRficient platform support 2006-09-13 18:39:53 +10:00