x86, kvm: Fix section mismatches in kvm.c
authorRakib Mullick <rakib.mullick@gmail.com>
Thu, 2 Jul 2009 05:40:36 +0000 (11:40 +0600)
committerIngo Molnar <mingo@elte.hu>
Fri, 3 Jul 2009 12:34:22 +0000 (14:34 +0200)
The function paravirt_ops_setup() has been refering the
variable no_timer_check, which is a __initdata. Thus generates
the following warning. paravirt_ops_setup() function is called
from kvm_guest_init() which is a __init function. So to fix
this we mark paravirt_ops_setup as __init.

The sections-check output that warned us about this was:

   LD      arch/x86/built-in.o
  WARNING: arch/x86/built-in.o(.text+0x166ce): Section mismatch in
  reference from the function paravirt_ops_setup() to the variable
  .init.data:no_timer_check
  The function paravirt_ops_setup() references
  the variable __initdata no_timer_check.
  This is often because paravirt_ops_setup lacks a __initdata
  annotation or the annotation of no_timer_check is wrong.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Acked-by: Avi Kivity <avi@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <b9df5fa10907012240y356427b8ta4bd07f0efc6a049@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/kvm.c

index a78ecad0c900ff646b8c826c08cd54b094815b5a..c664d515f613576c7ccd1168afcc47bf897a0855 100644 (file)
@@ -200,7 +200,7 @@ static void kvm_leave_lazy_mmu(void)
        state->mode = paravirt_get_lazy_mode();
 }
 
-static void paravirt_ops_setup(void)
+static void __init paravirt_ops_setup(void)
 {
        pv_info.name = "KVM";
        pv_info.paravirt_enabled = 1;