2006-03-23 20:40:45

by Arnd Bergmann

[permalink] [raw]
Subject: [patch 00/13] Cell kernel updates

Sorry for having delayed these patches so long. This should
bring the mainline kernel up-to-date with the experimental
stuff that is hosted on bsc.es. It should apply on today's
git tree and with trivial modifications also works on 2.6.16,
for those that are interested.

Apart from a number of bug fixes, the important parts in here
are:

- the hvc console driver for rtas
- spufs support for doing syscalls from an spu
- host-initiated DMA though spufs
- option to map SPU control registers into user space

Paulus, please apply and forward as appropriate.

Arnd <><

--


2006-03-24 18:49:49

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] spufs: Fix endless protection fault on LS writes by SPE.

If an SPE attempts a DMA put to a local store after already doing
a get, the kernel must update the HW PTE to allow the write access.
This case was not being handled correctly.

From: Mike Kistler <[email protected]>
Signed-off-by: Mike Kistler <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>

---
diff -ur linux-2.6.15/arch/powerpc/platforms/cell/spu_base.c linux-2.6.15.fixed/arch/powerpc/platforms/cell/spu_base.c
--- linux-2.6.15/arch/powerpc/platforms/cell/spu_base.c 2006-03-22 12:30:07.000000000 -0600
+++ linux-2.6.15.fixed/arch/powerpc/platforms/cell/spu_base.c 2006-03-22 10:21:26.000000000 -0600
@@ -486,14 +486,13 @@

ea = spu->dar;
dsisr = spu->dsisr;
- if (dsisr & MFC_DSISR_PTE_NOT_FOUND) {
+ if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)) {
access = (_PAGE_PRESENT | _PAGE_USER);
access |= (dsisr & MFC_DSISR_ACCESS_PUT) ? _PAGE_RW : 0UL;
if (hash_page(ea, access, 0x300) != 0)
error |= CLASS1_ENABLE_STORAGE_FAULT_INTR;
}
- if ((error & CLASS1_ENABLE_STORAGE_FAULT_INTR) ||
- (dsisr & MFC_DSISR_ACCESS_DENIED)) {
+ if (error & CLASS1_ENABLE_STORAGE_FAULT_INTR) {
if ((ret = spu_handle_mm_fault(spu)) != 0)
error |= CLASS1_ENABLE_STORAGE_FAULT_INTR;
else

2006-03-27 19:27:51

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] fix __init/__exit annotations for spufs

spufs_init and spufs_exit should be marked correctly so
they can be removed when not needed.

Signed-off-by: Arnd Bergmann <[email protected]>
---
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/inode.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/inode.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/inode.c
@@ -442,7 +442,7 @@ static struct file_system_type spufs_typ
.kill_sb = kill_litter_super,
};

-static int spufs_init(void)
+static int __init spufs_init(void)
{
int ret;
ret = -ENOMEM;
@@ -472,7 +472,7 @@ out:
}
module_init(spufs_init);

-static void spufs_exit(void)
+static void __exit spufs_exit(void)
{
spu_sched_exit();
unregister_spu_syscalls(&spufs_calls);