On Mon, 14 Nov 2005, Gerd Knorr wrote:
>
> Throwing another patch into the discussion ;)
Ouch, this one is really ugly.
If you want to go this way, then you should instead add an X86_FEATURE_SMP
that gets cleared on UP and on SMP with just one core (and detect when CPU
hotplug ain't gonna happen ;), and then do
#ifdef CONFIG_SMP
#define smp_alternative(x,y) alternative(x,y,X86_FEATURE_SMP)
#else
#define smp_alternative(x,y) asm(x)
#endif
or something similar, instead of creating a totally new infrastructure to
do the thing that "alternative()" already does.
(Yeah, the above doesn't really work, since usually the SMP form is the
longer one, and "alternative()" wants the long complex one first. So maybe
the x86 feature needs to be "X86_FEATURE_UP" instead, since it's now a
"feature" to only have one core ;)
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]