From patchwork Fri Mar 23 13:17:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 889985 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GcQnDKck"; 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 4073xl4r4kz9ryk for ; Sat, 24 Mar 2018 00:18:03 +1100 (AEDT) Received: from localhost ([::1]:38050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezMa0-0001ES-Tx for incoming@patchwork.ozlabs.org; Fri, 23 Mar 2018 09:18:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezMZV-0001Cg-W8 for qemu-devel@nongnu.org; Fri, 23 Mar 2018 09:17:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezMZT-0006Pj-Hr for qemu-devel@nongnu.org; Fri, 23 Mar 2018 09:17:29 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:40258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ezMZT-0006PJ-AQ for qemu-devel@nongnu.org; Fri, 23 Mar 2018 09:17:27 -0400 Received: by mail-lf0-x244.google.com with SMTP id e5-v6so18265445lfb.7 for ; Fri, 23 Mar 2018 06:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6wbOeSV7jqBqMlgDIUdkcmlwT++eq3ZtJxo0yf6YFFo=; b=GcQnDKckKxpryTeyqnPtBMFB6xbL9syoXxX0DDRPRNiQ21WGNDoNf/qE0u22/X2BO8 aOQKVyCR4AQ9skkXzZtHXGJjoQ4GbPmRo2Ryk+2GjmzouWAoi4nID1K1TeUKDi294Vuf 1/nHk0TLD+eXD3UzdT7ZRGB+3S0NmmsQfAn7orTdvnsAAL6kDfXxgfop7Oy9RL2qZm1L zLtVcDR32LFnQo7v+Cp0YXXduVr/WjPZbMas7pQyurlEzH9y68PrXiFs2K9dv/zYAWiA lN9E55jbkfX9INSqWVAW2SP4Ml1jwEpBrFHUAV4uvPvi68F2JSa4kCe8vnhYb7zwgp19 Qg4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6wbOeSV7jqBqMlgDIUdkcmlwT++eq3ZtJxo0yf6YFFo=; b=ZtxTyb2jph1+TEILQbupbwDkGKgOtgiLc7Hk1XPgPFBtxJRnBMX/fhO73r7o3wqrj/ t1bgx0+KPCaAYA8OpOURNsmlbQcsqdk/bw7K0kbfv0sDzrv5hA7ovSrkVnyiYnqIJwgu 5wf6xc1TZmT1ZQVgs5SYlA2uva3BU0WHz5th4wr48R+2A3ouRqJr/wI2/ZslUiYBl2TG 3lLRm79/HkWKyD8ZLT493o2KaevGA3XErN1y0u8kGd5YulJOkeWu4OA184bt2l9tFGAK iS9UV2Yqmh6S2E8PFRyXMSKdwS0qtTMCt6FZdhAcgatJ2EwLLZHblhn/aM71nFcXLYHP q6ZA== X-Gm-Message-State: AElRT7GeKgmA9F2C0lPRsaaV5avfL8YmikKwCnBRAWzh8dXIyLVZSi6y rnyEUPMapFMHMhd8kqsxkfyeqw== X-Google-Smtp-Source: AG47ELus4s2Xd71Dp3Z1GQABo8T1+9VnDmKK0oqB+fqZOAAiXhnNyBtKArfAOWF/Q10fahBfLXSOAg== X-Received: by 10.46.36.6 with SMTP id k6mr17061449ljk.15.1521811045624; Fri, 23 Mar 2018 06:17:25 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net. (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id f200-v6sm2205283lff.35.2018.03.23.06.17.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 06:17:24 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Fri, 23 Mar 2018 06:17:15 -0700 Message-Id: <20180323131715.29739-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 Subject: [Qemu-devel] [PATCH] target/xtensa: fix timers test 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: Max Filippov , Pavel Dovgaluk Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Change frequency of the core used in tests so that clock cycle takes exactly 64ns. Change icount power used in tests to 6, so that each instruction takes exactly 1 clock cycle. With these changes the assumptions of the xtensa timers test are correct and the test must always pass. Longer story: http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg04326.html Cc: Pavel Dovgaluk Signed-off-by: Max Filippov --- target/xtensa/core-dc232b.c | 2 +- tests/tcg/xtensa/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c index aa07018af4e7..8846336f5cfa 100644 --- a/target/xtensa/core-dc232b.c +++ b/target/xtensa/core-dc232b.c @@ -47,7 +47,7 @@ static XtensaConfig dc232b __attribute__((unused)) = { } }, .isa_internal = &xtensa_modules, - .clock_freq_khz = 10000, + .clock_freq_khz = 15625, DEFAULT_SECTIONS }; diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile index 2882c431e4a9..091518c05583 100644 --- a/tests/tcg/xtensa/Makefile +++ b/tests/tcg/xtensa/Makefile @@ -5,7 +5,7 @@ CROSS=xtensa-$(CORE)-elf- ifndef XT SIM = ../../../xtensa-softmmu/qemu-system-xtensa -SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting -icount 7 $(EXTFLAGS) -kernel +SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel SIMDEBUG = -s -S else SIM = xt-run