Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932507AbWCXStt (ORCPT ); Fri, 24 Mar 2006 13:49:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932591AbWCXStt (ORCPT ); Fri, 24 Mar 2006 13:49:49 -0500 Received: from e3.ny.us.ibm.com ([32.97.182.143]:19690 "EHLO e3.ny.us.ibm.com") by vger.kernel.org with ESMTP id S932507AbWCXSts (ORCPT ); Fri, 24 Mar 2006 13:49:48 -0500 From: Arnd Bergmann Organization: IBM Deutschland Entwicklung GmbH To: linuxppc-dev@ozlabs.org Subject: [PATCH] spufs: Fix endless protection fault on LS writes by SPE. Date: Fri, 24 Mar 2006 19:49:27 +0100 User-Agent: KMail/1.9.1 Cc: Arnd Bergmann , Paul Mackerras , cbe-oss-dev@ozlabs.org, linux-kernel@vger.kernel.org References: <20060323203423.620978000@dyn-9-152-242-103.boeblingen.de.ibm.com> In-Reply-To: <20060323203423.620978000@dyn-9-152-242-103.boeblingen.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603241949.28218.arnd.bergmann@de.ibm.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1499 Lines: 34 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 Signed-off-by: Mike Kistler Signed-off-by: Arnd Bergmann --- 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/