From patchwork Sun Jan 3 14:00:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11995749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC4D8C433DB for ; Sun, 3 Jan 2021 14:02:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 752F620C56 for ; Sun, 3 Jan 2021 14:02:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 752F620C56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=GTGBhh+UgoTTiVFy20w4nsJEHaVP3azrLzD2mAc583Q=; b=QRAjRpAts4gxAIlii8kK8ywaou jC//J3HGsEC+dreIMu932s5jui9z7jMvb8lB2eCxHXoeZjuNKR/0Ch5oiF/NkdoTaqtkyHf+Xcseq hKthbVKi+GQOOLkl7H9aF8DnesuhJtoyBXDlpArJSGUZstjlV49i2zivMS56IfuilQnrUO3aIFTXz DDukm7tcVXOgkqvIl3XWw9Ls6MI3cybd0SOVB35gFUgF7nh7sxmfrBvMpoBMg8yyfRBU4ft67N6KX leAkRenO6tx5Hv1xKL+s7+k23S0MO8tTqMDF68oUsCU/ZeyrSUchbkuvFWf6wMLgN5lRNfdwmvXJm RAl/N7Mw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw3wW-0000z9-55; Sun, 03 Jan 2021 14:01:12 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw3wT-0000yD-Pv for linux-arm-kernel@lists.infradead.org; Sun, 03 Jan 2021 14:01:10 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3CC5B20C56; Sun, 3 Jan 2021 14:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609682468; bh=HTypC30TDtap+wwyfZ7D+lF6Xf783015Cd+73+IGuD4=; h=From:To:Cc:Subject:Date:From; b=hoqjBQMsL0M+WFOYBk/RiHhGD0f3wf3zgivimzkWaIaHRZOWHhvs83ko3/UIquXZr JzoqCqv6D9c/Fs0qO9HcPRSZhUeaK7hTX7nusmqp7/8KzhcSKESrTsXLEcXz1ZOQlS cEnm+L7eF5Z+DvzLuA5H/BSN7W03A7AVtgOn/C0pXKUKoYGIiu6agHFaw4HAxCwfdW zm+Onu/34tJwWr922C7vUUj17Z7fHIkAn2AVRg43mru0Mm8oiqBSmq5SE/NDYVPPdc R0jrFiHjUunynrXGv3FTaJtSzqzrAXH1gxUAS1TTAo51C9df5wOlKUNlFNFLrk/6cI ErsZZbvoLRxbA== From: Arnd Bergmann To: Marc Zyngier , Catalin Marinas , Will Deacon Subject: [PATCH] KVM: arm64: remove incorrect __init annotation Date: Sun, 3 Jan 2021 15:00:50 +0100 Message-Id: <20210103140104.3853922-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210103_090109_932179_36790F39 X-CRM114-Status: GOOD ( 15.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Suzuki K Poulose , Sean Christopherson , linux-kernel@vger.kernel.org, James Morse , Andrew Scull , Paolo Bonzini , David Brazdil , kvmarm@lists.cs.columbia.edu, Julien Thierry Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann When hyp_cpu_pm_exit() is not inlined, it causes a link time warning: WARNING: modpost: vmlinux.o(.text+0x39974): Section mismatch in reference from the function kvm_arch_init() to the function .init.text:hyp_cpu_pm_exit() The function kvm_arch_init() references the function __init hyp_cpu_pm_exit(). This is often because kvm_arch_init lacks a __init annotation or the annotation of hyp_cpu_pm_exit is wrong. This is not only called at boot time, so remove the annotation to prevent undefined behavior in case it gets called after being freed. Signed-off-by: Arnd Bergmann --- arch/arm64/kvm/arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index 6e637d2b4cfb..71a49eae9ea0 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -1574,12 +1574,12 @@ static struct notifier_block hyp_init_cpu_pm_nb = { .notifier_call = hyp_init_cpu_pm_notifier, }; -static void __init hyp_cpu_pm_init(void) +static void hyp_cpu_pm_init(void) { if (!is_protected_kvm_enabled()) cpu_pm_register_notifier(&hyp_init_cpu_pm_nb); } -static void __init hyp_cpu_pm_exit(void) +static void hyp_cpu_pm_exit(void) { if (!is_protected_kvm_enabled()) cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb);