From patchwork Fri Sep 7 05:16:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 967200 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 ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4265Ks73xWz9s4s for ; Fri, 7 Sep 2018 15:17:37 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from lists.ozlabs.org (unknown [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4265Ks5rKCzF3Sp for ; Fri, 7 Sep 2018 15:17:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 4265KY2Bs4zF3SN for ; Fri, 7 Sep 2018 15:17:20 +1000 (AEST) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w875F9iP097597 for ; Fri, 7 Sep 2018 01:17:19 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mbhbeu599-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 07 Sep 2018 01:17:18 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Sep 2018 06:17:16 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 7 Sep 2018 06:17:14 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w875HDFp61604046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 7 Sep 2018 05:17:13 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE8FD4C050; Fri, 7 Sep 2018 08:17:07 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E40D4C046; Fri, 7 Sep 2018 08:17:06 +0100 (BST) Received: from hegdevasant.in.ibm.com (unknown [9.109.198.233]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 7 Sep 2018 08:17:06 +0100 (BST) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Fri, 7 Sep 2018 10:46:55 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180907051655.5812-1-hegdevasant@linux.vnet.ibm.com> References: <20180907051655.5812-1-hegdevasant@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18090705-0020-0000-0000-000002C28793 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090705-0021-0000-0000-0000210FC1E5 Message-Id: <20180907051655.5812-2-hegdevasant@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-09-07_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=870 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809070053 Subject: [Skiboot] [PATCH v3 2/2] hdata: Make sure reserved node name starts with "ibm, " X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.27 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" HDAT does not provide consistent label format for reserved memory label. Few starts with "ibm," while few other starts with component name. Lets make sure all the reserved node name starts with "ibm,". Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Vasant Hegde --- hdata/memory.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hdata/memory.c b/hdata/memory.c index d9c9ddda9..e7566ef5a 100644 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -565,6 +565,8 @@ static struct dt_node *dt_hb_reserves; static struct dt_node *add_hb_reserve_node(const char *name, u64 start, u64 end) { + /* label size + "ibm," + NULL */ + char node_name[HB_RESERVE_MEM_LABEL_SIZE + 5] = { 0 }; struct dt_node *node, *hb; if (!dt_hb_reserves) { @@ -578,10 +580,15 @@ static struct dt_node *add_hb_reserve_node(const char *name, u64 start, u64 end) dt_add_property_cells(dt_hb_reserves, "#address-cells", 2); } - node = dt_new_addr(dt_hb_reserves, name, start); + /* Add "ibm," to reserved node name */ + if (strncasecmp(name, "ibm", 3)) + snprintf(node_name, 5, "ibm,"); + strcat(node_name, name); + + node = dt_new_addr(dt_hb_reserves, node_name, start); if (!node) { prerror("Unable to create node for %s@%llx\n", - name, (unsigned long long) start); + node_name, (unsigned long long) start); return NULL; }