Lines Matching refs:lc
196 struct lowcore *lc; in pcpu_alloc_lowcore() local
198 lc = (struct lowcore *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER); in pcpu_alloc_lowcore()
202 if (!lc || !nodat_stack || !async_stack || !mcck_stack) in pcpu_alloc_lowcore()
204 memcpy(lc, &S390_lowcore, 512); in pcpu_alloc_lowcore()
205 memset((char *) lc + 512, 0, sizeof(*lc) - 512); in pcpu_alloc_lowcore()
206 lc->async_stack = async_stack + STACK_INIT_OFFSET; in pcpu_alloc_lowcore()
207 lc->nodat_stack = nodat_stack + STACK_INIT_OFFSET; in pcpu_alloc_lowcore()
208 lc->mcck_stack = mcck_stack + STACK_INIT_OFFSET; in pcpu_alloc_lowcore()
209 lc->cpu_nr = cpu; in pcpu_alloc_lowcore()
210 lc->spinlock_lockval = arch_spin_lockval(cpu); in pcpu_alloc_lowcore()
211 lc->spinlock_index = 0; in pcpu_alloc_lowcore()
212 lc->return_lpswe = gen_lpswe(__LC_RETURN_PSW); in pcpu_alloc_lowcore()
213 lc->return_mcck_lpswe = gen_lpswe(__LC_RETURN_MCCK_PSW); in pcpu_alloc_lowcore()
214 lc->preempt_count = PREEMPT_DISABLED; in pcpu_alloc_lowcore()
215 if (nmi_alloc_mcesa(&lc->mcesad)) in pcpu_alloc_lowcore()
217 if (abs_lowcore_map(cpu, lc, true)) in pcpu_alloc_lowcore()
219 lowcore_ptr[cpu] = lc; in pcpu_alloc_lowcore()
220 pcpu_sigp_retry(pcpu, SIGP_SET_PREFIX, __pa(lc)); in pcpu_alloc_lowcore()
224 nmi_free_mcesa(&lc->mcesad); in pcpu_alloc_lowcore()
229 free_pages((unsigned long) lc, LC_ORDER); in pcpu_alloc_lowcore()
236 struct lowcore *lc; in pcpu_free_lowcore() local
240 lc = lowcore_ptr[cpu]; in pcpu_free_lowcore()
241 nodat_stack = lc->nodat_stack - STACK_INIT_OFFSET; in pcpu_free_lowcore()
242 async_stack = lc->async_stack - STACK_INIT_OFFSET; in pcpu_free_lowcore()
243 mcck_stack = lc->mcck_stack - STACK_INIT_OFFSET; in pcpu_free_lowcore()
247 nmi_free_mcesa(&lc->mcesad); in pcpu_free_lowcore()
251 free_pages((unsigned long) lc, LC_ORDER); in pcpu_free_lowcore()
256 struct lowcore *lc, *abs_lc; in pcpu_prepare_secondary() local
258 lc = lowcore_ptr[cpu]; in pcpu_prepare_secondary()
261 lc->cpu_nr = cpu; in pcpu_prepare_secondary()
262 lc->restart_flags = RESTART_FLAG_CTLREGS; in pcpu_prepare_secondary()
263 lc->spinlock_lockval = arch_spin_lockval(cpu); in pcpu_prepare_secondary()
264 lc->spinlock_index = 0; in pcpu_prepare_secondary()
265 lc->percpu_offset = __per_cpu_offset[cpu]; in pcpu_prepare_secondary()
266 lc->kernel_asce = S390_lowcore.kernel_asce; in pcpu_prepare_secondary()
267 lc->user_asce = s390_invalid_asce; in pcpu_prepare_secondary()
268 lc->machine_flags = S390_lowcore.machine_flags; in pcpu_prepare_secondary()
269 lc->user_timer = lc->system_timer = in pcpu_prepare_secondary()
270 lc->steal_timer = lc->avg_steal_timer = 0; in pcpu_prepare_secondary()
272 memcpy(lc->cregs_save_area, abs_lc->cregs_save_area, sizeof(lc->cregs_save_area)); in pcpu_prepare_secondary()
274 lc->cregs_save_area[1] = lc->kernel_asce; in pcpu_prepare_secondary()
275 lc->cregs_save_area[7] = lc->user_asce; in pcpu_prepare_secondary()
276 save_access_regs((unsigned int *) lc->access_regs_save_area); in pcpu_prepare_secondary()
282 struct lowcore *lc; in pcpu_attach_task() local
286 lc = lowcore_ptr[cpu]; in pcpu_attach_task()
287 lc->kernel_stack = (unsigned long)task_stack_page(tsk) + STACK_INIT_OFFSET; in pcpu_attach_task()
288 lc->current_task = (unsigned long)tsk; in pcpu_attach_task()
289 lc->lpp = LPP_MAGIC; in pcpu_attach_task()
290 lc->current_pid = tsk->pid; in pcpu_attach_task()
291 lc->user_timer = tsk->thread.user_timer; in pcpu_attach_task()
292 lc->guest_timer = tsk->thread.guest_timer; in pcpu_attach_task()
293 lc->system_timer = tsk->thread.system_timer; in pcpu_attach_task()
294 lc->hardirq_timer = tsk->thread.hardirq_timer; in pcpu_attach_task()
295 lc->softirq_timer = tsk->thread.softirq_timer; in pcpu_attach_task()
296 lc->steal_timer = 0; in pcpu_attach_task()
301 struct lowcore *lc; in pcpu_start_fn() local
305 lc = lowcore_ptr[cpu]; in pcpu_start_fn()
306 lc->restart_stack = lc->kernel_stack; in pcpu_start_fn()
307 lc->restart_fn = (unsigned long) func; in pcpu_start_fn()
308 lc->restart_data = (unsigned long) data; in pcpu_start_fn()
309 lc->restart_source = -1U; in pcpu_start_fn()
327 struct lowcore *lc, *abs_lc; in pcpu_delegate() local
330 lc = lowcore_ptr[pcpu - pcpu_devices]; in pcpu_delegate()
341 if (lc) { in pcpu_delegate()
342 lc->restart_stack = stack; in pcpu_delegate()
343 lc->restart_fn = (unsigned long)func; in pcpu_delegate()
344 lc->restart_data = (unsigned long)data; in pcpu_delegate()
345 lc->restart_source = source_cpu; in pcpu_delegate()
405 struct lowcore *lc = lowcore_ptr[0]; in smp_call_ipl_cpu() local
408 lc = &S390_lowcore; in smp_call_ipl_cpu()
411 lc->nodat_stack); in smp_call_ipl_cpu()
622 struct lowcore *lc; in smp_store_status() local
627 lc = lowcore_ptr[cpu]; in smp_store_status()
628 pa = __pa(&lc->floating_pt_save_area); in smp_store_status()
634 pa = lc->mcesad & MCESA_ORIGIN_MASK; in smp_store_status()
636 pa |= lc->mcesad & MCESA_LC_MASK; in smp_store_status()
1262 static __always_inline void set_new_lowcore(struct lowcore *lc) in set_new_lowcore() argument
1269 dst.even = (unsigned long) lc; in set_new_lowcore()
1270 dst.odd = sizeof(*lc); in set_new_lowcore()
1271 pfx = __pa(lc); in set_new_lowcore()
1284 struct lowcore *lc, *lc_ipl; in smp_reinit_ipl_cpu() local
1289 lc = (struct lowcore *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER); in smp_reinit_ipl_cpu()
1293 if (!lc || !nodat_stack || !async_stack || !mcck_stack || nmi_alloc_mcesa(&mcesad)) in smp_reinit_ipl_cpu()
1298 set_new_lowcore(lc); in smp_reinit_ipl_cpu()
1306 if (abs_lowcore_map(0, lc, false)) in smp_reinit_ipl_cpu()
1308 lowcore_ptr[0] = lc; in smp_reinit_ipl_cpu()