ia64/xen-unstable

changeset 2206:34bccd941eb4

bitkeeper revision 1.1159.17.19 (411b929cWqTc_xtMch0ol_CgtZ8PJQ)

Merge 2.4 and 2.6 reboot code.
author cl349@freefall.cl.cam.ac.uk
date Thu Aug 12 15:54:04 2004 +0000 (2004-08-12)
parents a3feaa0784a7
children 8d02fbe8e19e
files linux-2.4.26-xen-sparse/arch/xen/kernel/Makefile linux-2.4.26-xen-sparse/arch/xen/kernel/process.c linux-2.4.26-xen-sparse/mkbuildtree linux-2.6.7-xen-sparse/arch/xen/kernel/reboot.c
line diff
     1.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/Makefile	Thu Aug 12 14:10:20 2004 +0000
     1.2 +++ b/linux-2.4.26-xen-sparse/arch/xen/kernel/Makefile	Thu Aug 12 15:54:04 2004 +0000
     1.3 @@ -10,7 +10,8 @@ export-objs     := i386_ksyms.o
     1.4  
     1.5  obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o  \
     1.6  		ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
     1.7 -		i386_ksyms.o i387.o evtchn.o ctrl_if.o pci-dma.o
     1.8 +		i386_ksyms.o i387.o evtchn.o ctrl_if.o pci-dma.o \
     1.9 +		reboot.o
    1.10  
    1.11  ifdef CONFIG_PCI
    1.12  obj-y	+= pci-i386.o pci-pc.o
     2.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/process.c	Thu Aug 12 14:10:20 2004 +0000
     2.2 +++ b/linux-2.4.26-xen-sparse/arch/xen/kernel/process.c	Thu Aug 12 15:54:04 2004 +0000
     2.3 @@ -115,27 +115,6 @@ void cpu_idle (void)
     2.4      }
     2.5  }
     2.6  
     2.7 -void machine_restart(char *__unused)
     2.8 -{
     2.9 -    /* We really want to get pending console data out before we die. */
    2.10 -    extern void xencons_force_flush(void);
    2.11 -    xencons_force_flush();
    2.12 -    HYPERVISOR_reboot();
    2.13 -}
    2.14 -
    2.15 -void machine_halt(void)
    2.16 -{
    2.17 -    machine_power_off();
    2.18 -}
    2.19 -
    2.20 -void machine_power_off(void)
    2.21 -{
    2.22 -    /* We really want to get pending console data out before we die. */
    2.23 -    extern void xencons_force_flush(void);
    2.24 -    xencons_force_flush();
    2.25 -    HYPERVISOR_shutdown();
    2.26 -}
    2.27 -
    2.28  extern void show_trace(unsigned long* esp);
    2.29  
    2.30  void show_regs(struct pt_regs * regs)
     3.1 --- a/linux-2.4.26-xen-sparse/mkbuildtree	Thu Aug 12 14:10:20 2004 +0000
     3.2 +++ b/linux-2.4.26-xen-sparse/mkbuildtree	Thu Aug 12 15:54:04 2004 +0000
     3.3 @@ -222,6 +222,7 @@ ln -sf ../../i386/kernel/semaphore.c
     3.4  ln -sf ../../i386/kernel/sys_i386.c 
     3.5  ln -sf ../../../${LINUX_26}/arch/xen/kernel/ctrl_if.c
     3.6  ln -sf ../../../${LINUX_26}/arch/xen/kernel/evtchn.c
     3.7 +ln -sf ../../../${LINUX_26}/arch/xen/kernel/reboot.c
     3.8  ln -sf ../../../${LINUX_26}/arch/xen/i386/kernel/ioport.c
     3.9  ln -sf ../../../${LINUX_26}/arch/xen/i386/kernel/pci-dma.c
    3.10  
     4.1 --- a/linux-2.6.7-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 12 14:10:20 2004 +0000
     4.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 12 15:54:04 2004 +0000
     4.3 @@ -1,8 +1,12 @@
     4.4  
     4.5 +#include <linux/version.h>
     4.6  #include <linux/module.h>
     4.7 +#include <linux/reboot.h>
     4.8  #include <asm-xen/hypervisor.h>
     4.9  
    4.10 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    4.11  int reboot_thru_bios = 0;	/* for dmi_scan.c */
    4.12 +#endif
    4.13  
    4.14  void machine_restart(char * __unused)
    4.15  {
    4.16 @@ -12,21 +16,18 @@ void machine_restart(char * __unused)
    4.17  	HYPERVISOR_reboot();
    4.18  }
    4.19  
    4.20 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    4.21  EXPORT_SYMBOL(machine_restart);
    4.22 +#endif
    4.23  
    4.24  void machine_halt(void)
    4.25  {
    4.26 -	/* We really want to get pending console data out before we die. */
    4.27 -	extern void xencons_force_flush(void);
    4.28 -	xencons_force_flush();
    4.29 -	for ( ; ; ) /* loop without wasting cpu cycles */
    4.30 -	{
    4.31 -		HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_pending = 0;
    4.32 -		HYPERVISOR_block();
    4.33 -	}
    4.34 +	machine_power_off();
    4.35  }
    4.36  
    4.37 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    4.38  EXPORT_SYMBOL(machine_halt);
    4.39 +#endif
    4.40  
    4.41  void machine_power_off(void)
    4.42  {
    4.43 @@ -36,4 +37,6 @@ void machine_power_off(void)
    4.44  	HYPERVISOR_shutdown();
    4.45  }
    4.46  
    4.47 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    4.48  EXPORT_SYMBOL(machine_power_off);
    4.49 +#endif