Skip to content
Snippets Groups Projects
Commit 534d542c authored by Avi Kivity's avatar Avi Kivity
Browse files

percpu: speed up virtual address calculations

The percpu address calculations are something like

  addr = base + (var - start)

where

  base is the per-cpu base of the per-cpu area
  var is the variable address in the per-cpu template in the elf image
  start is the beginning of the per-cpu template in the elf image

This patch simplifies the calculation by subtracting start from base.  This
allows us to compute addr with just one addition.
parent 571d39dd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment