Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8380981rwr; Wed, 10 May 2023 23:54:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iK2NUGwDfOhtxZbUTJSGl7lD4mV9zR5mJ1klsxAP5d5a1KBXhAvsOfi7J6xytJmQ7txuH X-Received: by 2002:a05:6a20:4324:b0:101:2f83:5fba with SMTP id h36-20020a056a20432400b001012f835fbamr11918703pzk.31.1683788054047; Wed, 10 May 2023 23:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683788054; cv=none; d=google.com; s=arc-20160816; b=d5WHhMUFvkspYm7KdDYs2s2glgP7cqNZ2UdFCdWlRfukyskVyvJtxs1gaWMAhYkw9a +EpKdiB487VH0YnGpzJKctw3tHyBXBNvIiBHP0DOzImGRCSD5/8CwKYrJDqIoBZZ/VFy aRRMMYmPNYrJoxgRB1HZzNN8krchWBKuDPuxcVnWX+CJ8EqqvpUrHNqFYIgBtHbPxLFb MRwJeCbXW/l302Ma50P3tvkHMqCTD0wBDBl3UGgO2C0bI1ugBM7PCUyORDPe+cgZlw3A TuvB4p1RtWGrL9ewUlTDR5L6CT2W2sQCNk+I6fcH3hVHnzLNk3MtdSnOds2v8vaN2zXo NuWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Fo98wMewbedmeBMq5ciRokAcVzkujILLfiWVr9nz4yM=; b=zTXPkY4GGqR5O10CZc0tQA+0YZ4+XJLcWvAmsPTjcH1HD7HUa8XJwa/S1h7DrQsftF o/EiIkeAUBwAHPSfw4sTNukqZ2wTtFoJj5iyLbmnfISZpDkK1ul1nLudMwjS4x9ntqRC 7UZ2jvWEAlgXCujXMNwas2C589lLZ2fYDPtoZoqdOasPZ26HzsuAR5a+SLA9wdsTV2NY mo3PHUM9Wa3XLS7cE4Z6sxwregf9tAVNYO72RcjvHImh5n+Rn1u0ZwoUXCGFw+c4i+5g yS9Mnw9VMbBJW2/BxfYnddRGYFMR+wHQnGZ2Zz5BNLN1bk4vnP/hfq0NGGL9KwyASAEb Rk6g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a17090a6e0d00b0024696759991si19031984pjk.47.2023.05.10.23.54.02; Wed, 10 May 2023 23:54:14 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237068AbjEKGsK (ORCPT + 99 others); Thu, 11 May 2023 02:48:10 -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> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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, * 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