#ifndef _ASM_LOONGARCH_ACPI_H
#define _ASM_LOONGARCH_ACPI_H
+#include <asm/suspend.h>
+
#ifdef CONFIG_ACPI
extern int acpi_strict;
extern int acpi_disabled;
extern int loongarch_acpi_suspend(void);
extern int (*acpi_suspend_lowlevel)(void);
-extern void loongarch_suspend_enter(void);
static inline unsigned long acpi_get_wakeup_address(void)
{
#ifdef CONFIG_SUSPEND
- extern void loongarch_wakeup_start(void);
return (unsigned long)loongarch_wakeup_start;
#endif
return 0UL;
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_SUSPEND_H
+#define __ASM_SUSPEND_H
+
+void loongarch_common_suspend(void);
+void loongarch_common_resume(void);
+void loongarch_suspend_enter(void);
+void loongarch_wakeup_start(void);
+
+#endif
};
static struct saved_registers saved_regs;
-static void arch_common_suspend(void)
+void loongarch_common_suspend(void)
{
save_counter();
saved_regs.pgd = csr_read64(LOONGARCH_CSR_PGDL);
loongarch_suspend_addr = loongson_sysconf.suspend_addr;
}
-static void arch_common_resume(void)
+void loongarch_common_resume(void)
{
sync_counter();
local_flush_tlb_all();
enable_gpe_wakeup();
enable_pci_wakeup();
- arch_common_suspend();
+ loongarch_common_suspend();
/* processor specific suspend */
loongarch_suspend_enter();
- arch_common_resume();
+ loongarch_common_resume();
return 0;
}