From patchwork Thu Aug 9 05:19:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 955350 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 41mGlk1Kpzz9s1c for ; Thu, 9 Aug 2018 15:19:46 +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="vjiGx47n"; 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 41mGlj6WpQzDqxs for ; Thu, 9 Aug 2018 15:19:45 +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="vjiGx47n"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41mGlW32DszDqCF for ; Thu, 9 Aug 2018 15:19:35 +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="vjiGx47n"; 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 41mGlV4kMsz9s4c; 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=juG7kWwv2puyWc3HzbD6APTrwSinaXZnhFFWQKn2PCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vjiGx47nK6/hkBNmWZ7QF3L6FlXcTXnt5CrDTh7tPoEiURq78TPnVmbXm4QPSHxYz sYS69q4N9tdvBV8HHNmB8n72DPGmX183O9IoJdFeOamhKR90dQ3e/q3yXfU0lF3d4z QYy4JY/ctiKonw0uvZwwgbEv3+8mqme48sPJCa7QcowhhfkKB6NAjOlfh+3UOgYQAw P2GX3WezFq5tzKGQzlHdCbOAkW4QPViVaa8hQ7Y/L1s4Ky/KWXMBnltwbiPUbl9j4E cOZqETIIwi7hmGAcE0qpjVh8IlNvBX+Twcjltlp3f37A0PjVBatWix7IOvoFi0Nvbp 6wJHkjyfjHdPA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 9 Aug 2018 15:19:24 +1000 Message-Id: <20180809051927.243483-3-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 2/5] main: Use the correct length of linux cpu list 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, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 48956bb..cfb01a8 100644 --- a/src/main.c +++ b/src/main.c @@ -391,7 +391,7 @@ static bool parse_options(int argc, char *argv[]) break; case 'l': - if (!parse_list(optarg, MAX_PROCESSORS, l_list, &l_count)) { + if (!parse_list(optarg, MAX_LINUX_CPUS, l_list, &l_count)) { fprintf(stderr, "Failed to parse '-l %s'\n", optarg); opt_error = true; } @@ -491,7 +491,7 @@ static bool parse_options(int argc, char *argv[]) if (l_count) { int pir = -1, i, chip, core, thread; - for (i = 0; i < MAX_PROCESSORS; i++) { + for (i = 0; i < MAX_LINUX_CPUS; i++) { if (l_list[i] == 1) { pir = get_pir(i); if (pir < 0)