On Wed, 23 Nov 2005, David S. Miller wrote:
>
> 1) Mark all IPI functions with ifdef CONFIG_SMP, or
> 2) Mark them with __attribute__((__unused__))) which is what
> the net/core/flow.c case does
We could certainly do some of both.
Add a new "__smp_only__" thing, and do something like
#ifdef CONFIG_SMP
#define __smp_only__
#else
#define __smp_only \
__attribute__((__unused__, section("discard")))
#endif
(Yeah, I didn't look up the section syntax, because I'm lazy, but you get
the point - put it explicitly in some section that will be thrown away,
and that we can make the build-checking tools verify isn't linked to).
How does that feel? It would waste a bit of compiler time to even look at
the function, but at least it wouldn't warn, and they'd get thrown away
_without_ having to rely on a smart compiler.
Quite frankly, every time we rely on some really smart gcc feature, we're
burnt.
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]