From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37278C77B7C for ; Thu, 11 May 2023 06:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236570AbjEKGsI (ORCPT ); Thu, 11 May 2023 02:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbjEKGsI (ORCPT ); Thu, 11 May 2023 02:48:08 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 240E14C13; Wed, 10 May 2023 23:48:07 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 7F4B0807A; Thu, 11 May 2023 06:48:06 +0000 (UTC) Date: Thu, 11 May 2023 09:48:05 +0300 From: Tony Lindgren To: Geert Uytterhoeven Cc: Stephen Boyd , Tomasz Figa , Sylwester Nawrocki , Will Deacon , Arnd Bergmann , Wolfram Sang , Dejin Zheng , Kai-Heng Feng , Nicholas Piggin , Heiko Carstens , Peter Zijlstra , Russell King , John Stultz , Thomas Gleixner , Krzysztof Kozlowski , Tero Kristo , Ulf Hansson , "Rafael J . Wysocki" , Vincent Guittot , linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] iopoll: Do not use timekeeping in read_poll_timeout_atomic() Message-ID: <20230511064805.GF14287@atomide.com> References: <8db63020d18fc22e137e4a8f0aa15e6b9949a6f6.1683722688.git.geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8db63020d18fc22e137e4a8f0aa15e6b9949a6f6.1683722688.git.geert+renesas@glider.be> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi, * Geert Uytterhoeven [230510 13:23]: > read_poll_timeout_atomic() uses ktime_get() to implement the timeout > feature, just like its non-atomic counterpart. However, there are > several issues with this, due to its use in atomic contexts: > > 1. When called in the s2ram path (as typically done by clock or PM > domain drivers), timekeeping may be suspended, triggering the > WARN_ON(timekeeping_suspended) in ktime_get(): Maybe add a comment to read_poll_timeout_atomic() saying it can be used also with timekeeping_suspended? Otherwise a few years later it might get broken when somebody goes to patch it without testing it with timekeeping_suspended :) Other than that looks good to me: Reviewed-by: Tony Lindgren