hv:Unify the MACRO name for invalid interrupt pin

There are the following definitions in hypervisor,
  define IOAPIC_INVALID_PIN      0xffU
  define VPIC_INVALID_PIN        0xffU
  define PTDEV_INVALID_PIN       0xffU
this patch unify them to:
  define INVALID_INTERRUPT_PIN   0xffffffffU

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
Mingqiang Chi 2019-01-10 17:03:34 +08:00 committed by Xie, Nanlin
parent 7725fe3b50
commit 1fc10d514c
5 changed files with 9 additions and 10 deletions

View File

@ -8,7 +8,6 @@
#include <ioapic.h>
#define IOAPIC_MAX_PIN 240U
#define IOAPIC_INVALID_PIN 0xffU
/*
* IOAPIC_MAX_LINES is architecturally defined.
@ -86,7 +85,7 @@ static const uint32_t pic_ioapic_pin_map[NR_LEGACY_PIN] = {
uint32_t get_pic_pin_from_ioapic_pin(uint32_t pin_index)
{
uint32_t pin_id = IOAPIC_INVALID_PIN;
uint32_t pin_id = INVALID_INTERRUPT_PIN;
if (pin_index < NR_LEGACY_PIN) {
pin_id = pic_ioapic_pin_map[pin_index];
}
@ -284,7 +283,7 @@ uint32_t ioapic_irq_to_pin(uint32_t irq)
if (ioapic_irq_is_gsi(irq)) {
ret = gsi_table_data[irq].pin;
} else {
ret = IOAPIC_INVALID_PIN;
ret = INVALID_INTERRUPT_PIN;
}
return ret;
@ -292,7 +291,7 @@ uint32_t ioapic_irq_to_pin(uint32_t irq)
bool ioapic_is_pin_valid(uint32_t pin)
{
return (pin != IOAPIC_INVALID_PIN);
return (pin != INVALID_INTERRUPT_PIN);
}
uint32_t ioapic_pin_to_irq(uint32_t pin)

View File

@ -903,7 +903,6 @@ static int32_t shell_show_cpu_int(__unused int32_t argc, __unused char **argv)
return 0;
}
#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,
uint32_t *pin, uint32_t *vpin, uint32_t *bdf, uint32_t *vbdf)
@ -917,8 +916,8 @@ static void get_entry_info(const struct ptirq_remapping_info *entry, char *type,
} else {
*lvl_tm = false;
}
*pin = PTDEV_INVALID_PIN;
*vpin = PTDEV_INVALID_PIN;
*pin = INVALID_INTERRUPT_PIN;
*vpin = INVALID_INTERRUPT_PIN;
*bdf = entry->phys_sid.msi_id.bdf;
*vbdf = entry->virt_sid.msi_id.bdf;
} else {

View File

@ -49,7 +49,7 @@ static inline bool master_pic(const struct acrn_vpic *vpic, struct i8259_reg_sta
static inline uint32_t vpic_get_highest_isrpin(const struct i8259_reg_state *i8259)
{
uint32_t bit, pin, i;
uint32_t found_pin = VPIC_INVALID_PIN;
uint32_t found_pin = INVALID_INTERRUPT_PIN;
pin = (i8259->lowprio + 1U) & 0x7U;
@ -79,7 +79,7 @@ static inline uint32_t vpic_get_highest_irrpin(const struct i8259_reg_state *i82
{
uint8_t serviced;
uint32_t bit, pin, tmp;
uint32_t found_pin = VPIC_INVALID_PIN;
uint32_t found_pin = INVALID_INTERRUPT_PIN;
/*
* In 'Special Fully-Nested Mode' when an interrupt request from

View File

@ -94,7 +94,6 @@
#define NR_VPIC_PINS_PER_CHIP 8U
#define NR_VPIC_PINS_TOTAL 16U
#define VPIC_INVALID_PIN 0xffU
enum vpic_trigger {
EDGE_TRIGGER,

View File

@ -54,6 +54,8 @@
#define IRQ_ALLOC_BITMAP_SIZE INT_DIV_ROUNDUP(NR_IRQS, 64U)
#define INVALID_INTERRUPT_PIN 0xffffffffU
/*
* Definition of the stack frame layout
*/