2 * Suspend support specific for s390.
4 * Copyright IBM Corp. 2009
6 * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com>
10 #include <linux/suspend.h>
11 #include <linux/reboot.h>
12 #include <linux/pfn.h>
13 #include <asm/sections.h>
17 * References to section boundaries
19 extern const void __nosave_begin
, __nosave_end
;
22 * check if given pfn is in the 'nosave' or in the read only NSS section
24 int pfn_is_nosave(unsigned long pfn
)
26 unsigned long nosave_begin_pfn
= __pa(&__nosave_begin
) >> PAGE_SHIFT
;
27 unsigned long nosave_end_pfn
= PAGE_ALIGN(__pa(&__nosave_end
))
29 unsigned long eshared_pfn
= PFN_DOWN(__pa(&_eshared
)) - 1;
30 unsigned long stext_pfn
= PFN_DOWN(__pa(&_stext
));
32 if (pfn
>= nosave_begin_pfn
&& pfn
< nosave_end_pfn
)
34 if (pfn
>= stext_pfn
&& pfn
<= eshared_pfn
) {
35 if (ipl_info
.type
== IPL_TYPE_NSS
)
37 } else if ((tprot(pfn
* PAGE_SIZE
) && pfn
> 0))