ia64/xen-unstable

changeset 13876:b50350fb0fde

[XEN] kexec: Remove asm/kexec.h. Move the single inline function into
arch specific machine_kexec.c with the other arch specific kexec
functions.

IA64 already had a stub in both kexec.h and machine_kexec.c.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Thu Feb 08 11:03:29 2007 +0000 (2007-02-08)
parents 3fbe12560ffe
children 3ad4691d1d34
files xen/arch/powerpc/machine_kexec.c xen/arch/x86/crash.c xen/arch/x86/machine_kexec.c xen/common/kexec.c xen/include/asm-ia64/kexec.h xen/include/asm-powerpc/kexec.h xen/include/asm-x86/kexec.h xen/include/asm-x86/x86_32/kexec.h xen/include/asm-x86/x86_64/kexec.h xen/include/xen/kexec.h
line diff
     1.1 --- a/xen/arch/powerpc/machine_kexec.c	Thu Feb 08 10:44:53 2007 +0000
     1.2 +++ b/xen/arch/powerpc/machine_kexec.c	Thu Feb 08 11:03:29 2007 +0000
     1.3 @@ -19,6 +19,11 @@ void machine_reboot_kexec(xen_kexec_imag
     1.4      printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
     1.5  }
     1.6  
     1.7 +void machine_kexec(xen_kexec_image_t *image)
     1.8 +{
     1.9 +    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
    1.10 +}
    1.11 +
    1.12  /*
    1.13   * Local variables:
    1.14   * mode: C
     2.1 --- a/xen/arch/x86/crash.c	Thu Feb 08 10:44:53 2007 +0000
     2.2 +++ b/xen/arch/x86/crash.c	Thu Feb 08 11:03:29 2007 +0000
     2.3 @@ -11,7 +11,6 @@
     2.4  #include <asm/atomic.h>
     2.5  #include <asm/elf.h>
     2.6  #include <asm/percpu.h>
     2.7 -#include <asm/kexec.h>
     2.8  #include <xen/types.h>
     2.9  #include <xen/irq.h>
    2.10  #include <asm/ipi.h>
     3.1 --- a/xen/arch/x86/machine_kexec.c	Thu Feb 08 10:44:53 2007 +0000
     3.2 +++ b/xen/arch/x86/machine_kexec.c	Thu Feb 08 11:03:29 2007 +0000
     3.3 @@ -15,11 +15,15 @@
     3.4  #include <xen/types.h>
     3.5  #include <xen/console.h>
     3.6  #include <xen/kexec.h>
     3.7 -#include <asm/kexec.h>
     3.8  #include <xen/domain_page.h>
     3.9  #include <asm/fixmap.h>
    3.10  #include <asm/hvm/hvm.h>
    3.11  
    3.12 +typedef void (*relocate_new_kernel_t)(
    3.13 +                unsigned long indirection_page,
    3.14 +                unsigned long page_list,
    3.15 +                unsigned long start_address);
    3.16 +
    3.17  int machine_kexec_load(int type, int slot, xen_kexec_image_t *image)
    3.18  {
    3.19      unsigned long prev_ma = 0;
    3.20 @@ -94,6 +98,15 @@ void machine_reboot_kexec(xen_kexec_imag
    3.21      BUG();
    3.22  }
    3.23  
    3.24 +void machine_kexec(xen_kexec_image_t *image)
    3.25 +{
    3.26 +    relocate_new_kernel_t rnk;
    3.27 +
    3.28 +    rnk = (relocate_new_kernel_t) image->page_list[1];
    3.29 +    (*rnk)(image->indirection_page, (unsigned long)image->page_list, 
    3.30 +           image->start_address);
    3.31 +}
    3.32 +
    3.33  /*
    3.34   * Local variables:
    3.35   * mode: C
     4.1 --- a/xen/common/kexec.c	Thu Feb 08 10:44:53 2007 +0000
     4.2 +++ b/xen/common/kexec.c	Thu Feb 08 11:03:29 2007 +0000
     4.3 @@ -6,7 +6,6 @@
     4.4   * - Magnus Damm <magnus@valinux.co.jp>
     4.5   */
     4.6  
     4.7 -#include <asm/kexec.h>
     4.8  #include <xen/lib.h>
     4.9  #include <xen/ctype.h>
    4.10  #include <xen/errno.h>
     5.1 --- a/xen/include/asm-ia64/kexec.h	Thu Feb 08 10:44:53 2007 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,25 +0,0 @@
     5.4 -#ifndef __IA64_KEXEC_H__
     5.5 -#define __IA64_KEXEC_H__
     5.6 -
     5.7 -#include <xen/lib.h>       /* for printk() used in stub */
     5.8 -#include <xen/types.h>
     5.9 -#include <public/xen.h>
    5.10 -#include <xen/kexec.h>
    5.11 -
    5.12 -static inline void machine_kexec(xen_kexec_image_t *image)
    5.13 -{
    5.14 -    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
    5.15 -}
    5.16 -
    5.17 -#endif /* __IA64_KEXEC_H__ */
    5.18 -
    5.19 -/*
    5.20 - * Local variables:
    5.21 - * mode: C
    5.22 - * c-set-style: "BSD"
    5.23 - * c-basic-offset: 4
    5.24 - * tab-width: 4
    5.25 - * indent-tabs-mode: nil
    5.26 - * End:
    5.27 - */
    5.28 -
     6.1 --- a/xen/include/asm-powerpc/kexec.h	Thu Feb 08 10:44:53 2007 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,25 +0,0 @@
     6.4 -#ifndef _ASM_KEXEC_H__
     6.5 -#define _ASM_KEXEC_H__
     6.6 -
     6.7 -#include <xen/lib.h>       /* for printk() used in stub */
     6.8 -#include <xen/types.h>
     6.9 -#include <public/xen.h>
    6.10 -#include <xen/kexec.h>
    6.11 -
    6.12 -static inline void machine_kexec(xen_kexec_image_t *image)
    6.13 -{
    6.14 -    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
    6.15 -}
    6.16 -
    6.17 -#endif /* _ASM_KEXEC_H__ */
    6.18 -
    6.19 -/*
    6.20 - * Local variables:
    6.21 - * mode: C
    6.22 - * c-set-style: "BSD"
    6.23 - * c-basic-offset: 4
    6.24 - * tab-width: 4
    6.25 - * indent-tabs-mode: nil
    6.26 - * End:
    6.27 - */
    6.28 -
     7.1 --- a/xen/include/asm-x86/kexec.h	Thu Feb 08 10:44:53 2007 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,20 +0,0 @@
     7.4 -#ifndef __X86_KEXEC_H__
     7.5 -#define __X86_KEXEC_H__
     7.6 -
     7.7 -#ifdef __x86_64__
     7.8 -#include <asm/x86_64/kexec.h>
     7.9 -#else
    7.10 -#include <asm/x86_32/kexec.h>
    7.11 -#endif
    7.12 -
    7.13 -#endif /* __X86_KEXEC_H__ */
    7.14 -
    7.15 -/*
    7.16 - * Local variables:
    7.17 - * mode: C
    7.18 - * c-set-style: "BSD"
    7.19 - * c-basic-offset: 4
    7.20 - * tab-width: 4
    7.21 - * indent-tabs-mode: nil
    7.22 - * End:
    7.23 - */
     8.1 --- a/xen/include/asm-x86/x86_32/kexec.h	Thu Feb 08 10:44:53 2007 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,39 +0,0 @@
     8.4 -/******************************************************************************
     8.5 - * kexec.h
     8.6 - * 
     8.7 - * Based heavily on machine_kexec.c and kexec.h from Linux 2.6.19-rc1
     8.8 - *
     8.9 - */
    8.10 -  
    8.11 -#ifndef __X86_KEXEC_X86_32_H__
    8.12 -#define __X86_KEXEC_X86_32_H__
    8.13 -
    8.14 -#include <xen/types.h>
    8.15 -#include <xen/kexec.h>
    8.16 -
    8.17 -typedef asmlinkage void (*relocate_new_kernel_t)(
    8.18 -               unsigned long indirection_page,
    8.19 -               unsigned long page_list,
    8.20 -               unsigned long start_address,
    8.21 -               unsigned int has_pae);
    8.22 -
    8.23 -static inline void machine_kexec(xen_kexec_image_t *image)
    8.24 -{
    8.25 -    relocate_new_kernel_t rnk;
    8.26 -
    8.27 -    rnk = (relocate_new_kernel_t) image->page_list[1];
    8.28 -    (*rnk)(image->indirection_page, (unsigned long)image->page_list, 
    8.29 -           image->start_address, (unsigned long)cpu_has_pae);
    8.30 -}
    8.31 -
    8.32 -#endif /* __X86_KEXEC_X86_32_H__ */
    8.33 -
    8.34 -/*
    8.35 - * Local variables:
    8.36 - * mode: C
    8.37 - * c-set-style: "BSD"
    8.38 - * c-basic-offset: 4
    8.39 - * tab-width: 4
    8.40 - * indent-tabs-mode: nil
    8.41 - * End:
    8.42 - */
     9.1 --- a/xen/include/asm-x86/x86_64/kexec.h	Thu Feb 08 10:44:53 2007 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,38 +0,0 @@
     9.4 -/******************************************************************************
     9.5 - * kexec.h
     9.6 - * 
     9.7 - * Based heavily on machine_kexec.c and kexec.h from Linux 2.6.19-rc1
     9.8 - *
     9.9 - */
    9.10 -
    9.11 -#ifndef __X86_64_KEXEC_H__
    9.12 -#define __X86_64_KEXEC_H__
    9.13 -  
    9.14 -#include <xen/types.h>
    9.15 -#include <xen/kexec.h>
    9.16 -
    9.17 -typedef void (*relocate_new_kernel_t)(
    9.18 -                unsigned long indirection_page,
    9.19 -                unsigned long page_list,
    9.20 -                unsigned long start_address);
    9.21 -
    9.22 -static inline void machine_kexec(xen_kexec_image_t *image)
    9.23 -{
    9.24 -    relocate_new_kernel_t rnk;
    9.25 -
    9.26 -    rnk = (relocate_new_kernel_t) image->page_list[1];
    9.27 -    (*rnk)(image->indirection_page, (unsigned long)image->page_list, 
    9.28 -           image->start_address);
    9.29 -}
    9.30 -
    9.31 -#endif /* __X86_64_KEXEC_H__ */
    9.32 -
    9.33 -/*
    9.34 - * Local variables:
    9.35 - * mode: C
    9.36 - * c-set-style: "BSD"
    9.37 - * c-basic-offset: 4
    9.38 - * tab-width: 4
    9.39 - * indent-tabs-mode: nil
    9.40 - * End:
    9.41 - */
    10.1 --- a/xen/include/xen/kexec.h	Thu Feb 08 10:44:53 2007 +0000
    10.2 +++ b/xen/include/xen/kexec.h	Thu Feb 08 11:03:29 2007 +0000
    10.3 @@ -25,6 +25,7 @@ int machine_kexec_load(int type, int slo
    10.4  void machine_kexec_unload(int type, int slot, xen_kexec_image_t *image);
    10.5  void machine_kexec_reserved(xen_kexec_reserve_t *reservation);
    10.6  void machine_reboot_kexec(xen_kexec_image_t *image);
    10.7 +void machine_kexec(xen_kexec_image_t *image);
    10.8  void kexec_crash(void);
    10.9  void kexec_crash_save_cpu(void);
   10.10  crash_xen_info_t *kexec_crash_save_info(void);