From: Joerg Roedel Date: Wed, 28 Oct 2009 17:02:26 +0000 (+0100) Subject: x86/amd-iommu: Un__init function required on shutdown X-Git-Tag: v2.6.27.39~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7c536f4b06b335490228376e236f1897acfc6924;p=karo-tx-linux.git x86/amd-iommu: Un__init function required on shutdown commit ca0207114f1708b563f510b7781a360ec5b98359 upstream. The function iommu_feature_disable is required on system shutdown to disable the IOMMU but it is marked as __init. This may result in a panic if the memory is reused. This patch fixes this bug. Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 923e6827b1a7..3b06a9cc671d 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c @@ -230,7 +230,7 @@ static void __init iommu_feature_enable(struct amd_iommu *iommu, u8 bit) writel(ctrl, iommu->mmio_base + MMIO_CONTROL_OFFSET); } -static void __init iommu_feature_disable(struct amd_iommu *iommu, u8 bit) +static void iommu_feature_disable(struct amd_iommu *iommu, u8 bit) { u32 ctrl;