diff options
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r-- | kernel/power/snapshot.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index fa46606f3356..b7708e319941 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -36,13 +36,13 @@ | |||
36 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
37 | #include <asm/tlbflush.h> | 37 | #include <asm/tlbflush.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #ifdef CONFIG_STRICT_KERNEL_RWX | 39 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY |
40 | #include <asm/set_memory.h> | 40 | #include <asm/set_memory.h> |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #include "power.h" | 43 | #include "power.h" |
44 | 44 | ||
45 | #ifdef CONFIG_STRICT_KERNEL_RWX | 45 | #if defined(CONFIG_STRICT_KERNEL_RWX) && defined(CONFIG_ARCH_HAS_SET_MEMORY) |
46 | static bool hibernate_restore_protection; | 46 | static bool hibernate_restore_protection; |
47 | static bool hibernate_restore_protection_active; | 47 | static bool hibernate_restore_protection_active; |
48 | 48 | ||
@@ -77,7 +77,7 @@ static inline void hibernate_restore_protection_begin(void) {} | |||
77 | static inline void hibernate_restore_protection_end(void) {} | 77 | static inline void hibernate_restore_protection_end(void) {} |
78 | static inline void hibernate_restore_protect_page(void *page_address) {} | 78 | static inline void hibernate_restore_protect_page(void *page_address) {} |
79 | static inline void hibernate_restore_unprotect_page(void *page_address) {} | 79 | static inline void hibernate_restore_unprotect_page(void *page_address) {} |
80 | #endif /* CONFIG_STRICT_KERNEL_RWX */ | 80 | #endif /* CONFIG_STRICT_KERNEL_RWX && CONFIG_ARCH_HAS_SET_MEMORY */ |
81 | 81 | ||
82 | static int swsusp_page_is_free(struct page *); | 82 | static int swsusp_page_is_free(struct page *); |
83 | static void swsusp_set_page_forbidden(struct page *); | 83 | static void swsusp_set_page_forbidden(struct page *); |
@@ -1929,8 +1929,7 @@ static inline unsigned int alloc_highmem_pages(struct memory_bitmap *bm, | |||
1929 | * also be located in the high memory, because of the way in which | 1929 | * also be located in the high memory, because of the way in which |
1930 | * copy_data_pages() works. | 1930 | * copy_data_pages() works. |
1931 | */ | 1931 | */ |
1932 | static int swsusp_alloc(struct memory_bitmap *orig_bm, | 1932 | static int swsusp_alloc(struct memory_bitmap *copy_bm, |
1933 | struct memory_bitmap *copy_bm, | ||
1934 | unsigned int nr_pages, unsigned int nr_highmem) | 1933 | unsigned int nr_pages, unsigned int nr_highmem) |
1935 | { | 1934 | { |
1936 | if (nr_highmem > 0) { | 1935 | if (nr_highmem > 0) { |
@@ -1976,7 +1975,7 @@ asmlinkage __visible int swsusp_save(void) | |||
1976 | return -ENOMEM; | 1975 | return -ENOMEM; |
1977 | } | 1976 | } |
1978 | 1977 | ||
1979 | if (swsusp_alloc(&orig_bm, ©_bm, nr_pages, nr_highmem)) { | 1978 | if (swsusp_alloc(©_bm, nr_pages, nr_highmem)) { |
1980 | printk(KERN_ERR "PM: Memory allocation failed\n"); | 1979 | printk(KERN_ERR "PM: Memory allocation failed\n"); |
1981 | return -ENOMEM; | 1980 | return -ENOMEM; |
1982 | } | 1981 | } |