From patchwork Mon Apr 9 00:41:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132955 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp651452ljb; Sun, 8 Apr 2018 17:42:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx48XS5MAkLEbymMxiadoUeuhLP53flSNE+GYjgV/lTKITvGuZNT8yICv+/kR1sDWo36SAcrd X-Received: by 10.99.124.16 with SMTP id x16mr19553087pgc.201.1523234563752; Sun, 08 Apr 2018 17:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234563; cv=none; d=google.com; s=arc-20160816; b=XC2buFyNSfhwMSOotZpjcGb1tvfWGRHpMJYGuemS0eb9LDUlG0kc2HFbHgjgtr6LNB oVoSQgtzWoV91ju9e/D0Lm3yccwmhykrGXSzSMWO+m0nc97wTZ5HxRkHEPvnL9OrBj7M jzW/WvkMvCx45lRKowRsXXH2i9p+kpGf+Vs9NOOMFHlYfKjeV+4tfjVvLiilvhqe2QdX s1uE+6jQn2s87nT0O1ZskFhs9Cp2otx4OkBsjHB7OH5Z/xxLXbi/5HafY73I75tHjswJ Qr3B3pRy983izIjiil6dUTNMvtNiwc5/aE7DCe16ZGNF8HnKXkKMTydSH9xMmNU0PiRR HDdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=xToftLCkOip8XzocZXMj13wruOVli+B/vwieOr/rDIk=; b=JDpNwCiy/Di7YsOc2ai3EDho6Zuy47toloSBQ9oIDjyBIdF8F+KQUeX3Dm6bAMRkQS 9SGDzNgjo/Yyv4fat2YdG8/A3L6me++VXt6F10ox5Y2vrmQZq0Xth8i+ONdO3/RwtjvV CQas+g7SJPkdnnGfngbiS2D9CDfzC48SxUJADBZ+gC+RGkz0hqFXlWTKElPNAtz0fRVJ udwffEcPzTzuHd7o2uVHGy/eazebPxWLwV9dKyKIcXjvzdHkrqOiUTqttVM4I+AbcxCp OeLNrtEjE/ZxP7objl5n3YUH7jVhkLEwOZ1SV0cUTUxld6VyQ3z61ZFZXs4NMu0q80hZ 2N5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=N84XG3iQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t71si10416584pgb.70.2018.04.08.17.42.43; Sun, 08 Apr 2018 17:42:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=N84XG3iQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756826AbeDIAmk (ORCPT + 29 others); Sun, 8 Apr 2018 20:42:40 -0400 Received: from mail-cys01nam02on0126.outbound.protection.outlook.com ([104.47.37.126]:44046 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756777AbeDIAma (ORCPT ); Sun, 8 Apr 2018 20:42:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xToftLCkOip8XzocZXMj13wruOVli+B/vwieOr/rDIk=; b=N84XG3iQLF8WD3NqhkPyXkjwd/RdImZYPatyUUa45fpeufTk4fD9SpXpaJYpDi9QO5Dui5vJ4WdewWqWCgwW5skSkB+stQd8YlDKWrHLEmfrpZpACdq8FkK72DT8DtwE77MVFzv23DF9msMdm7mOspqQaq5c3o6PfWueIg6nBG4= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1062.namprd21.prod.outlook.com (52.132.128.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:42:21 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:42:21 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , Thomas Gleixner , Len Brown , Andi Kleen , Nicolas Pitre , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Pavel Machek , Bart Van Assche , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 089/101] x86/power: Fix swsusp_arch_resume prototype Thread-Topic: [PATCH AUTOSEL for 3.18 089/101] x86/power: Fix swsusp_arch_resume prototype Thread-Index: AQHTz5uKZ+V1oSlMfUuRo77hwH52BQ== Date: Mon, 9 Apr 2018 00:41:47 +0000 Message-ID: <20180409004042.164920-39-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1062; 7:rj8uWDkEwvpwpVLVNDXZ27sZ6Itc41gJLGYsNV+Es1BG7Ct0iZSgBO3SFTWUhecPC0ZqzF/7aizf88Vr507LJwd0BJsTZ4GRpWLHHt5tfNnupKw/SxIeZtbpv9zsXha1Vsijh+BrDGdh7W4Gy1SGwKsi2Am3NcflfNxMYiOc1Ba92r+jM3wa85u/s0HMq4ksQSh8Ed4Ee2bZgtLs8QZi7M3B1rKWeaK+AtyASewGMGnVHxmVGRv0HuVwM9Ut2lJy; 20:6cz1ZMK4OknhDtxicvBdLUrHXoPGWGDfoFSFFRM7Bh91O/qP9MKUowiWCBuoYPFvoGs6fa8t8oa6HUsfHqujMv7Znho6kdRkoT3zO8/52KIC6zFfaJTlFwHAMQEhmGRedHKxmiCzNhJkmyNsSAbfAMuYUaUuc05XxStMGYdD3Hs= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 389120b1-8f77-4552-8bde-08d59db2c176 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1062; x-ms-traffictypediagnostic: DM5PR2101MB1062: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(42068640409301)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB1062; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1062; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(376002)(39380400002)(396003)(346002)(199004)(189003)(68736007)(6512007)(316002)(486006)(6486002)(6666003)(54906003)(5660300001)(110136005)(102836004)(6306002)(14454004)(99286004)(36756003)(86612001)(72206003)(105586002)(97736004)(106356001)(2906002)(22452003)(1076002)(2900100001)(10090500001)(6436002)(3660700001)(7416002)(6116002)(575784001)(3846002)(305945005)(59450400001)(86362001)(66066001)(10290500003)(3280700002)(5250100002)(25786009)(8676002)(81166006)(8936002)(7736002)(478600001)(476003)(81156014)(26005)(4326008)(186003)(2501003)(107886003)(966005)(6506007)(2616005)(76176011)(11346002)(446003)(53936002)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1062; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: QLHFQNwiXeAj7zGQop5K66ZEurBkKpVcVkkpTpex0dATFFg5S0i8x7eSw+DtGlJ8aZUaEHm6M3tbPaCMRiSus1IucrMJMLylkTXdzwxsPl3h9o59ZpJgwJy0ikiATAd9dX2R3uu/yPF1WQXMBJQHC8hmDOcufjarsAQKfu0WefesboFNh0hZD4v541Z4TkgY3rZ7y4aPyx2Tq6XgTdbKbZ2f7izmWqSkuLKM8+eQZZuckzTeL0N4eICrVRA0zl8xxXmYx9oNufwDVnt60jt82uroPGrwbM5JKvHojGsdewpUMzVNU5wTm4A95Mk8vnQx9VOVQ/7UhHcb4ccROif/u2nrIAB0aL4IKMgodcR9RCXTiXodEP0HDHe2F40fnNZQDNkiVlsxPmjdnTJKGgAO76v2DME+UdBYXzDQ0bwSrfE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 389120b1-8f77-4552-8bde-08d59db2c176 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:47.4553 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1062 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 328008a72d38b5bde6491e463405c34a81a65d3e ] 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 Signed-off-by: Thomas Gleixner Cc: Len Brown Cc: Andi Kleen Cc: Nicolas Pitre Cc: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Bart Van Assche Link: https://lkml.kernel.org/r/20180202145634.200291-2-arnd@arndb.de Signed-off-by: Sasha Levin --- 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.15.1 diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index 291226b952a9..77ac4e4deb16 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c @@ -142,7 +142,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 009947d419a6..0e0c773edffc 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c @@ -78,7 +78,7 @@ static int set_up_temporary_mappings(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 3388c1b6f7d8..10a48138e063 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -325,6 +325,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 2df883a9d3cb..45244cb31c91 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -85,9 +85,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);