From: "Jan Beulich" Subject: Re: [PATCH v2 5/9] x86/intel_pstate: relocate the driver register/unregister function Date: Fri, 29 May 2015 08:58:55 +0100 Message-ID: <5568385F020000780007ED13@mail.emea.novell.com> References: <1463125836-13967-1-git-send-email-wei.w.wang@intel.com> <55648BD7020000780007DE9B@mail.emea.novell.com> <286AC319A985734F985F78AFA26841F79760FF@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <286AC319A985734F985F78AFA26841F79760FF@shsmsx102.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei W Wang Cc: "jinsong.liu@alibaba-inc.com" , "xen-devel@lists.xen.org" , "wei.liu2@citrix.com" , "ian.campbell@citrix.com" , "andrew.cooper3@citrix.com" List-Id: xen-devel@lists.xenproject.org >>> On 29.05.15 at 04:47, wrote: > On 26/05/2015 21:06, Jan Beulich wrote >> >>> On 13.05.16 at 09:50, wrote: >> > Register/unregister the CPU hotplug notifier when the driver is >> > registered, and move the driver register/unregister function to the >> > cpufreq.c. >> >> Without saying why I'm afraid I don't even see much reason to review this in >> any detail. >> >> > --- a/xen/drivers/cpufreq/cpufreq.c >> > +++ b/xen/drivers/cpufreq/cpufreq.c >> > @@ -630,12 +630,31 @@ static struct notifier_block cpu_nfb = { >> > .notifier_call = cpu_callback >> > }; >> > >> > -static int __init cpufreq_presmp_init(void) >> > +int cpufreq_register_driver(struct cpufreq_driver *driver_data) >> > { >> > - void *cpu = (void *)(long)smp_processor_id(); >> > - cpu_callback(&cpu_nfb, CPU_ONLINE, cpu); >> >> Why is this being removed without replacement? > > I think they are redundant here. > If we go and check the hypercall code path (the bottom of set_px_pminfo()), > the cpufreq_add_cpu() is called there (inside cpufreq_cpu_init()), too. Why > do we need to initialize this CPU twice? If this is indeed being done twice, removing it is fine. But in a separate patch with a proper description. Jan