From 7725fe3b503a890c36565a7f448eff12b9616840 Mon Sep 17 00:00:00 2001 From: Mingqiang Chi Date: Thu, 10 Jan 2019 11:15:11 +0800 Subject: [PATCH] hv: shell & vuart: Change interrupt pin to uint32_t Change the type from uint8_t to uint32_t for shell and vuart Tracked-On: #861 Signed-off-by: Mingqiang Chi Acked-by: Eddie Dong --- hypervisor/debug/shell.c | 8 ++++---- hypervisor/debug/vuart.c | 4 ++-- hypervisor/include/debug/vuart.h | 2 +- hypervisor/release/vuart.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hypervisor/debug/shell.c b/hypervisor/debug/shell.c index 5faf74261..f1b9e020a 100644 --- a/hypervisor/debug/shell.c +++ b/hypervisor/debug/shell.c @@ -906,7 +906,7 @@ static int32_t shell_show_cpu_int(__unused int32_t argc, __unused char **argv) #define PTDEV_INVALID_PIN 0xffU static void get_entry_info(const struct ptirq_remapping_info *entry, char *type, uint32_t *irq, uint32_t *vector, uint64_t *dest, bool *lvl_tm, - uint8_t *pin, uint8_t *vpin, uint32_t *bdf, uint32_t *vbdf) + uint32_t *pin, uint32_t *vpin, uint32_t *bdf, uint32_t *vbdf) { if (is_entry_active(entry)) { if (entry->intr_type == PTDEV_INTR_MSI) { @@ -967,7 +967,7 @@ static void get_ptdev_info(char *str_arg, size_t str_max) char type[16]; uint64_t dest; bool lvl_tm; - uint8_t pin, vpin; + uint32_t pin, vpin; uint32_t bdf, vbdf; len = snprintf(str, size, "\r\nVM\tTYPE\tIRQ\tVEC\tDEST\tTM\tPIN\tVPIN\tBDF\tVBDF"); @@ -1133,8 +1133,8 @@ static int32_t get_ioapic_info(char *str_arg, size_t str_max_len) ioapic_nr_gsi = ioapic_get_nr_gsi (); for (irq = 0U; irq < ioapic_nr_gsi; irq++) { - void *addr = ioapic_get_gsi_irq_addr (irq); - uint8_t pin = ioapic_irq_to_pin (irq); + void *addr = ioapic_get_gsi_irq_addr(irq); + uint32_t pin = ioapic_irq_to_pin(irq); union ioapic_rte rte; bool irr, phys, level, mask; diff --git a/hypervisor/debug/vuart.c b/hypervisor/debug/vuart.c index 07e78590c..51edd22be 100644 --- a/hypervisor/debug/vuart.c +++ b/hypervisor/debug/vuart.c @@ -33,7 +33,7 @@ #include "uart16550.h" -static uint8_t vuart_com_irq = CONFIG_COM_IRQ; +static uint32_t vuart_com_irq = CONFIG_COM_IRQ; static uint16_t vuart_com_base = CONFIG_COM_BASE; #ifndef CONFIG_PARTITION_MODE @@ -407,7 +407,7 @@ void vuart_init(struct acrn_vm *vm) vuart_register_io_handler(vm); } -bool hv_used_dbg_intx(uint8_t intx_pin) +bool hv_used_dbg_intx(uint32_t intx_pin) { return is_dbg_uart_enabled() && (intx_pin == vuart_com_irq); } diff --git a/hypervisor/include/debug/vuart.h b/hypervisor/include/debug/vuart.h index ff6be6b5c..9abd663f2 100644 --- a/hypervisor/include/debug/vuart.h +++ b/hypervisor/include/debug/vuart.h @@ -75,6 +75,6 @@ struct acrn_vuart *vuart_console_active(void); void vuart_console_tx_chars(struct acrn_vuart *vu); void vuart_console_rx_chars(struct acrn_vuart *vu); -bool hv_used_dbg_intx(uint8_t intx_pin); +bool hv_used_dbg_intx(uint32_t intx_pin); void vuart_set_property(const char *vuart_info); #endif /* VUART_H */ diff --git a/hypervisor/release/vuart.c b/hypervisor/release/vuart.c index 74926e615..e6c8f5f5a 100644 --- a/hypervisor/release/vuart.c +++ b/hypervisor/release/vuart.c @@ -16,7 +16,7 @@ struct acrn_vuart *vuart_console_active(void) void vuart_console_tx_chars(__unused struct acrn_vuart *vu) {} void vuart_console_rx_chars(__unused struct acrn_vuart *vu) {} -bool hv_used_dbg_intx(__unused uint8_t intx_pin) +bool hv_used_dbg_intx(__unused uint32_t intx_pin) { return false; }