I noticed warning messages about "section mismatches" when I compiled some 3rd-party drivers with an SMP-enabled kernel. I think the Lucent driver is one of them -- it compiled ok with a uniprocessor kernel, but the same kernel version configured for SMP gave the "section mismatches" warning. Note that the Lucent driver does not work with an SMP kernel, but I don't know if that has anything to do with the mismatch warning.
The 'agsrm' modem driver also has this warning.
Today I compiled the 188.8.131.52 kernel, SMP-enabled, and I noticed that even the kernel reports a mismatch:
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
I recompiled the kernel:
# make CONFIG_DEBUG_SECTION_MISMATCH=y bzImage
Which reports this:
WARNING: vmlinux.o(.text+0x91e): Section mismatch in reference from the function cpu_exit_clear() to the function .cpuinit.text:cpu_uninit()
The function cpu_exit_clear() references
the function __cpuinit cpu_uninit().
This is often because cpu_exit_clear lacks a __cpuinit
annotation or the annotation of cpu_uninit is wrong.
WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel()
The variable __cpuinitdata initial_code references
a function __init i386_start_kernel().
If i386_start_kernel is only used by initial_code then
annotate i386_start_kernel with a matching annotation.
Is this something to worry about? The kernel seems to work ok. What about modules, if they give that warning is it a problem? For example, compiling the agsrm modem driver:
Building modules, stage 2.
MODPOST 2 modules
WARNING: modpost: Found 3 section mismatch(es).
I typed these keywords "modpost section mismatch kernel" and got 129,000 hits. Some people get a dozen or more mismatches -- perhaps I should count myself lucky! Here is one comment (http://bugs.gentoo.org/232335):
Section matches are generally harmless and are in many kernel versions and seem
to come and go.
If I narrow the search a bit, "modpost section mismatch cpu_exit_clear initial_code", I get just 7 hits, most of them for the 2.6.27.x kernel. Nothing that tells me whether it is a "serious" problem, no patches to fix it.
I'm curious, tonight I'll recompile the kernel for a single-processor only, see if that fixes it.
Comments:Posted on 8 Aug 2009, 2:20 by MU
in general warnings during compilation are harmless.
They may appear for example, if deprciated functions are used.
I often had them with Gtk, and they caused no trouble.
Really serious things throw errors, and compilation then stops.
Posted on 8 Aug 2009, 8:05 by BarryK
Interesting, I reconfigured the kernel, just one change, unticked the SMP checkbox, then when I compiled it was reduced to one section mismatch.
Anyway, I'll go back to SMP for this kernel.
I notice that the help while configuring refers to 'ext4dev' filesystem that "will be renamed to ext4 when it matures" (or words to that effect).
But, the 2.6.27 kernel was released August 2008 and has been patched continuously since then, right up to the latest '29' patch on 30th July 2009. I read some recent changelogs, lots of upgrades for ext4.
There are some questions about this on various forums. People reporting that they have to mount the partition as 'ext4dev' rather than 'ext4'. There are some comments that even in the 2.6.28 kernel ext4 is not fully mature, but they are dated around December 2008.
Oh, Redhat has a patch for 184.108.40.206 to rename ext4dev to ext4:
...I'll check that out.
Posted on 8 Aug 2009, 8:29 by BarryK
For the record, I looked at the 2.6.27.x changelogs, there were lots of ext4 patches in 220.127.116.11, 18.104.22.168 and 22.214.171.124 (I looked back as far as 126.96.36.199) -- and in the changelog they are referring to it as 'ext4'.
But the actual configure docs call it ext4dev, so I will probably have to apply the patch.
Posted on 8 Aug 2009, 8:49 by BarryK
ext4dev yet again
I searched the changelog, back to 188.8.131.52, there are lots of ext4 patches in 184.108.40.206, but nothing anywhere about renaming ext4dev to ext4.
Posted on 8 Aug 2009, 8:07 by BarryK
The patch is 'linux-2.6.27-ext4-rename-ext4dev-to-ext4.patch' (created by Redhat/Fedora) but finding where to download it from, that is a problem...
Posted on 8 Aug 2009, 9:06 by BarryK
Ah ha! here's a patch:
Posted on 8 Aug 2009, 18:34 by Dougal
This (or one instance) was fixed recently in lkml:
It has to do with CONFIG_CPU_HOTPLUG.