From patchwork Tue Apr 16 00:33:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 236794 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 9F9B92C00C4 for ; Tue, 16 Apr 2013 10:36:36 +1000 (EST) Received: from localhost ([::1]:51877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URtsw-0002FM-Sy for incoming@patchwork.ozlabs.org; Mon, 15 Apr 2013 20:36:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URtsG-0001sb-Mc for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URtsC-0002yK-OC for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:35:52 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:53965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URtsC-0002y1-Cl for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:35:48 -0400 Received: by mail-pd0-f178.google.com with SMTP id w11so2774192pde.9 for ; Mon, 15 Apr 2013 17:35:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=ixTZb9xHco8AVKOdb5hYb98ub/QoJjs6tpXUSkB0pQ8=; b=WQXAq0QKYxPw4ST2RbugirPRJO+p6AWV7Tcg0mtghghV+QNWBFpJPtNTUm6XvKtqQZ PP5x0gJMaVe8p3TNl4YSzjVHwZugjmpnuaX89Is+iwMSJ3fX1Gsi6o8uPtdgnj4i8We0 l8HTqzVsFv7X8xZ7j+GJwonw5etgFkxVrmWttlj4EyddM/ygsfaJGwc0vS+yABhFNgPJ rEbZbIIe3usf6TudsjvibxV4nhmEBxDmnX4PlxvhazNHFCVzyTbuli41R46J9vlSwTr+ +atSCVObnGb4+k5ghTGuc4S1Xiy51if0kdq+Yq900lvS56UeZ1Z71RJVZJmtJICk+zxh fYqQ== X-Received: by 10.66.150.35 with SMTP id uf3mr684631pab.34.1366072547699; Mon, 15 Apr 2013 17:35:47 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPS id ya4sm22176212pbb.24.2013.04.15.17.35.45 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 15 Apr 2013 17:35:46 -0700 (PDT) From: peter.crosthwaite@xilinx.com To: qemu-devel@nongnu.org Date: Tue, 16 Apr 2013 10:33:32 +1000 Message-Id: <1b7a4e4c6a0c132a02b3207455826265677e713b.1366071713.git.peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: X-Gm-Message-State: ALoCoQn+FDsqCcoGU5BFQKOotUT/XEaXEdj+AIqPveCCgcmv9bJ96ACexg2rCrLhsU+OU2MXH13b X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.192.178 Cc: qemu-trivial@nongnu.org, edgar.iglesias@gmail.com Subject: [Qemu-devel] [PATCH v3 2/4] m25p80: Convert guest errors to LOG_GUEST_ERROR 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 From: Peter Crosthwaite Some of the debug printfs in m25p80 are really guest errors. Changed over to qemu_log_mask(LOG_GUEST_ERROR accordingly. Signed-off-by: Peter Crosthwaite --- hw/block/m25p80.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index a524bde..9a24a31 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -319,11 +319,12 @@ static void flash_erase(Flash *s, int offset, FlashCMD cmd) DB_PRINT("offset = %#x, len = %d\n", offset, len); if ((s->pi->flags & capa_to_assert) != capa_to_assert) { - hw_error("m25p80: %d erase size not supported by device\n", len); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: %d erase size not supported by" + " device\n", len); } if (!s->write_enable) { - DB_PRINT("erase with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: erase with write protect!\n"); return; } memset(s->storage + offset, 0xff, len); @@ -345,7 +346,7 @@ void flash_write8(Flash *s, uint64_t addr, uint8_t data) uint8_t prev = s->storage[s->cur_addr]; if (!s->write_enable) { - DB_PRINT("write with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: write with write protect!\n"); } if ((prev ^ data) & data) { @@ -503,13 +504,14 @@ static void decode_new_cmd(Flash *s, uint32_t value) DB_PRINT("chip erase\n"); flash_erase(s, 0, BULK_ERASE); } else { - DB_PRINT("chip erase with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: chip erase with write " + "protect!\n"); } break; case NOP: break; default: - DB_PRINT("Unknown cmd %x\n", value); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: Unknown cmd %x\n", value); break; } }