Linux 5.7.6
[linux/fpc-iii.git] / arch / arm / mach-prima2 / hotplug.c
blobbc0d957e89ac496794b68b78c4863116c439e9b8
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * CPU hotplug support for CSR Marco dual-core SMP SoCs
5 * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company.
6 */
8 #include <linux/kernel.h>
9 #include <linux/errno.h>
10 #include <linux/smp.h>
12 #include <asm/smp_plat.h>
13 #include "common.h"
15 static inline void platform_do_lowpower(unsigned int cpu)
17 /* we put the platform to just WFI */
18 for (;;) {
19 __asm__ __volatile__("dsb\n\t" "wfi\n\t"
20 : : : "memory");
21 if (prima2_pen_release == cpu_logical_map(cpu)) {
23 * OK, proper wakeup, we're done
25 break;
31 * platform-specific code to shutdown a CPU
33 * Called with IRQs disabled
35 void sirfsoc_cpu_die(unsigned int cpu)
37 platform_do_lowpower(cpu);