From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965370AbeAJETK (ORCPT + 1 other); Tue, 9 Jan 2018 23:19:10 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:37544 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965354AbeAJETI (ORCPT ); Tue, 9 Jan 2018 23:19:08 -0500 X-Google-Smtp-Source: ACJfBov/zPWkEzSn9hNDTfJyAQW5DFDIquRw3Kj3OTlaQbVv1U8OEQPu47n8EUubgwf89Z/VrkMOmw== Date: Wed, 10 Jan 2018 09:49:05 +0530 From: Viresh Kumar To: Sudeep Holla Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Linton , Lorenzo Pieralisi , "Rafael J. Wysocki" Subject: Re: [PATCH 2/2] cpufreq: scpi: remove arm_big_little dependency Message-ID: <20180110041905.GC3335@vireshk-i7> References: <1515516568-31359-1-git-send-email-sudeep.holla@arm.com> <1515516568-31359-3-git-send-email-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515516568-31359-3-git-send-email-sudeep.holla@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 09-01-18, 16:49, Sudeep Holla wrote: > +static int > +scpi_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask) > { > - return scpi_ops->get_transition_latency(cpu_dev); > + int cpu, domain, tdomain; > + struct device *tcpu_dev; > + > + domain = scpi_ops->device_domain_id(cpu_dev); > + if (domain < 0) > + return domain; > + > + for_each_possible_cpu(cpu) { > + if (cpu == cpu_dev->id) > + continue; > + > + tcpu_dev = get_cpu_device(cpu); > + if (!tcpu_dev) > + continue; > + > + tdomain = scpi_ops->device_domain_id(tcpu_dev); > + if (tdomain == domain) > + cpumask_set_cpu(cpu, cpumask); > + } > + > + return 0; > } So this is the main thing you want to achieve ? i.e. get the policy->cpus from scpi_ops, right ? Why can't we update .init_opp_table() to include policy as a parameter and let individual stub drivers update policy->cpus then ? -- viresh