aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBalbir Singh <bsingharora@gmail.com>2017-06-03 06:52:32 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-26 20:05:28 -0400
commit49368a47f6dc1b256e3b83813da5c9b0731fe268 (patch)
treeb40184b30e1c3a26c4d743aa659030f5ad6b2eb5
parentc0944883c97c0ddc71da67cc731590a7c878a1a2 (diff)
PM / hibernate: Use CONFIG_HAVE_SET_MEMORY for include condition
Kbuild reported a build failure when CONFIG_STRICT_KERNEL_RWX was enabled on powerpc. We don't yet have ARCH_HAS_SET_MEMORY and ppc32 saw a build failure. I've only done a basic compile test with a config that has hibernation enabled. Fixes: 50327ddfbc92 (kernel/power/snapshot.c: use set_memory.h header) Reported-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Balbir Singh <bsingharora@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--kernel/power/snapshot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index fa46606f3356..71730d672290 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)
46static bool hibernate_restore_protection; 46static bool hibernate_restore_protection;
47static bool hibernate_restore_protection_active; 47static bool hibernate_restore_protection_active;
48 48
@@ -77,7 +77,7 @@ static inline void hibernate_restore_protection_begin(void) {}
77static inline void hibernate_restore_protection_end(void) {} 77static inline void hibernate_restore_protection_end(void) {}
78static inline void hibernate_restore_protect_page(void *page_address) {} 78static inline void hibernate_restore_protect_page(void *page_address) {}
79static inline void hibernate_restore_unprotect_page(void *page_address) {} 79static 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
82static int swsusp_page_is_free(struct page *); 82static int swsusp_page_is_free(struct page *);
83static void swsusp_set_page_forbidden(struct page *); 83static void swsusp_set_page_forbidden(struct page *);