From patchwork Thu Feb 19 10:08:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ananth N Mavinakayanahalli X-Patchwork-Id: 441557 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6086C14009B for ; Thu, 19 Feb 2015 21:07:02 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4A64A1A0CE2 for ; Thu, 19 Feb 2015 21:07:02 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e28smtp03.in.ibm.com (e28smtp03.in.ibm.com [122.248.162.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id C4A041A0C23 for ; Thu, 19 Feb 2015 21:06:59 +1100 (AEDT) Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Feb 2015 15:36:56 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp03.in.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 19 Feb 2015 15:36:53 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 9C66DE0044 for ; Thu, 19 Feb 2015 15:38:34 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1JA6q8U65470670 for ; Thu, 19 Feb 2015 15:36:53 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1JA6qYi001645 for ; Thu, 19 Feb 2015 15:36:52 +0530 Received: from thinktux.in.ibm.com ([9.77.198.74]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t1JA6qWY001613 for ; Thu, 19 Feb 2015 15:36:52 +0530 To: skiboot@lists.ozlabs.org From: Ananth N Mavinakayanahalli Date: Thu, 19 Feb 2015 15:38:11 +0530 Message-ID: <20150219100811.23431.63894.stgit@thinktux.in.ibm.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15021910-0009-0000-0000-000004052AC9 Subject: [Skiboot] [PATCH 1/3] hostservices: Fix lid load X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Fix the loop iterator to not miss a lid Signed-off-by: Ananth N Mavinakayanahalli --- core/hostservices.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/hostservices.c b/core/hostservices.c index ad19e15..1c41a95 100644 --- a/core/hostservices.c +++ b/core/hostservices.c @@ -452,6 +452,7 @@ void hservices_lid_preload(void) { const uint32_t *lid_list = NULL; size_t num_lids; + int i; if (!hservice_runtime) return; @@ -465,8 +466,8 @@ void hservices_lid_preload(void) prlog(PR_INFO, "HBRT: %d lids to load\n", (int)num_lids); /* Currently HBRT needs only one (OCC) lid */ - while (num_lids--) - __hservice_lid_preload(lid_list[num_lids]); + for (i = 0; i < num_lids; i++) + __hservice_lid_preload(lid_list[i]); } static int hservice_lid_load(uint32_t lid, void **buf, size_t *len)