Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2210471pxu; Sun, 6 Dec 2020 23:49:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJbJraDd3C05yKQG+juBhP1inKLJ3MWmgrt0HImswBrVydfhVvAxdXy7akAHaMLbT1DowP X-Received: by 2002:a17:906:447:: with SMTP id e7mr10556415eja.172.1607327391453; Sun, 06 Dec 2020 23:49:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607327391; cv=none; d=google.com; s=arc-20160816; b=Q3mS1lG/WAOxLBdsXDgKQhtXHu9e+bzcJKQD71PgDXDKSrHKJhg1s1gFNRGce9MbIM 8tA0vPcL79IMZIA1S/Lqp4EHF7ODkHQaegCFGAiSUj0CCGtoaXsGHL8xPOth6LoS5d3F rzHCKrLtoBlK5ig5NF2kTWsJ6cNaEGNX/SRD2hy+PSSCv/xPpQNKMFTzPts45wkYuyy3 hlfTr5GsvqEcYD8HSDY9gqCd54Rv3yCuh9EeIWCbB/KFqKUOqrprRBYLxkhHgLkbizot YKR56B3eOLUwNFgXbSewE5r0q8q1PHFnl+cpq+j461M6D+k1YUy0Mvtyg9NBziSkd0rw 4vLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=siy5k+plcJtXdcMZn6ACu9NpjqM7plnkiw05pK5XU78=; b=TKC3LVgsWs9SHSkBCZRqCoUuyBvJ8Ec25FLWmXNjwAwDYJOnCAv0YwhY7fE6RYdfc5 KAKeJfCiMZGN0LwINQfjGQVtFnPJoV6mpv5NkV97gOcxPxVn7DF3DDc2SdnQ6rJxEibi oy5HGtROwhNJ82w4zzQYXR3Ky6MTvVd+9dRN0zK2say4+HIGQp/sjHnexoXp2tzUScX3 dl/JkuDWOktN2yNlLnfzNJ2WdGsMdBdoL22kbbBzUFv4E9sgBAj3gv836ixgzW24LKiO 2n+wMIHkd1Fv+pPKQVT1Oct7qw5xNBebLIjiGOnP70tVMCEZafD7g5qrf3XH95gbrmNN BDng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SDUXu+D0; 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 d16si6348373ejm.152.2020.12.06.23.49.29; Sun, 06 Dec 2020 23:49:51 -0800 (PST) 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=SDUXu+D0; 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 S1726067AbgLGHq7 (ORCPT + 99 others); Mon, 7 Dec 2020 02:46:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgLGHq7 (ORCPT ); Mon, 7 Dec 2020 02:46:59 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F853C0613D3 for ; Sun, 6 Dec 2020 23:46:19 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id 69so353837pgg.8 for ; Sun, 06 Dec 2020 23:46:19 -0800 (PST) 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=siy5k+plcJtXdcMZn6ACu9NpjqM7plnkiw05pK5XU78=; b=SDUXu+D0A6hVVfD7s9o8DA/1jQ8Bu8P0p8WJ72Zd8IiPT4Jbd36OkBflzx5nis97e7 2m+YWrHHdHGVquqwdMRyTXd5AnglaWoSG0eV6tKGxXmzW+a5GwSp7V71wKEwMpJOXHMs TIOd0RDwkoVEhMq8PpWQpru6n3UIkct5T95tfzH9yX5AlilLX5Q5Fx5MqoygwCmEwLvB FPmFW57vMqXXyrDjZkgJPNRCzYytAvf4cuT/08hU54TWqXSt04STB3EFnpu7qH4X5L1s G7pSSFaShvs7GSinDFoY7GMzwoeBgorkdGaPSWmuVKDxcuLpMDcuMN7lNi8DUwG9w8ev AFhQ== 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=siy5k+plcJtXdcMZn6ACu9NpjqM7plnkiw05pK5XU78=; b=L2HRLTgaGbrCv7cfmQPqxEnwG1oBf6g3ul5qpDQG53W7fLAbq8V9I40CqqIE2V9yZv ZvHpgItY8hy3DvfWy5n8X2mcoFfPAkjHoz4inEgr8nUtjtqSU61AGs7Lx62lnBZtJatk A2deb2vJfNSUEL9ZEhJIf4lcKyzr8pjYpA2XOrEwbx9zGkHYknNzyf9k1uuqpU6jQ2ho QsJ/1lfhxjBDMDCbEiUWmrJKkEQFQRvnuki+IU7BVtX9G28rMF2ea5Yk7BkjiD7qBGpQ FBhBnYLl5fR8x3W633OqojMCMfo8KPGGMDNkNH8j7Lg1f1SDQ5GUWI5snQsqF2lFYzzm ADsg== X-Gm-Message-State: AOAM532EgaHSX3UFTq49EzsDFJLuYgnVoEsZredo6wwea32xnCDkVPGz I912GND2gQtspE4dGX0d5+MfZg== X-Received: by 2002:a63:c843:: with SMTP id l3mr17438532pgi.202.1607327178597; Sun, 06 Dec 2020 23:46:18 -0800 (PST) Received: from localhost ([122.172.136.109]) by smtp.gmail.com with ESMTPSA id c184sm521086pfb.11.2020.12.06.23.46.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Dec 2020 23:46:17 -0800 (PST) Date: Mon, 7 Dec 2020 13:16:15 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Srinivas Pandruvada , Peter Zijlstra , Doug Smythies , Giovanni Gherdovich Subject: Re: [RFC][PATCH 1/2] cpufreq: Add special-purpose fast-switching callback for drivers Message-ID: <20201207074615.kmvy5afoolhv5cgq@vireshk-i7> References: <1817571.2o5Kk4Ohv2@kreacher> <2174134.tL5yAn4CWt@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2174134.tL5yAn4CWt@kreacher> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30-11-20, 19:37, Rafael J. Wysocki wrote: > Index: linux-pm/include/linux/cpufreq.h > =================================================================== > --- linux-pm.orig/include/linux/cpufreq.h > +++ linux-pm/include/linux/cpufreq.h > @@ -320,6 +320,15 @@ struct cpufreq_driver { > unsigned int index); > unsigned int (*fast_switch)(struct cpufreq_policy *policy, > unsigned int target_freq); > + /* > + * ->fast_switch() replacement for drivers that use an internal > + * representation of performance levels and can pass hints other than > + * the target performance level to the hardware. > + */ > + void (*adjust_perf)(unsigned int cpu, bool busy, Maybe this should still take policy as an argument (like other calls) instead of CPU, even if it is going to be used for single-cpu per policy case for now. > + unsigned long min_perf, > + unsigned long target_perf, > + unsigned long capacity); -- viresh