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

[Xen-devel] [PATCH 8/10] Convert __init into __devinit in wakeup path


  • To: "Keir Fraser" <keir@xxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Wed, 27 Jun 2007 21:37:59 +0800
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 27 Jun 2007 06:36:52 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Ace4wF9eXAl1kmjvTKCix40UQOvTBg==
  • Thread-topic: [PATCH 8/10] 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@xxxxxxxxx>

diff -r 8140b647f56c xen/arch/x86/apic.c
--- a/xen/arch/x86/apic.c       Tue Jun 26 18:05:22 2007 -0400
+++ b/xen/arch/x86/apic.c       Tue Jun 26 18:05:22 2007 -0400
@@ -957,7 +957,7 @@ void __setup_APIC_LVTT(unsigned int cloc
     apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR);
 }
 
-static void __init setup_APIC_timer(unsigned int clocks)
+static void __devinit setup_APIC_timer(unsigned int clocks)
 {
     unsigned long flags;
     local_irq_save(flags);
diff -r 8140b647f56c xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c      Tue Jun 26 18:05:22 2007 -0400
+++ b/xen/arch/x86/i8259.c      Tue Jun 26 18:17:33 2007 -0400
@@ -336,7 +336,7 @@ int i8259A_suspend(void)
     return 0;
 }
 
-void __init init_8259A(int auto_eoi)
+void __devinit init_8259A(int auto_eoi)
 {
     unsigned long flags;
 
diff -r 8140b647f56c xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c        Tue Jun 26 18:05:22 2007 -0400
+++ b/xen/arch/x86/nmi.c        Tue Jun 26 18:05:22 2007 -0400
@@ -202,7 +202,7 @@ void release_lapic_nmi(void)
         enable_lapic_nmi_watchdog();
 }
 
-#define __pminit __init
+#define __pminit __devinit
 
 /*
  * Activate the NMI watchdog via the local APIC.
diff -r 8140b647f56c xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c       Tue Jun 26 18:05:22 2007 -0400
+++ b/xen/arch/x86/x86_32/traps.c       Tue Jun 26 18:05:22 2007 -0400
@@ -241,7 +241,7 @@ fastcall void smp_deferred_nmi(struct cp
     do_nmi(regs);
 }
 
-void __init percpu_traps_init(void)
+void __devinit percpu_traps_init(void)
 {
     struct tss_struct *tss = &doublefault_tss;
     asmlinkage int hypercall(void);
diff -r 8140b647f56c xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c       Tue Jun 26 18:05:22 2007 -0400
+++ b/xen/arch/x86/x86_64/traps.c       Tue Jun 26 18:05:22 2007 -0400
@@ -285,7 +285,7 @@ static int write_stack_trampoline(
     return 34;
 }
 
-void __init percpu_traps_init(void)
+void __devinit percpu_traps_init(void)
 {
     char *stack_bottom, *stack;
     int   cpu = smp_processor_id();
diff -r 8140b647f56c xen/drivers/char/ns16550.c
--- a/xen/drivers/char/ns16550.c        Tue Jun 26 18:05:22 2007 -0400
+++ b/xen/drivers/char/ns16550.c        Tue Jun 26 18:16:02 2007 -0400
@@ -170,7 +170,7 @@ static int ns16550_getc(struct serial_po
     return 1;
 }
 
-static void __init ns16550_init_preirq(struct serial_port *port)
+static void __devinit ns16550_init_preirq(struct serial_port *port)
 {
     struct ns16550 *uart = port->uart;
     unsigned char lcr;
@@ -214,7 +214,7 @@ static void __init ns16550_init_preirq(s
         port->tx_fifo_size = 16;
 }
 
-static void __init ns16550_init_postirq(struct serial_port *port)
+static void __devinit ns16550_init_postirq(struct serial_port *port)
 {
     struct ns16550 *uart = port->uart;
     int rc, bits;
diff -r 8140b647f56c xen/drivers/char/serial.c
--- a/xen/drivers/char/serial.c Tue Jun 26 18:05:22 2007 -0400
+++ b/xen/drivers/char/serial.c Tue Jun 26 18:09:56 2007 -0400
@@ -348,7 +348,7 @@ int serial_tx_space(int handle)
     return SERIAL_TXBUFSZ - (port->txbufp - port->txbufc);
 }
 
-void __init serial_init_preirq(void)
+void __devinit serial_init_preirq(void)
 {
     int i;
     for ( i = 0; i < ARRAY_SIZE(com); i++ )
@@ -356,7 +356,7 @@ void __init serial_init_preirq(void)
             com[i].driver->init_preirq(&com[i]);
 }
 
-void __init serial_init_postirq(void)
+void __devinit serial_init_postirq(void)
 {
     int i;
     for ( i = 0; i < ARRAY_SIZE(com); i++ )

Attachment: init_to_devinit.patch
Description: init_to_devinit.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.