[Pdbg] [PATCH 1/5] main: Define MAX_LINUX_CPUS for convenience

Amitay Isaacs amitay at ozlabs.org
Thu Aug 9 15:19:23 AEST 2018


Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 src/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index fcdab67..48956bb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -68,6 +68,8 @@ static int i2c_addr = 0x50;
 #define MAX_CHIPS 24
 #define MAX_THREADS THREADS_PER_CORE
 
+#define MAX_LINUX_CPUS	(MAX_PROCESSORS * MAX_CHIPS * MAX_THREADS)
+
 static int **processorsel[MAX_PROCESSORS];
 static int *chipsel[MAX_PROCESSORS][MAX_CHIPS];
 static int threadsel[MAX_PROCESSORS][MAX_CHIPS][MAX_THREADS];
@@ -314,7 +316,7 @@ static bool parse_options(int argc, char *argv[])
 	int p_list[MAX_PROCESSORS];
 	int c_list[MAX_CHIPS];
 	int t_list[MAX_THREADS];
-	int l_list[MAX_PROCESSORS * MAX_THREADS * MAX_CHIPS];
+	int l_list[MAX_LINUX_CPUS];
 	int p_count = 0, c_count = 0, t_count = 0, l_count = 0;
 	int i, j, k;
 	struct option long_opts[] = {
-- 
2.17.1



More information about the Pdbg mailing list