Skip to contentSkip to conversation

dmar: section mismatch cleanup

PATCH In review Henrik Kretzschmar 2 participants 2 messages Mar 26, 2010 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmar: section mismatch cleanup

This patch fixes a section mismatch.

WARNING: drivers/pci/built-in.o(.text+0x182f5): Section mismatch in reference from the function dmar_ir_support() to the variable .init.data:acpi_slot_detected
The function dmar_ir_support() references
the variable __initdata acpi_slot_detected.
This is often because dmar_ir_support lacks a __initdata annotation or the annotation of acpi_slot_detected is wrong.

---
 drivers/pci/dmar.c          |    2 +-
 include/linux/intel-iommu.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pci/dmar.c +1 -1
index 83aae47..ffe22bc 100644
@@ -1456,7 +1456,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
index 9310c69..f51a553 100644
@@ -361,6 +361,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 dmar_ir_support(void) __init;
 
 #endif
Signature · 1 line
1.6.3.3
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · * Henrik Kretzschmar ([email protected]) wrote:

This patch fixes a section mismatch.

WARNING: drivers/pci/built-in.o(.text+0x182f5): Section mismatch in reference from the function dmar_ir_support() to the variable .init.data:acpi_slot_detected
The function dmar_ir_support() references
the variable __initdata acpi_slot_detected.
This is often because dmar_ir_support lacks a __initdata annotation or the annotation of acpi_slot_detected is wrong.

include/linux/intel-iommu.h extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep, · line 364

Quoted 5 lines
include/linux/intel-iommu.h +2 -2
-int dmar_ir_support(void)
+int __init dmar_ir_support(void)
 
-extern int dmar_ir_support(void);
+extern int dmar_ir_support(void) __init;

Nit, but prerfer to see:

-extern int dmar_ir_support(void);
+extern int __init dmar_ir_support(void);

thanks,
-chris