Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp507023ybt; Wed, 1 Jul 2020 03:49:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbehBqLG2F4/DgMQIGXvUWhXjaAsgzZX8yHHeYLoKfKuRPuKJ4TkyQzNYg5zCEPNMqNRLk X-Received: by 2002:a17:906:1688:: with SMTP id s8mr13158096ejd.164.1593600597108; Wed, 01 Jul 2020 03:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593600597; cv=none; d=google.com; s=arc-20160816; b=w3CRd5qx43EbUy8syCsoKVW9aNEX/2S/k7Fs3M0db0Bm+WPBXCpQ0N2Cr7wTiWGupN vQpX4PGg/qS4eO9TGPhb9oUbiyK1YHr+GJ5aPvWorkaOGAw3B2C7JTcot3ZvHGKMmNQZ v8jO3bl+ki2g4EchihpJTZ1+mOWHuyOYgoW27DMSrD7lBOj3IUUG5x99tsM//0pj16AX Z2VJMCDJTcKcWwM02XdgOcp22xCBoiXvypRMVC5EqZGt3Mjk4Ydnvb84DR7LGm4Td0Gg IcQDxdeSdJV3WnH+kJBZyKhwX71JaqsFpM3+k7cDqUhxv/3IVQmDRoWM3n//VUA+SwVE 6W0w== 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=ZAwIqiRySDiFfmgD/1oQKpgA8/Glycu71hEVY2X/5aI=; b=jHD+Zx8PEQtpVk35BRmbVwR6Vaec+2BU5ojKdVp1WVYLoqCO2i0QwlurzcJ6AsjD1G PE5Md+coMhlQqj1/E088TyryfbrFT4QpmFiylE4gxDm3rxRdFUTS3LMkabPWQ2qUyQhA 65gfXF3TgSQ9VSSxpt6xDgMJ61DB1h74ug1WUJmAU72syKvLbTv8S1G0RfvT1E23/oZL vd+sa6wLS6sPyusbPpy30aki4++aq9VL4eesRsZbFlzYLw3ZUIlaPIWGnjDYZq2oJajW qHK6BYsEwwj9n5SDCVcvvaUh2Us+CwjKeDlvi4XMmkN/zn8ShiQJ4BcKj71EINRAa/yf tHCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y2MZvUMx; 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 ci6si3798572ejc.202.2020.07.01.03.49.33; Wed, 01 Jul 2020 03:49:57 -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=Y2MZvUMx; 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 S1729990AbgGAKqW (ORCPT + 99 others); Wed, 1 Jul 2020 06:46:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729892AbgGAKqV (ORCPT ); Wed, 1 Jul 2020 06:46:21 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4DABC03E979 for ; Wed, 1 Jul 2020 03:46:21 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id p1so492109pls.4 for ; Wed, 01 Jul 2020 03:46:21 -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=ZAwIqiRySDiFfmgD/1oQKpgA8/Glycu71hEVY2X/5aI=; b=Y2MZvUMxug59kJ6DDiLOpxa9zz6EJSdJWxnPjurraa6ShY+zwguiLuVARBo2GsYARE sCBkYAjnk8pxDw6oB8oYB32xL2alGAVqRPY9f4ka1qooiZvIZ1rQFc2RCSl9hXErdZ8O l2R+I1SFM5l9TUuGSKCN/nXFxiXTCkqe7NcMZ8WZ18FSTMVVQiDxRLRWt3TjHIRIHxZa lw3/CrMZTs/Xla60Ez35dHPn+j7pFdAAX9vfqeviEf+R2//EnfHkS/+0uek5aH0NP7M0 /GZvpAXruFM3RGb9Gw2a9FvZjV35rJRNtOSbVmVTrP5TuYIhV201UAKxQOKMieYx4mlB 1+ZQ== 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=ZAwIqiRySDiFfmgD/1oQKpgA8/Glycu71hEVY2X/5aI=; b=eTAmgP31d9M6y4fyPaLg30Xp2Al5YYys9BFTN4vo/skpVYUmTkh/Q8wEKQ+9q8Rc/Z C8V42tlYJMNyzzQNqVHn5j6DxErdZ6ao7grKx8dnoE1NRreE45ytARPmGDjTpVNS4wtn Zh1Ba6YeNueqdCZ9hc9hrJvMOprTIbKrwbEyDsUd6DJvXBADCp2tVmzXnkty/Ru7L5nt lHnXEn+TLJNxYbnOTap0jPk95BoqBv1LfKShO5P9Y7xUbQyhzLsnhSrGyKrQMQRlH9W/ 1s79XbCYhOSjR6J8mCokU83GOi99zXlc3aoNyNntTajvMG3AZrEuzkTBZrjfUM36dz66 LQ+g== X-Gm-Message-State: AOAM530sBY2xx9zRb4dbyazUx8LDh3VKR6jVKzxPl1nBT+6GyGNVk/27 HF15/YOTLfYf4r4S5GZhiRRGIg== X-Received: by 2002:a17:902:8d89:: with SMTP id v9mr21290407plo.191.1593600381045; Wed, 01 Jul 2020 03:46:21 -0700 (PDT) Received: from localhost ([122.172.81.75]) by smtp.gmail.com with ESMTPSA id d16sm5413722pfo.156.2020.07.01.03.46.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2020 03:46:19 -0700 (PDT) Date: Wed, 1 Jul 2020 16:16:17 +0530 From: Viresh Kumar To: Ionela Voinescu Cc: rjw@rjwysocki.net, catalin.marinas@arm.com, sudeep.holla@arm.com, will@kernel.org, linux@armlinux.org.uk, valentin.schneider@arm.com, mingo@redhat.com, peterz@infradead.org, dietmar.eggemann@arm.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/8] cpufreq: allow drivers to flag custom support for freq invariance Message-ID: <20200701094417.ffuvduz6pqknjcks@vireshk-i7> References: <20200701090751.7543-1-ionela.voinescu@arm.com> <20200701090751.7543-2-ionela.voinescu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200701090751.7543-2-ionela.voinescu@arm.com> 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 01-07-20, 10:07, Ionela Voinescu wrote: > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > index 3494f6763597..42668588f9f8 100644 > --- a/include/linux/cpufreq.h > +++ b/include/linux/cpufreq.h > @@ -293,7 +293,7 @@ __ATTR(_name, 0644, show_##_name, store_##_name) > > struct cpufreq_driver { > char name[CPUFREQ_NAME_LEN]; > - u8 flags; > + u16 flags; Lets make it u32. > void *driver_data; > > /* needed by all drivers */ > @@ -417,6 +417,14 @@ struct cpufreq_driver { > */ > #define CPUFREQ_IS_COOLING_DEV BIT(7) > > +/* > + * Set by drivers which implement the necessary calls to the scheduler's > + * frequency invariance engine. The use of this flag will result in the > + * default arch_set_freq_scale calls being skipped in favour of custom > + * driver calls. > + */ > +#define CPUFREQ_CUSTOM_SET_FREQ_SCALE BIT(8) I will rather suggest CPUFREQ_SKIP_SET_FREQ_SCALE as the name and functionality. We need to give drivers a choice if they do not want the core to do it on their behalf, because they are doing it on their own or they don't want to do it. -- viresh