From patchwork Wed Aug 31 20:38:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 112684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DB176B6F77 for ; Thu, 1 Sep 2011 06:38:44 +1000 (EST) Received: from localhost ([::1]:60479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyrYX-0004aS-CT for incoming@patchwork.ozlabs.org; Wed, 31 Aug 2011 16:38:41 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=yUKBa+7ZV9kA3JMmt3mNtjjCnwgSfix71+gFMbRp8CI=; b=spHk2I2I5VgR/dktaufMyfZ+WO8X1fxrP0jb7osF1estCtt74kknmbL4kbAr/+PZ/3 Ujqujcn05fYiNbtk2LTysLqla3FLFYHVmKik+1z3/qI6l5Kmy7Me10BiQQuauXZj2BvW PRbDsTgz6Nr/VczbX01HEODY5fM2Kg8eADav0= Received: by 10.14.10.77 with SMTP id 53mr483666eeu.191.1314823114027; Wed, 31 Aug 2011 13:38:34 -0700 (PDT) Received: from localhost (h59ec324b.selukar.dyn.perspektivbredband.net [89.236.50.75]) by mx.google.com with ESMTPS id 76sm5029376eee.8.2011.08.31.13.38.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Aug 2011 13:38:33 -0700 (PDT) Date: Wed, 31 Aug 2011 22:38:31 +0200 From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Message-ID: <20110831203831.GC18881@zapo> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.215.45 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH] mips: Support the MT TCStatus IXMT irq disable flag X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;