aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2012-09-05 19:30:01 +0900
committerMarcelo Tosatti <mtosatti@redhat.com>2012-09-12 13:38:23 -0300
commitecba9a52acdf20530d561b7634b80c35c308943a (patch)
tree8a8ef1bd20dd24b4181acab240906da6978c117f /virt
parent7de5bdc96c372ab875408c86e0099958dba89f56 (diff)
downloadvexpress-lsk-ecba9a52acdf20530d561b7634b80c35c308943a.tar.gz
KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()
find_highest_vector() and count_vectors(): - Instead of using magic values, define and use proper macros. find_highest_vector(): - Remove likely() which is there only for historical reasons and not doing correct branch predictions anymore. Using such heuristics to optimize this function is not worth it now. Let CPUs predict things instead. - Stop checking word[0] separately. This was only needed for doing likely() optimization. - Use for loop, not while, to iterate over the register array to make the code clearer. Note that we actually confirmed that the likely() did wrong predictions by inserting debug code. Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions