Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3746900lfb; Mon, 9 May 2022 03:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi3yp5uqoUqxOQm6mh1e+vDe5S5Dl/YmmUENmIMcq20P61MIRTxU4F7ChzGJBkKxpuBsuR X-Received: by 2002:a17:90b:4d11:b0:1dc:ec4f:a19c with SMTP id mw17-20020a17090b4d1100b001dcec4fa19cmr12540504pjb.117.1652091248002; Mon, 09 May 2022 03:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652091247; cv=none; d=google.com; s=arc-20160816; b=hTAWgkdeVqkC8zBc2L+0WFl2nPzqR+zttIYncD8H45ML6UztF7vMcFMCEoNBmD0TSL xK9HhvZfjXRPYvL5C4r0h0CNFTBJGzxPffH7m82EMNSs/4YHnTWWhL7UID+3xGQAmk3R QK2y+nQROjKP/um/EoDd78riiYitkE7qo1ZnnXaQGbFTbQfSdsvDx2w7Nhz8620e4B1u FSvkwbtO3tH877oeuSwnp9VBMwJwViRC3yK2GfUag7DjpEM77pf9R/RTqtEx1fJn3xOZ vd3WsnIQwzKlU8pProeblJ0eWzyoMgMf/3GN0sj1a5JByIOrfQ9d8VFqczxrNXlICvPf UsQw== 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:dkim-signature:dkim-signature; bh=ocfO726Kgd2oGw0Tv8/aji7U+imgHZnPcKK9GAi4KlI=; b=vHDeZqw4lIs9FwI0/p50IfYFAgrjzWWvyRH7DsHmUNyBs+9r15gQZFt5yLAtmFhxN4 eOFG7KsN3cMJ01qYl8rqVMeoXKvLQG+tbFwWG0IuoOJLccMSBqvSoGbO+LLIqVJ8gU5n p8udwmf+z1I2NMigZPTq1Wx5l2InZYn7qu6LQF6uDrTVynAwC3fjUBAN1ZF19dVhyV2H 6lEAa7VRFmP1ccOR9vsmZU5A7iuSmWLeZQdZvYAg+GX/QyxyPa124QxLdmRhLqbJnVYy GTcrRJ+7oajFsZ6qEQA4TZQvRWkod6r+g1Dt0TBegNhFpIt8yFmEBqG9d3PJf+6Aj4Z1 efxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=d+9NBS2s; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=dO3GHKZM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b1-20020a631b01000000b003ab8abd9630si14500965pgb.376.2022.05.09.03.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:14:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=d+9NBS2s; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=dO3GHKZM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1E3231B177C; Mon, 9 May 2022 02:52:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233605AbiEIBeD (ORCPT + 99 others); Sun, 8 May 2022 21:34:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234695AbiEIBba (ORCPT ); Sun, 8 May 2022 21:31:30 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 513982616 for ; Sun, 8 May 2022 18:21:26 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B92D15C0037; Sun, 8 May 2022 21:21:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 08 May 2022 21:21:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1652059283; x=1652145683; bh=ocfO726Kgd2oGw0Tv8/aji7U+ imgHZnPcKK9GAi4KlI=; b=d+9NBS2sBLLKEL2qcU/34D6uosjdcq9dBliOwCGFW TEU+O+EMDSKf7zz+BN8GSleUoPs2F+tUKhTUngLrZbSBMJN+doFn4svxQ3O2WPF5 VpI2BKMOH+vEwYAnfB9vlP7F1SkQonpebKjjhCbPt48EWZQhZfDNhYqUwIeHG8Yv JfBiGp4kLgHHZa0F1j+UpclI7+uL6MpqMC+pV8ewBwWZwMvp3lGG6SG+lirIovrN l+rfoEo32ulilyStCA431Ey2z1Qb42pN7ptrLO6itrGcphAR9ydnetg+O8MGuagX SKjCZ5hf3R6aBCPOVwEbC2V/wTnAQ9V7iCNJEFbaHOAOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1652059283; x=1652145683; bh=o cfO726Kgd2oGw0Tv8/aji7U+imgHZnPcKK9GAi4KlI=; b=dO3GHKZMgU11UaHc1 QEpGIP2jbuj/Tq8wFi4xsnDNa/1nCTFn7oBzY/qczvca4MVqMccEkLE067BjE7fk iscbjIOTlYo/sgzMh7Pn5vpORWNOzr4DAt3Iu6iHER0/j1UwO07Qn0zEat/sENne dnr8fzFzkCIEmpFwwcnZUrfplcMx/HG4LZhqROIcIFyvnQniLeL4fqw14oM48w9l NJ1WOxP40lCeeUCmjxXu2+8YfnZC3ZSIIooqkoGeZpuQSDaO4Pb0QGJkTkstlmgn PVchO3fBF83UKDSlQ3pjW1JzHz/fdGcRF6F+n+8ojHddjutJsA58zmOj/mSjQnOf k68iA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeekveelhfejueelleetvdejvdeffeetgeelheeujeffhefgffefkeehhffh keekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 8 May 2022 21:21:22 -0400 (EDT) From: Samuel Holland To: Daniel Lezcano , Thomas Gleixner Cc: Samuel Holland , Albert Ou , Atish Patra , Dmitriy Cherkasov , Palmer Dabbelt , Paul Walmsley , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH] clocksource/drivers/riscv: Events are stopped during CPU suspend Date: Sun, 8 May 2022 20:21:21 -0500 Message-Id: <20220509012121.40031-1-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 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 --- 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