From patchwork Thu Apr 5 14:05:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Bergheaud X-Patchwork-Id: 895404 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40H4Np2036z9rx7 for ; Fri, 6 Apr 2018 00:05:46 +1000 (AEST) 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 40H4Nn72ykzF1sj for ; Fri, 6 Apr 2018 00:05:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com 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=felix@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 40H4Nb0gpwzF1bH for ; Fri, 6 Apr 2018 00:05:32 +1000 (AEST) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w35E365u062973 for ; Thu, 5 Apr 2018 10:05:29 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h5khqwcrq-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 05 Apr 2018 10:05:29 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Apr 2018 15:05:25 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 5 Apr 2018 15:05:24 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w35E5N1R13828598; Thu, 5 Apr 2018 14:05:23 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 412EEAE056; Thu, 5 Apr 2018 14:55:28 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2EA62AE045; Thu, 5 Apr 2018 14:55:28 +0100 (BST) Received: from smtp.lab.toulouse-stg.fr.ibm.com (unknown [9.101.4.1]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 5 Apr 2018 14:55:28 +0100 (BST) Received: from w541.lab.toulouse-stg.fr.ibm.com (t42p.lab.toulouse-stg.fr.ibm.com [9.101.4.37]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id 3D60E220089; Thu, 5 Apr 2018 16:05:23 +0200 (CEST) From: Philippe Bergheaud To: skiboot@lists.ozlabs.org Date: Thu, 5 Apr 2018 16:05:15 +0200 X-Mailer: git-send-email 2.16.2 X-TM-AS-GCONF: 00 x-cbid: 18040514-0020-0000-0000-0000040E73B7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040514-0021-0000-0000-000042A287CE Message-Id: <20180405140515.5025-1-felix@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-04-05_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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804050148 Subject: [Skiboot] [PATCH] phb4: set TVT1 for tunneled operations in capi mode X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: clombard@linux.ibm.com, benh@au1.ibm.com MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Philippe Bergheaud --- hw/phb4.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/hw/phb4.c b/hw/phb4.c index 7ef6f3d4..df76d96a 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -150,11 +150,6 @@ static bool pci_tracing; static bool pci_eeh_mmio; static bool pci_retry_all; -enum capi_dma_tvt { - CAPI_DMA_TVT0, - CAPI_DMA_TVT1, -}; - /* Note: The "ASB" name is historical, practically this means access via * the XSCOM backdoor */ @@ -3825,7 +3820,6 @@ static void phb4_init_capp_errors(struct phb4 *p) * = 000000C0 for Stack2 */ static int64_t enable_capi_mode(struct phb4 *p, uint64_t pe_number, - enum capi_dma_tvt dma_tvt, uint32_t capp_eng) { uint64_t reg, start_addr, end_addr, stq_eng, dma_eng; @@ -3944,13 +3938,11 @@ static int64_t enable_capi_mode(struct phb4 *p, uint64_t pe_number, p->tve_cache[pe_number * 2] = tve_encode_50b_noxlate(start_addr, end_addr); - /* TVT#1: DMA, all memory, in bypass mode */ - if (dma_tvt == CAPI_DMA_TVT1) { - start_addr = (1ull << 59); - end_addr = start_addr + 0x0003ffffffffffffull; - p->tve_cache[pe_number * 2 + 1] = - tve_encode_50b_noxlate(start_addr, end_addr); - } + /* TVT#1: CAPI window + DMA, all memory, in bypass mode */ + start_addr = (1ull << 59); + end_addr = start_addr + 0x0003ffffffffffffull; + p->tve_cache[pe_number * 2 + 1] = + tve_encode_50b_noxlate(start_addr, end_addr); phb4_ioda_sel(p, IODA3_TBL_TVT, 0, true); for (i = 0; i < p->tvt_size; i++) @@ -4038,13 +4030,13 @@ static int64_t phb4_set_capi_mode(struct phb *phb, uint64_t mode, switch (mode) { case OPAL_PHB_CAPI_MODE_CAPI: - ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT0, + ret = enable_capi_mode(p, pe_number, CAPP_MAX_STQ_ENGINES | CAPP_MIN_DMA_READ_ENGINES); disable_fast_reboot("CAPP being enabled"); break; case OPAL_PHB_CAPI_MODE_DMA_TVT1: - ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT1, + ret = enable_capi_mode(p, pe_number, CAPP_MIN_STQ_ENGINES | CAPP_MAX_DMA_READ_ENGINES); disable_fast_reboot("CAPP being enabled");