From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wang, Wei W" Subject: Re: [PATCH v4 04/11] x86/intel_pstate: avoid calling cpufreq_add_cpu() twice Date: Mon, 27 Jul 2015 07:35:14 +0000 Message-ID: <286AC319A985734F985F78AFA26841F79E432F@shsmsx102.ccr.corp.intel.com> References: <1435230922-22111-1-git-send-email-wei.w.wang@intel.com> <55B25B570200007800095344@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55B25B570200007800095344@prv-mh.provo.novell.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: "andrew.cooper3@citrix.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 24/07/2015 21:36, Jan Beulich wrote: > >>> On 25.06.15 at 13:15, wrote: > > cpufreq_add_cpu() is already called in the hypercall code path (the > > bottom of set_px_pminfo() and inside cpufreq_cpu_init()). > > So, we remove the redundant calling here. > > While I can see that currently the call is kind of pointless (as it can't do > anything useful before Dom0 communicated the data obtained from ACPI), > it's still logically correct to call the callback on the BP prior to registering a hook > for AP bringup. Otherwise you could (and perhaps should) as well defer the > CPU notifier registration. > > Otoh now that you're trying to introduce a driver independent of ACPI (and > hence initialized at boot time) I wonder why you don't make use of what is > here instead of deleting it. > Ok, I will roll back to leave cpufreq_presmp_init() there. Best, Wei > > > --- a/xen/drivers/cpufreq/cpufreq.c > > +++ b/xen/drivers/cpufreq/cpufreq.c > > @@ -632,8 +632,6 @@ static struct notifier_block cpu_nfb = { > > > > static int __init cpufreq_presmp_init(void) { > > - void *cpu = (void *)(long)smp_processor_id(); > > - cpu_callback(&cpu_nfb, CPU_ONLINE, cpu); > > register_cpu_notifier(&cpu_nfb); > > return 0; > > } >