From patchwork Fri Feb 2 14:56:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126721 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp716260ljc; Fri, 2 Feb 2018 06:59:00 -0800 (PST) X-Google-Smtp-Source: AH8x224T3dRj80Wzq0S2f2SjteOyPcRbiv0aZsGAUB2Wlu7W9OTIbrFKmJ/v6/p4UHLka1FmdBz0 X-Received: by 10.99.173.5 with SMTP id g5mr31958344pgf.391.1517583540132; Fri, 02 Feb 2018 06:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517583540; cv=none; d=google.com; s=arc-20160816; b=Kcq52ZZ/dfLC7+ZCH1DO6FvR7jNP951g9g2AgXGAj93xfIv1GruKto/Yv41ubuxJVF rILqRbv3WOHGG57dmfpHzTwwyuVl17S6TaHshD22YskTpVEqe7/K+KtfvPgJCX6YnZR6 a2udYV1v+bq1zfeVNVUGfv2KR0IuN143lKIXCMpeFnVZXgM4/+ln2Zmj5o8Z9YtCGRsq QqlXOIZAf2p47l3/Es58LClCuGrLGyjFeI0isLQZpXaxkoTNmhbNl1N9u3CQzOKIuCkd H3WR5QDOdDnzbvD03dHv77zHILfaNtIdpCC46JvJEarnqS1luNkiWNeEeJyn+NpWMz8j 3Atg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=a4x5i9OGZNVhxHLsj7aYkwUZ8uCEWiCE0NLzShPNMy8=; b=qi5LbqCzSfb8fqgw9SXZ4Wfx4Mteoy4aQAIBifHuhTFgcGXsM+eBWBeuKFP6TdC88m vr6C/anQ9gF6+sMhanBVOspSsj2tnSU3e3i8MvgUch5zvDtG7GSkup5VyhbcUmb+NgYz NF3T3+JQ+umLERADG+RzSvcdrUT8kDVg0HwzZpMAfL2m1SBUylaKkjESAHg/c2ogZxeb wqraU1FyM1VCPoGaX7Hli44LzBKdDllCnMHGWdz0iLawdJ/eBSFTWkTgWM32E1Qrf2Bi 2/oWMsNBoYJ11XGvE0Vfp79hDP8/njWxD4aKp8tpGGw8/w3fg30HSugmzR03kjSH/7gr HbDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si1572341pgp.160.2018.02.02.06.58.59; Fri, 02 Feb 2018 06:59:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751916AbeBBO66 (ORCPT + 11 others); Fri, 2 Feb 2018 09:58:58 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:53657 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbeBBO65 (ORCPT ); Fri, 2 Feb 2018 09:58:57 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0MeHvO-1eNB9z3uN4-00PtNS; Fri, 02 Feb 2018 15:57:38 +0100 From: Arnd Bergmann To: x86@kernel.org, "Rafael J. Wysocki" , Pavel Machek , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Len Brown Cc: Nicolas Pitre , Andi Kleen , linux-kernel@vger.kernel.org, Arnd Bergmann , Bart Van Assche , linux-pm@vger.kernel.org Subject: [PATCH 2/3] x86: fix swsusp_arch_resume prototype Date: Fri, 2 Feb 2018 15:56:18 +0100 Message-Id: <20180202145634.200291-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202145634.200291-1-arnd@arndb.de> References: <20180202145434.100626-1-arnd@arndb.de> <20180202145634.200291-1-arnd@arndb.de> X-Provags-ID: V03:K0:ky5wMEXrnMiWObgBA5KeDBRDcJHbRB63cOR62Dk9Joh5+1tRJC5 CjM86WptwuuIxieB4rxjpSZrBk4iT9feA8Ncizh81R03TOV7sTarb2I1VubutQYQmZ/ZaPG IAXGsKFNLB1yBUkDOZbzx94RHHiX8evSkiWCUQmFW+P8BTi3ouGqkHIUbGbURli/HKwXBS6 ycE1m4L7Z1AQKdtC6kcrw== X-UI-Out-Filterresults: notjunk:1; V01:K0:SOG8ZtnVteE=:N2Ou79kS+dqCc0gWQYsaDU XKvkJH98YLzjTmVW5Ed5hIFcSWwyVZRIeYbhupqeEJUsgclX0zbqT8GxEB8gj+QaU4KTu47Nb vFO9yGVJToocmhXNlX4kNsAHjnWEpTK7S1ssF/hQeZufRDQWlWWEMaJlKfnrouVHulRzXDJxq 6+ZdM1OrOZ0kaVrPPAGqWtD3dp4DE2w0jD6KQ1JzSeaTIX5XgmztKTWJRjMGOwsmI+AYvM4xf pJNFQjWAAXckblzYf6wXFo5lnhqELhvnxJHeM0+ApJlYp4dW3iugB523KBDObmz/Mo9d2O5dZ vl4zH/kTRBRvBhqFk6Libwz5GIYwWHgfiZO6aIgFxALqiZ0vUNYmCWIt6PFcSQiRGoISzmxTL PvRNntWbUrDaHbnimh1LorNjS50190WtaM1+RBpuL9U8GKbkmcjU3pntzq9om+fKvAlaNuGvm gLg3MmF7S9TAjjfZjyqvr2KyjGDmV0pFTdae3bALnKW1hPojyvHtfn06HFkDFl3O0CaIRSUKJ eaeN+QEcMIxXgvoMr85XkUTwtBzpnPYzMeQlb63yuKUbXxuF6Dwl6k1njPh9w8OwGb62AMPzH 6YsMqK80FB9HnPuKtsmGCfobHMo1t/rlQeXTAVgKz/JQfdpURE0sBQGelUWke+p2nPw9F8uFK UnB6Jd2OVS8YQIy1P7Y7fxAJuFv7ZPkA71vuPAiuyHF2r1FEOPeaYbqz5QDCmkAUQ3DvHDOUh 5lr6KZB51m/oaZ9fhZsqB+4PeAwGsGviaFqvsw== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The declaration for swsusp_arch_resume marks it as 'asmlinkage', but the definition in x86-32 does not, and it fails to include the header with the declaration. This leads to a warning when building with link-time-optimizations: kernel/power/power.h:108:23: error: type of 'swsusp_arch_resume' does not match original declaration [-Werror=lto-type-mismatch] extern asmlinkage int swsusp_arch_resume(void); ^ arch/x86/power/hibernate_32.c:148:0: note: 'swsusp_arch_resume' was previously declared here int swsusp_arch_resume(void) This moves the declaration into a globally visible header file and fixes up both x86 definitions to match it. Signed-off-by: Arnd Bergmann --- arch/x86/power/hibernate_32.c | 2 +- arch/x86/power/hibernate_64.c | 2 +- include/linux/suspend.h | 2 ++ kernel/power/power.h | 3 --- 4 files changed, 4 insertions(+), 5 deletions(-) -- 2.9.0 diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index c35fdb585c68..afc4ed7b1578 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c @@ -145,7 +145,7 @@ static inline void resume_init_first_level_page_table(pgd_t *pg_dir) #endif } -int swsusp_arch_resume(void) +asmlinkage int swsusp_arch_resume(void) { int error; diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c index f910c514438f..0ef5e5204968 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c @@ -174,7 +174,7 @@ static int relocate_restore_code(void) return 0; } -int swsusp_arch_resume(void) +asmlinkage int swsusp_arch_resume(void) { int error; diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cc22a24516d6..440b62f7502e 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -384,6 +384,8 @@ extern int swsusp_page_is_forbidden(struct page *); extern void swsusp_set_page_free(struct page *); extern void swsusp_unset_page_free(struct page *); extern unsigned long get_safe_page(gfp_t gfp_mask); +extern asmlinkage int swsusp_arch_suspend(void); +extern asmlinkage int swsusp_arch_resume(void); extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); extern int hibernate(void); diff --git a/kernel/power/power.h b/kernel/power/power.h index f29cd178df90..9e58bdc8a562 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -104,9 +104,6 @@ extern int in_suspend; extern dev_t swsusp_resume_device; extern sector_t swsusp_resume_block; -extern asmlinkage int swsusp_arch_suspend(void); -extern asmlinkage int swsusp_arch_resume(void); - extern int create_basic_memory_bitmaps(void); extern void free_basic_memory_bitmaps(void); extern int hibernate_preallocate_memory(void);