summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2018-06-25 04:34:01 -0600
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2018-08-20 14:46:18 -0400
commit2197082afd4ef7139ea1bcb10b81c2dc881830a4 (patch)
tree7acf8ba7aad659c10e07489216fa1ba8c521dda3 /arch/x86
parent2ad0d52699700a91660a406a4046017a2d7f246a (diff)
x86/Xen: mark xen_setup_gdt() __init
Its only caller is __init, so to avoid section mismatch warnings when a compiler decides to not inline the function marke this function so as well. Take the opportunity and also make the function actually use its argument: The sole caller passes in zero anyway. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/xen/enlighten_pv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index ee3b00c7acda..419ff4641644 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -1170,13 +1170,13 @@ static void __init xen_boot_params_init_edd(void)
* we do this, we have to be careful not to call any stack-protected
* function, which is most of the kernel.
*/
-static void xen_setup_gdt(int cpu)
+static void __init xen_setup_gdt(int cpu)
{
pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry_boot;
pv_cpu_ops.load_gdt = xen_load_gdt_boot;
- setup_stack_canary_segment(0);
- switch_to_new_gdt(0);
+ setup_stack_canary_segment(cpu);
+ switch_to_new_gdt(cpu);
pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry;
pv_cpu_ops.load_gdt = xen_load_gdt;