lkml.org 
[lkml]   [2010]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] hwmon (coretemp): Fix build breakage if SMP is undefined
On Mon, Sep 27, 2010 at 08:59:46AM -0400, Ingo Molnar wrote:
>
> * Guenter Roeck <guenter.roeck@ericsson.com> wrote:
>
> > +#ifdef CONFIG_SMP
> > +#endif
> > +#ifdef CONFIG_SMP
> > +#endif
>
> Hm, this tickles my uglo-meter. Is there no cleaner way, preferably one
> that doesnt involve preprocessor directives?
>
After looking through the code I thought about a much cleaner fix for
handling the SMP defines in coretemp.c and pkgtemp.c. Essentially
it will move all SMP dependencies into a single #ifdef, and also
optimize the loop in question with cpumask_first() / cpumask_next().
Maybe I can get rid of some of the SMP dependencies entirely. However,
the driver also uses phys_proc_id and cpu_core_id from cpuinfo_x86,
and those are only available if SMP is defined.

That would be way too invasive for .36, though. I'll stick with the
current patch and submit a cleanup for .37. That also fits well with
the other pending cleanups for the two drivers.

Thanks,
Guenter



\
 
 \ /
  Last update: 2010-09-27 20:11    [from the cache]
©2003-2011 Jasper Spaans