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: 10304707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D09360386 for ; Fri, 23 Mar 2018 13:18:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F270528E85 for ; Fri, 23 Mar 2018 13:18:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E75E628E8B; Fri, 23 Mar 2018 13:18:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 59A3828E85 for ; Fri, 23 Mar 2018 13:18:24 +0000 (UTC) Received: from localhost ([::1]:38053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezMaN-0001pm-DA for patchwork-qemu-devel@patchwork.kernel.org; Fri, 23 Mar 2018 09:18:23 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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