Skip to contentSkip to conversation

kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition

PATCH In review Balbir Singh 3 participants 5 messages Jun 3, 2017 – Jun 27, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/power/suspend: 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.

fixes(50327dd kernel/power/snapshot.c: use set_memory.h header)

I've only done a basic compile test with a config that has hibernation enabled.

Cc "Rafael J. Wysocki" <[email protected]>
Cc Len Brown <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Laura Abbott <[email protected]>
Cc Andrew Morton <[email protected]>
---
 kernel/power/snapshot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/power/snapshot.c +3 -3
index fa46606..71730d6 100644
@@ -36,13 +36,13 @@
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/io.h>
-#ifdef CONFIG_STRICT_KERNEL_RWX
+#ifdef CONFIG_ARCH_HAS_SET_MEMORY
 #include <asm/set_memory.h>
 #endif
 
 #include "power.h"
 
-#ifdef CONFIG_STRICT_KERNEL_RWX
+#if defined(CONFIG_STRICT_KERNEL_RWX) && defined(CONFIG_ARCH_HAS_SET_MEMORY)
 static bool hibernate_restore_protection;
 static bool hibernate_restore_protection_active;
 
@@ -77,7 +77,7 @@ static inline void hibernate_restore_protection_begin(void) {}
 static inline void hibernate_restore_protection_end(void) {}
 static inline void hibernate_restore_protect_page(void *page_address) {}
 static inline void hibernate_restore_unprotect_page(void *page_address) {}
-#endif /* CONFIG_STRICT_KERNEL_RWX */
+#endif /* CONFIG_STRICT_KERNEL_RWX  && CONFIG_ARCH_HAS_SET_MEMORY */
 
 static int swsusp_page_is_free(struct page *);
 static void swsusp_set_page_forbidden(struct page *);
Signature · 1 line
2.9.3
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Balbir Singh

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.

fixes(50327dd kernel/power/snapshot.c: use set_memory.h header)

I've only done a basic compile test with a config that has hibernation enabled.

Cc "Rafael J. Wysocki" <[email protected]>
Cc Len Brown <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 5 lines · Pavel Machek
Quoted 4 lines · Balbir Singh

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.

Quoted 8 lines
Quoted 7 lines

fixes(50327dd kernel/power/snapshot.c: use set_memory.h header)

I've only done a basic compile test with a config that has hibernation enabled.

Cc "Rafael J. Wysocki" <[email protected]>
Cc Len Brown <[email protected]>

Ping. Could we please pick this up? it breaks any attempt to support STRICT_KERNEL_RWX on powerpc

Balbir Singh.

#3 lore raw
Quoted 11 lines · Balbir Singh
Quoted 10 lines · Pavel Machek
Quoted 9 lines · Balbir Singh

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.

fixes(50327dd kernel/power/snapshot.c: use set_memory.h header)

I've only done a basic compile test with a config that has hibernation enabled.

Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Cc "Rafael J. Wysocki" <[email protected]>
Cc Len Brown <[email protected]>

Ping. Could we please pick this up? it breaks any attempt to support STRICT_KERNEL_RWX on powerpc

Yes, I'm going to pick it up for 4.13.

Thanks,
Rafael

#4 lore raw
Quoted 12 lines · Rafael J. Wysocki
Quoted 11 lines · Balbir Singh
Quoted 10 lines · Pavel Machek
Quoted 9 lines · Balbir Singh

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.

fixes(50327dd kernel/power/snapshot.c: use set_memory.h header)

I've only done a basic compile test with a config that has hibernation enabled.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Cc "Rafael J. Wysocki" <[email protected]>
Cc Len Brown <[email protected]>

Ping. Could we please pick this up? it breaks any attempt to support STRICT_KERNEL_RWX on powerpc

Yes, I'm going to pick it up for 4.13.

Thanks,
Balbir Singh.