From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiejun Chen Subject: [v5][PATCH 02/10] xen:vtd:rmrr: introduce acpi_rmrr_unit_entries Date: Tue, 26 Aug 2014 19:02:52 +0800 Message-ID: <1409050980-21933-3-git-send-email-tiejun.chen@intel.com> References: <1409050980-21933-1-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409050980-21933-1-git-send-email-tiejun.chen@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: JBeulich@suse.com, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, yang.z.zhang@intel.com, kevin.tian@intel.com, andrew.cooper3@citrix.com Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org We need a global count, acpi_rmrr_unit_entries, to record the number of rmrr entries, then we can use that somewhere else conveniently. Signed-off-by: Tiejun Chen --- xen/drivers/passthrough/vtd/dmar.c | 2 ++ xen/include/asm-x86/acpi.h | 1 + 2 files changed, 3 insertions(+) diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 1152c3a..c1b62a8 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -74,8 +74,10 @@ static int __init acpi_register_drhd_unit(struct acpi_drhd_unit *drhd) return 0; } +uint32_t acpi_rmrr_unit_entries = 0; static int __init acpi_register_rmrr_unit(struct acpi_rmrr_unit *rmrr) { + acpi_rmrr_unit_entries++; list_add(&rmrr->list, &acpi_rmrr_units); return 0; } diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h index b3c9e90..6b9d3ab 100644 --- a/xen/include/asm-x86/acpi.h +++ b/xen/include/asm-x86/acpi.h @@ -181,4 +181,5 @@ void save_rest_processor_state(void); void restore_rest_processor_state(void); extern struct list_head acpi_rmrr_units; +extern uint32_t acpi_rmrr_unit_entries; #endif /*__X86_ASM_ACPI_H*/ -- 1.9.1