[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 8/9] x86/PVH: adjust function/data placement


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 30 Sep 2021 14:20:42 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rcnbfPfvjwvbRBDjXE1pl6H+OGafQ+4UuiRZ3VCNkN4=; b=gTMbXi5NorRXIPD1/M6hvcSJ8QYJtdKB65jGRcsnJ9l+zRtZ2ViXG7Prs5ZDkncIkKXj9QMcHW6GH3aDxqIZZOoY2Dcj4OqNfHNRn7p04fzwUo8p4Wvxii/Ds6hO4UFKPspF2uCHX/OV0Pwq7GIJ6egCv/N/y9RPbOpTuYT/hr+L1X8vzgEWFKmfIc+KqJBI0lO36SV85AwcFxr+kUHHSDt6PehUafpGOEvaYsKX+YHzcGUitAvrHk7npAdeUcamcwa8XKZNzbeEAhk9cdfXEXX7JQUh+rOBm0vV7+EeefOOwGYoYX49bQPGdUwHmFJkCvJFECGwqIV8nCpzruZudg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UrBJTr4FxA+8BvHSEZ3m+6PzZSDClJT8lUEHWNuyPzJRqWvdWndhdt3MKur0ZHdnEJDZMauyvi0X/p6HXQUmwyr6ESEesEPyhW34AzeLTjY8hnKOLNSX5jIHYCA7FxVp4rXtMHMvreBwkduk58OHk2flEPTNAwxgOPfw/hHB+Agz0Tn3j0RU5b+JJwJS+rxlCs/hXsmgnnikW1aTHs7SquU8e6CG+ahSTmL9M5t0jqrt4nxZoc9KR3u7fcd4Z7xACB6xDKeKeDbCqN+hdrHtQJEXF1hqOROKTHA2UWVjbrcpuf1dBLLPiip0p426whTH6Sl+719R84ZTzO3C30bVlA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 30 Sep 2021 12:20:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Two of the variables can live in .init.data, allowing the open-coded
placing in .data to go away. Another "variable" is used to communicate a
size value only to very early assembly code, which hence can be both
const and live in .init.*. Additionally two functions were lacking
__init annotations.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>

--- a/arch/x86/platform/pvh/enlighten.c
+++ b/arch/x86/platform/pvh/enlighten.c
@@ -16,15 +16,15 @@
 /*
  * PVH variables.
  *
- * pvh_bootparams and pvh_start_info need to live in the data segment since
+ * pvh_bootparams and pvh_start_info need to live in a data segment since
  * they are used after startup_{32|64}, which clear .bss, are invoked.
  */
-struct boot_params pvh_bootparams __section(".data");
-struct hvm_start_info pvh_start_info __section(".data");
+struct boot_params __initdata pvh_bootparams;
+struct hvm_start_info __initdata pvh_start_info;
 
-unsigned int pvh_start_info_sz = sizeof(pvh_start_info);
+const unsigned int __initconst pvh_start_info_sz = sizeof(pvh_start_info);
 
-static u64 pvh_get_root_pointer(void)
+static u64 __init pvh_get_root_pointer(void)
 {
        return pvh_start_info.rsdp_paddr;
 }
@@ -107,7 +107,7 @@ void __init __weak xen_pvh_init(struct b
        BUG();
 }
 
-static void hypervisor_specific_init(bool xen_guest)
+static void __init hypervisor_specific_init(bool xen_guest)
 {
        if (xen_guest)
                xen_pvh_init(&pvh_bootparams);




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.