MIPS: Netlogic: Move coremask setup to nlm_node_init
authorJayachandran C <jchandra@broadcom.com>
Tue, 29 Apr 2014 14:37:42 +0000 (20:07 +0530)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 30 May 2014 14:45:19 +0000 (16:45 +0200)
This is needed for nlm_node_present(0) to work on uniprocessor compile.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6861/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/netlogic/xlp/nlm_hal.c
arch/mips/netlogic/xlp/wakeup.c

index 997cd9ee10de663015e21aa84b88c75617c7b58a..7b277cda31f3b7eddfb56af7cfb5ab46826e1462 100644 (file)
@@ -54,6 +54,8 @@ void nlm_node_init(int node)
        struct nlm_soc_info *nodep;
 
        nodep = nlm_get_node(node);
+       if (node == 0)
+               nodep->coremask = 1;    /* node 0, boot cpu */
        nodep->sysbase = nlm_get_sys_regbase(node);
        nodep->picbase = nlm_get_pic_regbase(node);
        nodep->ebase = read_c0_ebase() & (~((1 << 12) - 1));
index 9a92617a2af5920917f069b0f9e30b46a42d4471..7589238658865d4f5f62c79aa806aa6df8e4110e 100644 (file)
@@ -159,10 +159,6 @@ static void xlp_enable_secondary_cores(const cpumask_t *wakeup_mask)
                 */
                syscoremask = (1 << hweight32(~fusemask & mask)) - 1;
 
-               /* The boot cpu */
-               if (n == 0)
-                       nodep->coremask = 1;
-
                pr_info("Node %d - SYS/FUSE coremask %x\n", n, syscoremask);
                for (core = 0; core < nlm_cores_per_node(); core++) {
                        /* we will be on node 0 core 0 */