HV: vioapic: use uint8_t for pins

IOAPIC pins always fit in 8-bit and we already use uint8_t for virt_pins. This
patch converts pins in vioapic to uint8_t.

This is based on Arindam's previous patch ("was: hv: Cleanup and optimise
vioapic.c"), with SOS boot failure resolved, format string updated, complex
arithmetic expression with implicit type conversion decoupled. Also make some
local variables representing interrupt vectors uint32_t.

Signed-off-by: Arindam Roy <arindam.roy@intel.com>
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Junjie Mao
2018-07-05 18:56:31 +08:00
committed by lijinxia
parent f7d78289ee
commit db62c23d81
3 changed files with 73 additions and 59 deletions

View File

@@ -40,7 +40,7 @@
#define REQUEST_WRITE 1
/* IOAPIC device model info */
#define VIOAPIC_RTE_NUM 48 /* vioapic pins */
#define VIOAPIC_RTE_NUM 48U /* vioapic pins */
#if VIOAPIC_RTE_NUM < 24
#error "VIOAPIC_RTE_NUM must be larger than 23"