Re: s390(64) per_cpu in modules (ipv6)

From: Roland Dreier
Date: Wed Jun 30 2004 - 11:13:49 EST


Martin> __attribute_used__ isn't really what we want. If a
Martin> statically defined per cpu variable isn't used in the C
Martin> file then gcc should be allowed to remove it. It's not
Martin> used after all. What we need is a way to tell the
Martin> compiler that an inline assembly uses a variable without
Martin> passing any kind of address of the variable to it.

Actually my understanding is that __attribute_used__ is intended for
exactly that: to let the compiler know that something that is
apparently unused by the C code is actually used by inline assembly.
I'm sure your solution is fine as well but I think this type of
situation is exactly what __attribute_used__ is for. For example it
is attached to the modversions ____versions array so that it is not
discarded by the compiler.

Best,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/