o Some functions which should have been in init sections as they are called
only once. Put them in init sections. Otherwise MODPOST generates warning
as these functions are placed in .text and they end up accessing something
in init sections.
WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init
from .text between 'do_pre_smp_initcalls' (at offset 0xc01000d1) and
'run_init_process'
Signed-off-by: Vivek Goyal <[email protected]>
---
arch/i386/kernel/acpi/boot.c | 2 +-
arch/i386/kernel/acpi/earlyquirk.c | 2 +-
arch/i386/kernel/setup.c | 2 +-
init/main.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff -puN arch/i386/kernel/acpi/boot.c~convert-some-functions-to-init-to-avoid-warnings arch/i386/kernel/acpi/boot.c
--- linux-2.6.19-rc1-reloc/arch/i386/kernel/acpi/boot.c~convert-some-functions-to-init-to-avoid-warnings 2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/arch/i386/kernel/acpi/boot.c 2006-12-15 14:08:59.000000000 +0530
@@ -333,7 +333,7 @@ acpi_parse_ioapic(acpi_table_entry_heade
/*
* Parse Interrupt Source Override for the ACPI SCI
*/
-static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
+static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
{
if (trigger == 0) /* compatible SCI trigger is level */
trigger = 3;
diff -puN arch/i386/kernel/acpi/earlyquirk.c~convert-some-functions-to-init-to-avoid-warnings arch/i386/kernel/acpi/earlyquirk.c
--- linux-2.6.19-rc1-reloc/arch/i386/kernel/acpi/earlyquirk.c~convert-some-functions-to-init-to-avoid-warnings 2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/arch/i386/kernel/acpi/earlyquirk.c 2006-12-15 14:08:59.000000000 +0530
@@ -50,7 +50,7 @@ static int __init check_bridge(int vendo
return 0;
}
-static void check_intel(void)
+static void __init check_intel(void)
{
u16 vendor, device;
diff -puN arch/i386/kernel/setup.c~convert-some-functions-to-init-to-avoid-warnings arch/i386/kernel/setup.c
--- linux-2.6.19-rc1-reloc/arch/i386/kernel/setup.c~convert-some-functions-to-init-to-avoid-warnings 2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/arch/i386/kernel/setup.c 2006-12-15 14:08:59.000000000 +0530
@@ -495,7 +495,7 @@ static void set_mca_bus(int x) { }
#endif
/* Overridden in paravirt.c if CONFIG_PARAVIRT */
-char * __attribute__((weak)) memory_setup(void)
+char * __init __attribute__((weak)) memory_setup(void)
{
return machine_specific_memory_setup();
}
diff -puN init/main.c~convert-some-functions-to-init-to-avoid-warnings init/main.c
--- linux-2.6.19-rc1-reloc/init/main.c~convert-some-functions-to-init-to-avoid-warnings 2006-12-15 14:08:59.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/init/main.c 2006-12-15 14:09:57.000000000 +0530
@@ -698,7 +698,7 @@ static void __init do_basic_setup(void)
do_initcalls();
}
-static void do_pre_smp_initcalls(void)
+static void __init do_pre_smp_initcalls(void)
{
extern int spawn_ksoftirqd(void);
#ifdef CONFIG_SMP
_
-
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]