All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition
@ 2017-06-03 10:52 Balbir Singh
  2017-06-03 13:27 ` Pavel Machek
  0 siblings, 1 reply; 5+ messages in thread
From: Balbir Singh @ 2017-06-03 10:52 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Balbir Singh, Rafael J. Wysocki, Len Brown, Pavel Machek,
	Laura Abbott, Andrew Morton

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" <rjw@rjwysocki.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>

Reported-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
---
 kernel/power/snapshot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index fa46606..71730d6 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -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 *);
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition
  2017-06-03 10:52 [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition Balbir Singh
@ 2017-06-03 13:27 ` Pavel Machek
  2017-06-26  3:34   ` Balbir Singh
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2017-06-03 13:27 UTC (permalink / raw)
  To: Balbir Singh
  Cc: linux-pm, linux-kernel, Rafael J. Wysocki, Len Brown,
	Laura Abbott, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

On Sat 2017-06-03 20:52:32, Balbir Singh wrote:
> 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" <rjw@rjwysocki.net>
> Cc: Len Brown <len.brown@intel.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition
  2017-06-03 13:27 ` Pavel Machek
@ 2017-06-26  3:34   ` Balbir Singh
  2017-06-26 21:07     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Balbir Singh @ 2017-06-26  3:34 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-pm, linux-kernel, Rafael J. Wysocki, Len Brown,
	Laura Abbott, Andrew Morton, linuxppc-dev, Michael Ellerman

On Sat, Jun 3, 2017 at 11:27 PM, Pavel Machek <pavel@ucw.cz> wrote:
> On Sat 2017-06-03 20:52:32, Balbir Singh wrote:
>> 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" <rjw@rjwysocki.net>
>> Cc: Len Brown <len.brown@intel.com>
> Acked-by: Pavel Machek <pavel@ucw.cz>

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

Balbir Singh.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition
  2017-06-26  3:34   ` Balbir Singh
@ 2017-06-26 21:07     ` Rafael J. Wysocki
  2017-06-27 11:57       ` Balbir Singh
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2017-06-26 21:07 UTC (permalink / raw)
  To: Balbir Singh
  Cc: Pavel Machek, linux-pm, linux-kernel, Len Brown, Laura Abbott,
	Andrew Morton, linuxppc-dev, Michael Ellerman

On Monday, June 26, 2017 01:34:52 PM Balbir Singh wrote:
> On Sat, Jun 3, 2017 at 11:27 PM, Pavel Machek <pavel@ucw.cz> wrote:
> > On Sat 2017-06-03 20:52:32, Balbir Singh wrote:
> >> 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" <rjw@rjwysocki.net>
> >> Cc: Len Brown <len.brown@intel.com>
> > Acked-by: Pavel Machek <pavel@ucw.cz>
> 
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition
  2017-06-26 21:07     ` Rafael J. Wysocki
@ 2017-06-27 11:57       ` Balbir Singh
  0 siblings, 0 replies; 5+ messages in thread
From: Balbir Singh @ 2017-06-27 11:57 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Pavel Machek, linux-pm, linux-kernel, Len Brown, Laura Abbott,
	Andrew Morton, linuxppc-dev, Michael Ellerman

On Tue, Jun 27, 2017 at 7:07 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Monday, June 26, 2017 01:34:52 PM Balbir Singh wrote:
>> On Sat, Jun 3, 2017 at 11:27 PM, Pavel Machek <pavel@ucw.cz> wrote:
>> > On Sat 2017-06-03 20:52:32, Balbir Singh wrote:
>> >> 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" <rjw@rjwysocki.net>
>> >> Cc: Len Brown <len.brown@intel.com>
>> > Acked-by: Pavel Machek <pavel@ucw.cz>
>>
>> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-27 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-03 10:52 [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition Balbir Singh
2017-06-03 13:27 ` Pavel Machek
2017-06-26  3:34   ` Balbir Singh
2017-06-26 21:07     ` Rafael J. Wysocki
2017-06-27 11:57       ` Balbir Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.