• Hugh Dickins's avatar
    kaiser: use ALTERNATIVE instead of x86_cr3_pcid_noflush · 2dff99eb
    Hugh Dickins authored
    
    Now that we're playing the ALTERNATIVE game, use that more efficient
    method: instead of user-mapping an extra page, and reading an extra
    cacheline each time for x86_cr3_pcid_noflush.
    
    Neel has found that __stringify(bts $X86_CR3_PCID_NOFLUSH_BIT, %rax)
    is a working substitute for the "bts $63, %rax" in these ALTERNATIVEs;
    but the one line with $63 in looks clearer, so let's stick with that.
    
    Worried about what happens with an ALTERNATIVE between the jump and
    jump label in another ALTERNATIVE?  I was, but have checked the
    combinations in SWITCH_KERNEL_CR3_NO_STACK at entry_SYSCALL_64,
    and it does a good job.
    Signed-off-by: default avatarHugh Dickins <hughd@google.com>
    Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    2dff99eb
entry_64.S 45.7 KB