HV: link CONFIG_MAX_IOMMU_NUM and MAX_DRHDS to DRHD_COUNT

The value of CONFIG_MAX_IOMMU and MAX_DRHDS are identical to DRHD_COUNT
which defined in platform ACPI table, so remove CONFIG_MAX_IOMMU_NUM
from Kconfig and link these three MACROs together.

Tracked-On: #3977

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-10-29 17:13:58 +08:00
committed by wenlingz
parent 75f512ce8c
commit 589be88cf6
7 changed files with 14 additions and 72 deletions

View File

@@ -8,6 +8,8 @@
#define VTD_H
#include <types.h>
#include <pci.h>
#include <platform_acpi_info.h>
/*
* Intel IOMMU register specification per version 1.0 public spec.
*/
@@ -468,7 +470,7 @@ static inline uint16_t dma_frcd_up_sid(uint64_t up_sid)
return ((uint16_t)up_sid & 0xffffU);
}
#define MAX_DRHDS 4
#define MAX_DRHDS DRHD_COUNT
#define MAX_DRHD_DEVSCOPES 4
#define DMAR_CONTEXT_TRANSLATION_TYPE_TRANSLATED 0x00U