Re: [PATCH 06/18] MIPS: Netlogic: Get coremask from FUSE register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 14-10-2013 17:21, Jayachandran C wrote:

Use the FUSE register to get the list of active cores in the CPU
instead of using the CPU reset register, this is the recommended
method.

Also add code to mask the coremask with the default number of cores
for each processor series.

Signed-off-by: Jayachandran C <jchandra@xxxxxxxxxxxx>
---
  arch/mips/netlogic/xlp/wakeup.c |   31 ++++++++++++++++++++++++++-----
  1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/arch/mips/netlogic/xlp/wakeup.c b/arch/mips/netlogic/xlp/wakeup.c
index 682d563..1011577 100644
--- a/arch/mips/netlogic/xlp/wakeup.c
+++ b/arch/mips/netlogic/xlp/wakeup.c
[...]
@@ -111,12 +111,33 @@ static void xlp_enable_secondary_cores(const cpumask_t *wakeup_mask)
  		if (n != 0)
  			nlm_node_init(n);
  		nodep = nlm_get_node(n);
-		syscoremask = nlm_read_sys_reg(nodep->sysbase, SYS_CPU_RESET);
+
+		fusemask = nlm_read_sys_reg(nodep->sysbase,
+					SYS_EFUSE_DEVICE_CFG_STATUS0);
+		switch (read_c0_prid() & 0xff00) {
+		case PRID_IMP_NETLOGIC_XLP3XX:
+			mask = 0xf;
+			break;
+		case PRID_IMP_NETLOGIC_XLP2XX:
+			mask = 0x3;
+			break;
+		case PRID_IMP_NETLOGIC_XLP8XX:
+			mask = 0xff;
+			break;
+		default:
+			mask = 0xff;
+			break;

   Why not merge the last 2 cases?

+		}

WBR, Sergei



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux