Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp488663ybm; Thu, 28 May 2020 07:54:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykmAfTe+NUhnyx9ZQEvM6ZPwEqHw/Z5TrIzwsBukjiSz63/HDl3h07Xn1+WZRf6CRme1TE X-Received: by 2002:a05:6402:17af:: with SMTP id j15mr3415584edy.67.1590677655365; Thu, 28 May 2020 07:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590677655; cv=none; d=google.com; s=arc-20160816; b=zvGRCkkOdJZz4a05ZKPX12ZJ3U2tzP8pVPKpJnJFfEmZIFfzCMKutNbJgLKUdQuDui ffqzLSiwokIUvp+K+ZaE7ayU3hE8l1+cIHWd56cvbBcpOOwW55nolPafyrB5r3Qjz/g1 CH2J9I9FgV7cDo//BI1Ce1G5O1fyIPNRpE+YR32CcYAsbgIHlwLs1OHUQgkXBmaG0KIN anuBaArtuuwwGFUA2lCze8MWb6Euals4Ad5HX+X5tpfWOJlv9/zXvUHcZ8AUbtpIGi8v JPBaAK2LDwe20mkuYzKoDkz4VoCRz9ZdC4WjXPm0+uz24XXJfHUbApN2Xoh5XsAXuHvG Dw7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ps973uR8lunIoKwykKoQXnDQqkoCFXXUfBJCCsrchr0=; b=NddzZyCIASdud8v1zO9Q2lMkIZVZ91PQjsTzWXYx2ozmFCPYlAXJQzidcP9pQT416O Jqv5Uyr7/iygcZDJfNDKvn7WOU0SekzLnU85qXT8OSw23Eu3I1NwmuRO3lG2K6Wm45DK 0yRIL/KC6I8OtZ+5O4nYGB/tykj1BDmZkZclvTbESyC1wB0Rr9YdoeJgkGVpgHWew0U3 hbZhncZUTTOBNa1tPJT8o9L092xZl29PVaeDeCmfWRI9a7V/V4MffPtYbAEcXhsaqn/9 scwxILxh6bZtAC9hus6hdO/xbX9ikgCH5NCQv2+Kv+LOBTqdKdKWL9AbygaHu5DrA0V8 m8gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gObEdTFt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si3612462edb.536.2020.05.28.07.53.52; Thu, 28 May 2020 07:54:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gObEdTFt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391230AbgE1Ov0 (ORCPT + 99 others); Thu, 28 May 2020 10:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728638AbgE1OvS (ORCPT ); Thu, 28 May 2020 10:51:18 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63F77C08C5C6 for ; Thu, 28 May 2020 07:51:18 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id d8so166214uam.12 for ; Thu, 28 May 2020 07:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ps973uR8lunIoKwykKoQXnDQqkoCFXXUfBJCCsrchr0=; b=gObEdTFtoIohbbXUidGmBxpcoxQBs9V4kLQLJAksfxwwA0CbdEe0Ya72vYFDJCixuf IPhL1NfiNcTN8UJIQCCYYsGiOzI6fyqWDhKhEeymcBNr4I/lMAV/BIGuqnrvpMZUE8vQ cMHgj7hlNOCvxI9lsii91xDWgAzQDQsv2pBCQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ps973uR8lunIoKwykKoQXnDQqkoCFXXUfBJCCsrchr0=; b=qmUnSs1jXp7uBZ32UcceVji9Sh6OH8Z6yyba8MOZPL2lBi8zmrG4U2ngj0wEEHst2T GhviMwNx+dc7wktrHLPLbOE77uovOTgVJPoWQeVRQ0RVvSJaDrunZFYVoDTsOOsz9qRB O4cyLROSUHKNrAxQSleVuLio0SVga33iTHKC3dH/xplRPjwDjlP7HyjkG+PCWaMpqCm5 +UzN4pkcAJxK4GIVJjM/o/qoVjTN4dlNgXjbW47iUxDydd2V2MH1EIyR36ar4F7NPbDX Xy8tPp86QG1qrW3pq4ybi8FSkgTat8MBtB8D8K7sWTbd1//aMfN+kPe1AuT6o5wqxlhn zXrw== X-Gm-Message-State: AOAM530ESB8ZzNjPnakNKP747Vakox0BhGVz3bxo5KluSsu7w5zIEGji 7GPUuZCYbTSuC32b4p4H9cBHkXBZOzw= X-Received: by 2002:ab0:648e:: with SMTP id p14mr2417856uam.14.1590677477120; Thu, 28 May 2020 07:51:17 -0700 (PDT) Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com. [209.85.222.48]) by smtp.gmail.com with ESMTPSA id a7sm571859uaj.4.2020.05.28.07.51.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 May 2020 07:51:16 -0700 (PDT) Received: by mail-ua1-f48.google.com with SMTP id c15so2961468uar.9 for ; Thu, 28 May 2020 07:51:15 -0700 (PDT) X-Received: by 2002:ab0:1684:: with SMTP id e4mr2129380uaf.22.1590677475235; Thu, 28 May 2020 07:51:15 -0700 (PDT) MIME-Version: 1.0 References: <20200415095953.v3.1.Ic70288f256ff0be65cac6a600367212dfe39f6c9@changeid> <20200415095953.v3.2.I8550512081c89ec7a545018a7d2d9418a27c1a7a@changeid> In-Reply-To: From: Doug Anderson Date: Thu, 28 May 2020 07:51:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/2] soc: qcom: rpmh-rsc: Timeout after 1 second in write_tcs_reg_sync() To: Maulik Shah Cc: Andy Gross , Bjorn Andersson , Matthias Kaehlcke , Joe Perches , Stephen Boyd , Evan Green , linux-arm-msm , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, May 28, 2020 at 4:44 AM Maulik Shah wrote: > > Hi Doug, > > During suspend-resume with this change on sc7180 using latest > linux-next, below warning was reported. > > WARNING: CPU: 0 PID: 5324 at kernel/time/timekeeping.c:754 > ktime_get+0x94/0x9c > ktime_get+0x94/0x9c > write_tcs_reg_sync+0x4c/0x130 > tcs_invalidate+0x64/0xa4 > rpmh_rsc_invalidate+0x20/0x38 > rpmh_flush+0x58/0x1ec > rpmh_rsc_cpu_pm_callback+0xe4/0x144 > notifier_call_chain+0x58/0x90 > __atomic_notifier_call_chain+0x48/ > cpu_pm_notify+0x40/0x6c > cpu_pm_enter+0x34/0x7c > cpu_pm_suspend+0x10/0x20 > syscore_suspend+0x128/0x2a4 > suspend_devices_and_enter+0x5e0/0x8a0 > > This seems to be because timekeeping is already suspend by this time. Thanks for the report. I posted: https://lore.kernel.org/r/20200528074530.1.Ib86e5b406fe7d16575ae1bb276d650faa144b63c@changeid I think there are still a bunch of not-yet-landed patches needed for suspend-resume so I only confirmed that the code still works OK for the idle case. Hopefully you can confirm s2r is good, though I'd believe it should be exactly the same. I'm 99% sure that udelay() still works fine even when timekeeping is suspended. -Doug