ia64/xen-unstable

changeset 15586:a9103c71565e

Convert __init into __devinit in wakeup path.

Need to ensure all the code slice in the wakeup path still
existing. For this purpose, we have to use __devinit instead
of __init, since the former is null for CONFIG_HOTPLUG while
the latter always causes related code to be free-ed after
first boot.

Later when adding __init to some function, be sure to consider
wakeup case and cpu hotplug!

Signed-off-by <Kevin.Tian@intel.com>
author kfraser@localhost.localdomain
date Wed Jul 11 17:57:47 2007 +0100 (2007-07-11)
parents c3929e540632
children d0477293897c
files xen/arch/x86/apic.c xen/arch/x86/i8259.c xen/arch/x86/nmi.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/traps.c xen/drivers/char/ns16550.c xen/drivers/char/serial.c
line diff
     1.1 --- a/xen/arch/x86/apic.c	Wed Jul 11 17:48:10 2007 +0100
     1.2 +++ b/xen/arch/x86/apic.c	Wed Jul 11 17:57:47 2007 +0100
     1.3 @@ -957,7 +957,7 @@ void __setup_APIC_LVTT(unsigned int cloc
     1.4      apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR);
     1.5  }
     1.6  
     1.7 -static void __init setup_APIC_timer(unsigned int clocks)
     1.8 +static void __devinit setup_APIC_timer(unsigned int clocks)
     1.9  {
    1.10      unsigned long flags;
    1.11      local_irq_save(flags);
     2.1 --- a/xen/arch/x86/i8259.c	Wed Jul 11 17:48:10 2007 +0100
     2.2 +++ b/xen/arch/x86/i8259.c	Wed Jul 11 17:57:47 2007 +0100
     2.3 @@ -336,7 +336,7 @@ int i8259A_suspend(void)
     2.4      return 0;
     2.5  }
     2.6  
     2.7 -void __init init_8259A(int auto_eoi)
     2.8 +void __devinit init_8259A(int auto_eoi)
     2.9  {
    2.10      unsigned long flags;
    2.11  
     3.1 --- a/xen/arch/x86/nmi.c	Wed Jul 11 17:48:10 2007 +0100
     3.2 +++ b/xen/arch/x86/nmi.c	Wed Jul 11 17:57:47 2007 +0100
     3.3 @@ -202,7 +202,7 @@ void release_lapic_nmi(void)
     3.4          enable_lapic_nmi_watchdog();
     3.5  }
     3.6  
     3.7 -#define __pminit __init
     3.8 +#define __pminit __devinit
     3.9  
    3.10  /*
    3.11   * Activate the NMI watchdog via the local APIC.
     4.1 --- a/xen/arch/x86/x86_32/traps.c	Wed Jul 11 17:48:10 2007 +0100
     4.2 +++ b/xen/arch/x86/x86_32/traps.c	Wed Jul 11 17:57:47 2007 +0100
     4.3 @@ -232,7 +232,7 @@ unsigned long do_iret(void)
     4.4      return 0;
     4.5  }
     4.6  
     4.7 -void __init percpu_traps_init(void)
     4.8 +void __devinit percpu_traps_init(void)
     4.9  {
    4.10      struct tss_struct *tss = &doublefault_tss;
    4.11      asmlinkage int hypercall(void);
     5.1 --- a/xen/arch/x86/x86_64/traps.c	Wed Jul 11 17:48:10 2007 +0100
     5.2 +++ b/xen/arch/x86/x86_64/traps.c	Wed Jul 11 17:57:47 2007 +0100
     5.3 @@ -285,7 +285,7 @@ static int write_stack_trampoline(
     5.4      return 34;
     5.5  }
     5.6  
     5.7 -void __init percpu_traps_init(void)
     5.8 +void __devinit percpu_traps_init(void)
     5.9  {
    5.10      char *stack_bottom, *stack;
    5.11      int   cpu = smp_processor_id();
     6.1 --- a/xen/drivers/char/ns16550.c	Wed Jul 11 17:48:10 2007 +0100
     6.2 +++ b/xen/drivers/char/ns16550.c	Wed Jul 11 17:57:47 2007 +0100
     6.3 @@ -170,7 +170,7 @@ static int ns16550_getc(struct serial_po
     6.4      return 1;
     6.5  }
     6.6  
     6.7 -static void __init ns16550_init_preirq(struct serial_port *port)
     6.8 +static void __devinit ns16550_init_preirq(struct serial_port *port)
     6.9  {
    6.10      struct ns16550 *uart = port->uart;
    6.11      unsigned char lcr;
    6.12 @@ -214,7 +214,7 @@ static void __init ns16550_init_preirq(s
    6.13          port->tx_fifo_size = 16;
    6.14  }
    6.15  
    6.16 -static void __init ns16550_init_postirq(struct serial_port *port)
    6.17 +static void __devinit ns16550_init_postirq(struct serial_port *port)
    6.18  {
    6.19      struct ns16550 *uart = port->uart;
    6.20      int rc, bits;
     7.1 --- a/xen/drivers/char/serial.c	Wed Jul 11 17:48:10 2007 +0100
     7.2 +++ b/xen/drivers/char/serial.c	Wed Jul 11 17:57:47 2007 +0100
     7.3 @@ -348,7 +348,7 @@ int serial_tx_space(int handle)
     7.4      return SERIAL_TXBUFSZ - (port->txbufp - port->txbufc);
     7.5  }
     7.6  
     7.7 -void __init serial_init_preirq(void)
     7.8 +void __devinit serial_init_preirq(void)
     7.9  {
    7.10      int i;
    7.11      for ( i = 0; i < ARRAY_SIZE(com); i++ )
    7.12 @@ -356,7 +356,7 @@ void __init serial_init_preirq(void)
    7.13              com[i].driver->init_preirq(&com[i]);
    7.14  }
    7.15  
    7.16 -void __init serial_init_postirq(void)
    7.17 +void __devinit serial_init_postirq(void)
    7.18  {
    7.19      int i;
    7.20      for ( i = 0; i < ARRAY_SIZE(com); i++ )