1 // SPDX-License-Identifier: GPL-2.0
3 * swsusp.c - SuperH hibernation support
5 * Copyright (C) 2009 Magnus Damm
9 #include <linux/sched.h>
10 #include <linux/suspend.h>
11 #include <asm/suspend.h>
12 #include <asm/sections.h>
13 #include <asm/tlbflush.h>
17 struct swsusp_arch_regs swsusp_arch_regs_cpu0;
19 int pfn_is_nosave(unsigned long pfn)
21 unsigned long begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT;
22 unsigned long end_pfn = PAGE_ALIGN(__pa(&__nosave_end)) >> PAGE_SHIFT;
24 return (pfn >= begin_pfn) && (pfn < end_pfn);
27 void save_processor_state(void)
32 void restore_processor_state(void)
34 local_flush_tlb_all();