From patchwork Wed Jan 9 15:58:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reza Arbab X-Patchwork-Id: 1022492 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43ZYjF35lnz9sCh for ; Thu, 10 Jan 2019 02:59:29 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43ZYjF1vDczDqXT for ; Thu, 10 Jan 2019 02:59:29 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=arbab@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.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 43ZYhf3tFBzDqXQ for ; Thu, 10 Jan 2019 02:58:58 +1100 (AEDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x09FndRl083561 for ; Wed, 9 Jan 2019 10:58:56 -0500 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0a-001b2d01.pphosted.com with ESMTP id 2pwk8h2qyp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 09 Jan 2019 10:58:55 -0500 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 9 Jan 2019 15:58:55 -0000 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 9 Jan 2019 15:58:53 -0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x09FwqLK16580826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 9 Jan 2019 15:58:52 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 25BAC78064; Wed, 9 Jan 2019 15:58:52 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0847B7805F; Wed, 9 Jan 2019 15:58:51 +0000 (GMT) Received: from arbab-laptop.localdomain (unknown [9.53.179.210]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 9 Jan 2019 15:58:51 +0000 (GMT) Received: by arbab-laptop.localdomain (Postfix, from userid 152845) id 6E106460DA7; Wed, 9 Jan 2019 09:58:51 -0600 (CST) From: Reza Arbab To: skiboot@lists.ozlabs.org Date: Wed, 9 Jan 2019 09:58:45 -0600 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1547049531-759-1-git-send-email-arbab@linux.ibm.com> References: <1547049531-759-1-git-send-email-arbab@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19010915-0036-0000-0000-00000A781466 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010373; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000274; SDB=6.01144035; UDB=6.00595643; IPR=6.00924297; MB=3.00025051; MTD=3.00000008; XFM=3.00000015; UTC=2019-01-09 15:58:54 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19010915-0037-0000-0000-00004A477240 Message-Id: <1547049531-759-3-git-send-email-arbab@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-09_07:, , 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=888 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901090132 Subject: [Skiboot] [PATCH 3/9] npu2: Remove unused npu2::bdf2pe_cache X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Popple , Andrew Donnellan MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This cache is written but never read. Wiring it up would gain us little (except added complexity), and it obviously hasn't been missed thus far, so remove it altogether. Signed-off-by: Reza Arbab Reviewed-by: Andrew Donnellan --- hw/npu2-opencapi.c | 1 - hw/npu2.c | 30 ------------------------------ include/npu2.h | 1 - 3 files changed, 32 deletions(-) diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c index 65f623c..8075d4e 100644 --- a/hw/npu2-opencapi.c +++ b/hw/npu2-opencapi.c @@ -1447,7 +1447,6 @@ static int64_t npu2_opencapi_set_pe(struct phb *phb, reg = NPU2_REG_OFFSET(NPU2_STACK_MISC, NPU2_BLOCK_MISC, NPU2_MISC_BRICK0_BDF2PE_MAP0 + (dev->brick_index * 0x18)); - p->bdf2pe_cache[dev->brick_index] = val; npu2_write(p, reg, val); return OPAL_SUCCESS; diff --git a/hw/npu2.c b/hw/npu2.c index aa8a642..8d5b2f3 100644 --- a/hw/npu2.c +++ b/hw/npu2.c @@ -883,35 +883,6 @@ static void npu2_phb_final_fixup(struct phb *phb) static void npu2_init_ioda_cache(struct npu2 *p) { - uint64_t val[2]; - uint32_t i; - - /* - * PE mapping: there are two sets of registers. One of them - * is used to map PEs for transactions. Another set is used - * for error routing. We should have consistent setting in - * both of them. Note that each brick can support 3 PEs at - * the maximal degree. For now, we just support one PE per - * brick. - */ - val[0] = NPU2_CQ_BRICK_BDF2PE_MAP_ENABLE; - val[0] = SETFIELD(NPU2_CQ_BRICK_BDF2PE_MAP_PE, - val[0], NPU2_RESERVED_PE_NUM); - val[1] = NPU2_MISC_BRICK_BDF2PE_MAP_ENABLE; - val[1] = SETFIELD(NPU2_MISC_BRICK_BDF2PE_MAP_PE, - val[1], NPU2_RESERVED_PE_NUM); - for (i = 0; i < ARRAY_SIZE(p->bdf2pe_cache); i++) { - if (i < ARRAY_SIZE(p->bdf2pe_cache)) - p->bdf2pe_cache[i] = SETFIELD(NPU2_CQ_BRICK_BDF2PE_MAP_BDF, - val[0], i / 3); - else - p->bdf2pe_cache[i] = SETFIELD(NPU2_MISC_BRICK_BDF2PE_MAP_BDF, - val[1], i / 3); - - if (i % 3) - p->bdf2pe_cache[i] = 0ul; - } - /* TVT */ memset(p->tve_cache, 0, sizeof(p->tve_cache)); } @@ -1220,7 +1191,6 @@ static int64_t npu2_set_pe(struct phb *phb, val = SETFIELD(NPU2_MISC_BRICK_BDF2PE_MAP_BDF, val, dev->nvlink.gpu_bdfn); reg = NPU2_REG_OFFSET(NPU2_STACK_MISC, NPU2_BLOCK_MISC, NPU2_MISC_BRICK0_BDF2PE_MAP0 + (dev->brick_index * 0x18)); - p->bdf2pe_cache[dev->brick_index] = val; npu2_write(p, reg, val); return OPAL_SUCCESS; diff --git a/include/npu2.h b/include/npu2.h index 1de963d..af4ff68 100644 --- a/include/npu2.h +++ b/include/npu2.h @@ -165,7 +165,6 @@ struct npu2 { /* IODA cache */ uint64_t lxive_cache[8]; - uint64_t bdf2pe_cache[36]; uint64_t tve_cache[16]; bool tx_zcal_complete[2];