From nobody Tue Feb 10 03:37:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1637930142; cv=none; d=zohomail.com; s=zohoarc; b=dySbMtYzwXKnTO6kXTCQtbtT88ufi6isO/ovZ4zx3YmwgJ3sx1DAucwvlm3F/vbSWRdS6Pf+3Pf76ViKAqYFTNFd4YdMoT9IiKp1FbXnO9vBHsxdgpGtpN4z4tXm4QKZUQ4MsBrQJuj4MIYn8AoVBb17k1DOw7wNhE6BM2NIoNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637930142; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EKoXVGbRzP4e6+IPlyX5CtAe2VjQ8Hzo//7yyNzcScs=; b=A3A6EP2qarKAhNjXf2NJGZwfGhGPOIhVufJvcn8/Zh2hQuToLBmSCd3YKEek4gZXqw6fNo+rIGRsipPLmWVKCxuZ4H9CQps7J6lipnvBfpSykkfh9BKWMmHq5tecA9lJ19BMZ+z8KlB0U3SYTXUQIBO0VuuPCw7dV6tFBD77NeY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 163793014230942.6699655439229; Fri, 26 Nov 2021 04:35:42 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.232667.403459 (Exim 4.92) (envelope-from ) id 1mqaRU-00021M-5H; Fri, 26 Nov 2021 12:35:04 +0000 Received: by outflank-mailman (output) from mailman id 232667.403459; Fri, 26 Nov 2021 12:35:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqaRU-00020Q-1f; Fri, 26 Nov 2021 12:35:04 +0000 Received: by outflank-mailman (input) for mailman id 232667; Fri, 26 Nov 2021 12:35:02 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqaRS-0001F5-2d for xen-devel@lists.xenproject.org; Fri, 26 Nov 2021 12:35:02 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 448cc30e-4eb5-11ec-9787-a32c541c8605; Fri, 26 Nov 2021 13:34:59 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 448cc30e-4eb5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637930099; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F+vb4CK4+xYSviJ9bvv2J8tBZsl9csJinBYt0YnRvAQ=; b=ateChJ+i707v3trmHP65gr9yZ6lE8NUsToHxXxrNSi/0nqx/eNZ243mG LOGCHxMXGv+qFRXZbhW9jEGCZ7MbnMcw/C1dJ88M+bHIYkg56A7as9w5y 43XhFfxPskycyXRa9GbKO8msmp28qhNzySzVT8Js3tzUZDk4/RPnb6F03 A=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 8+gyD3VNzoRLnssr8bIpSdJRT7P8jxR22k++NGdUmF0yc5GPJBO6V8HpkF0yZvZqSsQr+AFXdu 4IEUBQ++lOaov/g4d59ua4Psf79cbGRNK3ux+owhplnR6X7AU+/7KuTkThYP272uVSCqz1zpvQ Yv3UcX4OMdpgrm0BDzEFfqQTKh37YO6lXD2rCAptZ6srTXciTGrPmcQ0LMCjUQlQXbpN+vljwD tF2PRgPQnSu1PS5ovMsZv+1i1bZYetmKVdqqCE6BDKHV4X0eM16kdFjl6FgsD/beK1F70IY2V6 BsHqAw9ZnnB3e0Dk3grLhkbS X-SBRS: 5.1 X-MesageID: 58192116 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:usPoeq7ZBazFQ4PlIaw0nwxRtM3AchMFZxGqfqrLsTDasY5as4F+v msXXGiEM6qKNjShfdF/YIy/8x4AsJ7VyoVmSlY6/C8yHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FVAMpBsJ00o5wrdg2NAw2LBVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z6 /RUjbqKcjsVH7CStKNeAgBGMRtmIvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALBc/nJo4A/FpnyinUF60OSpHfWaTao9Rf2V/cg+gTTa+PP ZNAN1KDajyYQxdCYgkbFKg4p+6CuCihbmYHuHas8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u12bkBhAXMvSPxDzD9Wij7sfUhj/yUo8WELy+99ZpjUeVy2hVDwcZPXOrrP/8hkOgVtZ3L 00P5jFovaU07FasTNT2Q1u/unHsljw2VsdUEuY6wBqQ0aeS6AGcblXoVRYYNoZg7pVvA2V3i BnZxLsFGACDrpW2aGul0I2vkQ+TJHY5aixTfDEmdxMatoyLTJ4IsjrDSdNqEaiQh9LzGC3tz z3ikBXSl4n/nuZQifzloAmvbyaE48GQE1Vrvlm/sneNt1shPOaYi5qUBU83BBqqBKKQVRG/s XcNgKByB8heXMjWxERhrAjgdYxFBspp0hWA3jaD/LF7rlxBHkJPm6gLu1mSw28zb645lcfBO hO7hO+ozMY70IGWRaF2eZmtLM8h0LLtE9/oPtiNMIERMsYsK17bon01DaJ144wLuBN3+U3YE c3GGftA8F5AUfg3pNZIb7t1PUAXKtAWmjqIGMGTI+WP2ruCfn+FIYrpw3PVBt3VGJis+V2Pm /4GbpPi40wGDIXWP3mGmaZOfAtiBSVqWvjLRzl/K7frzvxOQzp6VZc8ANoJJuRYokiivruSo yzmBBYHkAGXaL+uAVziV02PoYjHBf5XxU/X9wR3Vbpx83R8M4up8okFcJ47Iesu+OB5lKYmR PgZYcSQRP9IT22fqTgaaJD8qq1kdQiq2l3Sb3b0PmBncs4yXRHN9//lYhDrqHsEAB2ouJZsu LanzA7aH8YOHlwwEMbMZfuz5FqtpnxByvlqVk7FL4ALKkXh+YRnMQLrifozL51eIBnP3GLCh Q2XHQ0Zta/GpIpsqIvFgqWNroGIFepiHxUFQzmHvOjubSSDpzit245NVuqMbAvxbmKs9fXwf /hRwtH9LOYDwARAvb1jHus51qk5/dbu+eNXl1w2AHXRYl23Ibp8OX3aj9JXv6hAy7IF6wu7X kWDpotTNbmTYZ63FVcQIEwub/iZ1OFSkT7XtKxnLEL/7S5x3byGTUQNYEXc1H0DdON4YNE/3 OMsmM8K8Aju2BMlP+GPgj1Q62nRfGcLVL8qt81CDYLm4ubxJoquvXAI5vfK3ayy IronPort-HdrOrdr: A9a23:k+9h36D31PN9E+zlHemU55DYdb4zR+YMi2TC1yhKJyC9Ffbo7v xG/c5rsyMc5wxwZJhNo7y90ey7MBbhHP1OkO4s1NWZLWrbUQKTRekIh+bfKn/baknDH4ZmpN 9dmsNFaeEYY2IUsS+D2njbL+od X-IronPort-AV: E=Sophos;i="5.87,265,1631592000"; d="scan'208";a="58192116" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , Stefano Stabellini , Wei Liu , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 06/65] xen: Annotate fnptr targets from __initcall() Date: Fri, 26 Nov 2021 12:33:47 +0000 Message-ID: <20211126123446.32324-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20211126123446.32324-1-andrew.cooper3@citrix.com> References: <20211126123446.32324-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637930144410100011 Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/acpi/cpu_idle.c | 4 ++-- xen/arch/x86/acpi/cpufreq/cpufreq.c | 2 +- xen/arch/x86/cpu/mcheck/non-fatal.c | 2 +- xen/arch/x86/cpu/microcode/core.c | 2 +- xen/arch/x86/cpu/mtrr/main.c | 2 +- xen/arch/x86/cpu/vpmu.c | 2 +- xen/arch/x86/domain.c | 2 +- xen/arch/x86/extable.c | 2 +- xen/arch/x86/hvm/hvm.c | 4 ++-- xen/arch/x86/hvm/irq.c | 2 +- xen/arch/x86/hvm/mtrr.c | 2 +- xen/arch/x86/hvm/nestedhvm.c | 3 +-- xen/arch/x86/hvm/quirks.c | 2 +- xen/arch/x86/ioport_emulate.c | 4 ++-- xen/arch/x86/irq.c | 4 ++-- xen/arch/x86/mm/shadow/common.c | 4 ++-- xen/arch/x86/msi.c | 2 +- xen/arch/x86/nmi.c | 2 +- xen/arch/x86/numa.c | 2 +- xen/arch/x86/oprofile/nmi_int.c | 2 +- xen/arch/x86/percpu.c | 2 +- xen/arch/x86/psr.c | 2 +- xen/arch/x86/pv/domain.c | 2 +- xen/arch/x86/shutdown.c | 2 +- xen/arch/x86/time.c | 8 ++++---- xen/common/core_parking.c | 2 +- xen/common/debugtrace.c | 2 +- xen/common/event_channel.c | 2 +- xen/common/gdbstub.c | 2 +- xen/common/grant_table.c | 2 +- xen/common/kernel.c | 4 ++-- xen/common/kexec.c | 2 +- xen/common/livepatch.c | 2 +- xen/common/page_alloc.c | 4 ++-- xen/common/radix-tree.c | 2 +- xen/common/random.c | 2 +- xen/common/sched/cpupool.c | 2 +- xen/common/spinlock.c | 2 +- xen/common/stop_machine.c | 2 +- xen/drivers/cpufreq/cpufreq.c | 2 +- xen/drivers/cpufreq/cpufreq_misc_governors.c | 6 +++--- xen/drivers/cpufreq/cpufreq_ondemand.c | 2 +- xen/drivers/passthrough/amd/iommu.h | 2 +- xen/drivers/passthrough/amd/iommu_init.c | 2 +- xen/drivers/passthrough/pci.c | 2 +- xen/drivers/passthrough/vtd/iommu.c | 2 +- xen/drivers/passthrough/x86/hvm.c | 2 +- xen/include/asm-x86/hvm/save.h | 2 +- 48 files changed, 60 insertions(+), 61 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index 5d73eb5917af..7902ccce6b98 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -410,7 +410,7 @@ static void dump_cx(unsigned char key) } } =20 -static int __init cpu_idle_key_init(void) +static int __init cf_check cpu_idle_key_init(void) { register_keyhandler('c', dump_cx, "dump ACPI Cx structures", 1); return 0; @@ -1655,7 +1655,7 @@ static struct notifier_block cpu_nfb =3D { .notifier_call =3D cpu_callback }; =20 -static int __init cpuidle_presmp_init(void) +static int __init cf_check cpuidle_presmp_init(void) { void *cpu =3D (void *)(long)smp_processor_id(); =20 diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufre= q/cpufreq.c index 029c9398c42a..9510f05340aa 100644 --- a/xen/arch/x86/acpi/cpufreq/cpufreq.c +++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c @@ -630,7 +630,7 @@ static const struct cpufreq_driver __initconstrel acpi_= cpufreq_driver =3D { .exit =3D acpi_cpufreq_cpu_exit, }; =20 -static int __init cpufreq_driver_init(void) +static int __init cf_check cpufreq_driver_init(void) { int ret =3D 0; =20 diff --git a/xen/arch/x86/cpu/mcheck/non-fatal.c b/xen/arch/x86/cpu/mcheck/= non-fatal.c index ec52d37c96e1..2679c220a8a2 100644 --- a/xen/arch/x86/cpu/mcheck/non-fatal.c +++ b/xen/arch/x86/cpu/mcheck/non-fatal.c @@ -86,7 +86,7 @@ static void mce_work_fn(void *data) adjust =3D 0; } =20 -static int __init init_nonfatal_mce_checker(void) +static int __init cf_check init_nonfatal_mce_checker(void) { struct cpuinfo_x86 *c =3D &boot_cpu_data; =20 diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode= /core.c index 95d35ca0f3f7..46f55fe7f191 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -696,7 +696,7 @@ int microcode_update(XEN_GUEST_HANDLE(const_void) buf, = unsigned long len) microcode_update_helper, buffer); } =20 -static int __init microcode_init(void) +static int __init cf_check microcode_init(void) { /* * At this point, all CPUs should have updated their microcode diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c index e9df53f00d61..428133100d46 100644 --- a/xen/arch/x86/cpu/mtrr/main.c +++ b/xen/arch/x86/cpu/mtrr/main.c @@ -632,7 +632,7 @@ void mtrr_bp_restore(void) mtrr_if->set_all(); } =20 -static int __init mtrr_init_finialize(void) +static int __init cf_check mtrr_init_finialize(void) { if (!mtrr_if) return 0; diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index 9875143cac0e..c23e66d04c02 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -868,7 +868,7 @@ static struct notifier_block cpu_nfb =3D { .notifier_call =3D cpu_callback }; =20 -static int __init vpmu_init(void) +static int __init cf_check vpmu_init(void) { int vendor =3D current_cpu_data.x86_vendor; =20 diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index ef1812dc1402..f943283b2a88 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -2532,7 +2532,7 @@ static void vcpu_kick_softirq(void) */ } =20 -static int __init init_vcpu_kick_softirq(void) +static int __init cf_check init_vcpu_kick_softirq(void) { open_softirq(VCPU_KICK_SOFTIRQ, vcpu_kick_softirq); return 0; diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c index 3cb0352abe5f..b6664264de31 100644 --- a/xen/arch/x86/extable.c +++ b/xen/arch/x86/extable.c @@ -126,7 +126,7 @@ search_exception_table(const struct cpu_user_regs *regs) #ifndef NDEBUG #include =20 -static int __init stub_selftest(void) +static int __init cf_check stub_selftest(void) { static const struct { uint8_t opc[4]; diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 00edf899fa79..7af11656dcfd 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -164,7 +164,7 @@ static bool __init hap_supported(struct hvm_function_ta= ble *fns) return true; } =20 -static int __init hvm_enable(void) +static int __init cf_check hvm_enable(void) { const struct hvm_function_table *fns =3D NULL; =20 @@ -1518,7 +1518,7 @@ static int hvm_load_cpu_msrs(struct domain *d, hvm_do= main_context_t *h) /* We need variable length data chunks for XSAVE area and MSRs, hence * a custom declaration rather than HVM_REGISTER_SAVE_RESTORE. */ -static int __init hvm_register_CPU_save_and_restore(void) +static int __init cf_check hvm_register_CPU_save_and_restore(void) { hvm_register_savevm(CPU_XSAVE_CODE, "CPU_XSAVE", diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index 52aae4565f0c..6045c9149bad 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -650,7 +650,7 @@ static void dump_irq_info(unsigned char key) rcu_read_unlock(&domlist_read_lock); } =20 -static int __init dump_irq_info_key_init(void) +static int __init cf_check dump_irq_info_key_init(void) { register_keyhandler('I', dump_irq_info, "dump HVM irq info", 1); return 0; diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index 4a9f3177edd4..b3ef1bf54133 100644 --- a/xen/arch/x86/hvm/mtrr.c +++ b/xen/arch/x86/hvm/mtrr.c @@ -75,7 +75,7 @@ static uint8_t __read_mostly mtrr_epat_tbl[MTRR_NUM_TYPES= ][MEMORY_NUM_TYPES] =3D static uint8_t __read_mostly pat_entry_tbl[PAT_TYPE_NUMS] =3D { [0 ... PAT_TYPE_NUMS-1] =3D INVALID_MEM_TYPE }; =20 -static int __init hvm_mtrr_pat_init(void) +static int __init cf_check hvm_mtrr_pat_init(void) { unsigned int i, j; =20 diff --git a/xen/arch/x86/hvm/nestedhvm.c b/xen/arch/x86/hvm/nestedhvm.c index bd1101987de0..3cf812609acf 100644 --- a/xen/arch/x86/hvm/nestedhvm.c +++ b/xen/arch/x86/hvm/nestedhvm.c @@ -127,8 +127,7 @@ nestedhvm_vmcx_flushtlb(struct p2m_domain *p2m) * iomap[2] set set */ =20 -static int __init -nestedhvm_setup(void) +static int __init cf_check nestedhvm_setup(void) { /* Same format and size as hvm_io_bitmap (Intel needs only 2 pages). */ unsigned nr =3D cpu_has_vmx ? 2 : 3; diff --git a/xen/arch/x86/hvm/quirks.c b/xen/arch/x86/hvm/quirks.c index 54cc66c382b6..917356b1312c 100644 --- a/xen/arch/x86/hvm/quirks.c +++ b/xen/arch/x86/hvm/quirks.c @@ -36,7 +36,7 @@ static int __init dmi_hvm_deny_port80(const struct dmi_sy= stem_id *id) return 0; } =20 -static int __init check_port80(void) +static int __init cf_check check_port80(void) { /* * Quirk table for systems that misbehave (lock up, etc.) if port diff --git a/xen/arch/x86/ioport_emulate.c b/xen/arch/x86/ioport_emulate.c index cf1f3f922959..6caeb3d470ce 100644 --- a/xen/arch/x86/ioport_emulate.c +++ b/xen/arch/x86/ioport_emulate.c @@ -11,7 +11,7 @@ unsigned int (*__read_mostly ioemul_handle_quirk)( uint8_t opcode, char *io_emul_stub, struct cpu_user_regs *regs); =20 -static unsigned int ioemul_handle_proliant_quirk( +static unsigned int cf_check ioemul_handle_proliant_quirk( u8 opcode, char *io_emul_stub, struct cpu_user_regs *regs) { static const char stub[] =3D { @@ -100,7 +100,7 @@ static const struct dmi_system_id __initconstrel ioport= _quirks_tbl[] =3D { { } }; =20 -static int __init ioport_quirks_init(void) +static int __init cf_check ioport_quirks_init(void) { if ( dmi_check_system(ioport_quirks_tbl) ) ioemul_handle_quirk =3D ioemul_handle_proliant_quirk; diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 84b174d0f51f..bcf46cd54d16 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -954,7 +954,7 @@ static void irq_ratelimit_timer_fn(void *data) spin_unlock_irqrestore(&irq_ratelimit_lock, flags); } =20 -static int __init irq_ratelimit_init(void) +static int __init cf_check irq_ratelimit_init(void) { if ( irq_ratelimit_threshold ) init_timer(&irq_ratelimit_timer, irq_ratelimit_timer_fn, NULL, 0); @@ -2504,7 +2504,7 @@ static void dump_irqs(unsigned char key) dump_ioapic_irq_info(); } =20 -static int __init setup_dump_irqs(void) +static int __init cf_check setup_dump_irqs(void) { /* In lieu of being able to live in init_irq_data(). */ BUILD_BUG_ON(sizeof(irq_max_guests) > diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/commo= n.c index de09ef5cae58..1e4ee50771f5 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -105,7 +105,7 @@ static void shadow_audit_key(unsigned char key) __func__, shadow_audit_enable); } =20 -static int __init shadow_audit_key_init(void) +static int __init cf_check shadow_audit_key_init(void) { register_keyhandler('O', shadow_audit_key, "toggle shadow audits", 0); return 0; @@ -1057,7 +1057,7 @@ static void shadow_blow_all_tables(unsigned char c) } =20 /* Register this function in the Xen console keypress table */ -static __init int shadow_blow_tables_keyhandler_init(void) +static int __init cf_check shadow_blow_tables_keyhandler_init(void) { register_keyhandler('S', shadow_blow_all_tables, "reset shadow pagetab= les", 1); return 0; diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 5febc0ea4b7c..d1497254b188 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -1485,7 +1485,7 @@ static void dump_msi(unsigned char key) vpci_dump_msi(); } =20 -static int __init msi_setup_keyhandler(void) +static int __init cf_check msi_setup_keyhandler(void) { register_keyhandler('M', dump_msi, "dump MSI state", 1); return 0; diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index 1a225d499295..21e947a46f24 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -606,7 +606,7 @@ static void do_nmi_stats(unsigned char key) printk("%pv: NMI neither pending nor masked\n", v); } =20 -static __init int register_nmi_trigger(void) +static int __init cf_check register_nmi_trigger(void) { register_keyhandler('N', do_nmi_trigger, "trigger an NMI", 0); register_keyhandler('n', do_nmi_stats, "NMI statistics", 1); diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c index 6be5a0c93322..5de9db4e9943 100644 --- a/xen/arch/x86/numa.c +++ b/xen/arch/x86/numa.c @@ -504,7 +504,7 @@ static void dump_numa(unsigned char key) rcu_read_unlock(&domlist_read_lock); } =20 -static __init int register_numa_trigger(void) +static int __init cf_check register_numa_trigger(void) { register_keyhandler('u', dump_numa, "dump NUMA info", 1); return 0; diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_in= t.c index 7842d95b95ea..ba9c4b9804ca 100644 --- a/xen/arch/x86/oprofile/nmi_int.c +++ b/xen/arch/x86/oprofile/nmi_int.c @@ -388,7 +388,7 @@ static int __init arch_perfmon_init(char **cpu_type) return 1; } =20 -static int __init nmi_init(void) +static int __init cf_check nmi_init(void) { __u8 vendor =3D current_cpu_data.x86_vendor; __u8 family =3D current_cpu_data.x86; diff --git a/xen/arch/x86/percpu.c b/xen/arch/x86/percpu.c index 5ea14b6ec312..0e0b6577ca45 100644 --- a/xen/arch/x86/percpu.c +++ b/xen/arch/x86/percpu.c @@ -94,7 +94,7 @@ static struct notifier_block cpu_percpu_nfb =3D { .priority =3D 100 /* highest priority */ }; =20 -static int __init percpu_presmp_init(void) +static int __init cf_check percpu_presmp_init(void) { register_cpu_notifier(&cpu_percpu_nfb); =20 diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c index 56916344cb1d..9a3670afc341 100644 --- a/xen/arch/x86/psr.c +++ b/xen/arch/x86/psr.c @@ -1675,7 +1675,7 @@ static struct notifier_block cpu_nfb =3D { .priority =3D -1 }; =20 -static int __init psr_presmp_init(void) +static int __init cf_check psr_presmp_init(void) { if ( (opt_psr & PSR_CMT) && opt_rmid_max ) init_psr_cmt(opt_rmid_max); diff --git a/xen/arch/x86/pv/domain.c b/xen/arch/x86/pv/domain.c index 125c4561a7ea..55146c15c853 100644 --- a/xen/arch/x86/pv/domain.c +++ b/xen/arch/x86/pv/domain.c @@ -167,7 +167,7 @@ unsigned long pv_fixup_guest_cr4(const struct vcpu *v, = unsigned long cr4) static int8_t __read_mostly opt_global_pages =3D -1; boolean_runtime_param("global-pages", opt_global_pages); =20 -static int __init pge_init(void) +static int __init cf_check pge_init(void) { if ( opt_global_pages =3D=3D -1 ) opt_global_pages =3D !cpu_has_hypervisor || diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c index a01354d93319..ad3e3a76916f 100644 --- a/xen/arch/x86/shutdown.c +++ b/xen/arch/x86/shutdown.c @@ -533,7 +533,7 @@ static const struct dmi_system_id __initconstrel reboot= _dmi_table[] =3D { { } }; =20 -static int __init reboot_init(void) +static int __init cf_check reboot_init(void) { /* * Only do the DMI check if reboot_type hasn't been overridden diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 4b12f494604d..4ab0cf6731e3 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -526,7 +526,7 @@ static struct platform_timesource __initdata plt_pmtime= r =3D static struct time_scale __read_mostly pmt_scale; static struct time_scale __read_mostly pmt_scale_r; =20 -static __init int init_pmtmr_scale(void) +static __init int cf_check init_pmtmr_scale(void) { set_time_scale(&pmt_scale, ACPI_PM_FREQUENCY); pmt_scale_r =3D scale_reciprocal(pmt_scale); @@ -2047,7 +2047,7 @@ static void __init try_platform_timer_tail(void) } =20 /* Late init function, after all cpus have booted */ -static int __init verify_tsc_reliability(void) +static int __init cf_check verify_tsc_reliability(void) { if ( boot_cpu_has(X86_FEATURE_TSC_RELIABLE) ) { @@ -2218,7 +2218,7 @@ static int _disable_pit_irq(void(*hpet_broadcast_setu= p)(void)) return ret; } =20 -static int __init disable_pit_irq(void) +static int __init cf_check disable_pit_irq(void) { if ( !_disable_pit_irq(hpet_broadcast_init) ) { @@ -2581,7 +2581,7 @@ static void dump_softtsc(unsigned char key) printk("No domains have emulated TSC\n"); } =20 -static int __init setup_dump_softtsc(void) +static int __init cf_check setup_dump_softtsc(void) { register_keyhandler('s', dump_softtsc, "dump softtsc stats", 1); return 0; diff --git a/xen/common/core_parking.c b/xen/common/core_parking.c index aa432ed2f57b..44a907abfd7f 100644 --- a/xen/common/core_parking.c +++ b/xen/common/core_parking.c @@ -258,7 +258,7 @@ static int __init register_core_parking_policy(const st= ruct cp_policy *policy) return 0; } =20 -static int __init core_parking_init(void) +static int __init cf_check core_parking_init(void) { int ret =3D 0; =20 diff --git a/xen/common/debugtrace.c b/xen/common/debugtrace.c index 29b11239f5a5..f3c0fd8aa17b 100644 --- a/xen/common/debugtrace.c +++ b/xen/common/debugtrace.c @@ -279,7 +279,7 @@ static struct notifier_block debugtrace_nfb =3D { .notifier_call =3D debugtrace_cpu_callback }; =20 -static int __init debugtrace_init(void) +static int __init cf_check debugtrace_init(void) { unsigned int cpu; =20 diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index a4e78282e059..67ac4dd15dcf 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -1642,7 +1642,7 @@ static void dump_evtchn_info(unsigned char key) rcu_read_unlock(&domlist_read_lock); } =20 -static int __init dump_evtchn_info_key_init(void) +static int __init cf_check dump_evtchn_info_key_init(void) { register_keyhandler('e', dump_evtchn_info, "dump evtchn info", 1); return 0; diff --git a/xen/common/gdbstub.c b/xen/common/gdbstub.c index 848c1f4327e8..99bfd9a654c9 100644 --- a/xen/common/gdbstub.c +++ b/xen/common/gdbstub.c @@ -640,7 +640,7 @@ __trap_to_gdb(struct cpu_user_regs *regs, unsigned long= cookie) return rc; } =20 -static int __init initialise_gdb(void) +static int __init cf_check initialise_gdb(void) { if ( *opt_gdb =3D=3D '\0' ) return 0; diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index d477f334659b..7b2f593e8b6c 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -4273,7 +4273,7 @@ static void gnttab_usage_print_all(unsigned char key) printk("%s ] done\n", __func__); } =20 -static int __init gnttab_usage_init(void) +static int __init cf_check gnttab_usage_init(void) { register_keyhandler('g', gnttab_usage_print_all, "print grant table usage", 1); diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 752c2e0dae44..adff2d2c77f3 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -393,7 +393,7 @@ static HYPFS_STRING_INIT(extra, "extra"); static HYPFS_STRING_INIT(config, "config"); #endif =20 -static int __init buildinfo_init(void) +static int __init cf_check buildinfo_init(void) { hypfs_add_dir(&hypfs_root, &buildinfo, true); =20 @@ -431,7 +431,7 @@ __initcall(buildinfo_init); =20 static HYPFS_DIR_INIT(params, "params"); =20 -static int __init param_init(void) +static int __init cf_check param_init(void) { struct param_hypfs *param; =20 diff --git a/xen/common/kexec.c b/xen/common/kexec.c index 6286c0bbf08b..36384f782db3 100644 --- a/xen/common/kexec.c +++ b/xen/common/kexec.c @@ -570,7 +570,7 @@ void __init kexec_early_calculations(void) crashinfo_maxaddr_bits =3D fls64(crashinfo_maxaddr) - 1; } =20 -static int __init kexec_init(void) +static int __init cf_check kexec_init(void) { void *cpu =3D (void *)(unsigned long)smp_processor_id(); =20 diff --git a/xen/common/livepatch.c b/xen/common/livepatch.c index 7118551b27e2..33708b4e2388 100644 --- a/xen/common/livepatch.c +++ b/xen/common/livepatch.c @@ -2139,7 +2139,7 @@ static struct notifier_block cpu_nfb =3D { .notifier_call =3D cpu_callback }; =20 -static int __init livepatch_init(void) +static int __init cf_check livepatch_init(void) { unsigned int cpu; =20 diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 615ae7fe12fc..8789ec81b6df 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2555,7 +2555,7 @@ static void pagealloc_info(unsigned char key) printk(" Dom heap: %lukB free\n", total << (PAGE_SHIFT-10)); } =20 -static __init int pagealloc_keyhandler_init(void) +static __init int cf_check pagealloc_keyhandler_init(void) { register_keyhandler('m', pagealloc_info, "memory info", 1); return 0; @@ -2603,7 +2603,7 @@ static void dump_heap(unsigned char key) } } =20 -static __init int register_heap_trigger(void) +static __init int cf_check register_heap_trigger(void) { register_keyhandler('H', dump_heap, "dump heap info", 1); return 0; diff --git a/xen/common/radix-tree.c b/xen/common/radix-tree.c index 2384655a2e90..628a7e06988f 100644 --- a/xen/common/radix-tree.c +++ b/xen/common/radix-tree.c @@ -744,7 +744,7 @@ static __init unsigned long __maxindex(unsigned int hei= ght) return ~0UL >> shift; } =20 -static __init int radix_tree_init_maxindex(void) +static int __init cf_check radix_tree_init_maxindex(void) { unsigned int i; =20 diff --git a/xen/common/random.c b/xen/common/random.c index fb805b0ecd95..a29f2fcb991a 100644 --- a/xen/common/random.c +++ b/xen/common/random.c @@ -31,7 +31,7 @@ unsigned int get_random(void) return val; } =20 -static int __init init_boot_random(void) +static int __init cf_check init_boot_random(void) { boot_random =3D get_random(); return 0; diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index f0dd626054a6..f26c7f289539 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -1218,7 +1218,7 @@ static void cpupool_hypfs_init(void) =20 #endif /* CONFIG_HYPFS */ =20 -static int __init cpupool_init(void) +static int __init cf_check cpupool_init(void) { unsigned int cpu; =20 diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index b90981bb271e..5ce7e3363863 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -508,7 +508,7 @@ void _lock_profile_deregister_struct( spin_unlock(&lock_profile_lock); } =20 -static int __init lock_prof_init(void) +static int __init cf_check lock_prof_init(void) { struct lock_profile **q; =20 diff --git a/xen/common/stop_machine.c b/xen/common/stop_machine.c index 2d5f6aef61ed..8979d553d677 100644 --- a/xen/common/stop_machine.c +++ b/xen/common/stop_machine.c @@ -198,7 +198,7 @@ static struct notifier_block cpu_nfb =3D { .notifier_call =3D cpu_callback }; =20 -static int __init cpu_stopmachine_init(void) +static int __init cf_check cpu_stopmachine_init(void) { unsigned int cpu; for_each_online_cpu ( cpu ) diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c index 36b079296235..e55e202d5a18 100644 --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -657,7 +657,7 @@ static struct notifier_block cpu_nfb =3D { .notifier_call =3D cpu_callback }; =20 -static int __init cpufreq_presmp_init(void) +static int __init cf_check cpufreq_presmp_init(void) { register_cpu_notifier(&cpu_nfb); return 0; diff --git a/xen/drivers/cpufreq/cpufreq_misc_governors.c b/xen/drivers/cpu= freq/cpufreq_misc_governors.c index 746bbcd5ff36..8343f491da87 100644 --- a/xen/drivers/cpufreq/cpufreq_misc_governors.c +++ b/xen/drivers/cpufreq/cpufreq_misc_governors.c @@ -116,7 +116,7 @@ struct cpufreq_governor cpufreq_gov_userspace =3D { .handle_option =3D cpufreq_userspace_handle_option }; =20 -static int __init cpufreq_gov_userspace_init(void) +static int __init cf_check cpufreq_gov_userspace_init(void) { unsigned int cpu; =20 @@ -160,7 +160,7 @@ struct cpufreq_governor cpufreq_gov_performance =3D { .governor =3D cpufreq_governor_performance, }; =20 -static int __init cpufreq_gov_performance_init(void) +static int __init cf_check cpufreq_gov_performance_init(void) { return cpufreq_register_governor(&cpufreq_gov_performance); } @@ -199,7 +199,7 @@ struct cpufreq_governor cpufreq_gov_powersave =3D { .governor =3D cpufreq_governor_powersave, }; =20 -static int __init cpufreq_gov_powersave_init(void) +static int __init cf_check cpufreq_gov_powersave_init(void) { return cpufreq_register_governor(&cpufreq_gov_powersave); } diff --git a/xen/drivers/cpufreq/cpufreq_ondemand.c b/xen/drivers/cpufreq/c= pufreq_ondemand.c index 6b905d7cfca8..cabd9ffa8886 100644 --- a/xen/drivers/cpufreq/cpufreq_ondemand.c +++ b/xen/drivers/cpufreq/cpufreq_ondemand.c @@ -356,7 +356,7 @@ struct cpufreq_governor cpufreq_gov_dbs =3D { .handle_option =3D cpufreq_dbs_handle_option }; =20 -static int __init cpufreq_gov_dbs_init(void) +static int __init cf_check cpufreq_gov_dbs_init(void) { return cpufreq_register_governor(&cpufreq_gov_dbs); } diff --git a/xen/drivers/passthrough/amd/iommu.h b/xen/drivers/passthrough/= amd/iommu.h index 93243424e85d..04517c1a024c 100644 --- a/xen/drivers/passthrough/amd/iommu.h +++ b/xen/drivers/passthrough/amd/iommu.h @@ -234,7 +234,7 @@ int amd_iommu_prepare(bool xt); int amd_iommu_init(bool xt); int amd_iommu_init_late(void); int amd_iommu_update_ivrs_mapping_acpi(void); -int iov_adjust_irq_affinities(void); +int cf_check iov_adjust_irq_affinities(void); =20 int amd_iommu_quarantine_init(struct domain *d); =20 diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthr= ough/amd/iommu_init.c index 559a734bdaa5..f1ed75558227 100644 --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -808,7 +808,7 @@ static bool_t __init set_iommu_interrupt_handler(struct= amd_iommu *iommu) return 1; } =20 -int iov_adjust_irq_affinities(void) +int cf_check iov_adjust_irq_affinities(void) { const struct amd_iommu *iommu; =20 diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index e3105f90b7fe..036f5c2b1ffa 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -1289,7 +1289,7 @@ static void dump_pci_devices(unsigned char ch) pcidevs_unlock(); } =20 -static int __init setup_dump_pcidevs(void) +static int __init cf_check setup_dump_pcidevs(void) { register_keyhandler('Q', dump_pci_devices, "dump PCI devices", 1); return 0; diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/= vtd/iommu.c index b33697e36ba8..ba1ed5761d23 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -2113,7 +2113,7 @@ static void adjust_irq_affinity(struct acpi_drhd_unit= *drhd) spin_unlock_irqrestore(&desc->lock, flags); } =20 -static int adjust_vtd_irq_affinities(void) +static int cf_check adjust_vtd_irq_affinities(void) { struct acpi_drhd_unit *drhd; =20 diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x8= 6/hvm.c index 22bf84639f22..ef71c3b92717 100644 --- a/xen/drivers/passthrough/x86/hvm.c +++ b/xen/drivers/passthrough/x86/hvm.c @@ -1072,7 +1072,7 @@ static struct notifier_block cpu_nfb =3D { .notifier_call =3D cpu_callback, }; =20 -static int __init setup_dpci_softirq(void) +static int __init cf_check setup_dpci_softirq(void) { unsigned int cpu; =20 diff --git a/xen/include/asm-x86/hvm/save.h b/xen/include/asm-x86/hvm/save.h index 4efc53505500..e975011ddb71 100644 --- a/xen/include/asm-x86/hvm/save.h +++ b/xen/include/asm-x86/hvm/save.h @@ -115,7 +115,7 @@ void hvm_register_savevm(uint16_t typecode, /* Syntactic sugar around that function: specify the max number of * saves, and this calculates the size of buffer needed */ #define HVM_REGISTER_SAVE_RESTORE(_x, _save, _load, _num, _k) \ -static int __init __hvm_register_##_x##_save_and_restore(void) \ +static int __init cf_check __hvm_register_##_x##_save_and_restore(void) \ { \ hvm_register_savevm(HVM_SAVE_CODE(_x), \ #_x, \ --=20 2.11.0