From nobody Thu Nov 28 10:44:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1694153289; cv=none; d=zohomail.com; s=zohoarc; b=MmF3ETF+OECMcfNDjsYuIWkmjooeUTdPZLGaehQsiSV7nUOZg7KJuI6dpGouTAtcKuCaH4HmTOdGR77IY/OmK9aaxfolaUkrFVrYFyvqpHwkyDvytZVRPtn8vzWKybTGbvDdwPbkB7VMDnLYyKH6hId1F949dERVtOdsJtU338g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694153289; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ccGf/43x5nzKqeckplvIj3QC6H4I6RRe2CJqwTH4Zqo=; b=c5cdJWuTb5dCTuKe4BDmxzQ+Gmh+zIn8aT/1OLCm+Ts3Z7fbabCOPfsVTF8ASmJwfoJX6d3zKlXlpYCGtOVocGspkuM5L33rD7fMc3hDTVXzXqwXr8Me7B7/XlWfj/ibwlbvxxdMXQdmGh51S9Ireym0MlH1u1IWGebwYqs+ORU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694153289855660.7505825765227; Thu, 7 Sep 2023 23:08:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeUdr-0003KV-U9; Fri, 08 Sep 2023 02:06:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeUdf-0002Qk-Au for qemu-devel@nongnu.org; Fri, 08 Sep 2023 02:06:45 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeUdc-0006Hj-32 for qemu-devel@nongnu.org; Fri, 08 Sep 2023 02:06:42 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1c0d0bf18d7so13796715ad.0 for ; Thu, 07 Sep 2023 23:06:39 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-321-6fb2-58f1-a1b1.ip6.aussiebb.net. [2403:580b:97e8:0:321:6fb2:58f1:a1b1]) by smtp.gmail.com with ESMTPSA id q1-20020a170902dac100b001c3267ae31bsm715231plx.301.2023.09.07.23.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 23:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694153198; x=1694757998; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ccGf/43x5nzKqeckplvIj3QC6H4I6RRe2CJqwTH4Zqo=; b=KP2DQkLvAdtRvox0N6SOB9NvQU6VZ06L6txxxgCN0GiWFnuwGGdgMsz5ONCOnxqtgm 9EXt4iboWYpfYnFCu7/Ns/qvP7HLM1IhEMXDmy1lS9/GVxxbingflvyO8TBgQ+es+9gi JEXyep6DF8zi23syx4HZuNIODTML9/Dw2AwWmBBPZYUkRV1EdbFldcXXo6VLXTNKw8ru HAm9xjLJWA8+ywKuPMVMMNwqtmaX9ak3kg90Q8VukVXR8mvJz2J/BNbDaw4RYS3bZd4q W4yAKTnUQhs/eXrwAjTYNuWdYbaNxH6qhpakm3WHXpJYKkygi5WOTnGCntSk3ci0XXvs bNQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694153198; x=1694757998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ccGf/43x5nzKqeckplvIj3QC6H4I6RRe2CJqwTH4Zqo=; b=eaOiqMqy1smX2/SXYMUogSn2MxODljjFcAmxfTcS3d8Y22pX19KNR49dw7QzAGXMNY dYZrDPh21v/8cdHohbIxpG5GlfN8YVybnjUPX2xiHUH2PNCu51SBn+Qf0VUOeiMJ8PJt WXeS0OfTXPqkNCUZiSHaXU714mbJPwkqYhvrRUVddx5TQT3GPEWUuxTQ2K+cssbY3ffV +zhvi85RIMJC3xtTDOAPfutIASdO5DtJAKcNaQH98nY72MmBv7ljXKMqE/W49pZ0+Ji8 ve8kjDu4/8ydjq0KjrB8mrwPZLinkCNhSIxznySNdOmDy7sj+uxep2ACSY7PCLjEvTiN giYw== X-Gm-Message-State: AOJu0YxDd5HCoPaL+nkZv5DMJJLP8wtcaaYy3QJxHNYeJAX+nfXBdexP 6FWvknC0FnmQyChCvuZjLBYFwMILKITLRZZe X-Google-Smtp-Source: AGHT+IFUytjo9ReK8iqU2qz3U3ENlv9Ru4HkL+It8a5Vl11QCIaR2bKlk6mvVquRGjZAgu8vQnr1iw== X-Received: by 2002:a17:902:ec88:b0:1bd:f314:7896 with SMTP id x8-20020a170902ec8800b001bdf3147896mr1711721plg.25.1694153198266; Thu, 07 Sep 2023 23:06:38 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Jason Chien , Alistair Francis Subject: [PULL 27/65] hw/intc: Make rtc variable names consistent Date: Fri, 8 Sep 2023 16:03:53 +1000 Message-ID: <20230908060431.1903919-28-alistair.francis@wdc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230908060431.1903919-1-alistair.francis@wdc.com> References: <20230908060431.1903919-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1694153290681100003 Content-Type: text/plain; charset="utf-8" From: Jason Chien The variables whose values are given by cpu_riscv_read_rtc() should be named "rtc". The variables whose value are given by cpu_riscv_read_rtc_raw() should be named "rtc_r". Signed-off-by: Jason Chien Reviewed-by: Alistair Francis Message-ID: <20230728082502.26439-2-jason.chien@sifive.com> Signed-off-by: Alistair Francis --- hw/intc/riscv_aclint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c index bf77e29a70..25cf7a5d9d 100644 --- a/hw/intc/riscv_aclint.c +++ b/hw/intc/riscv_aclint.c @@ -64,13 +64,13 @@ static void riscv_aclint_mtimer_write_timecmp(RISCVAcli= ntMTimerState *mtimer, uint64_t next; uint64_t diff; =20 - uint64_t rtc_r =3D cpu_riscv_read_rtc(mtimer); + uint64_t rtc =3D cpu_riscv_read_rtc(mtimer); =20 /* Compute the relative hartid w.r.t the socket */ hartid =3D hartid - mtimer->hartid_base; =20 mtimer->timecmp[hartid] =3D value; - if (mtimer->timecmp[hartid] <=3D rtc_r) { + if (mtimer->timecmp[hartid] <=3D rtc) { /* * If we're setting an MTIMECMP value in the "past", * immediately raise the timer interrupt @@ -81,7 +81,7 @@ static void riscv_aclint_mtimer_write_timecmp(RISCVAclint= MTimerState *mtimer, =20 /* otherwise, set up the future timer interrupt */ qemu_irq_lower(mtimer->timer_irqs[hartid]); - diff =3D mtimer->timecmp[hartid] - rtc_r; + diff =3D mtimer->timecmp[hartid] - rtc; /* back to ns (note args switched in muldiv64) */ uint64_t ns_diff =3D muldiv64(diff, NANOSECONDS_PER_SECOND, timebase_f= req); =20 --=20 2.41.0