diff options
author | Borislav Petkov <[email protected]> | 2016-02-16 00:19:18 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2016-02-16 08:45:15 +0100 |
commit | f2cc8e0791c70833758101d9756609a08dd601ec (patch) | |
tree | a9322f722ebf4349c3503d28b3082975e968f975 /net/unix/af_unix.c | |
parent | dd7b6847670a84b7bb7c38f8e69b2f12059bca66 (diff) |
x86/cpufeature: Speed up cpu_feature_enabled()
When GCC cannot do constant folding for this macro, it falls back to
cpu_has(). But static_cpu_has() is optimal and it works at all times
now. So use it and speedup the fallback case.
Before we had this:
mov 0x99d674(%rip),%rdx # ffffffff81b0d9f4 <boot_cpu_data+0x34>
shr $0x2e,%rdx
and $0x1,%edx
jne ffffffff811704e9 <do_munmap+0x3f9>
After alternatives patching, it turns into:
jmp 0xffffffff81170390
nopl (%rax)
...
callq ffffffff81056e00 <mpx_notify_unmap>
ffffffff81170390: mov 0x170(%r12),%rdi
Signed-off-by: Borislav Petkov <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions