Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372663
b: refs/heads/master
c: beddf63
h: refs/heads/master
i:
  372661: ed447d9
  372659: fcdeda0
  372655: 1b18a56
v: v3
  • Loading branch information
Tomasz Figa authored and Kukjin Kim committed Apr 8, 2013
1 parent f6675d7 commit 1924534
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41de89860baf8e62fd74e83338058575398ad21f
refs/heads/master: beddf63fc8e01f06799bd6d7a2dd879885bbc9c6
32 changes: 27 additions & 5 deletions trunk/arch/arm/mach-exynos/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <asm/cacheflush.h>
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>
#include <asm/firmware.h>

#include <mach/hardware.h>
#include <mach/regs-clock.h>
Expand Down Expand Up @@ -145,10 +146,21 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct

timeout = jiffies + (1 * HZ);
while (time_before(jiffies, timeout)) {
unsigned long boot_addr;

smp_rmb();

__raw_writel(virt_to_phys(exynos4_secondary_startup),
cpu_boot_reg(phys_cpu));
boot_addr = virt_to_phys(exynos4_secondary_startup);

/*
* Try to set boot address using firmware first
* and fall back to boot register if it fails.
*/
if (call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr))
__raw_writel(boot_addr, cpu_boot_reg(phys_cpu));

call_firmware_op(cpu_boot, phys_cpu);

arch_send_wakeup_ipi_mask(cpumask_of(cpu));

if (pen_release == -1)
Expand Down Expand Up @@ -204,10 +216,20 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
* system-wide flags register. The boot monitor waits
* until it receives a soft interrupt, and then the
* secondary CPU branches to this address.
*
* Try using firmware operation first and fall back to
* boot register if it fails.
*/
for (i = 1; i < max_cpus; ++i)
__raw_writel(virt_to_phys(exynos4_secondary_startup),
cpu_boot_reg(cpu_logical_map(i)));
for (i = 1; i < max_cpus; ++i) {
unsigned long phys_cpu;
unsigned long boot_addr;

phys_cpu = cpu_logical_map(i);
boot_addr = virt_to_phys(exynos4_secondary_startup);

if (call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr))
__raw_writel(boot_addr, cpu_boot_reg(phys_cpu));
}
}

struct smp_operations exynos_smp_ops __initdata = {
Expand Down

0 comments on commit 1924534

Please sign in to comment.