-
Patrick Mochel authored
This embodies the core of the swsusp->pmdisk cleanups. Instead of using the ->dummy variable at the end of each pagedir for a linked list of the page dirs, this uses a static array, which is kept in the empty space of the swsusp header. There are 768 entries, and could be scaled up based on the size of the page and the amount of room remaining. 768 should be enough anyway, since each entry is a swp_entry_t to a page-length array of pages. With larger systems and more memory come larger pages, so each page-sized array will automatically scale up. This replaces the read_suspend_image() and write_suspend_image() in swsusp with the much more concise pmdisk versions (not that big of change at this point) and fixes up the callers so software_resume() gets it right. Also, mark the helpers only used in swsusp as static again.
a65ee5aa