From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1A2582C00A8 for ; Fri, 21 Mar 2014 22:41:05 +1100 (EST) Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Mar 2014 21:41:04 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 8D4822BB0047 for ; Fri, 21 Mar 2014 22:40:32 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2LBKAbP10879314 for ; Fri, 21 Mar 2014 22:20:10 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2LBeVwr009636 for ; Fri, 21 Mar 2014 22:40:31 +1100 Message-ID: <532C251B.1020306@linux.vnet.ibm.com> Date: Fri, 21 Mar 2014 17:10:11 +0530 From: "Srivatsa S. Bhat" MIME-Version: 1.0 To: Viresh Kumar Subject: Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform References: <1395317460-14811-1-git-send-email-ego@linux.vnet.ibm.com> <1395317460-14811-2-git-send-email-ego@linux.vnet.ibm.com> <20140321104317.GA2493@in.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Cc: linuxppc-dev@ozlabs.org, "ego@linux.vnet.ibm.com" , Anton Blanchard , Linux PM list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 03/21/2014 04:24 PM, Viresh Kumar wrote: > On 21 March 2014 16:13, Gautham R Shenoy wrote: >> On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: > >>>> + pr_debug("PState id %d freq %d MHz\n", id, freq); >>>> + powernv_freqs[i].driver_data = i; >>> [...] >>>> +static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy) >>>> +{ >>>> + int base, i; >>>> + >>>> +#ifdef CONFIG_SMP >>> >>> What will break if you don't have this ifdef here? Without that as well >>> below code should work? > > Missed this one? > Nothing will break, its just that the code size will be a tiny bit lesser on UP configs, that's all :-) Anyway, I think removing the ifdef improves the readability (and doesn't add any noticeable overhead on UP kernels), so let's get rid of it. Regards, Srivatsa S. Bhat >>>> + base = cpu_first_thread_sibling(policy->cpu); >>>> + >>>> + for (i = 0; i < threads_per_core; i++) >>>> + cpumask_set_cpu(base + i, policy->cpus); >>>> +#endif >>>> + policy->cpuinfo.transition_latency = 25000; >>>> + >>>> + policy->cur = powernv_freqs[0].frequency; >>>> + cpufreq_frequency_table_get_attr(powernv_freqs, policy->cpu); >>>