Date
1 - 5 of 5
[PATCH 2/2] hv: move the define of MAX_IR_ENTRIES to offline tool
chenli.wei
There is an issue of calculate 2^n roundup of CONFIG_MAX_PT_IRQ_ENTRIE,
and the code style is very ugly when we use macro to fix it. So this patch move MAX_IR_ENTRIE to offline tool which could do align check and calculate it automatically. Signed-off-by: Chenli Wei <chenli.wei@...> --- hypervisor/include/arch/x86/asm/vtd.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/hypervisor/include/arch/x86/asm/vtd.h b/hypervisor/include/arch/x86/asm/vtd.h index 4d3518286..284fc62db 100644 --- a/hypervisor/include/arch/x86/asm/vtd.h +++ b/hypervisor/include/arch/x86/asm/vtd.h @@ -42,13 +42,6 @@ #define DMAR_ICS_REG 0x9cU /* Invalidation complete status register */ #define DMAR_IRTA_REG 0xb8U /* Interrupt remapping table addr register */ -/* Make sure all PT IRQs work w/ interrupt remapping or post interrupt */ -#if (CONFIG_MAX_PT_IRQ_ENTRIES <= 256) -#define MAX_IR_ENTRIES 256 -#else -#define MAX_IR_ENTRIES powerof2_roundup(CONFIG_MAX_PT_IRQ_ENTRIES) -#endif - /* Values for entry_type in ACPI_DMAR_DEVICE_SCOPE - device types */ enum acpi_dmar_scope_type { ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, -- 2.17.1
|
|
toggle quoted messageShow quoted text
-----Original Message-----CONFIG_MAX_PT_IRQ_ENTRIE -> CONFIG_MAX_PT_IRQ_ENTRIES and the code style is very ugly when we use macro to fix it.MAX_IR_ENTRIE -> MAX_IR_ENTRIES and calculate it automatically.
|
|
chenli.wei
On 5/13/2022 8:34 PM, Geoffroy Van Cutsem wrote:
OK-----Original Message-----CONFIG_MAX_PT_IRQ_ENTRIE -> CONFIG_MAX_PT_IRQ_ENTRIES Done, thanksand the code style is very ugly when we use macro to fix it.MAX_IR_ENTRIE -> MAX_IR_ENTRIES and calculate it automatically.
|
|
Once you removed this, you can also remove ROUND2/4/8 MACROs.
toggle quoted messageShow quoted text
-----Original Message-----
|
|
chenli.wei
On 5/14/2022 1:13 AM, Eddie Dong wrote:
Once you removed this, you can also remove ROUND2/4/8 MACROs.OK -----Original Message-----
|
|