Received: by 10.223.164.202 with SMTP id h10csp1020466wrb; Tue, 7 Nov 2017 19:58:48 -0800 (PST) X-Google-Smtp-Source: ABhQp+TT168YuvTMHZtmVS2GnX0+0dMoeVXkcybRmbHZq+38YcXpv0iXk9We9kCqdDTZgZ7/q6R6 X-Received: by 10.159.218.142 with SMTP id w14mr949208plp.310.1510113528854; Tue, 07 Nov 2017 19:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510113528; cv=none; d=google.com; s=arc-20160816; b=pdAvmaZUG8+N+oYAFXPg2/NjcFLOrv48JLVp8obRgJnozVqk2rHrL3bRLY1mEt5HFS 9UemkNj3eMThym2ZfxpD852tQaqdnczalolD1ZR8f3OivYEuETbOr3E4mGDuQRQn7pVw pNRXOk4y5In6dR7ylS6+oBOIWXBSuIPtRsV3y3l9T7ENfoP7G0e9Ht1Up++81fSbBsr7 mtH+FsQQu/3WqzXdw43mQPweygTN0gvDtr0drziaapmwCvJ3hkRj9SudN7yP48H4UmcB 6wOAS2n1pQklw90dqyrNJxXxhZdkQQzmq5loVjEHk00gX+HxU56qnn3GnvRShq6hAQjM Q0yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=mYrmjQasNr9mGDiLOOYfLGDpmz8VmIM5ETq5ekWzICk=; b=bUbt7w89k/31opU6kP7b5GCrQeidjksNhoxVz+yF4Xz/Ghdv0vs3hwb1mvIn8HD/E1 KPAE18OpNyW1gIepPDj9PS4rJPp/PiuRAGgPT6hJ4qzEiNrY4FRmw6WND5onERs8l3xo W7VU5TnpLpRGwJUdmVGwNgc2VIYePNDL8XCOQNu9m8xq2AsSuob5N2bu1LX3vYgQy/zw fune14rwXkXX2dkC2gXAR5pOyF/5GxmSeuiLIway52ZQZQq3n56A43NHOabSkxRKmdM6 jGgEiOgk8Xkf65DguTOFeaeZv1ouRYKDFN2hiz++28SqZX+f/y1Ht9Ydr4xtmPjefKPT FnEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si2442552plt.757.2017.11.07.19.58.36; Tue, 07 Nov 2017 19:58:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753976AbdKHC1G (ORCPT + 90 others); Tue, 7 Nov 2017 21:27:06 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49022 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753057AbdKHCYO (ORCPT ); Tue, 7 Nov 2017 21:24:14 -0500 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 vA82O66o194118 for ; Tue, 7 Nov 2017 21:24:14 -0500 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0b-001b2d01.pphosted.com with ESMTP id 2e3m26n06v-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 07 Nov 2017 21:24:13 -0500 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Nov 2017 19:24:13 -0700 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 7 Nov 2017 19:24:10 -0700 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA82OAlZ52690994; Tue, 7 Nov 2017 19:24:10 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 636A96A03B; Tue, 7 Nov 2017 19:24:10 -0700 (MST) Received: from suka-w540.usor.ibm.com (unknown [9.70.94.25]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id E51F86A043; Tue, 7 Nov 2017 19:24:09 -0700 (MST) From: Sukadev Bhattiprolu To: Michael Ellerman Cc: Benjamin Herrenschmidt , mikey@neuling.org, hbabu@us.ibm.com, nicholas.piggin@gmail.com, linuxppc-dev@ozlabs.org, Subject: [PATCH v3 07/18] powerpc/vas: Save configured window credits Date: Tue, 7 Nov 2017 18:23:47 -0800 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510107838-15181-1-git-send-email-sukadev@linux.vnet.ibm.com> References: <1510107838-15181-1-git-send-email-sukadev@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17110802-0012-0000-0000-00001542ABF8 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008029; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00942691; UDB=6.00475552; IPR=6.00722979; BA=6.00005677; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017903; XFM=3.00000015; UTC=2017-11-08 02:24:12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110802-0013-0000-0000-0000502E302C Message-Id: <1510107838-15181-8-git-send-email-sukadev@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-07_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711080027 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Save the configured max window credits for a window in the vas_window structure. We will need this when polling for return of window credits. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 6 ++++-- arch/powerpc/platforms/powernv/vas.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c index 1422cdd..a59a187 100644 --- a/arch/powerpc/platforms/powernv/vas-window.c +++ b/arch/powerpc/platforms/powernv/vas-window.c @@ -674,7 +674,7 @@ static void init_winctx_for_rxwin(struct vas_window *rxwin, winctx->rx_fifo = rxattr->rx_fifo; winctx->rx_fifo_size = rxattr->rx_fifo_size; - winctx->wcreds_max = rxattr->wcreds_max ?: VAS_WCREDS_DEFAULT; + winctx->wcreds_max = rxwin->wcreds_max; winctx->pin_win = rxattr->pin_win; winctx->nx_win = rxattr->nx_win; @@ -844,6 +844,7 @@ struct vas_window *vas_rx_win_open(int vasid, enum vas_cop_type cop, rxwin->nx_win = rxattr->nx_win; rxwin->user_win = rxattr->user_win; rxwin->cop = cop; + rxwin->wcreds_max = rxattr->wcreds_max ?: VAS_WCREDS_DEFAULT; if (rxattr->user_win) rxwin->pid = task_pid_vnr(current); @@ -893,7 +894,7 @@ static void init_winctx_for_txwin(struct vas_window *txwin, */ memset(winctx, 0, sizeof(struct vas_winctx)); - winctx->wcreds_max = txattr->wcreds_max ?: VAS_WCREDS_DEFAULT; + winctx->wcreds_max = txwin->wcreds_max; winctx->user_win = txattr->user_win; winctx->nx_win = txwin->rxwin->nx_win; @@ -978,6 +979,7 @@ struct vas_window *vas_tx_win_open(int vasid, enum vas_cop_type cop, txwin->nx_win = txwin->rxwin->nx_win; txwin->pid = attr->pid; txwin->user_win = attr->user_win; + txwin->wcreds_max = attr->wcreds_max ?: VAS_WCREDS_DEFAULT; init_winctx_for_txwin(txwin, attr, &winctx); diff --git a/arch/powerpc/platforms/powernv/vas.h b/arch/powerpc/platforms/powernv/vas.h index 63e8e03..02d8a31 100644 --- a/arch/powerpc/platforms/powernv/vas.h +++ b/arch/powerpc/platforms/powernv/vas.h @@ -332,6 +332,7 @@ struct vas_window { void *hvwc_map; /* HV window context */ void *uwc_map; /* OS/User window context */ pid_t pid; /* Linux process id of owner */ + int wcreds_max; /* Window credits */ /* Fields applicable only to send windows */ void *paste_kaddr; -- 2.7.4 From 1583465273616531366@xxx Wed Nov 08 03:02:42 +0000 2017 X-GM-THRID: 1583465273616531366 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread