From patchwork Mon Feb 26 22:18:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uma Krishnan X-Patchwork-Id: 878172 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@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 3zqxGk6kznz9s1l for ; Tue, 27 Feb 2018 09:25:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zqxGk3ZX3zDqm5 for ; Tue, 27 Feb 2018 09:25:18 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=ukrishn@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 (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 3zqx7k6bXxzDqG5 for ; Tue, 27 Feb 2018 09:19:14 +1100 (AEDT) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1QMJANA066168 for ; Mon, 26 Feb 2018 17:19:11 -0500 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gctgch2kt-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 26 Feb 2018 17:19:11 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Feb 2018 15:19:02 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 26 Feb 2018 15:19:00 -0700 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1QMIxkV14221634; Mon, 26 Feb 2018 15:18:59 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F8916A041; Mon, 26 Feb 2018 15:18:59 -0700 (MST) Received: from p8tul1-build.aus.stglabs.ibm.com (unknown [9.3.141.206]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id 0DEAE6A042; Mon, 26 Feb 2018 15:18:58 -0700 (MST) From: Uma Krishnan To: linux-scsi@vger.kernel.org, James Bottomley , "Martin K. Petersen" , "Matthew R. Ochs" , "Manoj N. Kumar" Subject: [PATCH v2 00/38] cxlflash: OCXL transport support Date: Mon, 26 Feb 2018 16:18:33 -0600 X-Mailer: git-send-email 2.1.0 X-TM-AS-GCONF: 00 x-cbid: 18022622-0024-0000-0000-000017FFAED5 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008601; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.00995538; UDB=6.00506038; IPR=6.00774867; MB=3.00019751; MTD=3.00000008; XFM=3.00000015; UTC=2018-02-26 22:19:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022622-0025-0000-0000-00004EE30829 Message-Id: <1519683513-16731-1-git-send-email-ukrishn@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-26_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-1709140000 definitions=main-1802260280 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, Frederic Barrat , Andrew Donnellan , Christophe Lombard Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This patch series adds OCXL support to the cxlflash driver. With this support, new devices using the OCXL transport will be supported by the cxlflash driver along with the existing CXL devices. An effort is made to keep this transport specific function independent of the existing core driver that communicates with the AFU. The first three patches contain a minor fix and staging improvements. This series is intended for 4.17 and is bisectable. v2 Changes: - Replaced OpenCXL with OCXL in the commit messages and comments Matthew R. Ochs (1): cxlflash: Avoid clobbering context control register value Uma Krishnan (37): cxlflash: Preserve number of interrupts for master contexts cxlflash: Add argument identifier names cxlflash: Introduce OCXL backend cxlflash: Hardware AFU for OCXL cxlflash: Read host function configuration cxlflash: Setup function acTag range cxlflash: Read host AFU configuration cxlflash: Setup AFU acTag range cxlflash: Setup AFU PASID cxlflash: Adapter context support for OCXL cxlflash: Use IDR to manage adapter contexts cxlflash: Support adapter file descriptors for OCXL cxlflash: Support adapter context discovery cxlflash: Support image reload policy modification cxlflash: MMIO map the AFU cxlflash: Support starting an adapter context cxlflash: Support process specific mappings cxlflash: Support AFU state toggling cxlflash: Support reading adapter VPD data cxlflash: Setup function OCXL link cxlflash: Setup OCXL transaction layer cxlflash: Support process element lifecycle cxlflash: Support AFU interrupt management cxlflash: Support AFU interrupt mapping and registration cxlflash: Support starting user contexts cxlflash: Support adapter context polling cxlflash: Support adapter context reading cxlflash: Support adapter context mmap and release cxlflash: Support file descriptor mapping cxlflash: Introduce object handle fop cxlflash: Setup LISNs for user contexts cxlflash: Setup LISNs for master contexts cxlflash: Update synchronous interrupt status bits cxlflash: Introduce OCXL context state machine cxlflash: Register for translation errors cxlflash: Support AFU reset cxlflash: Enable OCXL operations drivers/scsi/cxlflash/Kconfig | 2 +- drivers/scsi/cxlflash/Makefile | 2 +- drivers/scsi/cxlflash/backend.h | 50 +- drivers/scsi/cxlflash/common.h | 10 +- drivers/scsi/cxlflash/cxl_hw.c | 13 + drivers/scsi/cxlflash/main.c | 55 +- drivers/scsi/cxlflash/main.h | 1 + drivers/scsi/cxlflash/ocxl_hw.c | 1428 +++++++++++++++++++++++++++++++++++++ drivers/scsi/cxlflash/ocxl_hw.h | 76 ++ drivers/scsi/cxlflash/sislite.h | 41 +- drivers/scsi/cxlflash/superpipe.c | 14 + 11 files changed, 1644 insertions(+), 48 deletions(-) create mode 100644 drivers/scsi/cxlflash/ocxl_hw.c create mode 100644 drivers/scsi/cxlflash/ocxl_hw.h