aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/xlr/wakeup.c
diff options
context:
space:
mode:
authorJayachandran C <jayachandranc@netlogicmicro.com>2011-11-15 19:21:29 -0500
committerRalf Baechle <ralf@linux-mips.org>2011-12-07 17:04:56 -0500
commit66d29985fab8207b1b2c03ac34a2c294c5b47a30 (patch)
treef73145e09c53606716266577eef5e14262129ed9 /arch/mips/netlogic/xlr/wakeup.c
parent8da24631e60438631112e6fdd198ef62416ff14a (diff)
MIPS: Netlogic: Merge some of XLR/XLP wakup code
Create a common NMI and reset handler in smpboot.S and use this for both XLR and XLP. In the earlier code, the woken up CPUs would busy wait until released, switch this to wakeup by NMI. The initial wakeup code or XLR and XLP are differ since they are started from different bootloaders (XLP from u-boot and XLR from netlogic bootloader). But in both platforms the woken up CPUs wait and are released by sending an NMI. Add support for starting XLR and XLP in 1/2/4 threads per core. Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2970/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic/xlr/wakeup.c')
-rw-r--r--arch/mips/netlogic/xlr/wakeup.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/mips/netlogic/xlr/wakeup.c b/arch/mips/netlogic/xlr/wakeup.c
index 69143bb7f688..db5d987d4881 100644
--- a/arch/mips/netlogic/xlr/wakeup.c
+++ b/arch/mips/netlogic/xlr/wakeup.c
@@ -48,21 +48,18 @@
48#include <asm/netlogic/xlr/iomap.h> 48#include <asm/netlogic/xlr/iomap.h>
49#include <asm/netlogic/xlr/pic.h> 49#include <asm/netlogic/xlr/pic.h>
50 50
51unsigned long secondary_entry_point; 51int __cpuinit xlr_wakeup_secondary_cpus(void)
52
53int __cpuinit nlm_wakeup_secondary_cpus(u32 wakeup_mask)
54{ 52{
55 unsigned int i, boot_cpu; 53 unsigned int i, boot_cpu;
56 void *reset_vec;
57 54
58 secondary_entry_point = (unsigned long)prom_pre_boot_secondary_cpus; 55 /*
59 reset_vec = (void *)CKSEG1ADDR(0x1fc00000); 56 * In case of RMI boot, hit with NMI to get the cores
60 memcpy(reset_vec, (void *)nlm_reset_entry, 57 * from bootloader to linux code.
61 (nlm_reset_entry_end - nlm_reset_entry)); 58 */
62 boot_cpu = hard_smp_processor_id(); 59 boot_cpu = hard_smp_processor_id();
63 60 nlm_set_nmi_handler(nlm_rmiboot_preboot);
64 for (i = 0; i < NR_CPUS; i++) { 61 for (i = 0; i < NR_CPUS; i++) {
65 if (i == boot_cpu || (wakeup_mask & (1u << i)) == 0) 62 if (i == boot_cpu || (nlm_cpumask & (1u << i)) == 0)
66 continue; 63 continue;
67 nlm_pic_send_ipi(nlm_pic_base, i, 1, 1); /* send NMI */ 64 nlm_pic_send_ipi(nlm_pic_base, i, 1, 1); /* send NMI */
68 } 65 }