From patchwork Wed Aug 26 09:25:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diana Madalina Craciun X-Patchwork-Id: 11737655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29F1C14E5 for ; Wed, 26 Aug 2020 09:27:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED77B20786 for ; Wed, 26 Aug 2020 09:27:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="x+GkBEl5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED77B20786 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=+cfUUm4F1OrETV3ECN47qS0pX7bIr1TfgnedpqLZn70=; b=x+GkBEl5J6/eyy10KZA96Q0Q/P qianr62Fs7hliu2ARzg4FrD4c2AtVm5DNIbOEjCtr0nsg3Psx5xSjl6PRJLHZadhHE0tI6OqVEuUz xDs+VI0yD+O5iQQdGd1bgf/aBfFmAsEcmJNPONCzoV5E1IGBoIdMtjVgmNIhzDiXoaUnq9Ejm06lv GjAoJInNH93pHi5oaRB8697AK2bL3cNLnTXtKi+KSMP+6qq18QLtuDbNSm/bKqllKM76+i+p8DGPD iOwZNesL5VoebdmwuvFI3OGD9fwelIxS046cW2db34NbJcQ4Eis93Y69urmwmPTiubMQLyr3H9PkY oaJDj9pQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kArh7-0005Jn-2J; Wed, 26 Aug 2020 09:26:13 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kArgz-0005Gm-G9 for linux-arm-kernel@lists.infradead.org; Wed, 26 Aug 2020 09:26:09 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 389BC1A08E7; Wed, 26 Aug 2020 11:26:02 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2B7051A16B9; Wed, 26 Aug 2020 11:26:02 +0200 (CEST) Received: from fsr-ub1864-111.ea.freescale.net (fsr-ub1864-111.ea.freescale.net [10.171.82.141]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id CA6A5202CA; Wed, 26 Aug 2020 11:26:01 +0200 (CEST) From: Diana Craciun To: linux-kernel@vger.kernel.org, laurentiu.tudor@nxp.com Subject: [PATCH v4 00/13] bus/fsl-mc: Extend mc-bus driver functionalities in preparation for mc-bus VFIO support Date: Wed, 26 Aug 2020 12:25:14 +0300 Message-Id: <20200826092527.4992-1-diana.craciun@oss.nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200826_052605_674998_A2137A7F X-CRM114-Status: GOOD ( 12.66 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.13 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stuyoder@gmail.com, gregkh@linuxfoundation.org, leoyang.li@nxp.com, bharatb.linux@gmail.com, Diana Craciun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The vfio-mc bus driver needs some additional services to be exported by the mc-bus driver like: - a way to reset the DPRC container - driver_override support - functions to setup/tear down a DPRC - functions for allocating the pool of interrupts. In case of VFIO the interrupts are not configured at probe time, but later by userspace request v3 -> v4 - Rebased on the latest kernel. - Exported a dprc_remove function v2 -> v3 - Add a new version for dprc_get_obj_region - Export the cacheability bus specific bits defines v1 -> v2 - Remove driver_override propagation through various functions - Cache the DPRC API version The patches are related with "vfio/fsl-mc: VFIO support for FSL-MC devices" patches, but the series were split because they are targeting different subsystems. However, the mc-bus patches may suffer changes when addressing the VFIO review comments. The patches do not address the comment regarding moving driver_override in the core code. I prefer not to tie these patches on that change and address that separately. Bharat Bhushan (3): bus/fsl-mc: add support for 'driver_override' in the mc-bus bus/fsl-mc: Add dprc-reset-container support bus/fsl-mc: Extend ICID size from 16bit to 32bit Diana Craciun (10): bus/fsl-mc: Do no longer export the total number of irqs outside dprc_scan_objects bus/fsl-mc: Add a new parameter to dprc_scan_objects function bus/fsl-mc: Set the QMAN/BMAN region flags bus/fsl-mc: Cache the DPRC API version bus/fsl-mc: Export dprc_scan/dprc_remove functions to be used by multiple entities bus/fsl-mc: Export a cleanup function for DPRC bus/fsl-mc: Add a container setup function bus/fsl_mc: Do not rely on caller to provide non NULL mc_io bus/fsl-mc: Export IRQ pool handling functions to be used by VFIO bus/fsl-mc: Add a new version for dprc_get_obj_region command drivers/bus/fsl-mc/dprc-driver.c | 175 ++++++++++++++++---------- drivers/bus/fsl-mc/dprc.c | 141 +++++++++++++++++---- drivers/bus/fsl-mc/fsl-mc-allocator.c | 12 +- drivers/bus/fsl-mc/fsl-mc-bus.c | 64 +++++++++- drivers/bus/fsl-mc/fsl-mc-private.h | 31 ++--- drivers/bus/fsl-mc/mc-io.c | 7 +- include/linux/fsl/mc.h | 41 +++++- 7 files changed, 349 insertions(+), 122 deletions(-) Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor