linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd.bergmann@de.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: Paul Mackerras <paulus@samba.org>,
	Arnd Bergmann <abergman@de.ibm.com>,
	cbe-oss-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] spufs: Fix endless protection fault on LS writes by SPE.
Date: Fri, 24 Mar 2006 19:49:27 +0100	[thread overview]
Message-ID: <200603241949.28218.arnd.bergmann@de.ibm.com> (raw)
In-Reply-To: <20060323203423.620978000@dyn-9-152-242-103.boeblingen.de.ibm.com>

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 <mkistler@us.ibm.com>
Signed-off-by: Mike Kistler <mkistler@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>

---
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

  parent reply	other threads:[~2006-03-24 18:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-23 20:34 [patch 00/13] Cell kernel updates Arnd Bergmann
2006-03-22 23:00 ` [patch 01/13] powerpc: hvc_console updates Arnd Bergmann
2006-03-27  4:00   ` Paul Mackerras
2006-03-27 19:25     ` [updated patch 1/2] " Arnd Bergmann
2006-03-28  5:23       ` Paul Mackerras
2006-03-27 19:26     ` [updated patch 2/2] powerpc: add hvc backend for rtas Arnd Bergmann
2006-03-22 23:00 ` [patch 02/13] " Arnd Bergmann
2006-03-23 21:32   ` Olof Johansson
2006-03-23 22:36     ` [Cbe-oss-dev] " Arnd Bergmann
2006-03-23 22:49       ` Olof Johansson
2006-03-24 18:58       ` powerpc: fix hvc-rtas comments Arnd Bergmann
2006-03-22 23:00 ` [patch 03/13] powerpc: update cell platform detection Arnd Bergmann
2006-03-22 23:00 ` [patch 04/13] powerpc: fix cell iommu setup Arnd Bergmann
2006-03-22 23:00 ` [patch 05/13] powerpc: update cell defconfig Arnd Bergmann
2006-03-22 23:00 ` [patch 06/13] powerpc: cell interrupt controller updates Arnd Bergmann
2006-03-23 22:15   ` Benjamin Herrenschmidt
2006-03-24 18:47     ` [PATCH] powerpc: use guarded ioremap for on-chip mappings Arnd Bergmann
2006-03-24 17:43   ` [patch 06/13] powerpc: cell interrupt controller updates Milton Miller
2006-03-24 18:05     ` Arnd Bergmann
2006-03-24 18:46       ` [PATCH] powerpc: fix spider-pic affinity setting Arnd Bergmann
2006-03-22 23:00 ` [patch 07/13] powerpc: work around a cell interrupt HW bug Arnd Bergmann
2006-03-22 23:00 ` [patch 08/13] powerpc: declare arch syscalls in <asm/syscalls.h> Arnd Bergmann
2006-03-22 23:00 ` [patch 09/13] spufs: allow SPU code to do syscalls Arnd Bergmann
2006-03-22 23:00 ` [patch 10/13] add sys_unshare to syscalls.h Arnd Bergmann
2006-03-22 23:00 ` [patch 11/13] spufs: implement mfc access for PPE-side DMA Arnd Bergmann
2006-03-22 23:00 ` [patch 12/13] spufs: enable SPE problem state MMIO access Arnd Bergmann
2006-03-22 23:00 ` [patch 13/13] spufs: initialize context correctly Arnd Bergmann
2006-03-24 18:49 ` Arnd Bergmann [this message]
2006-03-27 19:27 ` [PATCH] fix __init/__exit annotations for spufs Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200603241949.28218.arnd.bergmann@de.ibm.com \
    --to=arnd.bergmann@de.ibm.com \
    --cc=abergman@de.ibm.com \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).