From patchwork Mon Sep 18 02:25:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 814742 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xwVGt39vVz9rxm for ; Mon, 18 Sep 2017 12:25:42 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xwVGt2KMLzDrTM for ; Mon, 18 Sep 2017 12:25:42 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.vnet.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xwVGk6prdzDrMd for ; Mon, 18 Sep 2017 12:25:34 +1000 (AEST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8I2OpQv128613 for ; Sun, 17 Sep 2017 22:25:31 -0400 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0b-001b2d01.pphosted.com with ESMTP id 2d1mgge86d-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 17 Sep 2017 22:25:31 -0400 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 17 Sep 2017 20:25:30 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 17 Sep 2017 20:25:28 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v8I2PSQM10224110; Sun, 17 Sep 2017 19:25:28 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E968DBE039; Sun, 17 Sep 2017 20:25:27 -0600 (MDT) Received: from birb.localdomain (unknown [9.185.16.148]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id 7CC38BE03E; Sun, 17 Sep 2017 20:25:27 -0600 (MDT) Received: by birb.localdomain (Postfix, from userid 1000) id F37B14F0F8F; Mon, 18 Sep 2017 12:25:23 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Mon, 18 Sep 2017 12:25:23 +1000 X-Mailer: git-send-email 2.13.5 X-TM-AS-GCONF: 00 x-cbid: 17091802-0024-0000-0000-000017354233 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007754; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000229; SDB=6.00918583; UDB=6.00461442; IPR=6.00698809; BA=6.00005593; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017190; XFM=3.00000015; UTC=2017-09-18 02:25:29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17091802-0025-0000-0000-00004CC21097 Message-Id: <20170918022523.16131-1-stewart@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-17_16:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709180034 Subject: [Skiboot] [PATCH] hdat: fix parsing of P8 hdat X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Also fixes hdat_to_dt test cases. Fixes: ad484081ef8a51811e7902aec436fa8f1ca9604a Signed-off-by: Stewart Smith --- hdata/iohub.c | 7 ++----- hdata/test/stubs.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hdata/iohub.c b/hdata/iohub.c index 567ab5971231..4c4178da2d35 100644 --- a/hdata/iohub.c +++ b/hdata/iohub.c @@ -798,8 +798,6 @@ static void io_parse_slots(const void *sp_iohubs, int hub_id) const struct slot_map_entry *entry; unsigned int i, count; - dt_slots = get_slot_node(); - ioslot_arr = HDIF_child_arr(sp_iohubs, CECHUB_CHILD_IOSLOTS); if (!ioslot_arr) return; @@ -808,6 +806,8 @@ static void io_parse_slots(const void *sp_iohubs, int hub_id) if (!count) return; + dt_slots = get_slot_node(); + prlog(PR_DEBUG, "CEC: Found slot map for IOHUB %d\n", hub_id); if (count > 1) prerror("CEC: Multiple IOSLOTs found for IO HUB %d\n", hub_id); @@ -846,9 +846,6 @@ static void io_parse_fru(const void *sp_iohubs) unsigned int size, hub_id; uint32_t chip_id; - if(i > 0) - break; - hub = HDIF_get_iarray_item(sp_iohubs, CECHUB_FRU_IO_HUBS, i, &size); if (!hub || size < CECHUB_IOHUB_MIN_SIZE) { diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c index cb166f97516c..abeb832d2abc 100644 --- a/hdata/test/stubs.c +++ b/hdata/test/stubs.c @@ -97,7 +97,6 @@ STUB(op_display); STUB(fsp_preload_lid); STUB(fsp_wait_lid_loaded); STUB(fsp_adjust_lid_side); -STUB(backtrace); /* Add HW specific stubs here */ static bool true_stub(void) { return true; } @@ -117,4 +116,5 @@ NOOP_STUB(mem_reserve_fw); NOOP_STUB(mem_reserve_hwbuf); NOOP_STUB(add_chip_dev_associativity); NOOP_STUB(enable_mambo_console); +NOOP_STUB(backtrace);