From patchwork Thu Oct 15 09:04:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Tjernlund X-Patchwork-Id: 36097 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id B7A471014DE for ; Thu, 15 Oct 2009 20:05:57 +1100 (EST) Received: by ozlabs.org (Postfix) id CF94BB7BAD; Thu, 15 Oct 2009 20:04:42 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from gw1.transmode.se (gw1.transmode.se [213.115.205.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 67617B7D48 for ; Thu, 15 Oct 2009 20:04:42 +1100 (EST) Received: from sesr04.transmode.se (sesr04.transmode.se [192.168.201.15]) by gw1.transmode.se (Postfix) with ESMTP id 2866D65000B; Thu, 15 Oct 2009 11:04:30 +0200 (CEST) Received: from gentoo-jocke.transmode.se ([192.168.1.15]) by sesr04.transmode.se (Lotus Domino Release 8.5 HF942) with ESMTP id 2009101511043013-735 ; Thu, 15 Oct 2009 11:04:30 +0200 Received: from gentoo-jocke.transmode.se (gentoo-jocke.transmode.se [127.0.0.1]) by gentoo-jocke.transmode.se (8.14.0/8.14.0) with ESMTP id n9F94T40031065; Thu, 15 Oct 2009 11:04:29 +0200 Received: (from jocke@localhost) by gentoo-jocke.transmode.se (8.14.0/8.14.0/Submit) id n9F94Thn031064; Thu, 15 Oct 2009 11:04:29 +0200 From: Joakim Tjernlund To: Scott Wood , Rex Feany , Benjamin Herrenschmidt , "linuxppc-dev@ozlabs.org" Subject: [PATCH 5/8] 8xx: Add missing Guarded setting in DTLB Error. Date: Thu, 15 Oct 2009 11:04:23 +0200 Message-Id: <1255597466-30976-6-git-send-email-Joakim.Tjernlund@transmode.se> X-Mailer: git-send-email 1.6.4.4 In-Reply-To: <1255597466-30976-5-git-send-email-Joakim.Tjernlund@transmode.se> References: <1255597466-30976-1-git-send-email-Joakim.Tjernlund@transmode.se> <1255597466-30976-2-git-send-email-Joakim.Tjernlund@transmode.se> <1255597466-30976-3-git-send-email-Joakim.Tjernlund@transmode.se> <1255597466-30976-4-git-send-email-Joakim.Tjernlund@transmode.se> <1255597466-30976-5-git-send-email-Joakim.Tjernlund@transmode.se> X-MIMETrack: Itemize by SMTP Server on sesr04/Transmode(Release 8.5 HF942|October 08, 2009) at 2009-10-15 11:04:30, Serialize by Router on sesr04/Transmode(Release 8.5 HF942|October 08, 2009) at 2009-10-15 11:04:30, Serialize complete at 2009-10-15 11:04:30 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org only DTLB Miss did set this bit, DTLB Error needs too otherwise the setting is lost when the page becomes dirty. --- arch/powerpc/kernel/head_8xx.S | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 320f333..a1512e9 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -552,9 +552,16 @@ DARFixed:/* Return from dcbx instruction bug workaround, r10 holds value of DAR */ ori r11, r11, 1 /* Set valid bit in physical L2 page */ DO_8xx_CPU6(0x3b80, r3) - mtspr SPRN_MD_TWC, r11 /* Load pte table base address */ - mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ - lwz r10, 0(r11) /* Get the pte */ + mtspr SPRN_MD_TWC, r11 /* Load pte table base address */ + mfspr r10, SPRN_MD_TWC /* ....and get the pte address */ + lwz r10, 0(r10) /* Get the pte */ + /* Insert the Guarded flag into the TWC from the Linux PTE. + * It is bit 27 of both the Linux PTE and the TWC + */ + rlwimi r11, r10, 0, 27, 27 + DO_8xx_CPU6(0x3b80, r3) + mtspr SPRN_MD_TWC, r11 + mfspr r11, SPRN_MD_TWC /* get the pte address again */ ori r10, r10, _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HWWRITE stw r10, 0(r11) /* and update pte in table */