Lines Matching +full:spin +full:- +full:table
1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright 2006-2008, 2011-2012, 2015 Freescale Semiconductor Inc.
26 #include <asm/text-patching.h>
58 qoriq_pm_ops->freeze_time_base(true); in mpc85xx_give_timebase()
61 * e5500/e6500 have a workaround for erratum A-006958 in place in mpc85xx_give_timebase()
62 * that will reread the timebase until TBL is non-zero. in mpc85xx_give_timebase()
66 * TBL is non-zero, we ensure that TB does not change. We don't in mpc85xx_give_timebase()
91 qoriq_pm_ops->freeze_time_base(false); in mpc85xx_give_timebase()
122 qoriq_pm_ops->irq_mask(cpu); in smp_85xx_cpu_offline_self()
131 cur_cpu_spec->cpu_down_flush(); in smp_85xx_cpu_offline_self()
133 qoriq_pm_ops->cpu_die(cpu); in smp_85xx_cpu_offline_self()
146 paca_ptrs[cpu]->cpu_start = 0; in qoriq_cpu_kill()
158 * cache-inhibit spin table, we need to flush the cache
159 * before accessing spin table to invalidate any staled data.
160 * We also need to flush the cache after writing to spin
161 * table to push data out.
173 return in_be32(&((struct epapr_spin_table *)spin_table)->addr_l); in read_spin_table_addr_l()
199 cpu_rel_addr = of_get_property(np, "cpu-release-addr", NULL); in smp_85xx_start_cpu()
201 pr_err("No cpu-release-addr for cpu %d\n", cpu); in smp_85xx_start_cpu()
202 return -ENOENT; in smp_85xx_start_cpu()
211 ioremappable = *cpu_rel_addr > virt_to_phys(high_memory - 1); in smp_85xx_start_cpu()
213 /* Map the spin table */ in smp_85xx_start_cpu()
223 if (qoriq_pm_ops && qoriq_pm_ops->cpu_up_prepare) in smp_85xx_start_cpu()
224 qoriq_pm_ops->cpu_up_prepare(cpu); in smp_85xx_start_cpu()
237 * loader uses a cache-inhibited spin table. in smp_85xx_start_cpu()
244 ret = -EAGAIN; in smp_85xx_start_cpu()
250 out_be32(&spin_table->pir, hw_cpu); in smp_85xx_start_cpu()
252 out_be64((u64 *)(&spin_table->addr_h), in smp_85xx_start_cpu()
257 * We need also to write addr_h to spin table for systems in smp_85xx_start_cpu()
262 out_be32(&spin_table->addr_h, __pa(__early_start) >> 32); in smp_85xx_start_cpu()
264 out_be32(&spin_table->addr_l, __pa(__early_start)); in smp_85xx_start_cpu()
290 return -ENOENT; in smp_85xx_kick_cpu()
295 if (qoriq_pm_ops && qoriq_pm_ops->cpu_up_prepare) in smp_85xx_kick_cpu()
296 qoriq_pm_ops->cpu_up_prepare(nr); in smp_85xx_kick_cpu()
328 return -EINVAL; in smp_85xx_kick_cpu()
336 paca_ptrs[nr]->cpu_start = 1; in smp_85xx_kick_cpu()
374 cur_cpu_spec->cpu_down_flush(); in mpc85xx_smp_kexec_cpu_down()
420 while (paca_ptrs[disable_cpu]->kexec_state < KEXEC_STATE_REAL_MODE) { in mpc85xx_smp_kexec_cpu_down()
423 if (!notified && now - start > 1000000) { in mpc85xx_smp_kexec_cpu_down()
427 paca_ptrs[disable_cpu]->kexec_state); in mpc85xx_smp_kexec_cpu_down()
450 if (image->type == KEXEC_TYPE_DEFAULT) in mpc85xx_smp_machine_kexec()
453 while ( (atomic_read(&kexec_down_cpus) != (num_cpus - 1)) && in mpc85xx_smp_machine_kexec()
456 timeout--; in mpc85xx_smp_machine_kexec()
483 np = of_find_node_by_type(NULL, "open-pic"); in mpc85xx_smp_init()