Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7394163rwn; Tue, 13 Sep 2022 20:16:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR6NF5aUze8hoxXCvZ07q7fpTUBdMFyGhqkyk6l+IQgAJc70jMuJIxbOY4n8IZPDLTPvGqhI X-Received: by 2002:a65:538e:0:b0:434:aa53:2244 with SMTP id x14-20020a65538e000000b00434aa532244mr29107611pgq.343.1663125372002; Tue, 13 Sep 2022 20:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663125371; cv=none; d=google.com; s=arc-20160816; b=rEVJ19CGXs51Yg3CxnuLnlDQ3XDf01S/HaIHblFPxcKjxOHhzm5S8CL5P9bmndXCf2 c9OLUjXyC1CVpWDKQ5W2uPILOB0+nzWuaqIE3AqXYA1EOmF42FTxjn3BFLGuDpRwExaL 4EmFLtAQyhKotdXT2lMCBnz4pogXtnDagEm4AvfQmbxV8FGZp1E3+TQXOcEjJiZSMsXk tMoJ3ijMjRkcH+PjS3md84eBqA7NqW/PivDhsJe/HlO+HIXY0B25E2KnVwaju4ekWEZK e9InJdp383+MzhjRW0G55QQIrXXjGoeq3u96pDSY0UW1a3A3GE9y/ddKpEfAPVqh0RGk DUcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=TeJzeZlTIFwSOL1aUDH73P4zaWAkLPusnz7gRxytrkA=; b=Idv1VJCJC7/giHhi7OqjBKGNIciGW5jEBOf7thMgsnkAl6Xml9vv+VtsejMzyTFgHp UKxh2cGe1ls8qlldrs0KXY/CGq0FBD7x4RxB5vAcRuZYz/4sxWkLNsstZKLMg9+90Pku XbjEXMXFa09xprGkLByP7V3W8QZ1vULuqBXsFYsMqogHTBTf39uw4KS6yK8ovgnn//iE FUVh4l+kjHogqZmjS06Z1QPPcrqDd1iEgDDq6BVEXbjUAnWd84zOv5iPFTA1wubOrNeG r5F3YrBF4cbdpAA7ZaAKhgUSZmWAedlcj8vw3IovhlDLRtwRrIpwLFZjzLGI3Pbhsknm f8dg== 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=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p35-20020a634f63000000b0041b9a820023si13395331pgl.264.2022.09.13.20.16.00; Tue, 13 Sep 2022 20:16:11 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229833AbiINCbA (ORCPT + 99 others); Tue, 13 Sep 2022 22:31:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbiINCa6 (ORCPT ); Tue, 13 Sep 2022 22:30:58 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821556555C for ; Tue, 13 Sep 2022 19:30:57 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MS44t4DP3znTTf; Wed, 14 Sep 2022 10:28:14 +0800 (CST) Received: from kwepemm600007.china.huawei.com (7.193.23.208) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 14 Sep 2022 10:30:55 +0800 Received: from [10.174.185.210] (10.174.185.210) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 14 Sep 2022 10:30:54 +0800 Subject: Re: [PATCH] arm64: arch_timer: Fix the lack of set_next_event* for workaround of Cortex-A73 erratum 858921 To: Marc Zyngier CC: Mark Rutland , Daniel Lezcano , Thomas Gleixner , "Oliver Upton" , , , , References: <20220913104723.332-1-jiangkunkun@huawei.com> <8735cvuzvv.wl-maz@kernel.org> From: Kunkun Jiang Message-ID: Date: Wed, 14 Sep 2022 10:30:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <8735cvuzvv.wl-maz@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.174.185.210] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600007.china.huawei.com (7.193.23.208) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Marc, Thank you. I've modified it in v2. I'll pay more attention in the future. Thanks, Kunkun Jiang On 2022/9/13 22:12, Marc Zyngier wrote: > On Tue, 13 Sep 2022 11:47:23 +0100, > Kunkun Jiang wrote: >> The patch a38b71b0833e moves the programming of the timers from >> the countdown timer (TVAL) over to the comparator (CVAL). This >> makes it necessary to read the counter when setting next event. >> However, the workaround of Cortex-A73 erratum 858921 does not >> set the corresponding set_next_event_phys and set_next_event_virt. >> This patch fixes it. >> >> Fixes: a38b71b0833e ("clocksource/drivers/arm_arch_timer: Move system register timer programming over to CVAL") >> Signed-off-by: Kunkun Jiang >> --- >> drivers/clocksource/arm_arch_timer.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c >> index 9ab8221ee3c6..ff935efb6a88 100644 >> --- a/drivers/clocksource/arm_arch_timer.c >> +++ b/drivers/clocksource/arm_arch_timer.c >> @@ -473,6 +473,8 @@ static const struct arch_timer_erratum_workaround ool_workarounds[] = { >> .desc = "ARM erratum 858921", >> .read_cntpct_el0 = arm64_858921_read_cntpct_el0, >> .read_cntvct_el0 = arm64_858921_read_cntvct_el0, >> + .set_next_event_phys = erratum_set_next_event_phys, >> + .set_next_event_virt = erratum_set_next_event_virt, >> }, >> #endif >> #ifdef CONFIG_SUN50I_ERRATUM_UNKNOWN1 > With the fixed commit message as suggested by Oliver, and a subject > more conform to the style of previous commits (something like: > "clocksource/drivers/arm_arch_timer: Fix handling of ARM erratum 85821"): > > Acked-by: Marc Zyngier > > Daniel, I assume you'll pick this? > > Thanks, > > M. >