Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2653987ybk; Mon, 18 May 2020 04:48:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1u+/tWMlcfHONuyZ6j8Td/81gcvreW/CcxFqZia8y40ODcNRuSjTwLldtR0svwCif2svN X-Received: by 2002:aa7:d0c4:: with SMTP id u4mr12808414edo.44.1589802522731; Mon, 18 May 2020 04:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589802522; cv=none; d=google.com; s=arc-20160816; b=BHpJeJUQl6Vc7lVrGHBzPdvtNZfhezlsQZKfXsXdaSEYaqfTQJXxvDtnUaCDJK32Ie TH4umPJ4S5Geayfcf+o6JA/AD01puO31CH3hRiH4vAI7DyYc1AfJw3RgR2vHyRk8SGK6 e8RTcMnHXhgoSCr4ZrFRGSH9zXGAedGdz7RjcJXfXyKya3JdDFkqxSbVsVeQFalawUu1 lVEbqx2sN3EnTOdJxODkgID65ToizHFX6jMkSUOD22cuQ3sXH/0gP3R9PnlZsPmMg7QP cRz7OK/4GHeZEhd9OHUdxfkd/8nrwGryly9WaKE9kDTVLdX/yrI9N1oDW1F4BevBCQiE YDjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/+h/QADilkLXAAqEbNjayFiUXOxdF0Ou6pFZQNdQMpw=; b=t8M0630M/vxaySayPvdi8x6Z46zdakCN0/SQPLi7wEGnK1Iw+Jo+gzgn8251WxjaSs 7peJrp4qE4bppqGauwypYlRtrEJfNtQCiGNSYOWoz3CRgDB9LSTgEXVIb1qI9FWcUGyi 3+tZlbRFsgLauyRYX0Y0eykkWgdnClMHUvRcymGFJTd95MP81cs/nRQhXGorgYBWoAbh zIr3d+mdkHY4QC00zgPqWVQ2r7IJiskT0Fligu+vlMsT81h0P0o0WRmAhyXpXYnF5Yii Ws/VPgJBgzL2U4rvFr1qCcxyPAvWNCMlYlW0rnouvVlMuV7qIc8lN87nGoQgM/FMRUvF S3MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BohCfE7L; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si6487688ejx.200.2020.05.18.04.48.20; Mon, 18 May 2020 04:48:42 -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=@linaro.org header.s=google header.b=BohCfE7L; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbgERLnx (ORCPT + 99 others); Mon, 18 May 2020 07:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726957AbgERLnw (ORCPT ); Mon, 18 May 2020 07:43:52 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21FD2C05BD09 for ; Mon, 18 May 2020 04:43:52 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id x2so4821074pfx.7 for ; Mon, 18 May 2020 04:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/+h/QADilkLXAAqEbNjayFiUXOxdF0Ou6pFZQNdQMpw=; b=BohCfE7LN+qojReJbiEHPS1E31OWhUKd+62lCnoHK6LR3FKHuXwhhH1ROmi9SxW/F8 nxwNqtHH3/Ubg5gzXQxy88TH+LwH3oK+aZ2Ur/lNR/H1lgapWWSly0Nh7p/BUunwkL6j YMG7OJ0jyMtkc5+/eT/1nL2RAZZpstd34xKl2PfksIMK8IqcEdzzsiIGH+zAvYo8Snq7 HAc7I8yDOb11/+Bo8IJLUxNK0yuV8CeShO6JNFSw0bxihWcMqDE8I6yrG5fYvmfM/Jx0 +JU/m7SQipisQniBueJ1qScnkeelCzIONkSZRi4o3o3VE7D7RjiYj8hUWizJCr0NXhwG V8Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/+h/QADilkLXAAqEbNjayFiUXOxdF0Ou6pFZQNdQMpw=; b=g5cONNxj6PgaOArZssXEVTyJtXWzK74dKM3hAg50tt6Iyg6wZ5ku8sc7b0tFElpuYn PRB0cSCowkJ0DUcQWXlGXyJKX3HzoAujx+pn4NpdO0RypyIOVNlumqVquQcFaQ/73T+w b/LLVRMaDhriO/1HNXKwMxPHsBjPVK5QSkW6gy2TdXc+pENOCyLiGQdgCKTrE0jtE2YR Qyhvx17265eSsrSn7NEW/4S9VI81Gk/fK8FKTVcDE+XpPU8uk/0dge2IQgRrpy1k2NsU LyxFkD2/8B/Vs4kazWaTbNvQTVrGcR7EBS8nnvWwsGUNjMAzamDuuSbZnory/pNgk4B5 Fj/w== X-Gm-Message-State: AOAM5322PtzTcVputZYo7upyHfN4PYgSlECkcLacQT9ex03tzq+0B2Y7 NEDAP5QqgmVT9N/Pjpe68m+xcA== X-Received: by 2002:a63:c04a:: with SMTP id z10mr14307442pgi.430.1589802231701; Mon, 18 May 2020 04:43:51 -0700 (PDT) Received: from localhost ([122.167.130.103]) by smtp.gmail.com with ESMTPSA id lj12sm8539173pjb.21.2020.05.18.04.43.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 May 2020 04:43:50 -0700 (PDT) Date: Mon, 18 May 2020 17:13:48 +0530 From: Viresh Kumar To: Xiongfeng Wang Cc: rjw@rjwysocki.net, Souvik.Chakravarty@arm.com, Thanu.Rangarajan@arm.com, Sudeep.Holla@arm.com, guohanjun@huawei.com, john.garry@huawei.com, jonathan.cameron@huawei.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 1/3] cpufreq: handle the return value of '.set_boost()' properly Message-ID: <20200518114348.z55kpbhgbfxenrhm@vireshk-i7> References: <1589785808-12138-1-git-send-email-wangxiongfeng2@huawei.com> <1589785808-12138-2-git-send-email-wangxiongfeng2@huawei.com> <20200518074619.yznopcgqmoq6ds7t@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200518074619.yznopcgqmoq6ds7t@vireshk-i7> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-05-20, 13:16, Viresh Kumar wrote: > On 18-05-20, 15:10, Xiongfeng Wang wrote: > > 'freq_qos_update_request()' called by 'cpufreq_boost_set_sw()' reutrns 1 > > when the effective constraint value of frequency QoS has changed. It's > > not an error code. So handle the return value 1 of '.set_boost()' in > > 'cpufreq_boost_trigger_state()' properly. > > > > Signed-off-by: Xiongfeng Wang > > --- > > drivers/cpufreq/cpufreq.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > > index 4adac3a..bb6746e 100644 > > --- a/drivers/cpufreq/cpufreq.c > > +++ b/drivers/cpufreq/cpufreq.c > > @@ -2540,7 +2540,10 @@ int cpufreq_boost_trigger_state(int state) > > write_unlock_irqrestore(&cpufreq_driver_lock, flags); > > > > ret = cpufreq_driver->set_boost(state); > > - if (ret) { > > + if (ret == 1) { > > + pr_debug("The effective constraint value of frequency QoS has changed.\n"); > > + return 0; > > + } else if (ret) { > > Rafael, IMO it is better to pick patch from Sergey for this as this is > implementation detail. > > > write_lock_irqsave(&cpufreq_driver_lock, flags); > > cpufreq_driver->boost_enabled = !state; > > write_unlock_irqrestore(&cpufreq_driver_lock, flags); This is already fixed in the PM tree with a different patch Xiongfeng. -- viresh