Re: [PATCH v2] hwmon (coretemp): Fix build breakage if SMP is undefined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 27, 2010 at 5:26 PM, Guenter Roeck
<guenter.roeck@xxxxxxxxxxxx> wrote:
>
> Not that simple. cpu_sibling_mask()  is defined in asm/smp.h, which is only
> included from linux/smp.h if SMP is defined. But many other files do include
> asm/smp.h directly. This causes the following error all over the place
> if CONFIG_SMP is not defined.

Yeah, that's broken.  Seriously broken.

And I guess that if you had happened to include <asm/smp.h> in
coretemp.c you would magically have gotten that cpu_sibling_map()
thing, and it would just work - by mistake.

And maybe that's the correct (and really hacky) fix right now. Rather
than introduce an UP-only cpu_sibling_mask(), get the SMP version, and
get it ignored.

Seriously broken, but there it is.

In the long run, I guess we should either
 - disallow naked '<asm/smp.h>' includes
OR
 - just make '<linux/smp.h>' unconditionally include <asm/smp.h>

to at least not have that insane "some things exist in CONFIG_SMP or
not depending on how you include files".

                           Linus

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux