From patchwork Wed Mar 14 21:42:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 146786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2E12CB6EEF for ; Thu, 15 Mar 2012 10:46:03 +1100 (EST) Received: from localhost ([::1]:58720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7xtJ-0006eX-2B for incoming@patchwork.ozlabs.org; Wed, 14 Mar 2012 19:46:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7vyu-0005ce-Gt for qemu-devel@nongnu.org; Wed, 14 Mar 2012 17:43:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7vyj-0005ko-HV for qemu-devel@nongnu.org; Wed, 14 Mar 2012 17:43:40 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34970 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7vyi-0005k4-Sl for qemu-devel@nongnu.org; Wed, 14 Mar 2012 17:43:29 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id B3ECC90072; Wed, 14 Mar 2012 22:43:27 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Wed, 14 Mar 2012 22:42:54 +0100 Message-Id: <1331761376-20362-42-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1331761376-20362-1-git-send-email-afaerber@suse.de> References: <1331761376-20362-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Max Filippov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH v5 41/43] xtensa hw/: Don't use CPUState 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 Scripted conversion: for file in hw/xtensa_*.[hc]; do sed -i "s/CPUState/CPUXtensaState/g" $file done Signed-off-by: Andreas Färber Acked-by: Anthony Liguori --- hw/xtensa_lx60.c | 4 ++-- hw/xtensa_pic.c | 16 ++++++++-------- hw/xtensa_sim.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/xtensa_lx60.c b/hw/xtensa_lx60.c index 80ba4d7..afdef49 100644 --- a/hw/xtensa_lx60.c +++ b/hw/xtensa_lx60.c @@ -148,7 +148,7 @@ static uint64_t translate_phys_addr(void *env, uint64_t addr) static void lx60_reset(void *opaque) { - CPUState *env = opaque; + CPUXtensaState *env = opaque; cpu_state_reset(env); } @@ -164,7 +164,7 @@ static void lx_init(const LxBoardDesc *board, int be = 0; #endif MemoryRegion *system_memory = get_system_memory(); - CPUState *env = NULL; + CPUXtensaState *env = NULL; MemoryRegion *ram, *rom, *system_io; DriveInfo *dinfo; pflash_t *flash = NULL; diff --git a/hw/xtensa_pic.c b/hw/xtensa_pic.c index 71d5fc8..653ded6 100644 --- a/hw/xtensa_pic.c +++ b/hw/xtensa_pic.c @@ -29,7 +29,7 @@ #include "qemu-log.h" #include "qemu-timer.h" -void xtensa_advance_ccount(CPUState *env, uint32_t d) +void xtensa_advance_ccount(CPUXtensaState *env, uint32_t d) { uint32_t old_ccount = env->sregs[CCOUNT]; @@ -45,7 +45,7 @@ void xtensa_advance_ccount(CPUState *env, uint32_t d) } } -void check_interrupts(CPUState *env) +void check_interrupts(CPUXtensaState *env) { int minlevel = xtensa_get_cintlevel(env); uint32_t int_set_enabled = env->sregs[INTSET] & env->sregs[INTENABLE]; @@ -84,7 +84,7 @@ void check_interrupts(CPUState *env) static void xtensa_set_irq(void *opaque, int irq, int active) { - CPUState *env = opaque; + CPUXtensaState *env = opaque; if (irq >= env->config->ninterrupt) { qemu_log("%s: bad IRQ %d\n", __func__, irq); @@ -101,12 +101,12 @@ static void xtensa_set_irq(void *opaque, int irq, int active) } } -void xtensa_timer_irq(CPUState *env, uint32_t id, uint32_t active) +void xtensa_timer_irq(CPUXtensaState *env, uint32_t id, uint32_t active) { qemu_set_irq(env->irq_inputs[env->config->timerint[id]], active); } -void xtensa_rearm_ccompare_timer(CPUState *env) +void xtensa_rearm_ccompare_timer(CPUXtensaState *env) { int i; uint32_t wake_ccount = env->sregs[CCOUNT] - 1; @@ -125,7 +125,7 @@ void xtensa_rearm_ccompare_timer(CPUState *env) static void xtensa_ccompare_cb(void *opaque) { - CPUState *env = opaque; + CPUXtensaState *env = opaque; if (env->halted) { env->halt_clock = qemu_get_clock_ns(vm_clock); @@ -137,7 +137,7 @@ static void xtensa_ccompare_cb(void *opaque) } } -void xtensa_irq_init(CPUState *env) +void xtensa_irq_init(CPUXtensaState *env) { env->irq_inputs = (void **)qemu_allocate_irqs( xtensa_set_irq, env, env->config->ninterrupt); @@ -148,7 +148,7 @@ void xtensa_irq_init(CPUState *env) } } -void *xtensa_get_extint(CPUState *env, unsigned extint) +void *xtensa_get_extint(CPUXtensaState *env, unsigned extint) { if (extint < env->config->nextint) { unsigned irq = env->config->extint[extint]; diff --git a/hw/xtensa_sim.c b/hw/xtensa_sim.c index 445cfde..c7e05dc 100644 --- a/hw/xtensa_sim.c +++ b/hw/xtensa_sim.c @@ -47,7 +47,7 @@ static void sim_init(ram_addr_t ram_size, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { - CPUState *env = NULL; + CPUXtensaState *env = NULL; MemoryRegion *ram, *rom; int n;