Re: [PATCH] sparc, exec: remove redundant addr_limit assignment

From: Mathias Krause
Date: Mon Jun 13 2011 - 16:36:48 EST


On 12.06.2011, at 01:08 David Miller wrote:
> From: Mathias Krause <minipli@xxxxxxxxxxxxxx>
> Date: Fri, 10 Jun 2011 15:10:53 +0200
>
>> The address limit is already set in flush_old_exec() so this
>> assignment of USER_DS is redundant.
>>
>> Signed-off-by: Mathias Krause <minipli@xxxxxxxxxxxxxx>
> ...
>> @@ -368,9 +368,6 @@ void flush_thread(void)
>>
>> /* Clear FPU register state. */
>> t->fpsaved[0] = 0;
>> -
>> - if (get_thread_current_ds() != ASI_AIUS)
>> - set_fs(USER_DS);
>> }
>
> Yeah but now you're doing it unconditionally, the guard is here
> because the %asi register write which set_fs() does is extremely
> expensive on sparc64 and %99.99999 of the time we can avoid it.

As Linus already pointed out, that set_fs() was never called because
we already had (and still have) an unconditional set_fs() in the arch
independent code. So this patch just removes some dead code.

Mathias
--
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/