Lines Matching refs:pcpu
78 DEFINE_PER_CPU(struct pcpu, pcpu_devices);
80 * Pointer to the pcpu area of the boot CPU. This is required when a restart
85 static struct pcpu *ipl_pcpu;
116 * member of a pcpu data structure within the pcpu_devices array.
135 static int pcpu_sigp_retry(struct pcpu *pcpu, u8 order, u32 parm)
140 cc = __pcpu_sigp(pcpu->address, order, parm, NULL);
149 static inline int pcpu_stopped(struct pcpu *pcpu)
153 if (__pcpu_sigp(pcpu->address, SIGP_SENSE,
159 static inline int pcpu_running(struct pcpu *pcpu)
161 if (__pcpu_sigp(pcpu->address, SIGP_SENSE_RUNNING,
169 * Find struct pcpu by cpu address.
171 static struct pcpu *pcpu_find_address(const struct cpumask *mask, u16 address)
181 static void pcpu_ec_call(struct pcpu *pcpu, int ec_bit)
185 if (test_and_set_bit(ec_bit, &pcpu->ec_mask))
187 order = pcpu_running(pcpu) ? SIGP_EXTERNAL_CALL : SIGP_EMERGENCY_SIGNAL;
188 pcpu->ec_clk = get_tod_clock_fast();
189 pcpu_sigp_retry(pcpu, order, 0);
192 static int pcpu_alloc_lowcore(struct pcpu *pcpu, int cpu)
219 pcpu_sigp_retry(pcpu, SIGP_SET_PREFIX, __pa(lc));
232 static void pcpu_free_lowcore(struct pcpu *pcpu, int cpu)
241 pcpu_sigp_retry(pcpu, SIGP_SET_PREFIX, 0);
251 static void pcpu_prepare_secondary(struct pcpu *pcpu, int cpu)
259 lc->pcpu = (unsigned long)pcpu;
310 * Call function via PSW restart on pcpu and stop the current cpu.
317 static void pcpu_delegate(struct pcpu *pcpu, int cpu,
327 if (pcpu->address == source_cpu) {
332 pcpu_sigp_retry(pcpu, SIGP_STOP, 0);
333 pcpu_sigp_retry(pcpu, SIGP_CPU_RESET, 0);
353 : : "d" (pcpu->address), "d" (source_cpu),
444 struct pcpu *pcpu = per_cpu_ptr(&pcpu_devices, cpu);
445 set_bit(ec_stop_cpu, &pcpu->ec_mask);
446 while (__pcpu_sigp(pcpu->address, SIGP_EMERGENCY_SIGNAL,
468 struct pcpu *pcpu;
484 pcpu = per_cpu_ptr(&pcpu_devices, cpu);
485 pcpu_sigp_retry(pcpu, SIGP_STOP, 0);
486 while (!pcpu_stopped(pcpu))
555 struct pcpu *pcpu;
558 pcpu = per_cpu_ptr(&pcpu_devices, cpu);
561 if (__pcpu_sigp_relax(pcpu->address, SIGP_STORE_STATUS_AT_ADDRESS,
569 if (__pcpu_sigp_relax(pcpu->address, SIGP_STORE_ADDITIONAL_STATUS,
718 struct pcpu *pcpu;
730 pcpu = per_cpu_ptr(&pcpu_devices, cpu);
731 pcpu->address = address + i;
733 pcpu->state = CPU_STATE_CONFIGURED;
735 pcpu->state = CPU_STATE_STANDBY;
863 struct pcpu *pcpu = per_cpu_ptr(&pcpu_devices, cpu);
866 if (pcpu->state != CPU_STATE_CONFIGURED)
868 if (pcpu_sigp_retry(pcpu, SIGP_INITIAL_CPU_RESET, 0) !=
872 rc = pcpu_alloc_lowcore(pcpu, cpu);
880 pcpu_prepare_secondary(pcpu, cpu);
924 struct pcpu *pcpu;
927 pcpu = per_cpu_ptr(&pcpu_devices, cpu);
928 while (!pcpu_stopped(pcpu))
930 pcpu_free_lowcore(pcpu, cpu);
933 pcpu->flags = 0;
975 lc->pcpu = (unsigned long)ipl_pcpu;
1016 struct pcpu *pcpu;
1033 pcpu = per_cpu_ptr(&pcpu_devices, cpu);
1037 if (pcpu->state != CPU_STATE_CONFIGURED)
1039 rc = sclp_core_deconfigure(pcpu->address >> smp_cpu_mt_shift);
1052 if (pcpu->state != CPU_STATE_STANDBY)
1054 rc = sclp_core_configure(pcpu->address >> smp_cpu_mt_shift);