Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3747437lfb; Mon, 9 May 2022 03:14:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0cbK4yU5UZikKAMstmq0C70DR5fHUDVjmW0tpD6A53oGqSDlsLuyd9CLFPv1sK11VDcgn X-Received: by 2002:a65:604a:0:b0:3c2:fe7:a14e with SMTP id a10-20020a65604a000000b003c20fe7a14emr12389318pgp.156.1652091293179; Mon, 09 May 2022 03:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652091293; cv=none; d=google.com; s=arc-20160816; b=yK0COMTHCAfaKGzERg9uAvLrzqxuK+7WNWD8/QULZLQ/gDQZApBIyYGCN3/dDlThh6 wtllSMQK+ORe0AenHLZlct7cPFo0dEc40So90oeC2Pq5cVHLgCgxvY+AtdOhCLjcjfAj lVVb0EhogS7nvo1IV2LDmVy5sCNOjFr72U3Vd2L2bsq1YFUrh6DUj56G70csHep7u7/K s0/NPO3lVwZPtzhwDT2QzIAGgajpisMki1AxWvByrBDTNQZ6K0bH67Y8fzP43MSBGbd/ hk/HB2UOYC05IpQ/nx7ctFWwsG7/ceSOpkBvld8UZJpMQu6r3QLEgJ/MLFw02IE+boO5 l7oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kY8j3urZiYftEoIWj6itnjrLji/bjKW8y+9+36z3Zcs=; b=QVQijQc+352ohZ/dPd+JH70TzzKF0fJNY0s5G2Ln25vedSPa79pjhWkToNOlJD/E5p ITTq1wsC2FpL8HjMRiaQZGwcpnOLehPz76IHs3kbGtMDkLp7Urbz4ruEEQKg2NBZ1/lt e+4Y9ir+5T7dpW7/koRpleoeZQq2wphC19GoNwJvZhbJNjDC4c293l4qMCR0QgBa2TdT Sdb8NLr4TMFY8KrZrWq4Pc+4H0AHYPpvQlvYc1O3SRWNkXlhOOuKYVZrWsDYjMDchn1A GfMMuozc6XN6HYSNtqMhFHnUWWksfPVpLUbZXZ215OnrNaPm7j8VvgTlgBRBkvgkwCnY n5nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=x1Timy6c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x13-20020a170902b40d00b001544c952660si9964397plr.353.2022.05.09.03.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:14:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=x1Timy6c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AEB0617DDC4; Mon, 9 May 2022 02:52:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234301AbiEID7Q (ORCPT + 99 others); Sun, 8 May 2022 23:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234318AbiEIDzl (ORCPT ); Sun, 8 May 2022 23:55:41 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5C971A043 for ; Sun, 8 May 2022 20:51:46 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id v12so17586925wrv.10 for ; Sun, 08 May 2022 20:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kY8j3urZiYftEoIWj6itnjrLji/bjKW8y+9+36z3Zcs=; b=x1Timy6cr18MwlxY9CF20GOJ+EnM2i6uvBz1w/xy/gkEKH0DgUot6cF7QhnrQn6KL8 9Ry9NGv/m6fXIAOBPNitKX7+Oup8CPJBsSoYtximCtydKFwTLK5grzqVsIph+N7vJIEC eyzDRFYZxht7POr0XFGsw7Qu/aBfAre1m7VjYbJOCOfMXCV5WKmcHQtGg6dCGuD4Ye5w PMSwN6Q2BpYNmhg+hSklRbTVHJJKcN5+aQCvAopHMDtQXrKjkd1UdaXrNZ1QOY2TtcAb 1jH0OOjse1qPAJijLMVZJr58Z27OUbdb91gOA+mMQcYgrGFNEIPpMXgGXqsnFeV1gOTS Dqcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kY8j3urZiYftEoIWj6itnjrLji/bjKW8y+9+36z3Zcs=; b=rvL0Wh+pKSGcodGKxzeYnQbzqgVx3eWx0686hJiQYD0E1OY5469D9ehl4ILbhCHLg5 pU5iSEUCQETf2WDmBv+VmZ1NonZClVwSrasfJ+bzjlY1mUN0sdxxi2rsVBKGLw0oaz0B PRpXKZZPHjy/Cj3AsSPks20agB+0pCz208zXf4q+kCn+jQ7WBEfPJVxwsONhXMVqeAb+ 31xmpb63+3sdNu6aTNAEjAfyCnL7+w+QTv3kEAbA2fyw7lyTPWZ7iCPaYDQD49UmRrTQ hMvXwcQGGpWURSXha/GG/cgej+lX2S4OnNy5hMO9Z/5KRx6Zn3YQ5u9EdVt/2kuvH8ru I7NA== X-Gm-Message-State: AOAM531V47hTYeoEiwhiqlswYuLmA2Li9o2R9ax7P6tAnznaL7m1mqtT RWXFdojT00RHe0BBhgnDNKuyvdbgAfYNQa649GyvFg== X-Received: by 2002:a5d:6483:0:b0:20c:5c21:5c8c with SMTP id o3-20020a5d6483000000b0020c5c215c8cmr12089506wri.86.1652068280641; Sun, 08 May 2022 20:51:20 -0700 (PDT) MIME-Version: 1.0 References: <20220509012121.40031-1-samuel@sholland.org> In-Reply-To: <20220509012121.40031-1-samuel@sholland.org> From: Anup Patel Date: Mon, 9 May 2022 09:21:09 +0530 Message-ID: Subject: Re: [PATCH] clocksource/drivers/riscv: Events are stopped during CPU suspend To: Samuel Holland Cc: Daniel Lezcano , Thomas Gleixner , Albert Ou , Atish Patra , Dmitriy Cherkasov , Palmer Dabbelt , Paul Walmsley , "linux-kernel@vger.kernel.org List" , linux-riscv Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Mon, May 9, 2022 at 6:51 AM Samuel Holland wrote: > > Some implementations of the SBI time extension depend on hart-local > state (for example, CSRs) that are lost or hardware that is powered > down when a CPU is suspended. To be safe, the clockevents driver > cannot assume that timer IRQs will be received during CPU suspend. > > Fixes: 62b019436814 ("clocksource: new RISC-V SBI timer driver") > Signed-off-by: Samuel Holland Looks good to me. Reviewed-by: Anup Patel Regards, Anup > --- > > drivers/clocksource/timer-riscv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c > index 1767f8bf2013..593d5a957b69 100644 > --- a/drivers/clocksource/timer-riscv.c > +++ b/drivers/clocksource/timer-riscv.c > @@ -34,7 +34,7 @@ static int riscv_clock_next_event(unsigned long delta, > static unsigned int riscv_clock_event_irq; > static DEFINE_PER_CPU(struct clock_event_device, riscv_clock_event) = { > .name = "riscv_timer_clockevent", > - .features = CLOCK_EVT_FEAT_ONESHOT, > + .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP, > .rating = 100, > .set_next_event = riscv_clock_next_event, > }; > -- > 2.35.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv