diff mbox series

[1/5] main: Define MAX_LINUX_CPUS for convenience

Message ID 20180809051927.243483-2-amitay@ozlabs.org
State Accepted
Headers show
Series Fix target selection (yet again) | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master

Commit Message

Amitay Isaacs Aug. 9, 2018, 5:19 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 src/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

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[] = {