From patchwork Sat Jun 3 10:52:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Education Directorate X-Patchwork-Id: 9764099 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 15FF160360 for ; Sat, 3 Jun 2017 10:52:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB2DB26E4A for ; Sat, 3 Jun 2017 10:52:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCB002833B; Sat, 3 Jun 2017 10:52:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1A1D26E4A for ; Sat, 3 Jun 2017 10:52:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750832AbdFCKws (ORCPT ); Sat, 3 Jun 2017 06:52:48 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33984 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbdFCKwr (ORCPT ); Sat, 3 Jun 2017 06:52:47 -0400 Received: by mail-pf0-f195.google.com with SMTP id w69so15366113pfk.1; Sat, 03 Jun 2017 03:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=gPbxCLRiayq9mifeT8PJoIQpCowhioNvZDgoLrAjHbk=; b=XuzPy/uGFi2fer7gKtmFhqkRLyzZ0WKDK5soNvhqK+L64q6auRS/Z/TNVRSyA1WTGN 5m18NdchumT74ZXjaLVVoWqQb4VF2Gr9wRaRpOkhcdtzqw38xq81ByUWlWh6uxIyQvr9 mjJu+G25JXTj8cZJroutlKog5NnESrscRRTgYVYgHVcdySIdHMM+u3TQsfd3wAi+7XrP zg/BkNC552E9ZgDKBgEvw9YXrs3Wp+boSekOfMP+uj5XkhfWiqmgcPYM5wsVo+GhQjbM oEfR4loRfwvnS86OPundRlvpWG7YfB7dNdM2mUWn5wgssYw7C3Fs4FW7Cgk66AX1F1Zx LpUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gPbxCLRiayq9mifeT8PJoIQpCowhioNvZDgoLrAjHbk=; b=Ts1PGgvzciBZMwZECgC0Oe8Ws0EB5apyIks5lby+oEM4P1LYlMD2BpUmv1eSYP7OfV NUhVozvkyla6l5gtQZQUEYISph7kMCUgpbPkGCqsgk47bVAkkvrO34pscA6LvLse/ss/ f6Jq7Gan1bwPT8CNZFjvH5yYaByHOEJDDUpXzgmiFImSUNv3zUHNjoBb2lR735by1f7n 8lf1Okb6DYNowbtWwa+On9uvK+GrLpRkBIyfw7IOJNhlPWWej2OtNrnjGeoI5L3509sA kMLRsxnXMfiQKHzWKU+B9Yx8fFhSSPq/Tm68QA4Lb1F3UtGifhqE/q9CgAnhCGVs1MT5 ACjg== X-Gm-Message-State: AODbwcDj5WuEeYi/zcpFaMKO6604ucBoXDCyQcSwfzEhN8WLIpivxnl8 4jONwdum59EkjXDY+Jw= X-Received: by 10.84.198.36 with SMTP id o33mr1677991pld.43.1496487166418; Sat, 03 Jun 2017 03:52:46 -0700 (PDT) Received: from MiWiFi-R3-srv.au.ibm.com (14-202-194-140.static.tpgi.com.au. [14.202.194.140]) by smtp.gmail.com with ESMTPSA id g13sm8298838pgu.54.2017.06.03.03.52.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Jun 2017 03:52:45 -0700 (PDT) From: Balbir Singh To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Balbir Singh , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Laura Abbott , Andrew Morton Subject: [PATCH] kernel/power/suspend: use CONFIG_HAVE_SET_MEMORY for include condition Date: Sat, 3 Jun 2017 20:52:32 +1000 Message-Id: <20170603105232.6436-1-bsingharora@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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" Cc: Len Brown Cc: Pavel Machek Cc: Laura Abbott Cc: Andrew Morton Reported-by: Christophe Leroy Signed-off-by: Balbir Singh Acked-by: Pavel Machek --- 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 #include #include -#ifdef CONFIG_STRICT_KERNEL_RWX +#ifdef CONFIG_ARCH_HAS_SET_MEMORY #include #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 *);