> I originally thought that patch to kernel is going to be big and
> heavy. If it is not (2 lines seem reasonable to me), could you please
> post proposed kernel modification?
Add in linux/elf.h, line 132:
#define AT_LINUX_FPUCW 2134
(This is an arbitrary value.)
in linux/fs/binfmt_elf.c, change line 164 from
sp -= 2; to sp -= 4;
and in line 166 add
NEW_AUX_ENT(1, AT_LINUX_FPUCW, FPUCW_DEFAULT)
(Maybe this is the time where you can combine the AT_NULL and AT_HWCAP
lines since there is no reason why the AT_PLATFORM must be between
them. I.e.,
sp -= 6;
NEW_AUX_ENT(0, AT_NULL, 0);
NEW_AUX_ENT(1, AT_HWCAP, hwcap);
NEW_AUX_ENT(2, AT_LINUX_FPUCW, FPUCW_DEFAULT)
if (k_platform) {
...
and we've save yet another precious cycle for the sp -= 4 line!)
Beside this all to do is to make sure all ports define FPUCW_DEFAULT
and also use this value in the code (I don't know whether such a macro
already exists; if not it's high time to add one). That's all.
> PS: But... If kernel changes init word some time in future, all
> programs (like /bin/true) will start using FPU, again.
The change wouldn't happen without a good reason and in this case it's
certainly possible for everybody to upgrade the system. But at least
old programs will continue to work.
-- Uli
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu