• H. Peter Anvin's avatar
    x86: Add new static_cpu_has() function using alternatives · a3c8acd0
    H. Peter Anvin authored
    For CPU-feature-specific code that touches performance-critical paths,
    introduce a static patching version of [boot_]cpu_has().  This is run
    at alternatives time and is therefore not appropriate for most
    initialization code, but on the other hand initialization code is
    generally not performance critical.
    
    On gcc 4.5+ this uses the new "asm goto" feature.
    Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
    Cc: Avi Kivity <avi@redhat.com>
    Cc: Suresh Siddha <suresh.b.siddha@intel.com>
    LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
    a3c8acd0
cpufeature.h 15.6 KB