summaryrefslogtreecommitdiff
path: root/arch/arm/kvm/coproc.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-01-21 18:27:04 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2016-02-29 18:34:22 +0000
commit623eefa8d04c6c3df69a0630989f10b3762b3b00 (patch)
treeca9bfd8f2c0308ef434df7674194eff0f578b6e0 /arch/arm/kvm/coproc.c
parentbb0c70bcca6ba3c84afc2da7426f3b923bbe6825 (diff)
arm64: KVM: Switch the sys_reg search to be a binary search
Our 64bit sys_reg table is about 90 entries long (so far, and the PMU support is likely to increase this). This means that on average, it takes 45 comparaisons to find the right entry (and actually the full 90 if we have to search the invariant table). Not the most efficient thing. Specially when you think that this table is already sorted. Switching to a binary search effectively reduces the search to about 7 comparaisons. Slightly better! As an added bonus, the comparison is done by comparing all the fields at once, instead of one at a time. Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm/coproc.c')
0 files changed, 0 insertions, 0 deletions