[Cbe-oss-dev] [PATCH 01/23]MARS/base: usable spe count

Yuji Mano yuji.mano at am.sony.com
Sat Mar 14 12:18:00 EST 2009


From: Kazunori Asayama <asayama at sm.sony.co.jp>

Use number of usable SPEs instead of number of physical SPEs

This patch modifies the mars_mpu_max() function so it uses # of usable
SPEs instead of # of physical SPEs in order to avoid allocating system
SPEs or NOSCHED SPEs to MARS.

Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>
---
 base/src/host/lib/mpu_cell.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/base/src/host/lib/mpu_cell.c
===================================================================
--- a/base/src/host/lib/mpu_cell.c	2009-02-18 14:19:34.000000000 +0900
+++ b/base/src/host/lib/mpu_cell.c	2009-02-19 12:59:34.000000000 +0900
@@ -64,7 +64,7 @@ static int numa_mpu_max(void)
 			 * each node number is identical
 			 * between numa API and libspe.
 			 */
-			ret = spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, i);
+			ret = spe_cpu_info_get(SPE_COUNT_USABLE_SPES, i);
 			if (ret < 0) {
 				num = ret;
 				break;
@@ -94,7 +94,7 @@ int mars_mpu_max(int *num)
 	if (mars_numa_enabled())
 		*num = numa_mpu_max();
 	else
-		*num = spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, -1);
+		*num = spe_cpu_info_get(SPE_COUNT_USABLE_SPES, -1);
 
 	if (*num <= 0)
 		return MARS_ERROR_INTERNAL;






More information about the cbe-oss-dev mailing list