Lines Matching refs:cpu

70 static int apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu))  in apmu_wrap()  argument
72 void __iomem *p = apmu_cpus[cpu].iomem; in apmu_wrap()
74 return p ? fn(p, apmu_cpus[cpu].bit) : -EINVAL; in apmu_wrap()
77 static void apmu_init_cpu(struct resource *res, int cpu, int bit) in apmu_init_cpu() argument
79 if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem) in apmu_init_cpu()
82 apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res)); in apmu_init_cpu()
83 apmu_cpus[cpu].bit = bit; in apmu_init_cpu()
85 pr_debug("apmu ioremap %d %d %pr\n", cpu, bit, res); in apmu_init_cpu()
88 static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit), in apmu_parse_cfg() argument
133 int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle) in shmobile_smp_apmu_boot_secondary() argument
136 shmobile_smp_hook(cpu, virt_to_phys(secondary_startup), 0); in shmobile_smp_apmu_boot_secondary()
138 return apmu_wrap(cpu, apmu_power_on); in shmobile_smp_apmu_boot_secondary()
173 void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu) in shmobile_smp_apmu_cpu_shutdown() argument
177 apmu_wrap(cpu, apmu_power_off); in shmobile_smp_apmu_cpu_shutdown()
200 void shmobile_smp_apmu_cpu_die(unsigned int cpu) in shmobile_smp_apmu_cpu_die() argument
203 shmobile_smp_hook(cpu, 0, 0); in shmobile_smp_apmu_cpu_die()
206 shmobile_smp_apmu_cpu_shutdown(cpu); in shmobile_smp_apmu_cpu_die()
212 int shmobile_smp_apmu_cpu_kill(unsigned int cpu) in shmobile_smp_apmu_cpu_kill() argument
214 return apmu_wrap(cpu, apmu_power_off_poll); in shmobile_smp_apmu_cpu_kill()
219 static int shmobile_smp_apmu_do_suspend(unsigned long cpu) in shmobile_smp_apmu_do_suspend() argument
221 shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0); in shmobile_smp_apmu_do_suspend()
222 shmobile_smp_apmu_cpu_shutdown(cpu); in shmobile_smp_apmu_do_suspend()