From patchwork Thu Oct 25 14:45:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 10656079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A72813A9 for ; Thu, 25 Oct 2018 15:38:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 893922B8F7 for ; Thu, 25 Oct 2018 15:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D4EA2B8FC; Thu, 25 Oct 2018 15:38:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4A8D2B8F7 for ; Thu, 25 Oct 2018 15:38:33 +0000 (UTC) Received: from localhost ([::1]:55225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFhiT-0007cE-1A for patchwork-qemu-devel@patchwork.kernel.org; Thu, 25 Oct 2018 11:38:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFh5P-0004Pv-0n for qemu-devel@nongnu.org; Thu, 25 Oct 2018 10:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFgv8-00088F-7V for qemu-devel@nongnu.org; Thu, 25 Oct 2018 10:47:36 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:44321) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gFgv6-0007sj-My for qemu-devel@nongnu.org; Thu, 25 Oct 2018 10:47:32 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5693F2205C; Thu, 25 Oct 2018 10:46:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 25 Oct 2018 10:46:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=GdJChO6QFX/U3WjsyDMjg5O4nR4qKvkMl6SP4zFAKcI=; b=bAE0I aru912JUBWn1BfX0eSbMop5hAVHFGbmTXvViXffnV+7IWR7uGjKhgRGYn+A5cmGQ GDpI9fVx9tP6bz+opVwTsqX4VwgKO/QgRNMOWKmz/MuQ9KaxcAkiGnU1+qUAqpGt yKlNEY7sIkozkW3C6Uv4LKt4+CvqxK4Yq7ffJg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=GdJChO6QFX/U3WjsyDMjg5O4nR4qK vkMl6SP4zFAKcI=; b=mqFOFHbgHWo7GAkG5dozIC3WQOXjSekgOZXFgLhutJRic 6ou1+t9R8O62Gx/eWpaAICD8zuIUWFgGtcRPOqJ0d5rBca8KNfCAgmo21X6XY58Q g4Yja959RxVDVvObUlC6d/ccHsRVKJErDLYTItzxcD6mXwCyEI4NX0aCYEEPEX+a w5kNQ/RJNhKN0INpwibachb0WJdJjjKdAglGzgdXypsnLj30doDP9hLZ2eKSr8oc fOfONUI+vebxscmhPY4DdYzbHYXpgwkRiXI1oDm4xKw+QTsmG0DZlQ0sXpHlrooO 1ya7FuZSsTn8GTlZLKTrlbgtS121XiaYG6UahzE+g== X-ME-Sender: X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 5A34FE4A44; Thu, 25 Oct 2018 10:46:51 -0400 (EDT) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Thu, 25 Oct 2018 10:45:58 -0400 Message-Id: <20181025144644.15464-25-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025144644.15464-1-cota@braap.org> References: <20181025144644.15464-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 Subject: [Qemu-devel] [RFC v4 25/71] sparc: convert to cpu_halted X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Mark Cave-Ayland , Richard Henderson , Artyom Tarasenko , Fabien Chouteau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Cc: Fabien Chouteau Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée --- hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 8 ++++---- hw/sparc64/sparc64.c | 4 ++-- target/sparc/helper.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index fa98ab8177..0746001f91 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -61,7 +61,7 @@ static void main_cpu_reset(void *opaque) cpu_reset(cpu); - cpu->halted = 0; + cpu_halted_set(cpu, 0); env->pc = s->entry; env->npc = s->entry + 4; env->regbase[6] = s->sp; diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 3c29b68e67..5bd6512b2b 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -168,7 +168,7 @@ static void cpu_kick_irq(SPARCCPU *cpu) CPUSPARCState *env = &cpu->env; CPUState *cs = CPU(cpu); - cs->halted = 0; + cpu_halted_set(cs, 0); cpu_check_irqs(env); qemu_cpu_kick(cs); } @@ -199,7 +199,7 @@ static void main_cpu_reset(void *opaque) CPUState *cs = CPU(cpu); cpu_reset(cs); - cs->halted = 0; + cpu_halted_set(cs, 0); } static void secondary_cpu_reset(void *opaque) @@ -208,7 +208,7 @@ static void secondary_cpu_reset(void *opaque) CPUState *cs = CPU(cpu); cpu_reset(cs); - cs->halted = 1; + cpu_halted_set(cs, 1); } static void cpu_halt_signal(void *opaque, int irq, int level) @@ -825,7 +825,7 @@ static void cpu_devinit(const char *cpu_type, unsigned int id, } else { qemu_register_reset(secondary_cpu_reset, cpu); cs = CPU(cpu); - cs->halted = 1; + cpu_halted_set(cs, 1); } *cpu_irqs = qemu_allocate_irqs(cpu_set_irq, cpu, MAX_PILS); env->prom_addr = prom_addr; diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c index 408388945e..372bbd4f5b 100644 --- a/hw/sparc64/sparc64.c +++ b/hw/sparc64/sparc64.c @@ -100,7 +100,7 @@ static void cpu_kick_irq(SPARCCPU *cpu) CPUState *cs = CPU(cpu); CPUSPARCState *env = &cpu->env; - cs->halted = 0; + cpu_halted_set(cs, 0); cpu_check_irqs(env); qemu_cpu_kick(cs); } @@ -115,7 +115,7 @@ void sparc64_cpu_set_ivec_irq(void *opaque, int irq, int level) if (!(env->ivec_status & 0x20)) { trace_sparc64_cpu_ivec_raise_irq(irq); cs = CPU(cpu); - cs->halted = 0; + cpu_halted_set(cs, 0); env->interrupt_index = TT_IVEC; env->ivec_status |= 0x20; env->ivec_data[0] = (0x1f << 6) | irq; diff --git a/target/sparc/helper.c b/target/sparc/helper.c index 46232788c8..dd00cf7cac 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -245,7 +245,7 @@ void helper_power_down(CPUSPARCState *env) { CPUState *cs = CPU(sparc_env_get_cpu(env)); - cs->halted = 1; + cpu_halted_set(cs, 1); cs->exception_index = EXCP_HLT; env->pc = env->npc; env->npc = env->pc + 4;