xref: /linux/arch/arm64/include/asm/suspend.h (revision af391b15f7b56ce19f52862d36595637dd42b575)
16732bc65SLorenzo Pieralisi #ifndef __ASM_SUSPEND_H
26732bc65SLorenzo Pieralisi #define __ASM_SUSPEND_H
36732bc65SLorenzo Pieralisi 
46732bc65SLorenzo Pieralisi #define NR_CTX_REGS 11
56732bc65SLorenzo Pieralisi 
66732bc65SLorenzo Pieralisi /*
76732bc65SLorenzo Pieralisi  * struct cpu_suspend_ctx must be 16-byte aligned since it is allocated on
86732bc65SLorenzo Pieralisi  * the stack, which must be 16-byte aligned on v8
96732bc65SLorenzo Pieralisi  */
106732bc65SLorenzo Pieralisi struct cpu_suspend_ctx {
116732bc65SLorenzo Pieralisi 	/*
126732bc65SLorenzo Pieralisi 	 * This struct must be kept in sync with
136732bc65SLorenzo Pieralisi 	 * cpu_do_{suspend/resume} in mm/proc.S
146732bc65SLorenzo Pieralisi 	 */
156732bc65SLorenzo Pieralisi 	u64 ctx_regs[NR_CTX_REGS];
166732bc65SLorenzo Pieralisi 	u64 sp;
176732bc65SLorenzo Pieralisi } __aligned(16);
1895322526SLorenzo Pieralisi 
1995322526SLorenzo Pieralisi struct sleep_save_sp {
2095322526SLorenzo Pieralisi 	phys_addr_t *save_ptr_stash;
2195322526SLorenzo Pieralisi 	phys_addr_t save_ptr_stash_phys;
2295322526SLorenzo Pieralisi };
2395322526SLorenzo Pieralisi 
24*af391b15SSudeep Holla extern int cpu_suspend(unsigned long arg, int (*fn)(unsigned long));
2595322526SLorenzo Pieralisi extern void cpu_resume(void);
266732bc65SLorenzo Pieralisi #endif
27