kexec.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _ASM_POWERPC_KEXEC_H
  2. #define _ASM_POWERPC_KEXEC_H
  3. #ifdef __KERNEL__
  4. /*
  5. * Maximum page that is mapped directly into kernel memory.
  6. * XXX: Since we copy virt we can use any page we allocate
  7. */
  8. #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
  9. /*
  10. * Maximum address we can reach in physical address mode.
  11. * XXX: I want to allow initrd in highmem. Otherwise set to rmo on LPAR.
  12. */
  13. #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
  14. /* Maximum address we can use for the control code buffer */
  15. #ifdef __powerpc64__
  16. #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
  17. #else
  18. /* TASK_SIZE, probably left over from use_mm ?? */
  19. #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
  20. #endif
  21. #define KEXEC_CONTROL_CODE_SIZE 4096
  22. /* The native architecture */
  23. #ifdef __powerpc64__
  24. #define KEXEC_ARCH KEXEC_ARCH_PPC64
  25. #else
  26. #define KEXEC_ARCH KEXEC_ARCH_PPC
  27. #endif
  28. #define HAVE_ARCH_COPY_OLDMEM_PAGE
  29. #ifndef __ASSEMBLY__
  30. #ifdef CONFIG_KEXEC
  31. #define MAX_NOTE_BYTES 1024
  32. #ifdef __powerpc64__
  33. extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
  34. master to copy new code to 0 */
  35. extern void __init kexec_setup(void);
  36. extern int crashing_cpu;
  37. extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
  38. #endif /* __powerpc64 __ */
  39. struct kimage;
  40. struct pt_regs;
  41. extern void default_machine_kexec(struct kimage *image);
  42. extern int default_machine_kexec_prepare(struct kimage *image);
  43. extern void default_machine_crash_shutdown(struct pt_regs *regs);
  44. #endif /* !CONFIG_KEXEC */
  45. /*
  46. * Provide a dummy definition to avoid build failures. Will remain
  47. * empty till crash dump support is enabled.
  48. */
  49. static inline void crash_setup_regs(struct pt_regs *newregs,
  50. struct pt_regs *oldregs) { }
  51. #endif /* ! __ASSEMBLY__ */
  52. #endif /* __KERNEL__ */
  53. #endif /* _ASM_POWERPC_KEXEC_H */