Received: from eggs.gnu.org ([140.186.70.92]:51374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyrYS-0004aC-Cc for qemu-devel@nongnu.org; Wed, 31 Aug 2011 16:38:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyrYR-0001Ez-7g for qemu-devel@nongnu.org; Wed, 31 Aug 2011 16:38:36 -0400 Received: from mail-ew0-f45.google.com ([209.85.215.45]:53931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyrYR-0001Ec-2s for qemu-devel@nongnu.org; Wed, 31 Aug 2011 16:38:35 -0400 Received: by ewy24 with SMTP id 24so838312ewy.4 for ; Wed, 31 Aug 2011 13:38:34 -0700 (PDT) Date: Wed, 31 Aug 2011 22:38:31 +0200 From: "Edgar E. Iglesias" Message-ID: <20110831203831.GC18881@zapo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] mips: Support the MT TCStatus IXMT irq disable flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno This one goes on top of the recently posted MIPS SMP patches. It allows a linux MIPS SMTC kernel too boot with one VPE and one thread. Multiple threads per core still dont work. Cheers commit 063f70f8faf4b856bd0e3a4d9edac47c7d9aa2d4 Author: Edgar E. Iglesias Date: Tue Aug 30 00:44:28 2011 +0200 mips: Support the MT TCStatus IXMT irq disable flag Signed-off-by: Edgar E. Iglesias diff --git a/target-mips/cpu.h b/target-mips/cpu.h index f6f16a3..79e2558 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -537,6 +537,10 @@ static inline int cpu_mips_hw_interrupts_pending(CPUState *env) if (!(env->CP0_Status & (1 << CP0St_IE)) || (env->CP0_Status & (1 << CP0St_EXL)) || (env->CP0_Status & (1 << CP0St_ERL)) || + /* Note that the TCStatus IXMT field is initialized to zero, + and only MT capable cores can set it to one. So we don't + need to check for MT capabilities here. */ + (env->active_tc.CP0_TCStatus & (1 << CP0TCSt_IXMT)) || (env->hflags & MIPS_HFLAG_DM)) { /* Interrupts are disabled */ return 0;