The patch titled i386: fix section mismatch warning in intel.c has been added to the -mm tree. Its filename is i386-fix-section-mismatch-warning-in-intelc.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: i386: fix section mismatch warning in intel.c From: Sam Ravnborg <sam@xxxxxxxxxxxx> Fix following section mismatch warning: WARNING: vmlinux.o(.text+0xc88c): Section mismatch: reference to .init.text:trap_init_f00f_bug (between 'init_intel' and 'cpuid4_cache_lookup') init_intel are __cpuint where trap_init_f00f_bug is __init. Fixed by declaring trap_init_f00f_bug __cpuinit. Moved the defintion of trap_init_f00f_bug to the sole user in init.c so the ugly prototype in intel.c could get killed. Frank van Maarseveen <frankvm@xxxxxxxxxxx> supplied the .config used to reproduce the warning. Cc: Frank van Maarseveen <frankvm@xxxxxxxxxxx> Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx> Cc: Andi Kleen <ak@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/i386/kernel/cpu/intel.c | 17 +++++++++++++++-- arch/i386/kernel/traps.c | 14 -------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff -puN arch/i386/kernel/cpu/intel.c~i386-fix-section-mismatch-warning-in-intelc arch/i386/kernel/cpu/intel.c --- a/arch/i386/kernel/cpu/intel.c~i386-fix-section-mismatch-warning-in-intelc +++ a/arch/i386/kernel/cpu/intel.c @@ -8,6 +8,7 @@ #include <linux/module.h> #include <asm/processor.h> +#include <asm/pgtable.h> #include <asm/msr.h> #include <asm/uaccess.h> @@ -19,8 +20,6 @@ #include <mach_apic.h> #endif -extern int trap_init_f00f_bug(void); - #ifdef CONFIG_X86_INTEL_USERCOPY /* * Alignment at which movsl is preferred for bulk memory copies. @@ -95,6 +94,20 @@ static int __cpuinit num_cpu_cores(struc return 1; } +#ifdef CONFIG_X86_F00F_BUG +static void __cpuinit trap_init_f00f_bug(void) +{ + __set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO); + + /* + * Update the IDT descriptor and reload the IDT so that + * it uses the read-only mapped virtual address. + */ + idt_descr.address = fix_to_virt(FIX_F00F_IDT); + load_idt(&idt_descr); +} +#endif + static void __cpuinit init_intel(struct cpuinfo_x86 *c) { unsigned int l2 = 0; diff -puN arch/i386/kernel/traps.c~i386-fix-section-mismatch-warning-in-intelc arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c~i386-fix-section-mismatch-warning-in-intelc +++ a/arch/i386/kernel/traps.c @@ -1179,20 +1179,6 @@ asmlinkage void math_emulate(long arg) #endif /* CONFIG_MATH_EMULATION */ -#ifdef CONFIG_X86_F00F_BUG -void __init trap_init_f00f_bug(void) -{ - __set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO); - - /* - * Update the IDT descriptor and reload the IDT so that - * it uses the read-only mapped virtual address. - */ - idt_descr.address = fix_to_virt(FIX_F00F_IDT); - load_idt(&idt_descr); -} -#endif - /* * This needs to use 'idt_table' rather than 'idt', and * thus use the _nonmapped_ version of the IDT, as the _ Patches currently in -mm which might be from sam@xxxxxxxxxxxx are powerpc-vdso-install-unstripped-copies-on-disk.patch powerpc-vdso-install-unstripped-copies-on-disk-update.patch git-kbuild.patch pass-g-to-assembler-under-config_debug_info.patch mkmakefile-include-arch-on-o=-builds.patch include-linux-kbuild-remove-duplicate-entries.patch i386-fix-section-mismatch-warning-in-intelc.patch kconfig-syntax-cleanups.patch script-to-check-for-undefined-kconfig-symbols.patch modpost-detect-unterminated-device-id-lists.patch modpost-detect-unterminated-device-id-lists-fix.patch documentation-make-headers_installtxt.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html