[2.6 patch] i386: intel_cacheinfo.c:find_num_cache_leaves() should be __cpuinit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the following section mismatch:

<--  snip  -->

...
  MODPOST vmlinux
WARNING: arch/i386/kernel/built-in.o(.text+0xb6a7): Section mismatch: reference to .init.text:find_num_cache_leaves (between 'init_intel_cacheinfo' and 'cache_shared_cpu_map_setup')
...

<--  snip  -->

It could be __init_refok, but gcc >= 4.0 anyway inlines it into the 
__cpuinit init_intel_cacheinfo(), and IMHO it's too small
for "noinline __init".

Signed-off-by: Adrian Bunk <[email protected]>

---
--- linux-2.6.22-rc6-mm1/arch/i386/kernel/cpu/intel_cacheinfo.c.old	2007-07-10 04:21:03.000000000 +0200
+++ linux-2.6.22-rc6-mm1/arch/i386/kernel/cpu/intel_cacheinfo.c	2007-07-10 04:24:27.000000000 +0200
@@ -275,8 +275,7 @@
 	return 0;
 }
 
-/* will only be called once; __init is safe here */
-static int __init find_num_cache_leaves(void)
+static int __cpuinit find_num_cache_leaves(void)
 {
 	unsigned int		eax, ebx, ecx, edx;
 	union _cpuid4_leaf_eax	cache_eax;

-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux