From: Al Viro Date: Thu, 2 Aug 2012 07:49:43 +0000 (+0400) Subject: arm: optimized current_pt_regs() X-Git-Tag: v3.7-rc1~64^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfd170d56505bf21cb636b0f1f169eaa815bdfe4;p=pandora-kernel.git arm: optimized current_pt_regs() ... no need to read current_thread_info()->task only to feed it to task_thread_page() immediately afterwards. Moreover, not using current_thread_info() at all ends up with better assembler - we need a location very close to the top of kernel stack page and it's actually better to do or with 0x1fff, followed be subtracting a small constant than and with ~0x1fff, followed by adding a large one. Both & and | would be a couple of insns (mvn lsr/mvn lsl for |, a pair of bic for &), but the following addition would cost a pair of add while the subtraction ends up as a single sub. Signed-off-by: Al Viro --- Reading git-diff-tree failed