From patchwork Tue Jan 5 23:19:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Igor V. Kovalenko" X-Patchwork-Id: 42237 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A1F90B6EEE for ; Wed, 6 Jan 2010 12:04:41 +1100 (EST) Received: from localhost ([127.0.0.1]:51929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSKKE-0000Q3-SR for incoming@patchwork.ozlabs.org; Tue, 05 Jan 2010 20:04:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSIgh-0007ar-9w for qemu-devel@nongnu.org; Tue, 05 Jan 2010 18:19:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSIgf-0007Yf-PY for qemu-devel@nongnu.org; Tue, 05 Jan 2010 18:19:42 -0500 Received: from [199.232.76.173] (port=35323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSIgf-0007YL-Gf for qemu-devel@nongnu.org; Tue, 05 Jan 2010 18:19:41 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:54407) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSIge-0008JO-LA for qemu-devel@nongnu.org; Tue, 05 Jan 2010 18:19:41 -0500 Received: by mail-fx0-f222.google.com with SMTP id 22so19469351fxm.2 for ; Tue, 05 Jan 2010 15:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:subject:to:from:date :message-id:in-reply-to:references:user-agent:mime-version :content-type:content-transfer-encoding; bh=kZ+c3IvXES4al/+yTwXyuve7cA2L8u6vojR1jW7yWjo=; b=JBzLuQW6fi2c3hRiup3uVcyGIuyuVEeUQfn/DNhx2yvyEnTxyVU590SFEggsby42Kn vxU2da3KAGytNLUOBPQuKBOORbWlR4NevYmuaxQdPjZN9/QsYVLFXUayaHJSkh78Pc+z N2aaovgdj4xjaaywsiGvqb0h6j3kN/NolfK50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:to:from:date:message-id:in-reply-to:references:user-agent :mime-version:content-type:content-transfer-encoding; b=UVEgrjJMJxOtHKBZ0+n6SHKMo9PmqkQcgw2XmYJ/8MG+AOYQgTmnk8FGvnsmy2PS+M 2cJgKY3tIQiuaGR1qxfeolNLN6iRCbmwh+Rcwtpx135neyFtv7TD6mbP9kaqN1h3P9zz gvY133UJWRDpuNaz+GKyVYmZYjMeoZvFWWfAM= Received: by 10.223.94.201 with SMTP id a9mr633559fan.13.1262733579804; Tue, 05 Jan 2010 15:19:39 -0800 (PST) Received: from skyserv (host-87-255-14-75.bigtelecom.ru [87.255.14.75]) by mx.google.com with ESMTPS id 15sm6697858fxm.6.2010.01.05.15.19.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Jan 2010 15:19:39 -0800 (PST) Received: from localhost ([127.0.0.1] helo=[192.168.1.2]) by skyserv with esmtp (Exim 4.71) (envelope-from ) id 1NSIgc-0001lk-HL for qemu-devel@nongnu.org; Wed, 06 Jan 2010 02:19:38 +0300 To: qemu-devel@nongnu.org From: "Igor V. Kovalenko" Date: Wed, 06 Jan 2010 02:19:38 +0300 Message-ID: <20100105231938.6526.88981.stgit@skyserv> In-Reply-To: <20100105231558.6526.44483.stgit@skyserv> References: <20100105231558.6526.44483.stgit@skyserv> User-Agent: StGit/0.15 MIME-Version: 1.0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 7/9] sparc64: move cpu_interrupts_enabled to cpu.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Igor V. Kovalenko - to be used by cpu_check_irqs Signed-off-by: Igor V. Kovalenko --- target-sparc/cpu.h | 13 +++++++++++++ target-sparc/exec.h | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 0dba241..f1584d4 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -566,6 +566,19 @@ static inline int cpu_mmu_index(CPUState *env1) #endif } +static inline int cpu_interrupts_enabled(CPUState *env1) +{ +#if !defined (TARGET_SPARC64) + if (env1->psret != 0) + return 1; +#else + if (env1->pstate & PS_IE) + return 1; +#endif + + return 0; +} + static inline int cpu_fpu_enabled(CPUState *env1) { #if defined(CONFIG_USER_ONLY) diff --git a/target-sparc/exec.h b/target-sparc/exec.h index e120d6f..3e021e9 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -24,19 +24,6 @@ static inline void regs_to_env(void) /* op_helper.c */ void do_interrupt(CPUState *env); -static inline int cpu_interrupts_enabled(CPUState *env1) -{ -#if !defined (TARGET_SPARC64) - if (env1->psret != 0) - return 1; -#else - if (env1->pstate & PS_IE) - return 1; -#endif - - return 0; -} - static inline int cpu_has_work(CPUState *env1) { return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&