From patchwork Fri Jun 22 13:40:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933381 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="a7m1IoRj"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0Kt1Zqrz9s1B for ; Fri, 22 Jun 2018 23:49:20 +1000 (AEST) Received: from localhost ([::1]:34073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMRB-0003nb-Ce for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:49:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMIy-0005oU-TW for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:40:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMIy-0002sq-6N for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:40:48 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:45796) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMIy-0002s9-1U; Fri, 22 Jun 2018 09:40:48 -0400 Received: by mail-qt0-x242.google.com with SMTP id i18-v6so5893129qtp.12; Fri, 22 Jun 2018 06:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x5A9yyNDN4c6vjUK92tDsD+YIh1STXvsuJSarWOK7Ww=; b=a7m1IoRjzjo8UA5Rc+0/vgiuA2/tKtHyiM7PbLZjOaI04hfqO5blmc3BsqYC+K4gPc NKV3ljaZINrDc9P35f8Eub9Afc/T0rTzp/CZ6Bu3y+IMaA0rMfaSXyDHe0iUGT8GwfoF oVsGQBEwTdfiueWiaFbAn1B3JIOJvRAjF7pKzGBBXuy8IDQpDOQxMWritBJ5+BAV/3Ne ZwSElchdLklLabJ23P0kkFoBjcxYVrlIRs6evMIoGNB1UB9qXxvLmC22XvTLy/xXmpwv 6rJgG8EfGk3BrQlm+EFkFwiFW8Ml91MujJ+I1uS3uEIFAVdEt2LP3eYiEV2s05UpcWKv m7AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=x5A9yyNDN4c6vjUK92tDsD+YIh1STXvsuJSarWOK7Ww=; b=MRheI4v/NhQh5NDbkv4nQ4ua7ERwLbVWWdptLRbCDECfELYPN38PCdlEHaSNssYKGj K3uu9fnvXXw5x9U4S8Uqt5KNDRWgSZCeWfm0OQCDe4UrepWZ0bizSEvhZI+gQH4i4gq8 dCeqTlXVmNrMyvyHuFlGpartK6mM2royArci7GUoG7iQK48Q0mNgG/Vsa0QkYyn8jKBg lsg/mbjXY0/Dzu66gZqNR6kYkl8HtRzvKzPyexZUc3wEBuNjxUuySHcLZwQyrwdgIyG8 iowZhCa8LPKkFaAosTr+JuEqeJtLUV7yDcGO2MXHSmvvzDj8xKWtAHcmTlmDKjb0boRg 5gBg== X-Gm-Message-State: APt69E3Yg8iQtgBFnDMAy/G5AX2JL9Kuz2axpswDb87jSczGl8FBnjJI TkTU0u/CcDoXSeWNRrwocks= X-Google-Smtp-Source: AAOMgpex9ZgTeLQsH9GRG7aJ045Nn0e3liCWtrwh/qu1H8gT3vcsfdq4WIWEUcRfLrAHd7WIYG4ahQ== X-Received: by 2002:a0c:f54d:: with SMTP id p13-v6mr1403848qvm.149.1529674847431; Fri, 22 Jun 2018 06:40:47 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.40.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:40:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:23 -0300 Message-Id: <20180622134036.23182-2-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PATCH v2 01/14] hw/input/pckbd: Use qemu_log_mask(GUEST_ERROR) instead of fprintf 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: "Michael S. Tsirkin" , qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- hw/input/pckbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index f33e3fc63d..26aeac2326 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" @@ -308,7 +309,8 @@ static void kbd_write_command(void *opaque, hwaddr addr, /* ignore that */ break; default: - fprintf(stderr, "qemu: unsupported keyboard cmd=0x%02x\n", (int)val); + qemu_log_mask(LOG_GUEST_ERROR, + "unsupported keyboard cmd=0x%02lx\n", val); break; } } From patchwork Fri Jun 22 13:40:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933388 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="l/p9whak"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0TL51g0z9s1B for ; Fri, 22 Jun 2018 23:55:50 +1000 (AEST) Received: from localhost ([::1]:34124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMXU-0000z6-AV for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:55:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJ6-0005xP-WF for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:40:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJ3-00030n-EW for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:40:57 -0400 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:33658) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJ3-000301-AS; Fri, 22 Jun 2018 09:40:53 -0400 Received: by mail-qk0-x230.google.com with SMTP id c131-v6so3676450qkb.0; Fri, 22 Jun 2018 06:40:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fHiQErN6yopcx1uS9Z7wFWgWzQ8k9MSYNeu5WE6YAp4=; b=l/p9whakpVaCbIZ3Rfd3dHpN+FREe7/YUtk7I7CA0EgNdQC6cxfDpU/1nfUM3gI1SG kKSAxfIqJgvbqYcRDUeuiBH61kgfuMRtkB/Y2eSSatxleduM+XfOyRM5zxYEfxItTQln oldgAkRK0vjOT3tqwpQAm3Q7tNQEH36GWeCn0YMA5xH+OD55XkZN8c8NyAJmImoVfXVb Mu9NHrr79JDnbhGOTjYHtJDPXudEnOjjm40uVTU1DqLJ4IXGjyv1E6IX+4R5t15vyhaU nvOMUieYV5CGddXMacEJljRhJcDnxsGj85ix1nyMYPWnHnf++dKE8kuZ3u0nYCUo2jzQ hm4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fHiQErN6yopcx1uS9Z7wFWgWzQ8k9MSYNeu5WE6YAp4=; b=Akg6Jklffz8aLit5VGG7KSTxJ3wul0IiFFUFPaf45YLK4wcjKtb9jTLMp9PrDnW2SZ Ptgx9eHpEMRCcTdLKLPPAG4hjpgZrjqal4aPpmV40hNDHfJhBxTCqsU8yHTtZO6vPIe+ hXU08GqB60LlHn7L7LqW5ORnbs2fNPhAWNsrrp4lmUThJDcjlXBCG8avBpmDT65IUKq5 RzAMpZi8AHkX59zu6RQ6Wv1xP79NumYVb/UvR/L1jMQ5sYp1ola7Vl54Cfwd0duP9lNF fxCwZPn8DZYA7hn4stN4kmjWxleCc8Rmv9dDqyUlQJBOCIXlqLiDt7Bxec2O67RxN4pe o9kw== X-Gm-Message-State: APt69E037U8SScE8CEyOZ5t6qleqSDU4i//wINfsTYYw4NqQ4YMEsiju mNQatxoFqLGDiP85X1zNGg4= X-Google-Smtp-Source: ADUXVKKZd2zimhPq4OkCeb71Ma84YxQC5jzO1DvjosHzxsvYSakhIK0/7MlLpBKUBRdZ+4kd8Psclw== X-Received: by 2002:a37:9846:: with SMTP id a67-v6mr1280582qke.219.1529674852708; Fri, 22 Jun 2018 06:40:52 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.40.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:40:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:25 -0300 Message-Id: <20180622134036.23182-4-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::230 Subject: [Qemu-devel] [PATCH v2 03/14] hw/dma/omap_dma: Use qemu_log_mask(UNIMP) instead of printf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/dma/omap_dma.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c index abd18c67ea..ab3a1b0451 100644 --- a/hw/dma/omap_dma.c +++ b/hw/dma/omap_dma.c @@ -18,6 +18,7 @@ * with this program; if not, see . */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu-common.h" #include "qemu/timer.h" #include "hw/arm/omap.h" @@ -1439,8 +1440,9 @@ static int omap_dma_sys_read(struct omap_dma_s *s, int offset, case 0x480: /* DMA_PCh0_SR */ case 0x482: /* DMA_PCh1_SR */ case 0x4c0: /* DMA_PChD_SR_0 */ - printf("%s: Physical Channel Status Registers not implemented.\n", - __func__); + qemu_log_mask(LOG_UNIMP, + "%s: Physical Channel Status Registers not implemented\n", + __func__); *ret = 0xff; break; From patchwork Fri Jun 22 13:40:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PIgSxHmw"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0BF47fyz9s4V for ; Fri, 22 Jun 2018 23:42:44 +1000 (AEST) Received: from localhost ([::1]:34022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMKm-0006vF-G9 for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:42:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJ7-0005xp-9v for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:40:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJ6-00035X-9I for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:40:57 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:45799) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJ6-00034N-2C; Fri, 22 Jun 2018 09:40:56 -0400 Received: by mail-qt0-x244.google.com with SMTP id i18-v6so5893456qtp.12; Fri, 22 Jun 2018 06:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xT+wdDJ0+mzvn9PuSVGwp5pg/05Y7iGYk8C8bIHQifI=; b=PIgSxHmwgOFSGahWVQ/bvRsJuH0WdxdaYm4rgmqLomiUdYIOLOlHHQzGbOj+9pLDGj 4Rlprt284cBABQjW62RDLE6uNM54Og24N3NPk4O+fCIfDpIwXtkwaKJ1fJ+wnh8+7x0p ljfg2oTwK2H/nj/NPskx1AfuB3SIT6WXa/KmWOny8L/pDtCcNlPEIWBSBwXIoohdm3lw gW7P99w2hnEon/ilQB1TuqHSKoj0p6a9fQRhvLjBlGeo2MnSrQ4RkVExjLta1+qMfqIL Z3xnb8Su4Igkp4VmWUhVHVYL65j/3TqVmW/P+8Xy4ZrwP4Mb1IxXo+jv/qX77JRjevvT SgmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xT+wdDJ0+mzvn9PuSVGwp5pg/05Y7iGYk8C8bIHQifI=; b=aowrigDe6YfOIiWmfXTV+AE9To6TYYBCQ2n96aNiHX2ON+KBIwcdg7wqvpvUvtrcsS r6ZpuKdC0rGC6vrNoBTK5ZZQ8FlZb7SNmeZiqEirogKtHS529x+iYXOyVmWk24A07HIq 6bdl++knL6HwFtO7qG1yhX1OWeES+Bp5YA9FLuCPpkNOC6Des6KAC5Vynlhy60amYy9D SusFwwB7mbbVB5zoaRtN7yJcmii8CDmTrpzzanvEtl7rhbnb+0rUjs4Q6d56ya0jpJkb l6GYN8Qxt9Ta5b9A/s941EatCiXSsQvLSI9cFGYnambsYjpJtqWB7YEFmzH2QMhC/vDg T8CA== X-Gm-Message-State: APt69E0OrcHBieQxtzz2gT0wLtZo2Zjru2v91Kr+spnTLof+exZ5qe5n h/BWFF4TrqBMRTzE6whDGP4= X-Google-Smtp-Source: AAOMgpdGsiASwxrwbgiiMsIai+0see8cK5olFT73F93VPa6o6aGdvEe1MPEnFzOWTj8IUAyp/iAS2A== X-Received: by 2002:a0c:b084:: with SMTP id o4-v6mr1417193qvc.133.1529674855323; Fri, 22 Jun 2018 06:40:55 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.40.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:40:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:26 -0300 Message-Id: <20180622134036.23182-5-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [PATCH v2 04/14] hw/dma/omap_dma: Use qemu_log_mask(GUEST_ERROR) instead of fprintf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/dma/omap_dma.c | 64 +++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c index ab3a1b0451..cbb920f31d 100644 --- a/hw/dma/omap_dma.c +++ b/hw/dma/omap_dma.c @@ -879,15 +879,18 @@ static int omap_dma_ch_reg_write(struct omap_dma_s *s, ch->burst[0] = (value & 0x0180) >> 7; ch->pack[0] = (value & 0x0040) >> 6; ch->port[0] = (enum omap_dma_port) ((value & 0x003c) >> 2); - if (ch->port[0] >= __omap_dma_port_last) - printf("%s: invalid DMA port %i\n", __func__, - ch->port[0]); - if (ch->port[1] >= __omap_dma_port_last) - printf("%s: invalid DMA port %i\n", __func__, - ch->port[1]); + if (ch->port[0] >= __omap_dma_port_last) { + qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid DMA port %i\n", + __func__, ch->port[0]); + } + if (ch->port[1] >= __omap_dma_port_last) { + qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid DMA port %i\n", + __func__, ch->port[1]); + } ch->data_type = 1 << (value & 3); if ((value & 3) == 3) { - printf("%s: bad data_type for DMA channel\n", __func__); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: bad data_type for DMA channel\n", __func__); ch->data_type >>= 1; } break; @@ -1899,14 +1902,18 @@ static void omap_dma4_write(void *opaque, hwaddr addr, if (value & 2) /* SOFTRESET */ omap_dma_reset(s->dma); s->ocp = value & 0x3321; - if (((s->ocp >> 12) & 3) == 3) /* MIDLEMODE */ - fprintf(stderr, "%s: invalid DMA power mode\n", __func__); + if (((s->ocp >> 12) & 3) == 3) { /* MIDLEMODE */ + qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid DMA power mode\n", + __func__); + } return; case 0x78: /* DMA4_GCR */ s->gcr = value & 0x00ff00ff; - if ((value & 0xff) == 0x00) /* MAX_CHANNEL_FIFO_DEPTH */ - fprintf(stderr, "%s: wrong FIFO depth in GCR\n", __func__); + if ((value & 0xff) == 0x00) { /* MAX_CHANNEL_FIFO_DEPTH */ + qemu_log_mask(LOG_GUEST_ERROR, "%s: wrong FIFO depth in GCR\n", + __func__); + } return; case 0x80 ... 0xfff: @@ -1935,9 +1942,11 @@ static void omap_dma4_write(void *opaque, hwaddr addr, case 0x00: /* DMA4_CCR */ ch->buf_disable = (value >> 25) & 1; ch->src_sync = (value >> 24) & 1; /* XXX For CamDMA must be 1 */ - if (ch->buf_disable && !ch->src_sync) - fprintf(stderr, "%s: Buffering disable is not allowed in " - "destination synchronised mode\n", __func__); + if (ch->buf_disable && !ch->src_sync) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Buffering disable is not allowed in " + "destination synchronised mode\n", __func__); + } ch->prefetch = (value >> 23) & 1; ch->bs = (value >> 18) & 1; ch->transparent_copy = (value >> 17) & 1; @@ -1947,9 +1956,11 @@ static void omap_dma4_write(void *opaque, hwaddr addr, ch->suspend = (value & 0x0100) >> 8; ch->priority = (value & 0x0040) >> 6; ch->fs = (value & 0x0020) >> 5; - if (ch->fs && ch->bs && ch->mode[0] && ch->mode[1]) - fprintf(stderr, "%s: For a packet transfer at least one port " - "must be constant-addressed\n", __func__); + if (ch->fs && ch->bs && ch->mode[0] && ch->mode[1]) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: For a packet transfer at least one port " + "must be constant-addressed\n", __func__); + } ch->sync = (value & 0x001f) | ((value >> 14) & 0x0060); /* XXX must be 0x01 for CamDMA */ @@ -1978,9 +1989,11 @@ static void omap_dma4_write(void *opaque, hwaddr addr, ch->endian_lock[0] =(value >> 20) & 1; ch->endian[1] =(value >> 19) & 1; ch->endian_lock[1] =(value >> 18) & 1; - if (ch->endian[0] != ch->endian[1]) - fprintf(stderr, "%s: DMA endianness conversion enable attempt\n", - __func__); + if (ch->endian[0] != ch->endian[1]) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: DMA endianness conversion enable attempt\n", + __func__); + } ch->write_mode = (value >> 16) & 3; ch->burst[1] = (value & 0xc000) >> 14; ch->pack[1] = (value & 0x2000) >> 13; @@ -1988,12 +2001,15 @@ static void omap_dma4_write(void *opaque, hwaddr addr, ch->burst[0] = (value & 0x0180) >> 7; ch->pack[0] = (value & 0x0040) >> 6; ch->translate[0] = (value & 0x003c) >> 2; - if (ch->translate[0] | ch->translate[1]) - fprintf(stderr, "%s: bad MReqAddressTranslate sideband signal\n", - __func__); + if (ch->translate[0] | ch->translate[1]) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: bad MReqAddressTranslate sideband signal\n", + __func__); + } ch->data_type = 1 << (value & 3); if ((value & 3) == 3) { - printf("%s: bad data_type for DMA channel\n", __func__); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: bad data_type for DMA channel\n", __func__); ch->data_type >>= 1; } break; From patchwork Fri Jun 22 13:40:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aDSkZroW"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0Xk6KVkz9s1B for ; Fri, 22 Jun 2018 23:58:46 +1000 (AEST) Received: from localhost ([::1]:34153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMaK-0003MM-ED for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:58:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJA-00060K-1a for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJ8-0003Bx-UG for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:00 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:47057) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJ8-0003AW-QE; Fri, 22 Jun 2018 09:40:58 -0400 Received: by mail-qt0-x243.google.com with SMTP id h5-v6so5888896qtm.13; Fri, 22 Jun 2018 06:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0mutGa0sDmrzFg5daZsr8Rt8Y88n2i/QbM/UUL4yJrc=; b=aDSkZroWWSODVCXrLp7bVTWLYCuA+caAGKpgSKO/3tWUBDbgPkIK2gLDIU72FjbyK4 rP1IxC6p0a/nkqvV96tIJCu0L21jK6MPuECfMe7/eo2iuT7zoTSShSZWT40JCnCuDCRN UqoUUrM3WNH4JCV7f6JyCKsu1vBfKi6H2hktmW8ord4KF33Z2nGGvy3bVeIFaybMGfPQ DrSACd1eQeHu0O+5GoFQeRdtaSJHBSDCHeu8pqTlWaFyZwGYJg5e++yUaNPQOTF3sQXO 8+LGgwsQy/1O2fls/CukZRTClmAmC2Ii5Y4heJcilBkY6Dt6ydUHgdRZeiXAWFKT5w5S 1T1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0mutGa0sDmrzFg5daZsr8Rt8Y88n2i/QbM/UUL4yJrc=; b=hwh8Kdu43BfFQfDybZbywI5XDtEhZH6WWcJsrqtwdrwNS/D+nN6yjq/bsYh92YaRxB WZezwyG9mNh6LwjxgTKmT0FONF9iar1/6SjUK//pCEj93WdUFSwUEBmJhTO9kleZHdHY LnHiZA57S55R0J8iAh/kAaFJlZGGCRMozrarCPX9qauQ/buYRZ79y3PlZp/XutRUAYWt oPQU4E56T6/PByU8dpST4QMlhnvq7agGA+Ps9AUml+VjThuidX2lYoW+sduOJq770yzG bEgR71Y2H1P4HA0pqWzGsTEq3sDeC86IWFBeSHbyeA8ryN4tPoOs4XiYsWtqSmKCS8EU yxWw== X-Gm-Message-State: APt69E0YY3fxWGPGsDL0HOT+iWh8CD5mgZad4cJM7I3rDgkr91ABGjoj wVBGhg1cn4iyjJhliwG3VsQ= X-Google-Smtp-Source: AAOMgpfJxuritr8ixVtsc7QKjgPuKnflKTzsJnVLjd986S1ffUNfD/V1yY9lCmIBrHF1wsYX+mE31w== X-Received: by 2002:a0c:f54d:: with SMTP id p13-v6mr1404371qvm.149.1529674858134; Fri, 22 Jun 2018 06:40:58 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.40.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:40:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:27 -0300 Message-Id: <20180622134036.23182-6-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH v2 05/14] hw/ssi/omap_spi: Use qemu_log_mask(GUEST_ERROR) instead of fprintf 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: Peter Crosthwaite , qemu-trivial@nongnu.org, Alistair Francis , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , qemu-devel@nongnu.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/ssi/omap_spi.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/ssi/omap_spi.c b/hw/ssi/omap_spi.c index 34163e5646..f278a55160 100644 --- a/hw/ssi/omap_spi.c +++ b/hw/ssi/omap_spi.c @@ -20,6 +20,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/arm/omap.h" @@ -294,11 +295,15 @@ static void omap_mcspi_write(void *opaque, hwaddr addr, case 0x2c: /* MCSPI_CHCONF */ if ((value ^ s->ch[ch].config) & (3 << 14)) /* DMAR | DMAW */ omap_mcspi_dmarequest_update(s->ch + ch); - if (((value >> 12) & 3) == 3) /* TRM */ - fprintf(stderr, "%s: invalid TRM value (3)\n", __func__); - if (((value >> 7) & 0x1f) < 3) /* WL */ - fprintf(stderr, "%s: invalid WL value (%" PRIx64 ")\n", - __func__, (value >> 7) & 0x1f); + if (((value >> 12) & 3) == 3) { /* TRM */ + qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid TRM value (3)\n", + __func__); + } + if (((value >> 7) & 0x1f) < 3) { /* WL */ + qemu_log_mask(LOG_GUEST_ERROR, + "%s: invalid WL value (%" PRIx64 ")\n", + __func__, (value >> 7) & 0x1f); + } s->ch[ch].config = value & 0x7fffff; break; From patchwork Fri Jun 22 13:40:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YDTeY0k9"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0Fv1CFSz9s1B for ; Fri, 22 Jun 2018 23:45:55 +1000 (AEST) Received: from localhost ([::1]:34043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMNs-0001MK-Pm for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:45:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJC-00063T-Hs for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJB-0003JC-IP for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:02 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:43057) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJB-0003IA-Di; Fri, 22 Jun 2018 09:41:01 -0400 Received: by mail-qt0-x244.google.com with SMTP id y89-v6so5899367qtd.10; Fri, 22 Jun 2018 06:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uRGpaP9vdmbS62h1hqhwUmyNT6CxmmALvdK2uBT+F0w=; b=YDTeY0k9OxY2ngRZhTxeKECzsEbYi0v7gQrJnwyr02pGpZUnaSK0eBB+gO+INPOAeO pS2wLlqlo3nncJ00ld7vXEwz7ge8uIzql3VB2pH+rLkumlJMSKwGou+bxwpPY+b9r8lw qHEPN6mn9U10/rsmzYvt1vHFg/bkDJmPS18IHrw96iyTLJzK+PhOFNNp4AE6MRheW8pS qnNdKztAnxcL1XzwMO+vqkNYyfPfli3rTEdRRjBe8b9wlb/ppwE9dXUk+4vm3/cfIu4Z l3ck4lMwUkovWncy1wk3CVfe5MgwVfbTFZUZpqTTKbvb3ghXGGm2xYwIwDZUJnFL1fJm CKDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uRGpaP9vdmbS62h1hqhwUmyNT6CxmmALvdK2uBT+F0w=; b=XEUf5IDJq2C7NG+jUhgn8ne3FhuxZBLdO8hI/F0FCgHzn7ZXSLApUlOZ4Cm/iyo32p oJIxACbk74BwGZUxaJTw0CRCMtZQ7J3SBp5ky3O23f5vNJzw2EK8ZBv00vRSsPdmB7d8 bHKNf4l3LE1s3XswqGPjFtRo9BI/P04LbBjhCL1rCAqB8g2/NJtpdJRhcur3O3fSdn8w KwbowXs2Cb7/kZ+4JH6vIcZ9L9d/dTpxPBwck3TFgL4EJZuymw8aBijiJZWJ7iOvuu1w CpC3tO98aHFQrbBAvI+w+bm//RkcP8vKONqWoQJ2SaMgrDuPSgNveXGdR73gcSkVkdJd 6sWg== X-Gm-Message-State: APt69E31Vl6UKFhUgLTFTiIFc2saaAFxPoscrhxthLLiWsu10zIYmy/1 7xAmm/rC29hq7RlkglX/wJE= X-Google-Smtp-Source: AAOMgpcV4ywzJ7Cy3l7VBUWCEQOQZRiFGPXA302BwpQO8BjlrXZZ0gGGDaAc9XKNkHf9xPrDC2SCRg== X-Received: by 2002:a0c:e0c7:: with SMTP id x7-v6mr1411553qvk.113.1529674860903; Fri, 22 Jun 2018 06:41:00 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.40.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:28 -0300 Message-Id: <20180622134036.23182-7-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [PATCH v2 06/14] hw/sd/omap_mmc: Use qemu_log_mask(UNIMP) instead of printf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/sd/omap_mmc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c index 5b47cadf11..aa2a816f76 100644 --- a/hw/sd/omap_mmc.c +++ b/hw/sd/omap_mmc.c @@ -17,6 +17,7 @@ * with this program; if not, see . */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/arm/omap.h" #include "hw/sd/sd.h" @@ -449,10 +450,14 @@ static void omap_mmc_write(void *opaque, hwaddr offset, s->enable = (value >> 11) & 1; s->be = (value >> 10) & 1; s->clkdiv = (value >> 0) & (s->rev >= 2 ? 0x3ff : 0xff); - if (s->mode != 0) - printf("SD mode %i unimplemented!\n", s->mode); - if (s->be != 0) - printf("SD FIFO byte sex unimplemented!\n"); + if (s->mode != 0) { + qemu_log_mask(LOG_UNIMP, + "omap_mmc_wr: mode #%i unimplemented\n", s->mode); + } + if (s->be != 0) { + qemu_log_mask(LOG_UNIMP, + "omap_mmc_wr: Big Endian not implemented\n"); + } if (s->dw != 0 && s->lines < 4) printf("4-bit SD bus enabled\n"); if (!s->enable) From patchwork Fri Jun 22 13:40:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EEXDmLEP"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0cV21twz9s1B for ; Sat, 23 Jun 2018 00:02:02 +1000 (AEST) Received: from localhost ([::1]:34188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMdT-0006Jt-RK for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 10:01:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJH-00067c-25 for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJE-0003OE-D1 for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:07 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:40631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJE-0003NV-7K; Fri, 22 Jun 2018 09:41:04 -0400 Received: by mail-qk0-x232.google.com with SMTP id b129-v6so3660966qke.7; Fri, 22 Jun 2018 06:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9sCP0/1z6bl6hGhJNNvahAaExTnmCvOayGAPqQXr47Y=; b=EEXDmLEPV6PIQuLJih3jmkeWYzOKMjAe2YEiJipUxwFsGVtHbKjjL9KFytIDmarVEH S2UzGp9TfZdSLOU8oox8Ne0B8DbyF/GIaRsTr4VTi45VYJJ6NavqaBMysg6e20aURf3g Ehy4RWG3i5g9+HAiBKi0DYPhu44amB8rAB4bEWZWlmf5OxquMA7H67P5wekkO0uItcBj Vful46VbtxoTwXxZdzf7UE3I69y0H5CoJB/fgnZVQwyzAtiz3tlH1h+99/6lOrYVwovM fFuwpJPcTLDFy7DO1/V42eoI+XsELiDkCWry2Vh0GrYEd++kAXzF8Y+hm/+pvklIU4uw KkZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9sCP0/1z6bl6hGhJNNvahAaExTnmCvOayGAPqQXr47Y=; b=PjQpygvXBkrUsdwE9Qsdy5ogGu77gtDiTouX5KcklGlQWZfvwpyUbdGizgN2tyFPK9 jiMI27jDZwdTESjObEp6xxKeJPjbHU+pPuz6di8q/9muZItQRTVS3mBiqf0+RhJMRi2k N4prBRaTi20Z2Jx8t6D2V4FXREdcioHxmZhV1GCHjGgE0oj6wiIASGIN8DKYivjpgXaL VAd3z+/rlOCD/VQcBL5YBNq5p0d+V31QssyAZ4hAB2NeWt5Mlu1xhdSLzLgZr8qSXX/9 W6cE3M/DsmGHLOKHN2LZgP7g6UdFSRbL7eZpTcPRTqk/UeZsvZLSnkhmpL6OzvIuQihf dERg== X-Gm-Message-State: APt69E1SDWPBQLCUQCVj1M5JTxpiNbC/KvZ3kep61pvTLv4GLJidTuOe qSRPK8PNDkBpMdSHwRnscUU= X-Google-Smtp-Source: ADUXVKI4Xwf1Q57XdGU4vSSGUfJMUjSL8sx1qbNk4ujUEx/IrgBStPD0AB2DDro+42mOGut507qcVA== X-Received: by 2002:a37:2dc7:: with SMTP id t190-v6mr1258043qkh.229.1529674863464; Fri, 22 Jun 2018 06:41:03 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:29 -0300 Message-Id: <20180622134036.23182-8-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::232 Subject: [Qemu-devel] [PATCH v2 07/14] hw/i2c/omap_i2c: Use qemu_log_mask(UNIMP) instead of fprintf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/i2c/omap_i2c.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c index 26e3e5ebf6..690876e43e 100644 --- a/hw/i2c/omap_i2c.c +++ b/hw/i2c/omap_i2c.c @@ -17,6 +17,7 @@ * with this program; if not, see . */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/i2c/i2c.h" #include "hw/arm/omap.h" @@ -339,14 +340,15 @@ static void omap_i2c_write(void *opaque, hwaddr addr, } break; } - if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */ - fprintf(stderr, "%s: I^2C slave mode not supported\n", - __func__); + if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */ + qemu_log_mask(LOG_UNIMP, "%s: I^2C slave mode not supported\n", + __func__); break; } - if ((value & (1 << 15)) && value & (1 << 8)) { /* XA */ - fprintf(stderr, "%s: 10-bit addressing mode not supported\n", - __func__); + if ((value & (1 << 15)) && value & (1 << 8)) { /* XA */ + qemu_log_mask(LOG_UNIMP, + "%s: 10-bit addressing mode not supported\n", + __func__); break; } if ((value & (1 << 15)) && value & (1 << 0)) { /* STT */ @@ -392,8 +394,10 @@ static void omap_i2c_write(void *opaque, hwaddr addr, s->stat |= 0x3f; omap_i2c_interrupts_update(s); } - if (value & (1 << 15)) /* ST_EN */ - fprintf(stderr, "%s: System Test not supported\n", __func__); + if (value & (1 << 15)) { /* ST_EN */ + qemu_log_mask(LOG_UNIMP, + "%s: System Test not supported\n", __func__); + } break; default: From patchwork Fri Jun 22 13:40:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933383 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ZkTaWOkX"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0LQ2mKnz9s2t for ; Fri, 22 Jun 2018 23:49:50 +1000 (AEST) Received: from localhost ([::1]:34081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMRf-0004DQ-Ux for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:49:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJH-00068I-QA for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJG-0003Qd-Rf for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:07 -0400 Received: from mail-qt0-x22b.google.com ([2607:f8b0:400d:c0d::22b]:37456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJG-0003QP-NA; Fri, 22 Jun 2018 09:41:06 -0400 Received: by mail-qt0-x22b.google.com with SMTP id a18-v6so5922156qtj.4; Fri, 22 Jun 2018 06:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4jITap4zCLIMmBm7Af3WQ1M73+xzncSdrYZfIqepkTI=; b=ZkTaWOkXooUUZ6dRxXtHzp6aV4gc7ZHAUBHeqy1GBPemIyP8BA4BinkGoekz9nOMDa 0sM8hzeC0vlFIsfJRLOIoZHdDpZVGd1FnJeOkrmh0w4JnPKQZ656zlxZ7nocrbGLI6GB tC1M90l5gDkMjOzINStYdGjCYuxrp/gaJ+XMfgQjHBGxwgNNNKXy60Grm35YXAasJ3UE Bkdr4cT86bqnSYkjklpRq7ON1baUzoikxnHUiSwj6O68rtc8es2/may7cAAsw+ngmSZ+ PlXUEzh9SSYl1497j9t2nm4JssYo6hCFR75/VB+GXg8NoZOIidniSyk2kRJkobtjsl9e 9KEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4jITap4zCLIMmBm7Af3WQ1M73+xzncSdrYZfIqepkTI=; b=PSaIFHWd+zWwtjb9LTxYN9cLTdE6yQgcNkhJeFwikavC+fH6DB7YuWBxHUwWcfNLh8 06A49hNekvb2RL9cSjN6xslhyTZdHnk6Rg2SDBNTSjBSCumbRpWy9N7weDF9De0LHUP6 2xcEWbnQFARhDZpABGlCPVa0HnzlNxI7NamHD7x4TB/N5gUJuZWB415yPWZzwbLov1bf RF1sE0w9IMJlhepZ5wHt5E+8tZ+ALLOlhwWHydjlXL2jifR7R2mQRKJ9aoK5f1PeNUrT 6vKyrPArwXPuxVlyU2qZMXa/ozDoDNVysM8p07Xl/ncW1HwCAwDL5FfXfNOmc6MdnWG4 29WQ== X-Gm-Message-State: APt69E2eyv4QTxsyTNq3kjR8iHEdILdoWapRPUZ7tDWkxKRJdYNrj4Py ezOsO7+8T1LBvzywE9e4Ll4= X-Google-Smtp-Source: ADUXVKL8myaRMzRKvmmhddKo9pajZ4mEzKlFm43ehMYFAUT1RQxZwBfHUWGsSdfyBuKYebKOMPe71A== X-Received: by 2002:aed:3ce8:: with SMTP id e37-v6mr1382820qtf.295.1529674866159; Fri, 22 Jun 2018 06:41:06 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:30 -0300 Message-Id: <20180622134036.23182-9-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22b Subject: [Qemu-devel] [PATCH v2 08/14] hw/arm/omap1: Use qemu_log_mask(GUEST_ERROR) instead of fprintf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" TCMI_VERBOSE is no more used, drop the OMAP_8/16/32B_REG macros. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/hw/arm/omap.h | 18 ------------------ hw/arm/omap1.c | 18 ++++++++++++------ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index b398607b06..39abba753d 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -993,24 +993,6 @@ enum { #define OMAP_GPIOSW_INVERTED 0x0001 #define OMAP_GPIOSW_OUTPUT 0x0002 -# define TCMI_VERBOSE 1 - -# ifdef TCMI_VERBOSE -# define OMAP_8B_REG(paddr) \ - fprintf(stderr, "%s: 8-bit register " OMAP_FMT_plx "\n", \ - __func__, paddr) -# define OMAP_16B_REG(paddr) \ - fprintf(stderr, "%s: 16-bit register " OMAP_FMT_plx "\n", \ - __func__, paddr) -# define OMAP_32B_REG(paddr) \ - fprintf(stderr, "%s: 32-bit register " OMAP_FMT_plx "\n", \ - __func__, paddr) -# else -# define OMAP_8B_REG(paddr) -# define OMAP_16B_REG(paddr) -# define OMAP_32B_REG(paddr) -# endif - # define OMAP_MPUI_REG_MASK 0x000007ff #endif /* hw_omap_h */ diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 9af04728e3..539d29ef9c 100644 --- a/hw/arm/omap1.c +++ b/hw/arm/omap1.c @@ -34,12 +34,18 @@ #include "qemu/cutils.h" #include "qemu/bcd.h" +static inline void omap_log_badwidth(const char *funcname, hwaddr addr, int sz) +{ + qemu_log_mask(LOG_GUEST_ERROR, "%s: %d-bit register %#08" HWADDR_PRIx "\n", + funcname, sz << 2, addr); +} + /* Should signal the TCMI/GPMC */ uint32_t omap_badwidth_read8(void *opaque, hwaddr addr) { uint8_t ret; - OMAP_8B_REG(addr); + omap_log_badwidth(__func__, addr, 1); cpu_physical_memory_read(addr, &ret, 1); return ret; } @@ -49,7 +55,7 @@ void omap_badwidth_write8(void *opaque, hwaddr addr, { uint8_t val8 = value; - OMAP_8B_REG(addr); + omap_log_badwidth(__func__, addr, 1); cpu_physical_memory_write(addr, &val8, 1); } @@ -57,7 +63,7 @@ uint32_t omap_badwidth_read16(void *opaque, hwaddr addr) { uint16_t ret; - OMAP_16B_REG(addr); + omap_log_badwidth(__func__, addr, 2); cpu_physical_memory_read(addr, &ret, 2); return ret; } @@ -67,7 +73,7 @@ void omap_badwidth_write16(void *opaque, hwaddr addr, { uint16_t val16 = value; - OMAP_16B_REG(addr); + omap_log_badwidth(__func__, addr, 2); cpu_physical_memory_write(addr, &val16, 2); } @@ -75,7 +81,7 @@ uint32_t omap_badwidth_read32(void *opaque, hwaddr addr) { uint32_t ret; - OMAP_32B_REG(addr); + omap_log_badwidth(__func__, addr, 4); cpu_physical_memory_read(addr, &ret, 4); return ret; } @@ -83,7 +89,7 @@ uint32_t omap_badwidth_read32(void *opaque, hwaddr addr) void omap_badwidth_write32(void *opaque, hwaddr addr, uint32_t value) { - OMAP_32B_REG(addr); + omap_log_badwidth(__func__, addr, 4); cpu_physical_memory_write(addr, &value, 4); } From patchwork Fri Jun 22 13:40:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hIjR83rn"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0QV0S3Cz9ryk for ; Fri, 22 Jun 2018 23:53:22 +1000 (AEST) Received: from localhost ([::1]:34107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMV5-00071i-LW for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:53:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJK-0006BT-ID for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJJ-0003Vc-NZ for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:10 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:43858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJJ-0003UJ-GF; Fri, 22 Jun 2018 09:41:09 -0400 Received: by mail-qk0-x244.google.com with SMTP id s190-v6so3653711qke.10; Fri, 22 Jun 2018 06:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pfJpIm8zi7ra13uUzO7wM7N/UlRPWWku/UzRGCt+ygE=; b=hIjR83rnnsLlF+ejaBQQamvy1nrqUnmZiOCnFCxkCnET35TcALWssiK46ImVrKoM8p +KFjTM7cvhUZXmYlp4MXh0a07OAlZA/yO1BVcaEl13Bp5GblIeN70BkATtEP4HwiphGQ FHsrlMyfeMf7ik4eF8n75S0IFuxgyHoKYhtgiBWBorFNk+J4hsMsTDrhMMR5fObTR9iM BWkjpCe4nylrzCRy+oHHm/Sa0eVySzL/ciU2EfYN4VKPqLKW8VPZjfeWOrXJ8DyS0bfi k/Mj1FmJW1eJPbitt+ovNWI8X7TNdS6xQqfaC7mGyjVxHP93dVBd/wGtTud0zEkge8ND VfyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pfJpIm8zi7ra13uUzO7wM7N/UlRPWWku/UzRGCt+ygE=; b=GhxUCG6pVCigfc8fpVTZrh3yQEuNmopLPsf+mkm2hVmoWJaDgI92SKZ+Ty4Oo/afmY xoJMQRYF0+/zeLcsGoJWd+AaSVQBVVavPa11GURy86kZJBJS+7MPb6a/UzUHYKCCTCcK LiMnrYULkK+Z28L0l2KlHborWag+Y29HleATRHXno9NcmkO8eC7eeJLu6jUT1kZyzx+p h/uZBDtw+B1Co7/nMFb0XiDglq8LeIaxUoMrVMIbrThUTbRJKHJKTdB8kYru+fOkYbN7 PWvjqpcNfPQV1HX4m7YJLlu3hjIw8f48TsdUZGMSzti5acTmYNal4pzdllSeflmaVLcf SVMg== X-Gm-Message-State: APt69E0Nxf25SA0b2exuTT+mvQ6ebF2O2YXu7rQNN+EMra7GA5aITTuN +a1kSDF3kRlE1kJ6YeigODc= X-Google-Smtp-Source: ADUXVKKkhcl+hbMXQYfbrcYSmNVFOgTpAETg5RDv4KUfKtNb5voozBLw4vJ3tAiJNSYNE0GQMSAc3w== X-Received: by 2002:a37:17e3:: with SMTP id 96-v6mr1329886qkx.304.1529674868892; Fri, 22 Jun 2018 06:41:08 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:31 -0300 Message-Id: <20180622134036.23182-10-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PATCH v2 09/14] hw/arm/omap: Use qemu_log_mask(GUEST_ERROR) instead of fprintf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/omap.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 39abba753d..3867687b8c 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -21,6 +21,7 @@ # define hw_omap_h "omap.h" #include "hw/irq.h" #include "target/arm/cpu-qom.h" +#include "qemu/log.h" # define OMAP_EMIFS_BASE 0x00000000 # define OMAP2_Q0_BASE 0x00000000 @@ -962,8 +963,8 @@ void omap_mpu_wakeup(void *opaque, int irq, int req); fprintf(stderr, "%s: Bad register " OMAP_FMT_plx "\n", \ __func__, paddr) # define OMAP_RO_REG(paddr) \ - fprintf(stderr, "%s: Read-only register " OMAP_FMT_plx "\n", \ - __func__, paddr) + qemu_log_mask(LOG_GUEST_ERROR, "%s: Read-only register " OMAP_FMT_plx \ + "\n", __func__, paddr) /* OMAP-specific Linux bootloader tags for the ATAG_BOARD area (Board-specifc tags are not here) */ From patchwork Fri Jun 22 13:40:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933389 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CwvMWg5y"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0Tr5R7kz9ryk for ; Fri, 22 Jun 2018 23:56:16 +1000 (AEST) Received: from localhost ([::1]:34129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMXu-0001M6-B4 for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:56:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJP-0006H3-Ul for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJM-0003Z7-0H for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:16 -0400 Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:44607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJL-0003Y6-Sa; Fri, 22 Jun 2018 09:41:11 -0400 Received: by mail-qk0-x22e.google.com with SMTP id 185-v6so3661475qkk.11; Fri, 22 Jun 2018 06:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KhQeiHbv2jQeMnU8i4jHe6xMTLfXjGUU7tfSsxgUwrA=; b=CwvMWg5yg3st5XiqqasivnnCWxphTUYDIR9NxTnw4EMGFVzp4758ulXG8mybdwrJA3 ovsBnVJzM69J67UcgUPjHucLV6R+73kNJilMFYGljH8RusO68TaFpxR9SeflpG/aea03 IVlA/UrVbzV+x9K0NyL6CBz/ECJIjv3S1WPRz/zAsQdJ65O68MvmR/xM33NvGqKRErAO 0I3QwUHvztDJ4V7UKaLi8H+t/WZy1XwKHPKXVo6ayarxsdlb/uJBdq1iLLdOj4KmiX3c SkgHrLsdx0OKA59/YMA/7znirWLFAQ+Y+LDaM41au3edXvwe/47WVD+bV1QHv27ZJNYJ 8O0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KhQeiHbv2jQeMnU8i4jHe6xMTLfXjGUU7tfSsxgUwrA=; b=Bb/o34tDvwC8HHdK6l+QEExeV0FCKVLGG6v55k3SCe16a+pzmNT0j4RrYIwWRAO9mv e08W0kC0/RFJwi41ySGzHyHm0e8bkm9PBQDQq6yMfx30gU5RthJrPe1ZqjXHUTHUbMlY upWb+EqDOZyXfMnbA1vM2rGz9j5kBFzXs/6Wqj6+jOC3sTYebq8issjM+74bBaB46UcV NRYemfDAhG5tOx0t/zIzmZLtg+wXVg+V99P9c2EfioHgDjiuIpzwqpyNRO0yd0Jj67rP K4Rqz9kTweM4DzYDG/RQb5iwcnFPR1bB6c18BibsuwXvojh7we3DHE1SIqnzUQ+ttjC6 3knQ== X-Gm-Message-State: APt69E2qD9tABk5Sp/HT++qmRZFeOrEOoAIwlKk7PSm7beEuvCdOtiAm 8KgQJATUklzRtii9Q+mJ3Ig= X-Google-Smtp-Source: AAOMgpdxxPHo0qdH0d6bAgk3IBCuv69Qkbnqhpm3xCypaWsd/oYj1yr8TMn8hujrO6mQPqyxn1Vesw== X-Received: by 2002:a37:a0c8:: with SMTP id j191-v6mr1305069qke.387.1529674871311; Fri, 22 Jun 2018 06:41:11 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:32 -0300 Message-Id: <20180622134036.23182-11-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22e Subject: [Qemu-devel] [PATCH v2 10/14] hw/arm/stellaris: Use qemu_log_mask(UNIMP) instead of fprintf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/arm/stellaris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index a8f1f6a912..d06e366402 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -560,7 +560,7 @@ static void ssys_write(void *opaque, hwaddr offset, case 0x040: /* SRCR0 */ case 0x044: /* SRCR1 */ case 0x048: /* SRCR2 */ - fprintf(stderr, "Peripheral reset not implemented\n"); + qemu_log_mask(LOG_UNIMP, "Peripheral reset not implemented\n"); break; case 0x054: /* IMC */ s->int_mask = value & 0x7f; From patchwork Fri Jun 22 13:40:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933395 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MV8Tekms"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0hQ0NqWz9s1B for ; Sat, 23 Jun 2018 00:05:26 +1000 (AEST) Received: from localhost ([::1]:34219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMgl-0000B5-M6 for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 10:05:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJP-0006H4-Um for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJO-0003b4-QD for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:16 -0400 Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]:38342) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJO-0003an-LN; Fri, 22 Jun 2018 09:41:14 -0400 Received: by mail-qt0-x230.google.com with SMTP id e11-v6so5336129qtp.5; Fri, 22 Jun 2018 06:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YUhN8bGDi0zHsya44e31XrtEa0WibSxdo5h7xdErdEQ=; b=MV8TekmsTYJqvCJmQ9/Yhxv9wpMyQwjpjG6jESanVPBgpsq7wcKUqtKNN89vRdac3X r8CVqFJ3G18+IVtjJyd9Iwu/7Eri53xbe+1ePy7MvXCGyAa68re80KJkl4IoWarv/NOF 7G9La3ubRN33zZfj7HX/phVTT7uzHCLEQXK+ucvJpyKJmspta3MSoqYTbqmZs1F19UFG MFrAFckEYA+lQYx6544kF3EE3496gUZ8p/mbC9+u/2yZ3uh/dh7uPeLdr59QVdHfnkMz qAeB5ZhzzCuonyUAXIfDEqnz4UpZsYj4XcFDZEjbR/LECrEorpvz5TfZN6jAWYXtW1xA qcGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=YUhN8bGDi0zHsya44e31XrtEa0WibSxdo5h7xdErdEQ=; b=WHwmydxKKEHMjJeGtIYD3BLGoAMt5rXelWfTkDzZYT/DY+fxvTphXzlGQmiDa96WOw NNnh9VYuRQjDMSNOov/ojlKNKecvz4ozfAmnYnnZJ0HsORs9vudjNOj24tuvo3HWhDLU 0lNZvjFxOxTS6DWwe2FPWaTZFW5RNd/UiaPnpNTwgEO476uFBDFLOe6O4rfogaxEv9wE O69hWeM5z7ST5KrQ3APVnmlocp3pf9I7Qxq9tJNYOI1FKFWTV/MHnjY5hBSomgrI69L3 e+Sn0gxpZxoLbESRV0p7d3jDsltTG6f0iqkWVCRgCKLm5YaRK8AKyYlsNBAe6zYe+TDH 5Cmw== X-Gm-Message-State: APt69E0E9CRoRP5uv9Dg28yuvQZwHJ6DW+HZf1978YaBDozK0jVnMmAQ ATF85mhrW5vtjZebQhu5usQ= X-Google-Smtp-Source: ADUXVKLfcvixlDQt/1x152sdiJe7/PzauTxX9vYNrYcGrFQlGT3PFHOB71edk4Mu9308FRkNB/lw0w== X-Received: by 2002:ac8:27e1:: with SMTP id x30-v6mr1385691qtx.51.1529674874059; Fri, 22 Jun 2018 06:41:14 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:33 -0300 Message-Id: <20180622134036.23182-12-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::230 Subject: [Qemu-devel] [PATCH v2 11/14] hw/net/stellaris_enet: Use qemu_log_mask(GUEST_ERROR) instead of hw_error 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: qemu-trivial@nongnu.org, Jason Wang , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" hw_error() finally calls abort(), but there is no need to abort here. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/stellaris_enet.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c index 04bd10ada3..f8edebdecd 100644 --- a/hw/net/stellaris_enet.c +++ b/hw/net/stellaris_enet.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "net/net.h" +#include "qemu/log.h" #include //#define DEBUG_STELLARIS_ENET 1 @@ -343,7 +344,9 @@ static uint64_t stellaris_enet_read(void *opaque, hwaddr offset, case 0x3c: /* Undocuented: Timestamp? */ return 0; default: - hw_error("stellaris_enet_read: Bad offset %x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "stellaris_enet_rd%d: Illegal register" + " 0x02%" HWADDR_PRIx "\n", + size << 2, offset); return 0; } } @@ -442,7 +445,9 @@ static void stellaris_enet_write(void *opaque, hwaddr offset, /* Ignored. */ break; default: - hw_error("stellaris_enet_write: Bad offset %x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "stellaris_enet_wr%d: Illegal register" + " 0x02%" HWADDR_PRIx " = 0x%lx\n", + size << 2, offset, value); } } From patchwork Fri Jun 22 13:40:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933386 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rmRncngD"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0Qr5xLNz9s1B for ; Fri, 22 Jun 2018 23:53:40 +1000 (AEST) Received: from localhost ([::1]:34110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMVO-0007Oh-F6 for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:53:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJS-0006Ji-9k for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJR-0003eZ-FS for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:18 -0400 Received: from mail-qt0-x22a.google.com ([2607:f8b0:400d:c0d::22a]:33069) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJR-0003dr-AX; Fri, 22 Jun 2018 09:41:17 -0400 Received: by mail-qt0-x22a.google.com with SMTP id l10-v6so5937861qtj.0; Fri, 22 Jun 2018 06:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rb4Tel6ruUx+KkPm4chyV+0/3KWS8VEG2yorSZc4qog=; b=rmRncngDDmZtkzWkBrWIUbMYuiBoZpXDw4csJka4Y0EBJA/VBZKB1RqVZ7aUF57mBn VbpYJL7GsP6nveyXCFgGFEwpVQeVH6BXlKjk0ekmFupSnqe4KUKx1OntFL/1luul3GyK +uUzgjNxt4I4R8AeprjWpJULjat4NLrVSEUBucaQIrRDA/irm+1otgny9JacFN/lsChU lAuo7mdraZznPkc3WMcncNNUHZswBZWUH+S91nzd1VzF34jhQb1CRZJP0iMx0ehp30E2 2ymleoZXQDYZn3+TpfRd2PFVu4tKesfS9Qw/8GnJtxlqM2wDJGO1TWhhc/I2WRallVTJ gQOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rb4Tel6ruUx+KkPm4chyV+0/3KWS8VEG2yorSZc4qog=; b=CQUeCWWpuztiFdcEA1ukajPzMGSymp2ewbDn/no+SNWw+C9H4+e1L6yGBguKHmzK3A m3fpWldt1tRsVE/QPr5ECDkcT73G4rXQr33EYxpGQo83Rj+ZC0oJu9mGG3R0Fn+K52qm bs3o1pfX2RVJZrRi0EsLbj9GlYkO2TeBU8UBtVc5a/BxCCau/NcUIaIfr4LKDmnlHEhv tddUkLsT1bcrLEie+eNPnzWV9EuLIHlT9qa0ArxhsRePeItjayPOVHPAmCdSvs499rx0 /T2hXGCLiXZrTBd/Phc3QkmFOuy6TfFPguLwsyYPBxuPIQiPz4ONPP1j3jn1FOwXkJxD 3RWg== X-Gm-Message-State: APt69E0ctBI+jFWWag6y0bP4sL+AXa8cHqSs9WjBPAwjLBx2962PEQsa rh5YSJ8W79YQFiSL2FT5nLI= X-Google-Smtp-Source: AAOMgpfKvuRtNVyLjleFds8XB9p/oAQx/BA2JddqI2If/hmO7i5JoOBKu9wFCN/yuZpv/LQH3tZNhw== X-Received: by 2002:ac8:2302:: with SMTP id a2-v6mr1421215qta.180.1529674876626; Fri, 22 Jun 2018 06:41:16 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:34 -0300 Message-Id: <20180622134036.23182-13-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22a Subject: [Qemu-devel] [PATCH v2 12/14] hw/net/smc91c111: Use qemu_log_mask(GUEST_ERROR) instead of hw_error 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: qemu-trivial@nongnu.org, Jason Wang , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" hw_error() finally calls abort(), but there is no need to abort here. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/net/smc91c111.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index c8cc5379b7..9094c0b47c 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -11,6 +11,7 @@ #include "hw/sysbus.h" #include "net/net.h" #include "hw/devices.h" +#include "qemu/log.h" /* For crc32 */ #include @@ -478,7 +479,9 @@ static void smc91c111_writeb(void *opaque, hwaddr offset, } break; } - hw_error("smc91c111_write: Bad reg %d:%x\n", s->bank, (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "smc91c111_write(bank:%d) Illegal register" + " 0x%" HWADDR_PRIx " = 0x%x\n", + s->bank, offset, value); } static uint32_t smc91c111_readb(void *opaque, hwaddr offset) @@ -621,7 +624,9 @@ static uint32_t smc91c111_readb(void *opaque, hwaddr offset) } break; } - hw_error("smc91c111_read: Bad reg %d:%x\n", s->bank, (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "smc91c111_read(bank:%d) Illegal register" + " 0x%" HWADDR_PRIx "\n", + s->bank, offset); return 0; } From patchwork Fri Jun 22 13:40:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="B4n3h7kL"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0L50YHPz9s1B for ; Fri, 22 Jun 2018 23:49:33 +1000 (AEST) Received: from localhost ([::1]:34078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMRO-00040u-Jp for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 09:49:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJV-0006Mf-4w for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJU-0003j2-Cu for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:21 -0400 Received: from mail-qt0-x236.google.com ([2607:f8b0:400d:c0d::236]:34695) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJU-0003ib-8r; Fri, 22 Jun 2018 09:41:20 -0400 Received: by mail-qt0-x236.google.com with SMTP id d3-v6so5938063qto.1; Fri, 22 Jun 2018 06:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2Rc5TAl46HafWUsGlR1lgCO1U+OFpadWowwoZjTJ3L0=; b=B4n3h7kLsaaPHmNHddM/x3CK6hEnb4viQPRXplCplFte+rQcGdPvAqAlAopbzmY1eN XPgsNw9ay+bNkBrFYh7ip3lumyMMdWXdiwsxwBmcwzs4bjgGedUVz/IKTx38NG413gEo bnc4qImTJ6cUGNLGNol+tW8knc6nnskPNuvxjXOgUIzGNIgHskDJq/nX3IEVru99VqVH +hx0GA+RRZn/lwlvDl7MiF/I+y0MrozsHG/hoNP91LRrhJ9B6nEZ2OyEcNrvv6OfL9ah OWiMYHLRiDJsYDKnPIkHelSCx37mQkXlO/KWiFQKCEiMkWNUmxXJtHPrf4PWz0hN9/G/ zOvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2Rc5TAl46HafWUsGlR1lgCO1U+OFpadWowwoZjTJ3L0=; b=kyIeU2pTZnlq8FJrwUzdTuA3R/pf9M2CK4UtOc7O1+AR0c0tP14n9gzW6b49j5OCtR sjF2HKkRhEMky4EySR/flMapKtnvTd8Vga6HxwZp/VII66lsZCWWUXdrX8cEp84sZNDz E8GU8g8OZ5zszaQdnvEMgYVVVrAbL5Rer/h4vTzphDHhV56ZDYcSuMG/J8crufkW5hEM p+/wpaHxcmOaJkDWBdB/IuZbdcYzlvecEJ/d/y+yo1wM3l8UMofCDyq1NPbeaTANjkOs qLl+8PFrXIr6XB7TUDt+WVfxyxVdwe9vHFpC/osy3Wuvs/aoFgbBIO4mYRbU4okIrLq0 InDQ== X-Gm-Message-State: APt69E3uET2D55oSNdnLE7IWw8/+1e5+Xnp8wZuv0giCwpi8Wr9md+NT bgWi4EUZz4+RBc24ihkm0FE= X-Google-Smtp-Source: ADUXVKJSD3Z8XFCWddskcpSU9++PJjZw1I9Xm9aO3Ox1u6rmQ+8/swiAn1AT/2IpCpOBrsm0hr9YSQ== X-Received: by 2002:ac8:1285:: with SMTP id y5-v6mr1395122qti.164.1529674879570; Fri, 22 Jun 2018 06:41:19 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:35 -0300 Message-Id: <20180622134036.23182-14-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::236 Subject: [Qemu-devel] [PATCH v2 13/14] hw/net/smc91c111: Use qemu_log_mask(UNIMP) instead of fprintf 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: qemu-trivial@nongnu.org, Jason Wang , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/net/smc91c111.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index 9094c0b47c..d2fd2040e8 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -362,10 +362,14 @@ static void smc91c111_writeb(void *opaque, hwaddr offset, SET_HIGH(gpr, value); return; case 12: /* Control */ - if (value & 1) - fprintf(stderr, "smc91c111:EEPROM store not implemented\n"); - if (value & 2) - fprintf(stderr, "smc91c111:EEPROM reload not implemented\n"); + if (value & 1) { + qemu_log_mask(LOG_UNIMP, + "smc91c111: EEPROM store not implemented\n"); + } + if (value & 2) { + qemu_log_mask(LOG_UNIMP, + "smc91c111: EEPROM reload not implemented\n"); + } value &= ~3; SET_LOW(ctr, value); return; From patchwork Fri Jun 22 13:40:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HPDzjrhL"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41C0lq3Vhfz9s2t for ; Sat, 23 Jun 2018 00:08:23 +1000 (AEST) Received: from localhost ([::1]:34236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMjd-0002Tn-4R for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2018 10:08:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMJZ-0006QB-6k for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMJW-0003me-Uu for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:41:25 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:46614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMJW-0003lx-Pp; Fri, 22 Jun 2018 09:41:22 -0400 Received: by mail-qk0-x242.google.com with SMTP id o2-v6so3652933qkc.13; Fri, 22 Jun 2018 06:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PXIZKg3YGLOO4vafTYVLifGu8wGdKxGuAfiQyEwO7dw=; b=HPDzjrhLRNUoHN/eGImj3kLw4TI2hk0e4vZdvEH/FpctkmIQi+ECe+3pehmNwqyEU3 khShTnvhoZljjRu94Rlui1Hb1LnCwJgPO02CPNk2bX6iCqKcWwZBYk7lycO50kDNpE7O 7J/N3yseJhwsXwbHTSCVhlqGSGG8IHEZ7xqSZkeWKtnxUdH1rNeFDhEvLC/0yYxNTNZY 2U/xg7GYzzcaAkIQP+ztgKLLzFJTjLwZHhiKhu9vlam93f8CNB0+90YfDzYtCc6cEytA qprR22C4oVe8KtAX4TggiI7+MuuImUGpFwkYjcxj6/OIshBxIIDb3Dwh0M8FsckqV2sA 3jkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PXIZKg3YGLOO4vafTYVLifGu8wGdKxGuAfiQyEwO7dw=; b=kMh8N/cxi6J4r11id4572+lryguQRo6Hy5HoPeFs2ngmkNeCoO/NvGdl/AggaWJj3s D8j83p60d9bHlmRoWSESk6XVuUs+rRB1ViV2ZyYhQkGmzhuA/+/OSzlQBqX3eJXh0afq /ipJtUo1jjfmfIwdb/s9e9AyF1Vrfz0Wc9dJDBxefh9/JxmsZL60eLu+rc5MHvqtrD2F Ax6tyEZQrZmRLqsGK7vFcP8/pernHHoyt4FdWukL1e7YSyj5o3BA+SOIfuVqZ4V+yHa3 kk6VtRYvdfKSqO5LIhZ5VXOkJYl6MtsieiO7Xw7pG9Yhzl4Rb1fyMs4S8QQV8f7dp+lN DAQQ== X-Gm-Message-State: APt69E0BLQzH33yYQfYB2BBP7oHO5l653qNUS75nAbSrGtLZxFVh9hr/ jHNX98kmOvjXm1X8ESza0pkZdSDU X-Google-Smtp-Source: AAOMgpdgeARUWFvUTVKj07VWji5wfvzmEisAs+Z/jhLIDBLR2kg10NJCrvjTKQQVd0F3IplsDjadxQ== X-Received: by 2002:a37:18c4:: with SMTP id 65-v6mr1291846qky.415.1529674882196; Fri, 22 Jun 2018 06:41:22 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s39-v6sm6006629qts.42.2018.06.22.06.41.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:41:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Fri, 22 Jun 2018 10:40:36 -0300 Message-Id: <20180622134036.23182-15-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org> References: <20180622134036.23182-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [PATCH v2 14/14] hw/arm/stellaris: Fix gptm_write() error message 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/stellaris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index d06e366402..42baa768b2 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -294,7 +294,7 @@ static void gptm_write(void *opaque, hwaddr offset, break; default: qemu_log_mask(LOG_GUEST_ERROR, - "GPTM: read at bad offset 0x%x\n", (int)offset); + "GPTM: write at bad offset 0x%x\n", (int)offset); } gptm_update_irq(s); }