Skip to content

Commit 4403f80

Browse files
jbeulichjgross1
authored andcommitted
xen/x86: drop redundant zeroing from cpu_initialize_context()
Just after having obtained the pointer from kzalloc() there's no reason at all to set part of the area to all zero yet another time. Similarly there's no point explicitly clearing "ldt_ents". Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent d859ed2 commit 4403f80

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/x86/xen/smp_pv.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,6 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
290290

291291
gdt = get_cpu_gdt_rw(cpu);
292292

293-
memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt));
294-
295293
/*
296294
* Bring up the CPU in cpu_bringup_and_idle() with the stack
297295
* pointing just below where pt_regs would be if it were a normal
@@ -308,8 +306,6 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
308306

309307
xen_copy_trap_info(ctxt->trap_ctxt);
310308

311-
ctxt->ldt_ents = 0;
312-
313309
BUG_ON((unsigned long)gdt & ~PAGE_MASK);
314310

315311
gdt_mfn = arbitrary_virt_to_mfn(gdt);

0 commit comments

Comments
 (0)