]> Pileus Git - ~andy/linux/blobdiff - kernel/power/snapshot.c
Merge branch 'master' into upstream
[~andy/linux] / kernel / power / snapshot.c
index 24c96f3542318da918879ca45655afef95d55ce8..75d4886e648e7a6ae65258bc43a80fe6ec238ed7 100644 (file)
@@ -227,11 +227,17 @@ static void copy_data_pages(struct pbe *pblist)
                for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
                        if (saveable(zone, &zone_pfn)) {
                                struct page *page;
+                               long *src, *dst;
+                               int n;
+
                                page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
                                BUG_ON(!pbe);
                                pbe->orig_address = (unsigned long)page_address(page);
-                               /* copy_page is not usable for copying task structs. */
-                               memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
+                               /* copy_page and memcpy are not usable for copying task structs. */
+                               dst = (long *)pbe->address;
+                               src = (long *)pbe->orig_address;
+                               for (n = PAGE_SIZE / sizeof(long); n; n--)
+                                       *dst++ = *src++;
                                pbe = pbe->next;
                        }
                }