Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp357067rwb; Mon, 26 Sep 2022 20:40:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+lZEZ3emwTmjZLy9YPDPfx+jxO1H7s4DhAQ48gQlQHY5SCCCheu0P8JTvGpYpUsYwJ83w X-Received: by 2002:a17:906:6a0e:b0:782:31be:e91 with SMTP id qw14-20020a1709066a0e00b0078231be0e91mr21254611ejc.280.1664250023717; Mon, 26 Sep 2022 20:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664250023; cv=none; d=google.com; s=arc-20160816; b=keDrZdUBOxjdcH+tEtzy0b8qTZgmtTD6VwPZbMJcacbJ0Q634AXRjaWKzLuuytHlb4 08LzEJeJWhfhaGgv+0iUy7qw/KHXIwV80kwLXkCq1AsLKP78MoFNdzjSWCYAklDrgJQJ ZN+hGpUiGn/yUx144VDjs+KX2s0MjXD66BeFn1XBs30LtYxmnZhG2oHQrf62ALaOBizE JoXB6cFbPXkuGHh4HBW02U5jf0ggYr1KrUWtvZ7F5+bmrcm5xxxBcPYGRBOWhYmKntGH Il7HbfjZc5I0wyHCLub/LzTfFk323CoxREmuAQ4zHkowAFNPpu01wvRVtHZB0DvYOgse tNZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=GHWMQVTM+Y3SQI8//6SRzc99lxntDf40fhUe7+apfvQ=; b=LzO7NV0AIeG7UcaFJyEFnB/aQnJqa5s3/SU4UeaxYixitv9ByEiZgo+YJKVv9YpyeI gYB2zhRfHp2elS4IhcJm8nekvIWuFwGkYuEdJ7IDfgcOLx+dwn6nMO8Rwnn2Rm7qMWIW MWO18NbCkcIl6S8k+2X63KmT/jA5rKtF4A1me2pA8i5MUaBVl48PtSI5kHWOHB8+obe5 GkNpZtlX70tNH2eAkVQBwSFkWsBfTG6efnvoShJSWvECx6FZud2NGT1k9cmPDvFGkZOX 5SAXpeKXsHSzAk3fLpWD+iq+gS1JRl/H52pUdJ1vtntrHmzR3c640uYo18/s6wWVunVi dtbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kt14-20020a170906aace00b0077912fb01ddsi132112ejb.613.2022.09.26.20.39.58; Mon, 26 Sep 2022 20:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229540AbiI0Dfr (ORCPT + 99 others); Mon, 26 Sep 2022 23:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiI0Dfn (ORCPT ); Mon, 26 Sep 2022 23:35:43 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5676286F2; Mon, 26 Sep 2022 20:35:41 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Mc4w41409zHqHV; Tue, 27 Sep 2022 11:33:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 27 Sep 2022 11:35:39 +0800 From: Shaokun Zhang To: , CC: Yang Guo , , Daniel Lezcano , Thomas Gleixner , Marc Zyngier , Mark Rutland , Shaokun Zhang Subject: [PATCH v2] clocksource/drivers/arm_arch_timer: Fix CNTPCT_LO and CNTVCT_LO value Date: Tue, 27 Sep 2022 11:32:21 +0800 Message-ID: <20220927033221.49589-1-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Guo CNTPCT_LO and CNTVCT_LO are defined by mistake in commit '8b82c4f883a7', so fix them according to the Arm ARM DDI 0487I.a, Table I2-4 "CNTBaseN memory map" as follows: Offset Register Type Description 0x000 CNTPCT[31:0] RO Physical Count register. 0x004 CNTPCT[63:32] RO 0x008 CNTVCT[31:0] RO Virtual Count register. 0x00C CNTVCT[63:32] RO Fixes: 8b82c4f883a7 ("clocksource/drivers/arm_arch_timer: Move MMIO timer programming over to CVAL") Cc: stable@vger.kernel.org Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Mark Rutland Acked-by: Marc Zyngier Signed-off-by: Yang Guo Signed-off-by: Shaokun Zhang --- drivers/clocksource/arm_arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 9ab8221ee3c6..8122a1646925 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -44,8 +44,8 @@ #define CNTACR_RWVT BIT(4) #define CNTACR_RWPT BIT(5) -#define CNTVCT_LO 0x00 -#define CNTPCT_LO 0x08 +#define CNTPCT_LO 0x00 +#define CNTVCT_LO 0x08 #define CNTFRQ 0x10 #define CNTP_CVAL_LO 0x20 #define CNTP_CTL 0x2c -- 2.33.0