Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp336605lqb; Thu, 29 Feb 2024 02:22:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUQIlO0YP7tKpqCcZryatbgofUvm/daK8gEOH+y3wMRuqBZ4wqnOtFsNKUFOP58GwiEuMX9xopYWQLqhlh21FqNVeEBVltWdNuEkq93vQ== X-Google-Smtp-Source: AGHT+IFnKiF6FH9w10ip9gluz9vbzGAlKMEjoTK6zRTvmsVaygTUDun9IS6w4U9GbZQbc72kK9O/ X-Received: by 2002:a50:c8c9:0:b0:566:4aa9:7143 with SMTP id k9-20020a50c8c9000000b005664aa97143mr1060426edh.14.1709202173533; Thu, 29 Feb 2024 02:22:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709202173; cv=pass; d=google.com; s=arc-20160816; b=rfGQIwpPoMLo7u76Byrb0mbJuIbp9AB3GEf9bh9mgNyzcOOHoSydkzTzgWOXATlGGC 2QA2KcyZzc1SUNuLYzqVsT+CYiDRspnGElGAcWaaUFeWXcNOTTU/h5rMcuXM2+ScrFje 7fns7XnZ5BJa3/UTsbJdGAlRb9geVkoBbH64jHTRJ9YQFJlQKt0HGKQjGJCRB5RhjgRq rf5BBCs2D/vGf7bZqYc8zw/CmUAc4YnoZMWBFbs1g3KPqIWu39qIqqhgI3xuRE9EoEhS 8k50unFbSeCiQf/NJ7B3TXMKbJXXq/MEEWoq8kAiylgtPkYDUR/5oXE79svtsC93H3cE 4s5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=OQ+ZcX/wIW66mADd62JazDmWZBDhy+cAgQTyzzGXsiE=; fh=rTYF8/qFtIdBal8fILtFjm692fGT8KNU8arja5ZZw+o=; b=0ijtcUHCfQ7uyM7zbmBN3B027uGrVoG81g3j/UQu9jT01xsZeM3R9I1VPOGdxHkfv+ qO87nozjzEbgYlqfCh6bmAQmOs27G/XrwwN9oMKrDNIKsa9J8xCDTrfAAlXhk3b37uh6 s8Sfxx4jlSsNP+W88zaRMcEVYpg0nb3ayVU5hr+dr+sVMa02GITlDMoyEIH38dDogZTe CZJP9zz104LzwckODVDHUzXv2A3t2fg5njVGRso0v8kAnhs4ks+jFO9Ur868bSdqFHEF XKjJZL0DGd047/zSnDSgyvFVesRuA/UQxXcDzxRtwaNl4t+ZOm7yN6zjq/IsZ1SEFY97 /9Pg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-86540-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86540-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u30-20020a50d51e000000b005643f5aa720si459693edi.392.2024.02.29.02.22.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 02:22:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86540-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-86540-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86540-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7D8E51F2253D for ; Thu, 29 Feb 2024 10:22:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B52C64CF5; Thu, 29 Feb 2024 10:22:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9A4A64CC9; Thu, 29 Feb 2024 10:22:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709202146; cv=none; b=L/SWL9O1ZCmRH5GHveGuNW2FmzS3nVpN31Zuy2nfDVRsFctdv7r5oMYqP9Ka0DE1kIhkxQqOT05UdL53fFBr7rWGur0Um6jQ0hRWNU1S0IQso0y3U8B1V3BqGwf3fS6xLtWAb4KMdyVup95sqw6hyr3Gw1g59jl5OKUOTVIeRi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709202146; c=relaxed/simple; bh=zC+rOfgZk0FjySsxZFgupFvl2AUI4LOD52LgDdh6ffk=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=gHQzYXJwBPgnFMXl0/qDKoglVckRTasG1+UVYiM3nxhUr5Q2OVVOgQC4+RdifcwZ1hgznLw05JPj4lEO96+00irChYugRmjtKOUlbcFw/MqTUQUum32geTuc3fqawmBk4LPzUEfFSMikuE8kvq+Nq+YV+O/26KFrFxaeu0vaUqM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CA8831FB; Thu, 29 Feb 2024 02:23:02 -0800 (PST) Received: from [10.57.12.184] (unknown [10.57.12.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 99F903F762; Thu, 29 Feb 2024 02:22:21 -0800 (PST) Message-ID: <18c249b2-ce8c-435b-8d65-a1770a1f294e@arm.com> Date: Thu, 29 Feb 2024 10:22:39 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V3 2/2] cpufreq: scmi: Register for limit change notifications Content-Language: en-US From: Lukasz Luba To: Sibi Sankar , sudeep.holla@arm.com, cristian.marussi@arm.com Cc: linux-arm-kernel@lists.infradead.org, pierre.gondois@arm.com, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, viresh.kumar@linaro.org, rafael@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_mdtipton@quicinc.com, linux-arm-msm@vger.kernel.org References: <20240227181632.659133-1-quic_sibis@quicinc.com> <20240227181632.659133-3-quic_sibis@quicinc.com> <2608b2d8-f3b0-b4f5-f8e4-1f2242043ded@quicinc.com> <64c6a1bc-92f2-4f44-ab10-cbd2473746f3@arm.com> In-Reply-To: <64c6a1bc-92f2-4f44-ab10-cbd2473746f3@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/29/24 09:59, Lukasz Luba wrote: > > > On 2/28/24 17:00, Sibi Sankar wrote: >> >> >> On 2/28/24 18:54, Lukasz Luba wrote: >>> >>> >>> On 2/27/24 18:16, Sibi Sankar wrote: >>>> Register for limit change notifications if supported and use the >>>> throttled >>>> frequency from the notification to apply HW pressure. >> >> Lukasz, >> >> Thanks for taking time to review the series! >> >>>> >>>> Signed-off-by: Sibi Sankar >>>> --- >>>> >>>> v3: >>>> * Sanitize range_max received from the notifier. [Pierre] >>>> * Update commit message. >>>> >>>>   drivers/cpufreq/scmi-cpufreq.c | 29 ++++++++++++++++++++++++++++- >>>>   1 file changed, 28 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/cpufreq/scmi-cpufreq.c >>>> b/drivers/cpufreq/scmi-cpufreq.c >>>> index 76a0ddbd9d24..78b87b72962d 100644 >>>> --- a/drivers/cpufreq/scmi-cpufreq.c >>>> +++ b/drivers/cpufreq/scmi-cpufreq.c >>>> @@ -25,9 +25,13 @@ struct scmi_data { >>>>       int domain_id; >>>>       int nr_opp; >>>>       struct device *cpu_dev; >>>> +    struct cpufreq_policy *policy; >>>>       cpumask_var_t opp_shared_cpus; >>>> +    struct notifier_block limit_notify_nb; >>>>   }; >>>> +const struct scmi_handle *handle; > > I've missed this bit here. So for this change we actually have to ask Cristian or Sudeep because I'm not sure if we have only one 'handle' instance for all cpufreq devices. If we have different 'handle' we cannot move it to the global single pointer. Sudeep, Cristian what do you think?