suspend.h 574 B

1234567891011121314151617181920212223242526
  1. #ifndef __ASM_SUSPEND_H
  2. #define __ASM_SUSPEND_H
  3. #define NR_CTX_REGS 11
  4. /*
  5. * struct cpu_suspend_ctx must be 16-byte aligned since it is allocated on
  6. * the stack, which must be 16-byte aligned on v8
  7. */
  8. struct cpu_suspend_ctx {
  9. /*
  10. * This struct must be kept in sync with
  11. * cpu_do_{suspend/resume} in mm/proc.S
  12. */
  13. u64 ctx_regs[NR_CTX_REGS];
  14. u64 sp;
  15. } __aligned(16);
  16. struct sleep_save_sp {
  17. phys_addr_t *save_ptr_stash;
  18. phys_addr_t save_ptr_stash_phys;
  19. };
  20. extern int cpu_suspend(unsigned long arg, int (*fn)(unsigned long));
  21. extern void cpu_resume(void);
  22. #endif