Received: by 10.223.185.116 with SMTP id b49csp940334wrg; Fri, 16 Feb 2018 09:36:16 -0800 (PST) X-Google-Smtp-Source: AH8x226dVa7JvLq99ZK7eWpLwsaN7MwdaDBAnvfaGSnQg/NzkxsY5z/H68MswembxnB5KF4ITKDh X-Received: by 10.99.188.2 with SMTP id q2mr5856033pge.101.1518802576891; Fri, 16 Feb 2018 09:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518802576; cv=none; d=google.com; s=arc-20160816; b=r6rSmukWJvIG54VMXHqwVbZ4dhSUImB5ExLQi8xHJQL8dmcvq7oPCijmPBwFNOx3TV ladDFfo7Rf3PMX4NUSenaP8MVXHEvn6dpGYUgfp8p5SA7lJ8Eh/zrwVNnFtxNKSJdumu hU1RkHcFlRvumvN40tBsh2fAadl+d3GVUF2wXacEqGcnxSGbvzjfbB91QdVntyNI8hcY umo9mcLaNOXTs2n4/FqGby7oTdQEXadx3BtPQxOC7w2W0KL94qP/bwKh9XoXS0EJ49BM zDH/2pninzTqxvWvezrD90HMBT77waW+bEzWShNTtUt7uzO241TJmd7CIxs7QLuV8bDF lmYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=x9GKzVUtN+jblrAkmUUzzQk6QA7JU9qPZsbUW4tz+UE=; b=RagJRSV20/1+C2NKtA0nv0WLYidcms5tBz1imSZvzgGXPgWD5+BYDLzK/nxHOLmVSw c/cBwLeGUO/0YRyCVx68g3rtrQAuVlWXdybkAyNPQjXED+8Cp0MjjnFoiw2V8UOlS7yW mMxxaUdIWa+P6GRgQZdxtiJ5HDs79fhlym9qt8EgJpphiRqIK9x34nNKGreNXYwt8Q1N C46lZEBd2u78Qwed+CIqySU+PPfgFnP7FW2+U0bvUiJsyNdoaZFoIs6wGNHz3GecAJNh OxxJLEVZHGP336a5BJZGSr5adtPZ4UIOI2M9Igdn1POltN35HuME349Y7qtN575w5xYL KkGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=K1h3L+PU; dkim=pass header.i=@codeaurora.org header.s=default header.b=K1h3L+PU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si2786027pgd.335.2018.02.16.09.36.02; Fri, 16 Feb 2018 09:36:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=K1h3L+PU; dkim=pass header.i=@codeaurora.org header.s=default header.b=K1h3L+PU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755972AbeBOV1N (ORCPT + 99 others); Thu, 15 Feb 2018 16:27:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35652 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755950AbeBOV1M (ORCPT ); Thu, 15 Feb 2018 16:27:12 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DDF1560960; Thu, 15 Feb 2018 21:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518730031; bh=YaHR+MUjJRdylMN/+xHWJmAsIQ74Fhju2yx055ejjS8=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=K1h3L+PU4UA4Yzieq3qRciwUWcksoP9MLwiinYELgoCf239WVSgflUw4r0eS8zAaa jQsgmn8IIDU9PsomveWRQPwgJxv7/mFjoPObhcJw0wcyY7pH7ScxOpKJmYhPqJtw8d Gb2U+mHe1tOn+T4IQgxp7y/woCuY+v/oVqZZSic0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.134.64.210] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: skannan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 21A3960960; Thu, 15 Feb 2018 21:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518730031; bh=YaHR+MUjJRdylMN/+xHWJmAsIQ74Fhju2yx055ejjS8=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=K1h3L+PU4UA4Yzieq3qRciwUWcksoP9MLwiinYELgoCf239WVSgflUw4r0eS8zAaa jQsgmn8IIDU9PsomveWRQPwgJxv7/mFjoPObhcJw0wcyY7pH7ScxOpKJmYhPqJtw8d Gb2U+mHe1tOn+T4IQgxp7y/woCuY+v/oVqZZSic0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 21A3960960 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=skannan@codeaurora.org Message-ID: <5A85FB2E.2050407@codeaurora.org> Date: Thu, 15 Feb 2018 13:27:10 -0800 From: Saravana Kannan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Viresh Kumar CC: "Rafael J. Wysocki" , Bo Yan , sgurrappadi@nvidia.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended References: <1516744675-21233-1-git-send-email-byan@nvidia.com> <20180205040118.GB28462@vireshk-i7> <1710637.vo8uP0oTBm@aspire.rjw.lan> <20180205090546.GE28462@vireshk-i7> In-Reply-To: <20180205090546.GE28462@vireshk-i7> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/05/2018 01:05 AM, Viresh Kumar wrote: > On 05-02-18, 09:50, Rafael J. Wysocki wrote: >> By design (which I admit may be confusing) it should be fine to call >> dpm_resume_end() after a failing dpm_suspend_start(), whatever the reason >> for the failure is. cpufreq_suspend/resume() don't take that into account, >> everybody else does. > > Hmm, I see. Can't do much then, just fix the only broken piece of code :) > Sorry for the late reply, this email didn't get filtered into the right folder. I think the design of dpm_suspend_start() and dpm_resume_end() generally works fine because we seem to keep track of what devices have been suspended so far (in the dpm_suspended_list) and call resume only of those. So, why isn't the right fix to have cpufreq get put into that list? Instead of just always call it on the resume path even if it wasn't suspended? That seems to be the real issue. So, we should either have dpm_suspend/resume() have a flag to keep track of if cpufreq_suspend/resume() was called and make sure they are called in proper pairs. Or have cpufreq register in a way that gets it put in the suspend/resume list. I'd still like to NACK this change. -Saravana -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project