Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10096332pxu; Tue, 29 Dec 2020 13:46:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPKwyBoPdxOLwPCCQhdn8hRNMDOtfMRnxXOSuhcL9C+taBByTAknijxJsKxFoH2e6ypOiU X-Received: by 2002:a17:906:3c11:: with SMTP id h17mr46190593ejg.20.1609278371738; Tue, 29 Dec 2020 13:46:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609278371; cv=none; d=google.com; s=arc-20160816; b=nteTWInd7lLOXUKhY4n7UgObtdhKw6NrhufV1ML8iT1rbLd10rfHdddLwnOCe1qW7+ jX199zUCAoIUdnjJ56lFjRF7lZ7K5t9GEdb8peJ/dHGwJH4Z3YMjdqHcuUreLtyGKz+V ywhuUx3nsEJaX2gvvKqzkmAIU+E2GEL/oewfbjt7gjg+JA/Ciqnr3IFEzoN4OdVYt1AX f01hYcUDBSsBrd52iriXLkB3UrGY+0yqbAovkF3ZNHHQnqj1kG11gVv0ThDSGqlMKjkf ELd4U1RbJyE+oaZ0YkH/T1vY44q9ugsBPYq0afmqAkY+DZB/Vn3KY14JnZOFLism03NW PWjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HyTMgo2VSftHBiDIe/SLp0txxvwc3jI6o6j5ZlWh/dw=; b=AssveTCPX5qeGAppDGh4vG01w9anL16zfbToUwj1EqbBdzxV52zOuP7HcKDUYY2dt7 e//t/TrDuftYgs4Z7nv9ScQbbb8TGaa1iqMp3b6P9BqAGEoITMKhmHU77MWODaDIQ4dt /s0py8N8dSCiiMZAb5cdqdOn+GkKBHqmrWbpPpQoLMnKBRL6/xPX2ssGieiALJOnpsXE LS7GRJv9KMg2RAUsczlCGgvbAXdLwhyncXASX7NOFKbASAXmOI1YSLmD4a9xxDVGhGmi 0ZDjfmfCoSLkcNBjnB1zH5c4RIq3oF2PWYfId+9V9/SWAanOQAF99ZUrl2V55aH8e5HN GisQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f0dILRFv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si21425615edv.291.2020.12.29.13.45.49; Tue, 29 Dec 2020 13:46:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f0dILRFv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726528AbgL2VoW (ORCPT + 99 others); Tue, 29 Dec 2020 16:44:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbgL2VoW (ORCPT ); Tue, 29 Dec 2020 16:44:22 -0500 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06DCEC061574 for ; Tue, 29 Dec 2020 13:43:42 -0800 (PST) Received: by mail-qt1-x833.google.com with SMTP id 2so9844822qtt.10 for ; Tue, 29 Dec 2020 13:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HyTMgo2VSftHBiDIe/SLp0txxvwc3jI6o6j5ZlWh/dw=; b=f0dILRFveWykzV+Z08AvfOmj26DARStkXTD2rimwgfWkfyVMqtfKDgl3xemZfvShcu wchzqQrdG3m9iLk3zCc2lgOa4be5mWmA4hJxWlc9OIqKOIavkMFv6U0Wjp6biO7jNHxK VMfU2h8EmtfFqiB1wQ3c5h10hPIZ7hfjpQAmzIEK/42ryVwsOtWnfffmx2hRQxlvPRm+ lRPE3BxPkpJITLJ7pTCbUOWEdU8v3PPQzLPhxT2jCXyBltLlN/cFMCVqIUwTYvGWhpfP ahaKWxBfxutvEc4bFDrcIH5LZPJsw0wSv2gcWlpWUfD8WAA4MzYvetKlsExY7T9FmwSZ aFhA== 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:mime-version :content-transfer-encoding; bh=HyTMgo2VSftHBiDIe/SLp0txxvwc3jI6o6j5ZlWh/dw=; b=P7B60UnutGI26Smtp0Xk2YIYvPa5+eF4Yyi7cwlwFUoB0BQi8FO8/9ZoEiX6vLEKFR e5qNBlwtrfXl6fwiZ+cq5fRhNzTbCDKT0F0vBOphOB1vOEn4NcobiqBbPIdWD50wbEZ4 hzEhZJAzhReryDbV2dJBzAU9jii9RWnbiob7hDmnUq9Zx1zbWnSBDAEiNYkB2LUEO/fh JioN7KssHpaeOvtO3RcOXioNoOaB6YDqN/VYc6mE+jaYsmQRXQLyg48dyfKOyo9eZjbs EYFtDGv6VhwGJ+Tv1PCp3CFJk+3YggukIUf2FTciM4oHTnDGHggfoE8+POtnr/wBQ0OC Xeyg== X-Gm-Message-State: AOAM5331wgKBQYrBSdcBx53XQnQsFhfK7VRyzq0l8BVvrz97XEgiSVvY P+Pr6snCsczNq5xVUzl2cUnKZ/NU260= X-Received: by 2002:ac8:1184:: with SMTP id d4mr50229998qtj.103.1609278221078; Tue, 29 Dec 2020 13:43:41 -0800 (PST) Received: from localhost.localdomain ([2604:1380:45f1:1d00::1]) by smtp.gmail.com with ESMTPSA id 17sm25725927qtb.17.2020.12.29.13.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 13:43:40 -0800 (PST) From: Nathan Chancellor To: Marc Zyngier Cc: James Morse , Julien Thierry , Suzuki K Poulose , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH] KVM: arm64: Fix section mismatches around hyp_cpu_pm_{init,exit} Date: Tue, 29 Dec 2020 14:43:36 -0700 Message-Id: <20201229214336.4098955-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit fa8c3d65538a ("KVM: arm64: Keep nVHE EL2 vector installed") inadvertently changed clang's inlining decisions around hyp_cpu_pm_{init,exit}, causing the following section mismatch warnings: WARNING: modpost: vmlinux.o(.text+0x95c6c): 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. WARNING: modpost: vmlinux.o(.text+0x97054): Section mismatch in reference from the function init_subsystems() to the function .init.text:hyp_cpu_pm_init() The function init_subsystems() references the function __init hyp_cpu_pm_init(). This is often because init_subsystems lacks a __init annotation or the annotation of hyp_cpu_pm_init is wrong. Remove the __init annotation so that there are no warnings regardless of how functions are inlined. Fixes: 1fcf7ce0c602 ("arm: kvm: implement CPU PM notifier") Fixes: 06a71a24bae5 ("arm64: KVM: unregister notifiers in hyp mode teardown path") Link: https://github.com/ClangBuiltLinux/linux/issues/1230 Signed-off-by: Nathan Chancellor --- 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); base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e -- 2.30.0