From patchwork Thu Oct 15 00:41:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rex Feany X-Patchwork-Id: 36038 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 A2292B7DC8 for ; Thu, 15 Oct 2009 11:41:39 +1100 (EST) Received: by ozlabs.org (Postfix) id 29015B7B69; Thu, 15 Oct 2009 11:41:33 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from bos-spam.mrv.com (mx5.mrv.com [140.179.254.12]) by ozlabs.org (Postfix) with ESMTP id 9D3C6B6F2B for ; Thu, 15 Oct 2009 11:41:32 +1100 (EST) X-ASG-Debug-ID: 1255567290-5bd800060001-myxymE Received: from bosmail.bos.mrv.com (bosmail.bos.mrv.com [140.179.176.26]) by bos-spam.mrv.com with ESMTP id UHlJ3VF1lsxITJd9; Wed, 14 Oct 2009 20:41:30 -0400 (EDT) X-Barracuda-Envelope-From: RFeany@mrv.com Received: from chmailsrv.int.mrv.com ([192.168.11.19]) by bosmail.bos.mrv.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Oct 2009 20:42:26 -0400 Received: from jane.chatsunix.int.mrv.com ([192.168.11.80]) by chmailsrv.int.mrv.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 14 Oct 2009 17:42:23 -0700 X-Barracuda-BBL-IP: 192.168.11.19 X-Barracuda-RBL-IP: 192.168.11.19 Received: from laura.chatsunix.int.mrv.com ([192.168.17.23]) by jane.chatsunix.int.mrv.com with esmtp (Exim 4.69) (envelope-from ) id 1MyEPI-0006U5-9F; Wed, 14 Oct 2009 17:41:28 -0700 Received: from rfeany by laura.chatsunix.int.mrv.com with local (Exim 4.69) (envelope-from ) id 1MyEPH-00044l-Rd; Wed, 14 Oct 2009 17:41:27 -0700 Date: Wed, 14 Oct 2009 17:41:27 -0700 From: Rex Feany To: Benjamin Herrenschmidt X-ASG-Orig-Subj: I think I have 8xx working... Subject: I think I have 8xx working... Message-ID: <20091015004127.GA15570@laura.chatsunix.int.mrv.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-OriginalArrivalTime: 15 Oct 2009 00:42:23.0862 (UTC) FILETIME=[5C780960:01CA4D30] X-Barracuda-Connect: bosmail.bos.mrv.com[140.179.176.26] X-Barracuda-Start-Time: 1255567290 X-Barracuda-URL: http://140.179.128.126:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at mrv.com Cc: Scott Wood , "linuxppc-dev@ozlabs.org" 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: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org The biggest problem for me turned out to be the MMU context IDs being clamped to 32 when the 8xx only has 16. With this, things are a bit more stable :) diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index c2f93dc..15e00c5 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c @@ -404,7 +404,8 @@ void __init mmu_context_init(void) } #ifdef DEBUG_CLAMP_LAST_CONTEXT - last_context = DEBUG_CLAMP_LAST_CONTEXT; + if (last_context > DEBUG_CLAMP_LAST_CONTEXT) + last_context = DEBUG_CLAMP_LAST_CONTEXT; #endif /* * Allocate the maps used by context management diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index e7dae82..26fb6b9 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -40,7 +40,7 @@ #include #include #include - +#include #ifdef CONFIG_KPROBES static inline int notify_page_fault(struct pt_regs *regs) @@ -246,6 +246,12 @@ good_area: goto bad_area; #endif /* CONFIG_6xx */ #if defined(CONFIG_8xx) + /* 8xx sometimes need to load a invalid/non-present TLBs. + * These must be invalidated separately as linux mm don't. + */ + if (error_code & 0x40000000) /* no translation? */ + _tlbil_va(address, 0, 0, 0); + /* The MPC8xx seems to always set 0x80000000, which is * "undefined". Of those that can be set, this is the only * one which seems bad.