Skip to content

Commit 59f7e53

Browse files
jbeulichjgross1
authored andcommitted
x86/PVH: adjust function/data placement
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 <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent 079c4ba commit 59f7e53

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

arch/x86/platform/pvh/enlighten.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
/*
1717
* PVH variables.
1818
*
19-
* pvh_bootparams and pvh_start_info need to live in the data segment since
19+
* pvh_bootparams and pvh_start_info need to live in a data segment since
2020
* they are used after startup_{32|64}, which clear .bss, are invoked.
2121
*/
22-
struct boot_params pvh_bootparams __section(".data");
23-
struct hvm_start_info pvh_start_info __section(".data");
22+
struct boot_params __initdata pvh_bootparams;
23+
struct hvm_start_info __initdata pvh_start_info;
2424

25-
unsigned int pvh_start_info_sz = sizeof(pvh_start_info);
25+
const unsigned int __initconst pvh_start_info_sz = sizeof(pvh_start_info);
2626

27-
static u64 pvh_get_root_pointer(void)
27+
static u64 __init pvh_get_root_pointer(void)
2828
{
2929
return pvh_start_info.rsdp_paddr;
3030
}
@@ -107,7 +107,7 @@ void __init __weak xen_pvh_init(struct boot_params *boot_params)
107107
BUG();
108108
}
109109

110-
static void hypervisor_specific_init(bool xen_guest)
110+
static void __init hypervisor_specific_init(bool xen_guest)
111111
{
112112
if (xen_guest)
113113
xen_pvh_init(&pvh_bootparams);

0 commit comments

Comments
 (0)