HV:treewide: Clean up -1U or -1UL

According to C99 standard, -1 integer constant with 'U/UL'
suffix has no type.

To explicit the integer constant:
Update -1U or -1UL as ~0U or ~0UL, or invalid number according
to usage case.

V1-->V2:
	Update parameter name and type of send_startup_ipi since
	the second parameter is used as pcpu_id;
	Update related comments for code clearity.
V2-->V3:
	Update comments of struct acrn_irqline;
	rename  cpu_startup_dest as dest_pcpu_id in the second
	parameter of send_startup_ipi.

Tracked-on: ccm0001001-247033
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Xiangyang Wu
2018-07-06 16:08:33 +08:00
committed by lijinxia
parent de5bb50545
commit 49d1dc1534
9 changed files with 18 additions and 15 deletions

View File

@@ -144,7 +144,7 @@ int init_lapic(uint16_t cpu_id);
void send_lapic_eoi(void);
uint8_t get_cur_lapic_id(void);
int send_startup_ipi(enum intr_cpu_startup_shorthand cpu_startup_shorthand,
uint32_t cpu_startup_dest,
uint16_t dest_pcpu_id,
uint64_t cpu_startup_start_address);
/* API to send an IPI to a single guest */
void send_single_ipi(uint16_t pcpu_id, uint32_t vector);

View File

@@ -186,7 +186,7 @@ struct acrn_irqline {
uint64_t pic_irq;
/** ioapic IRQ for IOAPIC & ISA TYPE,
* if -1 then this IRQ will not be injected
* if ~0UL then this IRQ will not be injected
*/
uint64_t ioapic_irq;
} __aligned(8);

View File

@@ -77,7 +77,7 @@
#define ACRN_DOM0_VMID (0UL)
#define ACRN_INVALID_VMID (-1)
#define ACRN_INVALID_HPA (-1UL)
#define ACRN_INVALID_HPA (~0UL)
/* Generic memory attributes */
#define MEM_ACCESS_READ 0x00000001U