From 382cc39150df2d27eafcc0df28324ee22e7b0f63 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Fri, 28 May 2010 14:26:48 +0200 Subject: [PATCH] --- yaml --- r: 199755 b: refs/heads/master c: e82752d8b5a7e0a5e4d607fd8713549e2a4e2741 h: refs/heads/master i: 199753: 44a5e5366d5da50dfad4f3eb9f4ce7fe30c2b4a6 199751: 6d9ff0e15a6203f669902bb320ca7b7505fb7300 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/amd_iommu_init.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index b018c328f8f7..8a3e58976cd3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1d61e73ab4c7470833241af888939a7aab2b0354 +refs/heads/master: e82752d8b5a7e0a5e4d607fd8713549e2a4e2741 diff --git a/trunk/arch/x86/kernel/amd_iommu_init.c b/trunk/arch/x86/kernel/amd_iommu_init.c index 3bacb4d0844c..1405346c62b4 100644 --- a/trunk/arch/x86/kernel/amd_iommu_init.c +++ b/trunk/arch/x86/kernel/amd_iommu_init.c @@ -287,8 +287,12 @@ static u8 * __init iommu_map_mmio_space(u64 address) { u8 *ret; - if (!request_mem_region(address, MMIO_REGION_LENGTH, "amd_iommu")) + if (!request_mem_region(address, MMIO_REGION_LENGTH, "amd_iommu")) { + pr_err("AMD-Vi: Can not reserve memory region %llx for mmio\n", + address); + pr_err("AMD-Vi: This is a BIOS bug. Please contact your hardware vendor\n"); return NULL; + } ret = ioremap_nocache(address, MMIO_REGION_LENGTH); if (ret != NULL) @@ -1314,7 +1318,7 @@ static int __init amd_iommu_init(void) ret = amd_iommu_init_dma_ops(); if (ret) - goto free; + goto free_disable; amd_iommu_init_api(); @@ -1332,9 +1336,10 @@ static int __init amd_iommu_init(void) out: return ret; -free: +free_disable: disable_iommus(); +free: amd_iommu_uninit_devices(); free_pages((unsigned long)amd_iommu_pd_alloc_bitmap,