From patchwork Wed Nov 12 02:02:43 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 8274 X-Patchwork-Delegate: jwboyer@gmail.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 0E17DDDFAF for ; Wed, 12 Nov 2008 13:04:33 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1030) id 4FFBCDDDDB; Wed, 12 Nov 2008 13:04:09 +1100 (EST) To: Josh Boyer From: Benjamin Herrenschmidt Date: Wed, 12 Nov 2008 13:02:43 +1100 Subject: [PATCH] powerpc: Fix 460EX/460GT machine check handling Message-Id: <20081112020409.4FFBCDDDDB@ozlabs.org> Cc: linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 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@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Those cores use the 440A type machine check (ie, they have MCSRR0/MCSRR1). They thus need to call the appropriate fixup function to hook the right variant of the exception. Without this, all machine checks become fatal due to loss of context when entering the exception handler. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/cpu_setup_44x.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- linux-work.orig/arch/powerpc/kernel/cpu_setup_44x.S 2008-11-12 12:51:24.000000000 +1100 +++ linux-work/arch/powerpc/kernel/cpu_setup_44x.S 2008-11-12 13:01:03.000000000 +1100 @@ -34,7 +34,12 @@ _GLOBAL(__setup_cpu_440grx) blr _GLOBAL(__setup_cpu_460ex) _GLOBAL(__setup_cpu_460gt) - b __init_fpu_44x + mflr r4 + bl __init_fpu_44x + bl __fixup_440A_mcheck + mtlr r4 + blr + _GLOBAL(__setup_cpu_440gx) _GLOBAL(__setup_cpu_440spe) b __fixup_440A_mcheck