Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1350693imm; Tue, 22 May 2018 02:38:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrb+Z+RoXoUGXt1BrKVBIDvwZM7l7ZBGbmYjiOBAj/SOJOrKgbBbNHlbKcNOckotj2vkACp X-Received: by 2002:a17:902:6686:: with SMTP id e6-v6mr24011282plk.35.1526981917949; Tue, 22 May 2018 02:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526981917; cv=none; d=google.com; s=arc-20160816; b=JG7WQCqB5uMSfgS893WYmpRP8ebYSyHFAZ+JvQMufCH4J5ALYEXEu4Lh91IDEa16td cWGnKvNvNuO9GY146i9Fg3OOC3vmw9HydVlAU8rl9ty01Ur0d1pU5Wr6VOULhAGqx5nz iUjRE8NF3Mty7y+kC1X8lgVBbh9/7V84oJfFy/wIJUoU8RsPMnkhQ0VDGIH8JPKI6PJK Tpbuiqskldptq98Cwar3bjbKyPVZ1atmvI35TI09KBDYdUQ3xLnLQhsDSqXaKAS/K3n1 V9LZAXqJyVm3EEc+bP9nYzeKQKHN4s821F60KC4OMuAjO3AYGV1BZe5Yu8u1cFgwrImU LQ7A== 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:arc-authentication-results; bh=sXbxJ1mW6IB57/+WnP0TKUyfYvkLPjGZevoDh1WHNfo=; b=mopLgoQzLY+0by+jTPiaSL9mV4W5gsxKfIKSJmN9+gCiXjkrFTbzbZ40XegNG2s+pL NqGB0vnnAYT4aSmkJVC8A4dojluCUTOCUBpHK1MehEozqeL/6IJggjrvyE5pIyix0Nm1 TRPVtSSn7yH/hTnszaVDffLKZ/lxfmXNNnKF3eTjpz6JLnCxZzXhFDx+FVeGsHD37ia7 wDFvwzXOrMNLZCEa6hLom9wTDdB0UYy8w/ll2NHOiVNTxSoA7wPmQhTOyCHZ9+hnRn/5 S8HvDgLdp++EBpSSbVc/LybZyF90Hk675Lhf5/oqNe6I8xzGOZWyCUhh3ADaAVeAU6bG cyFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YEolpRJn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2-v6si17475371pli.569.2018.05.22.02.38.21; Tue, 22 May 2018 02:38:36 -0700 (PDT) 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=@linaro.org header.s=google header.b=YEolpRJn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751261AbeEVJiK (ORCPT + 99 others); Tue, 22 May 2018 05:38:10 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:33527 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbeEVJiH (ORCPT ); Tue, 22 May 2018 05:38:07 -0400 Received: by mail-pl0-f65.google.com with SMTP id n10-v6so10574323plp.0 for ; Tue, 22 May 2018 02:38:06 -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=sXbxJ1mW6IB57/+WnP0TKUyfYvkLPjGZevoDh1WHNfo=; b=YEolpRJnmmaC0PLHkmlO6FXEZwrfxu6VM6DsElwwKeTfE4l5CKPCA3ef5uHX1mmexQ wJ3V+qDJVLbkflDk7RbN1uRqk5WM6EFuEDfJAsn2dVu105rQd4hyx+tfFSoR3T3sTZxi arx2T7Ven0IvHcEhhmWyW2MNFLbfddUiXK6LI= 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=sXbxJ1mW6IB57/+WnP0TKUyfYvkLPjGZevoDh1WHNfo=; b=nqXqIPqTMxMeumwFMpPwsOzegqaEdnWdAfkAVzXS/IiYhx8GGe+9NwKvkaxsUxGO4h 20POAzGkeuAR2VM8GTrCXYrIJV6OELWocqe6WDdntAVnUt7dC4Jb/VdL/OIUbXg/JVFV fzXApXUZmyRERerk3WvHo2G5qaZkZQMS92WH3r/nA3LCl1oz0aZjN74DJST5exPhcKwN vlykiIvS/hexLKK5XW63jPJa0wDtzcVfMl/24v2i8fpwPQsavJlsTlzCuvuvlYROL0La Pluuoh4y4NxWccxI7lY/WMXbcKG2urShkXhdhqxLekJ+jG5fR4VKsxKZKNJYFn7eDobl fKDw== X-Gm-Message-State: ALKqPwepy+ZOLf48sP4yud0PloSOcwdpIheB7VdGuoqO9shLrD3qEqVL 7XxyFBf58q44Qqj4c6GVJQyOMQ== X-Received: by 2002:a17:902:8647:: with SMTP id y7-v6mr23622330plt.86.1526981886445; Tue, 22 May 2018 02:38:06 -0700 (PDT) Received: from localhost ([122.167.163.112]) by smtp.gmail.com with ESMTPSA id t69-v6sm36241284pfi.177.2018.05.22.02.38.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 02:38:05 -0700 (PDT) Date: Tue, 22 May 2018 15:08:03 +0530 From: Viresh Kumar To: ilialin@codeaurora.org Cc: 'Sudeep Holla' , mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, nm@ti.com, lgirdwood@gmail.com, broonie@kernel.org, andy.gross@linaro.org, david.brown@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, rjw@rjwysocki.net, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rnayak@codeaurora.org, amit.kucheria@linaro.org, nicolas.dechesne@linaro.org, celster@codeaurora.org, tfinkel@codeaurora.org Subject: Re: [PATCH] cpufreq: Add Kryo CPU scaling driver Message-ID: <20180522093803.kfmfktdskumxyqbx@vireshk-i7> References: <1526555955-29960-11-git-send-email-ilialin@codeaurora.org> <1526729701-8589-1-git-send-email-ilialin@codeaurora.org> <153cc316-dcb5-972f-5a2f-c91fe0f6348b@arm.com> <000f01d3f103$3ff78ba0$bfe6a2e0$@codeaurora.org> <2ace10bc-e1c4-2060-94d3-eb71e966ffbe@arm.com> <001401d3f1a2$c7328850$559798f0$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001401d3f1a2$c7328850$559798f0$@codeaurora.org> User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-05-18, 10:59, ilialin@codeaurora.org wrote: > OK, I think I found out the way. Would this be correct? > ----------------------------------------------------------------------------------------------- > extern struct cpu_topology cpu_topology[NR_CPUS]; > > static struct device *qcom_cpufreq_kryo_get_cluster_lead(int cluster) > { > unsigned cpu; > > for_each_possible_cpu(cpu) { > if ((cluster == cpu_topology[cpu].cluster_id) && > (0 == cpu_topology[cpu].core_id)) > return get_cpu_device(cpu); > } > > return NULL; > } Okay, this is what you should do IMHO. for_each_possible_cpu(cpu) { cpu_dev = xxx.. ret = dev_pm_opp_set_supported_hw(cpu_dev, xxx, xxx); if (ret && ret != -EBUSY) error-out. } This would require a trivial patch for the OPP core to not throw an error message with -EBUSY. I can do that separately. -- viresh