Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6463313rwn; Tue, 13 Sep 2022 04:49:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR5oJdpOxQMbId1+OMMwMKV17eAuzZtINCSs7uhwKa/sGZNo8SBrSud5BONutO0nyP2/JsW4 X-Received: by 2002:a17:902:ea11:b0:178:f0a:7472 with SMTP id s17-20020a170902ea1100b001780f0a7472mr19009101plg.46.1663069794435; Tue, 13 Sep 2022 04:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663069794; cv=none; d=google.com; s=arc-20160816; b=OmIcUyQ2Tu/E6h6GxnSpCttus8PsHwclC7o9SCEdfJjFB2Ac9j1JtpwQwqW0L5yBx5 m93dAqVAiF/FHfRsxATrfxFLtxC9C1W1DXeKgOEOMiPfqhfpRNvIAaLDeDFOZJ6TU11Y pKpwaKNxz7Z+oM2xtDhKZT4i0u0oNkWyfmx4SwG4yEDiwcZ8nf4tJeZPlfI1fa0flZpF l762L/8UAI4RSxHh3FVDCVLHQkUe2Hd82qvT62DPvfLX871cgnQriwI21Ihwpr+j/d/N oJ3qY9ZQfBiPNu8Q4RA6HbrVlXCSBTVV3nPTp7Dwq89WpgBdRlPIDpKNfB02poQ0UGf+ OSLQ== 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=4Rp4LyuCTQbPqRkUSixYMLTj/xWotK99ASTl3w+KH3o=; b=zZHSUiseVmfFsuNOpjBgIWyvY+6GfqGSKrr7NDLib8KhzNp9Xx8YRb55WRBWkrUQOH aZXI7lA28g8iAYtDoJKWow6AN9TF2ckB8CKLuwTd90sF1gvSelPlzjyghLoXCALSrwv0 gmrf7sdtlmlQfHamxS3qLLbgxBcII1ap2wIXDk0KyxoO2wihizdCbOxS/Xts3g2bhYQY lAqvcI0gMclmRj/oIMBL1mGiCsKMH+wImu67ZMFpinraFe4ETW/JDDBTBPCjB3kJBykD pvvz7UX2dLAwUR+7CeJtUoRpMyYIaoUqnV/nlkNt9aGugEgPAIpAWOhx+AlLob8utDIP hI1A== 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 g16-20020a056a001a1000b0052b29ffa4c9si11106539pfv.347.2022.09.13.04.49.40; Tue, 13 Sep 2022 04:49:54 -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 S231738AbiIMKwS (ORCPT + 99 others); Tue, 13 Sep 2022 06:52:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiIMKwO (ORCPT ); Tue, 13 Sep 2022 06:52:14 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7572A33E1C for ; Tue, 13 Sep 2022 03:52:13 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MRgDG5kP3zkWvj; Tue, 13 Sep 2022 18:48: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; Tue, 13 Sep 2022 18:52:11 +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; Tue, 13 Sep 2022 18:52:10 +0800 Subject: Re: A question about Cortex-A73 erratum 858921 To: Marc Zyngier CC: Mark Rutland , Daniel Lezcano , Thomas Gleixner , "wanghaibin.wang@huawei.com" , Zenghui Yu , , References: <87czc4rb1x.wl-maz@kernel.org> From: Kunkun Jiang Message-ID: <7f9bc4fb-67f5-5989-21ba-0833bd3cdd78@huawei.com> Date: Tue, 13 Sep 2022 18:52:09 +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: <87czc4rb1x.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: dggems705-chm.china.huawei.com (10.3.19.182) 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 for your reply, I've sent a fix. https://lore.kernel.org/all/20220913104723.332-1-jiangkunkun@huawei.com/ Thanks, Kunkun Jiang On 2022/9/9 20:23, Marc Zyngier wrote: > On Fri, 09 Sep 2022 08:31:43 +0100, > Kunkun Jiang wrote: >> Hi all, >> >> Recently I am learning the code related to Arm arch timer. I found that the >> Cortex-A73 erratum 858921 does not set the corresponding callback functions: >> set_next_event_phys and set_next_event_virt like other erratums. Won't it >> get the wrong value when reading the counter during setting next event? > Yup, you're correct. > > This is a regression introduced by a38b71b0833e > ("clocksource/drivers/arm_arch_timer: Move system register timer > programming over to CVAL"). We used to use the TVAL accessor which > doesn't need a read of the counter, while the switch to CVAL needs > one. Obviously, I didn't enough pay attention to the A73 erratum. > > Please send in a fix for this. > > Thanks, > > M. >