xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/Xen: mark xen_setup_gdt() __init
@ 2018-06-25 10:34 Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2018-06-25 10:34 UTC (permalink / raw)
  To: Boris Ostrovsky, Juergen Gross; +Cc: xen-devel

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>
---
 arch/x86/xen/enlighten_pv.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- 4.18-rc2/arch/x86/xen/enlighten_pv.c
+++ 4.18-rc2-xen-setup-GDT-init/arch/x86/xen/enlighten_pv.c
@@ -1175,13 +1175,13 @@ static void __init xen_boot_params_init_
  * 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;




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/Xen: mark xen_setup_gdt() __init
       [not found] <5B30C51902000078001CD6F5@suse.com>
@ 2018-07-02 13:54 ` Juergen Gross
  2018-08-15 21:31   ` Boris Ostrovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Juergen Gross @ 2018-07-02 13:54 UTC (permalink / raw)
  To: Jan Beulich, Boris Ostrovsky; +Cc: xen-devel

On 25/06/18 12:34, Jan Beulich wrote:
> 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>


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/Xen: mark xen_setup_gdt() __init
  2018-07-02 13:54 ` [PATCH] x86/Xen: mark xen_setup_gdt() __init Juergen Gross
@ 2018-08-15 21:31   ` Boris Ostrovsky
  0 siblings, 0 replies; 3+ messages in thread
From: Boris Ostrovsky @ 2018-08-15 21:31 UTC (permalink / raw)
  To: Juergen Gross, Jan Beulich; +Cc: xen-devel

On 07/02/2018 09:54 AM, Juergen Gross wrote:
> On 25/06/18 12:34, Jan Beulich wrote:
>> 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>


Applied to for-linus-4.19.

-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-15 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5B30C51902000078001CD6F5@suse.com>
2018-07-02 13:54 ` [PATCH] x86/Xen: mark xen_setup_gdt() __init Juergen Gross
2018-08-15 21:31   ` Boris Ostrovsky
2018-06-25 10:34 Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).