Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp383276pxf; Wed, 10 Mar 2021 08:12:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4XKUTxXmxH0lA96hcZFopNIE7IMLzImfOMUalDWxuNPCh85KIwb9AqVqERD6eUDHUYk6K X-Received: by 2002:a05:6402:549:: with SMTP id i9mr4246022edx.379.1615392741627; Wed, 10 Mar 2021 08:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615392741; cv=none; d=google.com; s=arc-20160816; b=V61emkp6txEgvuG+YGWYgBX+9gO0Wi7cVD0EwEogb4WWr+6xsSnRoHqC0NJJ89EEO4 /+IM4ZzlTCjTG8MgL6stV6szw66y7BIRkefKZv7sEWuRhXO0OmLRfzCN/kak9IUpFMLJ wniKcRPLtI5ByrWuY4hd/5Dm93Ti5BgrDQPiOVqWvDLnBasZ8LldkOnnqcD/xJHfWhK1 qyAI0UxcxFVPvO6Fcs6FE1JRBMrKDTKFBC4ZEvZOBWXf2OIejhe1zCepWilzGamolnJk wd5twRiLfPprwQXuyVU0xA07Zc45JwAz24hl7j8Vkzn1zGLE/cu/qnup1MFQ6aHD00QS /KKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=Uaw2AhSFxM9oBV3jzN5LoozupiwUAtWEp62rFJomdbs=; b=iP3oXBcGAeeMAXAruatE+y/OgSWzPqaxYh26Hby4BkOeskS9dtLUqQx0OPNRob67VK yU3zYqPPnqJ4CPk85NNDmV9jhO4w39P6GOd+L5Rpkv/hXAWmJ6y6N+AppYN97Pmb11ph 5vGuW+zcmsdQIOywv/bmVCRVhdKiWWb47EI/uD+pnAHP/hmmX753TYg3LNL+i5/rhKYF wdMR4WtvNQ7kmCnLmND6dATiMpY3yPgR3HrnWaZwXu9VdAcS3u1jGKufJ1lPz3n6btSm Br5gG0GNKdd1V9LAjYBpP297qFp7b21uXklDwKZ0hRBB+3IOcNuS5f53H9svVgynKy17 gfRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="edKji/Yp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si11438757edj.230.2021.03.10.08.11.57; Wed, 10 Mar 2021 08:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="edKji/Yp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232330AbhCJQK7 (ORCPT + 99 others); Wed, 10 Mar 2021 11:10:59 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:51386 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233214AbhCJQKe (ORCPT ); Wed, 10 Mar 2021 11:10:34 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12AG9x4b127769; Wed, 10 Mar 2021 10:09:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1615392599; bh=Uaw2AhSFxM9oBV3jzN5LoozupiwUAtWEp62rFJomdbs=; h=From:To:CC:Subject:Date; b=edKji/Ypjl6R/GH86U7ToJnG27nz5QAOc8ejtMGf6CqAdPPGuMUEemeGoBPiXDJFN Iryf70ViYg3/+pQ/R+lEpZgd5IWLGoGnxfZNTKpWgWI/hesV4MqwWcuW2ZLJo0CvzU 0ItSAh9rZOHGCoQG6YpQUYDocrSSeF36asJLCuY4= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12AG9x0F003935 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Mar 2021 10:09:59 -0600 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 10 Mar 2021 10:09:59 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Wed, 10 Mar 2021 10:09:59 -0600 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12AG9qkr100440; Wed, 10 Mar 2021 10:09:52 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Bjorn Helgaas , Jonathan Corbet , Rob Herring , Arnd Bergmann , Tom Joseph , Jingoo Han , Gustavo Pimentel , Marek Vasut , Yoshihiro Shimoda , Shawn Lin , Heiko Stuebner , Nadeem Athani CC: Greg Kroah-Hartman , , , , , , , , Lokesh Vutla Subject: [PATCH v4 0/7] Add SR-IOV support in PCIe Endpoint Core Date: Wed, 10 Mar 2021 21:39:36 +0530 Message-ID: <20210310160943.7606-1-kishon@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Patch series *) Adds support to add virtual functions to enable endpoint controller which supports SR-IOV capability *) Add support in Cadence endpoint driver to configure virtual functions *) Enable pci_endpoint_test driver to create pci_device for virtual functions v1 of the patch series can be found at [1] v2 of the patch series can be found at [2] v3 of the patch series can be found at [3] Here both physical functions and virtual functions use the same pci_endpoint_test driver and existing pcitest utility can be used to test virtual functions as well. Changes from v3: *) Fixed Rob's comment and added his Reviewed-by as suggested by him. Changes from v2: *) Fixed DT binding documentation comment by Rob *) Fixed the error check in pci-epc-core.c Changes from v1: *) Re-based and Re-worked to latest kernel 5.10.0-rc2+ (now has generic binding for EP) [1] -> http://lore.kernel.org/r/20191231113534.30405-1-kishon@ti.com [2] -> http://lore.kernel.org/r/20201112175358.2653-1-kishon@ti.com [3] -> https://lore.kernel.org/r/20210305050410.9201-1-kishon@ti.com Kishon Vijay Abraham I (7): dt-bindings: PCI: pci-ep: Add binding to specify virtual function PCI: endpoint: Add support to add virtual function in endpoint core PCI: endpoint: Add support to link a physical function to a virtual function PCI: endpoint: Add virtual function number in pci_epc ops PCI: cadence: Add support to configure virtual functions misc: pci_endpoint_test: Populate sriov_configure ops to configure SR-IOV device Documentation: PCI: endpoint/pci-endpoint-cfs: Guide to use SR-IOV .../PCI/endpoint/pci-endpoint-cfs.rst | 12 +- .../devicetree/bindings/pci/pci-ep.yaml | 7 + drivers/misc/pci_endpoint_test.c | 1 + .../pci/controller/cadence/pcie-cadence-ep.c | 251 +++++++++++++++--- drivers/pci/controller/cadence/pcie-cadence.h | 7 + .../pci/controller/dwc/pcie-designware-ep.c | 36 +-- drivers/pci/controller/pcie-rcar-ep.c | 19 +- drivers/pci/controller/pcie-rockchip-ep.c | 18 +- drivers/pci/endpoint/functions/pci-epf-ntb.c | 79 +++--- drivers/pci/endpoint/functions/pci-epf-test.c | 66 +++-- drivers/pci/endpoint/pci-ep-cfs.c | 24 ++ drivers/pci/endpoint/pci-epc-core.c | 130 ++++++--- drivers/pci/endpoint/pci-epf-core.c | 144 +++++++++- include/linux/pci-epc.h | 57 ++-- include/linux/pci-epf.h | 16 +- 15 files changed, 664 insertions(+), 203 deletions(-) -- 2.17.1