Fix dmar_ir_support() section mismatch
PATCH 1/1 Fix dmar_ir_support() section mismatch
dmar_ir_support() uses the static dmar_tbl variable, which is annotated as __initdata. This causes a section mismatch because the function is not annotated as __init.
Since it is only used by (__init) intr_remapping_supported(), fix the mismatch by annotating it with __init.
The code was introduced by commit 074835f0, Sep 9 2009.
--- drivers/pci/dmar.c | 2 +- include/linux/intel-iommu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pci/dmar.c +1 -1
@@ -1370,7 +1370,7 @@ int dmar_reenable_qi(struct intel_iommu *iommu)/* * Check interrupt remapping support in DMAR table description. */ -int dmar_ir_support (void ) +int __init dmar_ir_support (void ) {struct acpi_table_dmar *dmar; dmar = (struct acpi_table_dmar *)dmar_tbl;
include/linux/intel-iommu.h +1 -1
@@ -360,6 +360,6 @@ extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,extern int qi_submit_sync (struct qi_desc *desc,struct intel_iommu *iommu); -extern int dmar_ir_support (void ); +extern int __init dmar_ir_support (void );#endif
Signature · 1 line
1.6.5.2.372.gc0502
Quoted 10 lines · Alberto Bertogli
dmar_ir_support()uses the staticdmar_tblvariable, which is annotated as__initdata. This causes a section mismatch because the function is not annotated as__init.Since it is only used by (
__init)intr_remapping_supported(), fix the mismatch by annotating it with__init.The code was introduced by commit
074835f0, Sep 9 2009.Signed-off-by Alberto Bertogli <[email protected]>
This patch still seems to be necessary, am I missing something?
Quoted 38 lines
--- drivers/pci/dmar.c | 2 +- include/linux/intel-iommu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/pci/dmar.c +1
-1@@ -1370,7 +1370,7 @@ int dmar_reenable_qi(struct intel_iommu *iommu)/* * Check interrupt remapping support in DMAR table description. */ -int dmar_ir_support (void ) +int __init dmar_ir_support (void ) {struct acpi_table_dmar *dmar; dmar = (struct acpi_table_dmar *)dmar_tbl;include/linux/intel-iommu.h +1
-1@@ -360,6 +360,6 @@ extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,extern int qi_submit_sync (struct qi_desc *desc,struct intel_iommu *iommu); -extern int dmar_ir_support (void ); +extern int __init dmar_ir_support (void );#endif Signature · 7 lines
1.6.5.2.372.gc0502 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/