Re: [patch] SMP alternatives: skip with UP kernels.

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

 



Gerd Hoffmann wrote:

Yes, the #ifdef in arch/i386/kernel/module.c is a bit clumsy.

Yep, thats why.  I wanted avoid exactly that.  Having some code need to
know that function foobar() is only available with CONFIG_BAZ is set is
really ugly ...

The attached patch hides the magic in alternative.h and provides some
dummy inline functions for the UP case (gcc should manage to optimize
away these calls).  No changes in module.c.

Works for me; it doesn't easily get non-clumsy in module.c I see. Sure you want to keep smp_alt_once outside the #ifdef? Seems to not be doing anything other than being set to 1 for !SMP.

Thanks,
Rene.
-
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]
  Powered by Linux