From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDHuf-0002qq-JV for qemu-devel@nongnu.org; Mon, 30 Jun 2008 07:51:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDHue-0002q2-2Z for qemu-devel@nongnu.org; Mon, 30 Jun 2008 07:51:16 -0400 Received: from [199.232.76.173] (port=51389 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDHud-0002pz-W5 for qemu-devel@nongnu.org; Mon, 30 Jun 2008 07:51:16 -0400 Received: from savannah.gnu.org ([199.232.41.3]:53028 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KDHuc-0007XT-3G for qemu-devel@nongnu.org; Mon, 30 Jun 2008 07:51:14 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KDHub-0003er-80 for qemu-devel@nongnu.org; Mon, 30 Jun 2008 11:51:13 +0000 Received: from edgar_igl by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KDHub-0003en-0y for qemu-devel@nongnu.org; Mon, 30 Jun 2008 11:51:13 +0000 MIME-Version: 1.0 Errors-To: edgar_igl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: "Edgar E. Iglesias" Message-Id: Date: Mon, 30 Jun 2008 11:51:13 +0000 Subject: [Qemu-devel] [4806] Avoid refering to CRIS specific cpu-state to be able to use these blocks with other cores . Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4806 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4806 Author: edgar_igl Date: 2008-06-30 11:51:12 +0000 (Mon, 30 Jun 2008) Log Message: ----------- Avoid refering to CRIS specific cpu-state to be able to use these blocks with other cores. Modified Paths: -------------- trunk/hw/etraxfs_dma.c trunk/hw/etraxfs_eth.c trunk/hw/etraxfs_ser.c trunk/hw/etraxfs_timer.c Modified: trunk/hw/etraxfs_dma.c =================================================================== --- trunk/hw/etraxfs_dma.c 2008-06-30 11:30:34 UTC (rev 4805) +++ trunk/hw/etraxfs_dma.c 2008-06-30 11:51:12 UTC (rev 4806) @@ -353,8 +353,8 @@ { unsigned int cmd = v & ((1 << 10) - 1); - D(printf("%s ch=%d cmd=%x pc=%x\n", - __func__, c, cmd, ctrl->env->pc)); + D(printf("%s ch=%d cmd=%x\n", + __func__, c, cmd)); if (cmd & regk_dma_load_d) { channel_load_d(ctrl, c); if (cmd & regk_dma_burst) @@ -541,8 +541,8 @@ { struct fs_dma_ctrl *ctrl = opaque; CPUState *env = ctrl->env; - cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx - " pc=%x.\n", addr, env->pc); + cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx "\n", + addr); return 0; } @@ -566,8 +566,8 @@ default: r = ctrl->channels[c].regs[addr]; - D(printf ("%s c=%d addr=%x pc=%x\n", - __func__, c, addr, ctrl->env->pc)); + D(printf ("%s c=%d addr=%x\n", + __func__, c, addr)); break; } return r; @@ -578,8 +578,8 @@ { struct fs_dma_ctrl *ctrl = opaque; CPUState *env = ctrl->env; - cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx - " pc=%x.\n", addr, env->pc); + cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx "\n", + addr); } static void @@ -623,14 +623,12 @@ case RW_STREAM_CMD: ctrl->channels[c].regs[addr] = value; - D(printf("stream_cmd ch=%d pc=%x\n", - c, ctrl->env->pc)); + D(printf("stream_cmd ch=%d\n", c)); channel_stream_cmd(ctrl, c, value); break; default: - D(printf ("%s c=%d %x %x pc=%x\n", - __func__, c, addr, value, ctrl->env->pc)); + D(printf ("%s c=%d %x %x\n", __func__, c, addr)); break; } } Modified: trunk/hw/etraxfs_eth.c =================================================================== --- trunk/hw/etraxfs_eth.c 2008-06-30 11:30:34 UTC (rev 4805) +++ trunk/hw/etraxfs_eth.c 2008-06-30 11:51:12 UTC (rev 4806) @@ -330,15 +330,14 @@ { struct fs_eth *eth = opaque; CPUState *env = eth->env; - cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx - " pc=%x.\n", addr, env->pc); + cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx "\n", + addr); return 0; } static uint32_t eth_readl (void *opaque, target_phys_addr_t addr) { struct fs_eth *eth = opaque; - D(CPUState *env = eth->env); uint32_t r = 0; /* Make addr relative to this instances base. */ @@ -350,7 +349,7 @@ break; default: r = eth->regs[addr]; - D(printf ("%s %x p=%x\n", __func__, addr, env->pc)); + D(printf ("%s %x\n", __func__, addr)); break; } return r; @@ -361,8 +360,8 @@ { struct fs_eth *eth = opaque; CPUState *env = eth->env; - cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx - " pc=%x.\n", addr, env->pc); + cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx "\n", + addr); } static void eth_update_ma(struct fs_eth *eth, int ma) Modified: trunk/hw/etraxfs_ser.c =================================================================== --- trunk/hw/etraxfs_ser.c 2008-06-30 11:30:34 UTC (rev 4805) +++ trunk/hw/etraxfs_ser.c 2008-06-30 11:51:12 UTC (rev 4806) @@ -89,7 +89,7 @@ static uint32_t ser_readb (void *opaque, target_phys_addr_t addr) { D(CPUState *env = opaque); - D(printf ("%s %x pc=%x\n", __func__, addr, env->pc)); + D(printf ("%s %x\n", __func__, addr)); return 0; } @@ -132,7 +132,7 @@ break; default: - D(printf ("%s %x p=%x\n", __func__, addr, env->pc)); + D(printf ("%s %x\n", __func__, addr)); break; } return r; @@ -143,7 +143,7 @@ { D(struct etrax_serial_t *s = opaque); D(CPUState *env = s->env); - D(printf ("%s %x %x pc=%x\n", __func__, addr, value, env->pc)); + D(printf ("%s %x %x\n", __func__, addr, value)); } static void ser_writel (void *opaque, target_phys_addr_t addr, uint32_t value) @@ -181,8 +181,7 @@ s->rw_intr_mask = value; break; default: - D(printf ("%s %x %x pc=%x\n", - __func__, addr, value, env->pc)); + D(printf ("%s %x %x\n", __func__, addr, value)); break; } ser_update_irq(s); Modified: trunk/hw/etraxfs_timer.c =================================================================== --- trunk/hw/etraxfs_timer.c 2008-06-30 11:30:34 UTC (rev 4805) +++ trunk/hw/etraxfs_timer.c 2008-06-30 11:51:12 UTC (rev 4806) @@ -80,15 +80,14 @@ { struct fs_timer_t *t = opaque; CPUState *env = t->env; - cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx - " pc=%x.\n", addr, env->pc); + cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx "\n", + addr); return 0; } static uint32_t timer_readl (void *opaque, target_phys_addr_t addr) { struct fs_timer_t *t = opaque; - D(CPUState *env = t->env); uint32_t r = 0; /* Make addr relative to this instances base. */ @@ -109,7 +108,7 @@ r = t->r_intr & t->rw_intr_mask; break; default: - D(printf ("%s %x p=%x\n", __func__, addr, env->pc)); + D(printf ("%s %x\n", __func__, addr)); break; } return r; @@ -120,8 +119,8 @@ { struct fs_timer_t *t = opaque; CPUState *env = t->env; - cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx - " pc=%x.\n", addr, env->pc); + cpu_abort(env, "Unsupported short access. reg=" TARGET_FMT_plx "\n", + addr); } #define TIMER_SLOWDOWN 1 @@ -273,7 +272,6 @@ timer_writel (void *opaque, target_phys_addr_t addr, uint32_t value) { struct fs_timer_t *t = opaque; - CPUState *env = t->env; /* Make addr relative to this instances base. */ addr -= t->base; @@ -309,8 +307,8 @@ t->rw_ack_intr = 0; break; default: - printf ("%s " TARGET_FMT_plx " %x pc=%x\n", - __func__, addr, value, env->pc); + printf ("%s " TARGET_FMT_plx " %x\n", + __func__, addr, value); break; } }