x86/ioapic: Improve code generation for __io_apic_{read,write}()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 5 Aug 2020 13:35:16 +0000 (14:35 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 5 Aug 2020 16:35:11 +0000 (17:35 +0100)
commitdae7ea5138f72f3ac38367f50d941e8f70628119
tree7c1935d559c7821b6bc7e2a3075284dd4ed55615
parenta8ee9c4d3fb8532a60c6c87abd0fe80b5b03c6e8
x86/ioapic: Improve code generation for __io_apic_{read,write}()

The write into REGSEL prevents the optimiser from reusing the address
calculation, forcing it to be calcualted twice.

The calculation itself is quite expensive.  Pull it out into a local varaible.

Bloat-o-meter reports:
  add/remove: 0/0 grow/shrink: 0/26 up/down: 0/-1527 (-1527)

Also correct the register type, which is uint32_t, not int.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/io_apic.h