From patchwork Wed Oct 31 15:20:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Lal X-Patchwork-Id: 1679721 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B462ADFE15 for ; Wed, 31 Oct 2012 15:28:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935724Ab2JaP2A (ORCPT ); Wed, 31 Oct 2012 11:28:00 -0400 Received: from kymasys.com ([64.62.140.43]:50283 "HELO kymasys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757728Ab2JaP1S convert rfc822-to-8bit (ORCPT ); Wed, 31 Oct 2012 11:27:18 -0400 Received: from ::ffff:173.33.185.184 ([173.33.185.184]) by kymasys.com for ; Wed, 31 Oct 2012 08:20:41 -0700 From: Sanjay Lal Subject: [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for saving regs. Date: Wed, 31 Oct 2012 11:20:37 -0400 Message-Id: <6BC12683-224F-4867-818C-FE4CF722B272@kymasys.com> To: kvm@vger.kernel.org, linux-mips@linux-mips.org Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Sanjay Lal --- arch/mips/include/asm/stackframe.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index cb41af5..59c9245 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h @@ -30,7 +30,7 @@ #define STATMASK 0x1f #endif -#ifdef CONFIG_MIPS_MT_SMTC +#if defined(CONFIG_MIPS_MT_SMTC) || defined (CONFIG_MIPS_HW_FIBERS) #include #endif /* CONFIG_MIPS_MT_SMTC */ @@ -162,9 +162,9 @@ .set noat .set reorder mfc0 k0, CP0_STATUS - sll k0, 3 /* extract cu0 bit */ + andi k0,k0,0x10 /* check user mode bit*/ .set noreorder - bltz k0, 8f + beq k0, $0, 8f move k1, sp .set reorder /* Called from user mode, new stack. */