From patchwork Thu Aug 9 05:19:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 955349 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41mGlg0lSSz9s1c for ; Thu, 9 Aug 2018 15:19:43 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gxU/hVmc"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41mGlf3m1kzDr5t for ; Thu, 9 Aug 2018 15:19:42 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gxU/hVmc"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41mGlV4zslzDqCD for ; Thu, 9 Aug 2018 15:19:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gxU/hVmc"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 41mGlV2Ds6z9s4Z; Thu, 9 Aug 2018 15:19:34 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1533791974; bh=JhNnOMz0DGZGPSmIYYxcYS3Sb8RKkUGSD/wRNosZZn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gxU/hVmcPwRIJYgKJ038S2c+e09dqnsI5hceGlz5ZTHxN0y3lQ+1ej1aBSe9IaZ2g jNC0Ifu1wyiYlFd27KGJTt/5jKmfjw07S60sMaoOsA0aMR/s+NyFTUGJOPzmM/ti9B vrt/1c8ODRLZMhqznpEKo+2U24qY4HGKxo0Jdz5NprRTaD/3zPLtSZnkiO+o07zUmB +nfNvk4eY8yjm49vgSnQoEHmr58URJyQvIJPXXHJ2V41temJmu+2L779vYU/4wGP6b Zg8dcOQVDbEzR+H/lYOSiPhW/XbXM5FLBoIkV4/7bI2XY2uhCTlEwZlJoqEKYI4IKI hp6bBNQbRFi5A== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 9 Aug 2018 15:19:23 +1000 Message-Id: <20180809051927.243483-2-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180809051927.243483-1-amitay@ozlabs.org> References: <20180809051927.243483-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH 1/5] main: Define MAX_LINUX_CPUS for convenience X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- 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[] = {