blob: 85c3be63d644470775f95a580aab7cd9ec14ea2a [file] [log] [blame]
Pankaj Dubey45523862014-07-08 07:54:13 +09001 /*
Kukjin Kim7d30e8b2011-02-14 16:33:10 +09002 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
Changhwan Youn2b12b5c2010-07-26 21:08:52 +09004 *
5 * Cloned from linux/arch/arm/mach-vexpress/platsmp.c
6 *
7 * Copyright (C) 2002 ARM Ltd.
8 * All Rights Reserved
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <linux/init.h>
16#include <linux/errno.h>
17#include <linux/delay.h>
Changhwan Youn2b12b5c2010-07-26 21:08:52 +090018#include <linux/jiffies.h>
19#include <linux/smp.h>
20#include <linux/io.h>
Sachin Kamatb3205de2014-05-13 07:13:44 +090021#include <linux/of_address.h>
Pankaj Dubey2262d6e2015-12-18 09:02:11 +053022#include <linux/soc/samsung/exynos-regs-pmu.h>
Changhwan Youn2b12b5c2010-07-26 21:08:52 +090023
24#include <asm/cacheflush.h>
Krzysztof Kozlowski6f0b7c02014-09-14 02:49:31 +090025#include <asm/cp15.h>
Will Deaconeb504392012-01-20 12:01:12 +010026#include <asm/smp_plat.h>
Changhwan Youn2b12b5c2010-07-26 21:08:52 +090027#include <asm/smp_scu.h>
Tomasz Figabeddf632012-12-11 13:58:43 +090028#include <asm/firmware.h>
Changhwan Youn2b12b5c2010-07-26 21:08:52 +090029
Pankaj Dubey2e94ac42014-07-19 03:43:22 +090030#include <mach/map.h>
31
Marc Zyngier06853ae2011-09-08 13:15:22 +010032#include "common.h"
33
Kukjin Kim7d30e8b2011-02-14 16:33:10 +090034extern void exynos4_secondary_startup(void);
Changhwan Youn2b12b5c2010-07-26 21:08:52 +090035
Krzysztof Kozlowski6f0b7c02014-09-14 02:49:31 +090036#ifdef CONFIG_HOTPLUG_CPU
Krzysztof Kozlowski13cfa6c2014-09-14 02:49:32 +090037static inline void cpu_leave_lowpower(u32 core_id)
Krzysztof Kozlowski6f0b7c02014-09-14 02:49:31 +090038{
39 unsigned int v;
40
41 asm volatile(
42 "mrc p15, 0, %0, c1, c0, 0\n"
43 " orr %0, %0, %1\n"
44 " mcr p15, 0, %0, c1, c0, 0\n"
45 " mrc p15, 0, %0, c1, c0, 1\n"
46 " orr %0, %0, %2\n"
47 " mcr p15, 0, %0, c1, c0, 1\n"
48 : "=&r" (v)
49 : "Ir" (CR_C), "Ir" (0x40)
50 : "cc");
51}
52
53static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
54{
55 u32 mpidr = cpu_logical_map(cpu);
56 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
57
58 for (;;) {
59
60 /* Turn the CPU off on next WFI instruction. */
61 exynos_cpu_power_down(core_id);
62
63 wfi();
64
65 if (pen_release == core_id) {
66 /*
67 * OK, proper wakeup, we're done
68 */
69 break;
70 }
71
72 /*
73 * Getting here, means that we have come out of WFI without
74 * having been woken up - this shouldn't happen
75 *
76 * Just note it happening - when we're woken, we can report
77 * its occurrence.
78 */
79 (*spurious)++;
80 }
81}
82#endif /* CONFIG_HOTPLUG_CPU */
83
Krzysztof Kozlowski7310d992014-07-19 04:45:02 +090084/**
85 * exynos_core_power_down : power down the specified cpu
86 * @cpu : the cpu to power down
87 *
88 * Power down the specified cpu. The sequence must be finished by a
89 * call to cpu_do_idle()
90 *
91 */
92void exynos_cpu_power_down(int cpu)
93{
Bartlomiej Zolnierkiewicz497ab3b2015-03-27 02:32:56 +090094 u32 core_conf;
95
Krzysztof Kozlowskica489c52015-02-27 05:50:41 +090096 if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) {
Abhilash Kesavanadc548d2014-11-07 09:20:16 +090097 /*
98 * Bypass power down for CPU0 during suspend. Check for
99 * the SYS_PWR_REG value to decide if we are suspending
100 * the system.
101 */
102 int val = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG);
103
104 if (!(val & S5P_CORE_LOCAL_PWR_EN))
105 return;
106 }
Bartlomiej Zolnierkiewicz497ab3b2015-03-27 02:32:56 +0900107
108 core_conf = pmu_raw_readl(EXYNOS_ARM_CORE_CONFIGURATION(cpu));
109 core_conf &= ~S5P_CORE_LOCAL_PWR_EN;
110 pmu_raw_writel(core_conf, EXYNOS_ARM_CORE_CONFIGURATION(cpu));
Krzysztof Kozlowski7310d992014-07-19 04:45:02 +0900111}
112
113/**
114 * exynos_cpu_power_up : power up the specified cpu
115 * @cpu : the cpu to power up
116 *
117 * Power up the specified cpu
118 */
119void exynos_cpu_power_up(int cpu)
120{
Bartlomiej Zolnierkiewicz497ab3b2015-03-27 02:32:56 +0900121 u32 core_conf = S5P_CORE_LOCAL_PWR_EN;
122
123 if (soc_is_exynos3250())
124 core_conf |= S5P_CORE_AUTOWAKEUP_EN;
125
126 pmu_raw_writel(core_conf,
Arnd Bergmann944483d2014-07-26 17:54:21 +0200127 EXYNOS_ARM_CORE_CONFIGURATION(cpu));
Krzysztof Kozlowski7310d992014-07-19 04:45:02 +0900128}
129
130/**
131 * exynos_cpu_power_state : returns the power state of the cpu
132 * @cpu : the cpu to retrieve the power state from
133 *
134 */
135int exynos_cpu_power_state(int cpu)
136{
Arnd Bergmann944483d2014-07-26 17:54:21 +0200137 return (pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) &
Krzysztof Kozlowski7310d992014-07-19 04:45:02 +0900138 S5P_CORE_LOCAL_PWR_EN);
139}
140
141/**
142 * exynos_cluster_power_down : power down the specified cluster
143 * @cluster : the cluster to power down
144 */
145void exynos_cluster_power_down(int cluster)
146{
Arnd Bergmann944483d2014-07-26 17:54:21 +0200147 pmu_raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster));
Krzysztof Kozlowski7310d992014-07-19 04:45:02 +0900148}
149
150/**
151 * exynos_cluster_power_up : power up the specified cluster
152 * @cluster : the cluster to power up
153 */
154void exynos_cluster_power_up(int cluster)
155{
Arnd Bergmann944483d2014-07-26 17:54:21 +0200156 pmu_raw_writel(S5P_CORE_LOCAL_PWR_EN,
157 EXYNOS_COMMON_CONFIGURATION(cluster));
Krzysztof Kozlowski7310d992014-07-19 04:45:02 +0900158}
159
160/**
161 * exynos_cluster_power_state : returns the power state of the cluster
162 * @cluster : the cluster to retrieve the power state from
163 *
164 */
165int exynos_cluster_power_state(int cluster)
166{
Arnd Bergmann944483d2014-07-26 17:54:21 +0200167 return (pmu_raw_readl(EXYNOS_COMMON_STATUS(cluster)) &
168 S5P_CORE_LOCAL_PWR_EN);
Krzysztof Kozlowski7310d992014-07-19 04:45:02 +0900169}
170
Bartlomiej Zolnierkiewiczaf997112015-03-18 14:09:57 +0100171static void __iomem *cpu_boot_reg_base(void)
Tomasz Figa1f054f52012-11-24 11:13:48 +0900172{
173 if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
Pankaj Dubey2e94ac42014-07-19 03:43:22 +0900174 return pmu_base_addr + S5P_INFORM5;
Sachin Kamatb3205de2014-05-13 07:13:44 +0900175 return sysram_base_addr;
Tomasz Figa1f054f52012-11-24 11:13:48 +0900176}
177
178static inline void __iomem *cpu_boot_reg(int cpu)
179{
180 void __iomem *boot_reg;
181
182 boot_reg = cpu_boot_reg_base();
Sachin Kamatb3205de2014-05-13 07:13:44 +0900183 if (!boot_reg)
Krzysztof Kozlowski2cc6b812015-07-10 19:20:58 +0900184 return IOMEM_ERR_PTR(-ENODEV);
Tomasz Figa1f054f52012-11-24 11:13:48 +0900185 if (soc_is_exynos4412())
186 boot_reg += 4*cpu;
Arun Kumar K86c6f142014-05-26 04:16:11 +0900187 else if (soc_is_exynos5420() || soc_is_exynos5800())
Chander Kashyap1580be32013-06-19 00:29:35 +0900188 boot_reg += 4;
Tomasz Figa1f054f52012-11-24 11:13:48 +0900189 return boot_reg;
190}
JungHi Min911c29b2011-07-16 13:39:09 +0900191
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900192/*
Krzysztof Kozlowskib588aae2014-09-25 18:15:13 +0900193 * Set wake up by local power mode and execute software reset for given core.
194 *
195 * Currently this is needed only when booting secondary CPU on Exynos3250.
196 */
Bartlomiej Zolnierkiewiczaf997112015-03-18 14:09:57 +0100197void exynos_core_restart(u32 core_id)
Krzysztof Kozlowskib588aae2014-09-25 18:15:13 +0900198{
199 u32 val;
200
201 if (!of_machine_is_compatible("samsung,exynos3250"))
202 return;
203
Bartlomiej Zolnierkiewicz497ab3b2015-03-27 02:32:56 +0900204 while (!pmu_raw_readl(S5P_PMU_SPARE2))
205 udelay(10);
206 udelay(10);
207
Krzysztof Kozlowskib588aae2014-09-25 18:15:13 +0900208 val = pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(core_id));
209 val |= S5P_CORE_WAKEUP_FROM_LOCAL_CFG;
210 pmu_raw_writel(val, EXYNOS_ARM_CORE_STATUS(core_id));
211
Krzysztof Kozlowskib588aae2014-09-25 18:15:13 +0900212 pmu_raw_writel(EXYNOS_CORE_PO_RESET(core_id), EXYNOS_SWRESET);
213}
214
215/*
Russell King3705ff62010-12-18 10:53:12 +0000216 * Write pen_release in a way that is guaranteed to be visible to all
217 * observers, irrespective of whether they're taking part in coherency
218 * or not. This is necessary for the hotplug code to work reliably.
219 */
220static void write_pen_release(int val)
221{
222 pen_release = val;
223 smp_wmb();
Nicolas Pitref45913f2013-12-05 14:26:16 -0500224 sync_cache_w(&pen_release);
Russell King3705ff62010-12-18 10:53:12 +0000225}
226
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900227static void __iomem *scu_base_addr(void)
228{
229 return (void __iomem *)(S5P_VA_SCU);
230}
231
232static DEFINE_SPINLOCK(boot_lock);
233
Paul Gortmaker8bd26e32013-06-17 15:43:14 -0400234static void exynos_secondary_init(unsigned int cpu)
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900235{
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900236 /*
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900237 * let the primary processor know we're out of the
238 * pen, then head off into the C entry point
239 */
Russell King3705ff62010-12-18 10:53:12 +0000240 write_pen_release(-1);
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900241
242 /*
243 * Synchronise with the boot thread.
244 */
245 spin_lock(&boot_lock);
246 spin_unlock(&boot_lock);
247}
248
Bartlomiej Zolnierkiewiczaf997112015-03-18 14:09:57 +0100249int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr)
Bartlomiej Zolnierkiewicz955d4cf2015-03-18 14:09:55 +0100250{
251 int ret;
252
253 /*
254 * Try to set boot address using firmware first
255 * and fall back to boot register if it fails.
256 */
257 ret = call_firmware_op(set_cpu_boot_addr, core_id, boot_addr);
258 if (ret && ret != -ENOSYS)
259 goto fail;
260 if (ret == -ENOSYS) {
261 void __iomem *boot_reg = cpu_boot_reg(core_id);
262
263 if (IS_ERR(boot_reg)) {
264 ret = PTR_ERR(boot_reg);
265 goto fail;
266 }
267 __raw_writel(boot_addr, boot_reg);
268 ret = 0;
269 }
270fail:
271 return ret;
272}
273
Bartlomiej Zolnierkiewiczaf997112015-03-18 14:09:57 +0100274int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr)
Bartlomiej Zolnierkiewicz1225ad72015-03-18 14:09:56 +0100275{
276 int ret;
277
278 /*
279 * Try to get boot address using firmware first
280 * and fall back to boot register if it fails.
281 */
282 ret = call_firmware_op(get_cpu_boot_addr, core_id, boot_addr);
283 if (ret && ret != -ENOSYS)
284 goto fail;
285 if (ret == -ENOSYS) {
286 void __iomem *boot_reg = cpu_boot_reg(core_id);
287
288 if (IS_ERR(boot_reg)) {
289 ret = PTR_ERR(boot_reg);
290 goto fail;
291 }
292 *boot_addr = __raw_readl(boot_reg);
293 ret = 0;
294 }
295fail:
296 return ret;
297}
298
Paul Gortmaker8bd26e32013-06-17 15:43:14 -0400299static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900300{
301 unsigned long timeout;
Tomasz Figa9637f302014-07-16 02:59:18 +0900302 u32 mpidr = cpu_logical_map(cpu);
303 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
Sachin Kamatb3205de2014-05-13 07:13:44 +0900304 int ret = -ENOSYS;
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900305
306 /*
307 * Set synchronisation state between this boot processor
308 * and the secondary one
309 */
310 spin_lock(&boot_lock);
311
312 /*
313 * The secondary processor is waiting to be released from
314 * the holding pen - release it, then wait for it to flag
315 * that it has been released by resetting pen_release.
316 *
Tomasz Figa9637f302014-07-16 02:59:18 +0900317 * Note that "pen_release" is the hardware CPU core ID, whereas
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900318 * "cpu" is Linux's internal ID.
319 */
Tomasz Figa9637f302014-07-16 02:59:18 +0900320 write_pen_release(core_id);
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900321
Tomasz Figa9637f302014-07-16 02:59:18 +0900322 if (!exynos_cpu_power_state(core_id)) {
323 exynos_cpu_power_up(core_id);
JungHi Min911c29b2011-07-16 13:39:09 +0900324 timeout = 10;
325
326 /* wait max 10 ms until cpu1 is on */
Tomasz Figa9637f302014-07-16 02:59:18 +0900327 while (exynos_cpu_power_state(core_id)
328 != S5P_CORE_LOCAL_PWR_EN) {
JungHi Min911c29b2011-07-16 13:39:09 +0900329 if (timeout-- == 0)
330 break;
331
332 mdelay(1);
333 }
334
335 if (timeout == 0) {
336 printk(KERN_ERR "cpu1 power enable failed");
337 spin_unlock(&boot_lock);
338 return -ETIMEDOUT;
339 }
340 }
Krzysztof Kozlowskib588aae2014-09-25 18:15:13 +0900341
342 exynos_core_restart(core_id);
343
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900344 /*
345 * Send the secondary CPU a soft interrupt, thereby causing
346 * the boot monitor to read the system wide flags register,
347 * and branch to the address found there.
348 */
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900349
350 timeout = jiffies + (1 * HZ);
351 while (time_before(jiffies, timeout)) {
Tomasz Figabeddf632012-12-11 13:58:43 +0900352 unsigned long boot_addr;
353
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900354 smp_rmb();
JungHi Min911c29b2011-07-16 13:39:09 +0900355
Tomasz Figabeddf632012-12-11 13:58:43 +0900356 boot_addr = virt_to_phys(exynos4_secondary_startup);
357
Bartlomiej Zolnierkiewicz955d4cf2015-03-18 14:09:55 +0100358 ret = exynos_set_boot_addr(core_id, boot_addr);
359 if (ret)
Sachin Kamatb3205de2014-05-13 07:13:44 +0900360 goto fail;
Tomasz Figabeddf632012-12-11 13:58:43 +0900361
Tomasz Figa9637f302014-07-16 02:59:18 +0900362 call_firmware_op(cpu_boot, core_id);
Tomasz Figabeddf632012-12-11 13:58:43 +0900363
Bartlomiej Zolnierkiewicz497ab3b2015-03-27 02:32:56 +0900364 if (soc_is_exynos3250())
365 dsb_sev();
366 else
367 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
JungHi Min911c29b2011-07-16 13:39:09 +0900368
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900369 if (pen_release == -1)
370 break;
371
372 udelay(10);
373 }
374
Bartlomiej Zolnierkiewicz9f294c12015-03-18 14:09:53 +0100375 if (pen_release != -1)
376 ret = -ETIMEDOUT;
377
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900378 /*
379 * now the secondary core is starting up let it run its
380 * calibrations, then wait for it to finish
381 */
Sachin Kamatb3205de2014-05-13 07:13:44 +0900382fail:
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900383 spin_unlock(&boot_lock);
384
Sachin Kamatb3205de2014-05-13 07:13:44 +0900385 return pen_release != -1 ? ret : 0;
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900386}
387
388/*
389 * Initialise the CPU possible map early - this describes the CPUs
390 * which may be present or become present in the system.
391 */
392
Marc Zyngier06853ae2011-09-08 13:15:22 +0100393static void __init exynos_smp_init_cpus(void)
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900394{
395 void __iomem *scu_base = scu_base_addr();
396 unsigned int i, ncores;
397
Russell Kingaf040ff2014-06-24 19:43:15 +0100398 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
Kukjin Kime9bba612012-01-25 15:35:57 +0900399 ncores = scu_base ? scu_get_core_count(scu_base) : 1;
Chander Kashyap1897d2f2013-06-19 00:29:34 +0900400 else
401 /*
402 * CPU Nodes are passed thru DT and set_cpu_possible
403 * is set by "arm_dt_init_cpu_maps".
404 */
405 return;
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900406
407 /* sanity check */
Russell Kinga06f9162011-10-20 22:04:18 +0100408 if (ncores > nr_cpu_ids) {
409 pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
410 ncores, nr_cpu_ids);
411 ncores = nr_cpu_ids;
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900412 }
413
414 for (i = 0; i < ncores; i++)
415 set_cpu_possible(i, true);
416}
417
Marc Zyngier06853ae2011-09-08 13:15:22 +0100418static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900419{
Tomasz Figa1f054f52012-11-24 11:13:48 +0900420 int i;
421
Olof Johansson1754c422014-06-02 21:47:46 -0700422 exynos_sysram_init();
423
Krzysztof Kozlowski6f024972015-03-11 11:13:57 +0100424 exynos_set_delayed_reset_assertion(true);
425
Russell Kingaf040ff2014-06-24 19:43:15 +0100426 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
Kukjin Kime9bba612012-01-25 15:35:57 +0900427 scu_enable(scu_base_addr());
Russell King05c74a62010-12-03 11:09:48 +0000428
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900429 /*
Russell King05c74a62010-12-03 11:09:48 +0000430 * Write the address of secondary startup into the
431 * system-wide flags register. The boot monitor waits
432 * until it receives a soft interrupt, and then the
433 * secondary CPU branches to this address.
Tomasz Figabeddf632012-12-11 13:58:43 +0900434 *
435 * Try using firmware operation first and fall back to
436 * boot register if it fails.
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900437 */
Tomasz Figabeddf632012-12-11 13:58:43 +0900438 for (i = 1; i < max_cpus; ++i) {
Tomasz Figabeddf632012-12-11 13:58:43 +0900439 unsigned long boot_addr;
Tomasz Figa9637f302014-07-16 02:59:18 +0900440 u32 mpidr;
441 u32 core_id;
Sachin Kamatb3205de2014-05-13 07:13:44 +0900442 int ret;
Tomasz Figabeddf632012-12-11 13:58:43 +0900443
Tomasz Figa9637f302014-07-16 02:59:18 +0900444 mpidr = cpu_logical_map(i);
445 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
Tomasz Figabeddf632012-12-11 13:58:43 +0900446 boot_addr = virt_to_phys(exynos4_secondary_startup);
447
Bartlomiej Zolnierkiewicz955d4cf2015-03-18 14:09:55 +0100448 ret = exynos_set_boot_addr(core_id, boot_addr);
449 if (ret)
Sachin Kamatb3205de2014-05-13 07:13:44 +0900450 break;
Tomasz Figabeddf632012-12-11 13:58:43 +0900451 }
Changhwan Youn2b12b5c2010-07-26 21:08:52 +0900452}
Marc Zyngier06853ae2011-09-08 13:15:22 +0100453
Krzysztof Kozlowski6f0b7c02014-09-14 02:49:31 +0900454#ifdef CONFIG_HOTPLUG_CPU
455/*
456 * platform-specific code to shutdown a CPU
457 *
458 * Called with IRQs disabled
459 */
Krzysztof Kozlowski27b9ee82014-09-14 02:49:32 +0900460static void exynos_cpu_die(unsigned int cpu)
Krzysztof Kozlowski6f0b7c02014-09-14 02:49:31 +0900461{
462 int spurious = 0;
Krzysztof Kozlowski13cfa6c2014-09-14 02:49:32 +0900463 u32 mpidr = cpu_logical_map(cpu);
464 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
Krzysztof Kozlowski6f0b7c02014-09-14 02:49:31 +0900465
466 v7_exit_coherency_flush(louis);
467
468 platform_do_lowpower(cpu, &spurious);
469
470 /*
471 * bring this CPU back into the world of cache
472 * coherency, and then restore interrupts
473 */
Krzysztof Kozlowski13cfa6c2014-09-14 02:49:32 +0900474 cpu_leave_lowpower(core_id);
Krzysztof Kozlowski6f0b7c02014-09-14 02:49:31 +0900475
476 if (spurious)
477 pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
478}
479#endif /* CONFIG_HOTPLUG_CPU */
480
Masahiro Yamada75305272015-11-15 10:39:53 +0900481const struct smp_operations exynos_smp_ops __initconst = {
Marc Zyngier06853ae2011-09-08 13:15:22 +0100482 .smp_init_cpus = exynos_smp_init_cpus,
483 .smp_prepare_cpus = exynos_smp_prepare_cpus,
484 .smp_secondary_init = exynos_secondary_init,
485 .smp_boot_secondary = exynos_boot_secondary,
486#ifdef CONFIG_HOTPLUG_CPU
487 .cpu_die = exynos_cpu_die,
488#endif
489};