[S390] hibernation: remove dead file
[linux-2.6/mini2440.git] / arch / s390 / power / suspend.c
blobb3351eceebbed78f241e05619215dbc406a6c5a1
1 /*
2 * Suspend support specific for s390.
4 * Copyright IBM Corp. 2009
6 * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com>
7 */
9 #include <linux/mm.h>
10 #include <linux/suspend.h>
11 #include <linux/reboot.h>
12 #include <linux/pfn.h>
13 #include <asm/sections.h>
14 #include <asm/ipl.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))
28 >> PAGE_SHIFT;
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)
33 return 1;
34 if (pfn >= stext_pfn && pfn <= eshared_pfn) {
35 if (ipl_info.type == IPL_TYPE_NSS)
36 return 1;
37 } else if ((tprot(pfn * PAGE_SIZE) && pfn > 0))
38 return 1;
39 return 0;