Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318221 - sys-kernel/gentoo-sources-2.6.33-r1 - Section mismatch in reference from the function dmar_ir_support() to the variable .init.data:dmar_tbl
Summary: sys-kernel/gentoo-sources-2.6.33-r1 - Section mismatch in reference from the ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-02 21:57 UTC by Dani Soufi
Modified: 2010-05-06 10:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Soufi 2010-05-02 21:57:26 UTC
During build of kernel 2.6.33-r1, i receive a section mismatch warning. After re-compiling with CONFIG_DEBUG_SECTION_MISMATCH=y, i get those 3 warnings:
  CC      drivers/pci/pci-acpi.o
  LD      drivers/pci/built-in.o
WARNING: drivers/pci/built-in.o(.text+0xf50d): Section mismatch in reference from the function dmar_ir_support() to the variable .init.data:dmar_tbl
The function dmar_ir_support() references
the variable __initdata dmar_tbl.
This is often because dmar_ir_support lacks a __initdata 
annotation or the annotation of dmar_tbl is wrong.

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

  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x28e8d5): Section mismatch in reference from the function dmar_ir_support() to the variable .init.data:dmar_tbl
The function dmar_ir_support() references
the variable __initdata dmar_tbl.
This is often because dmar_ir_support lacks a __initdata 
annotation or the annotation of dmar_tbl is wrong.

  GEN     .version

I did some googling and looks like I found a solution/work around by modifying dmar.c and intel-iommu.h as follows:

--- dmar.c	2010-05-02 23:30:33.792500437 +0200
+++ /usr/src/linux/drivers/pci/dmar.c	2010-05-02 23:31:51.228500456 +0200
@@ -1456,7 +1456,7 @@
 /*
  * 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;

--- intel-iommu.h	2010-05-02 23:30:46.500501264 +0200
+++ /usr/src/linux/include/linux/intel-iommu.h	2010-05-02 23:32:11.790500101 +0200
@@ -361,6 +361,6 @@
 
 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

Kernel bug tracker doesn't seem to return any results on this.

Reproducible: Always
Comment 1 Mike Pagano gentoo-dev 2010-05-06 10:56:34 UTC
Section matches are generally harmless and are in many kernel versions and seem
to come and go. Please feel free to take these upstream at

http://bugzilla.kernel.org.