From patchwork Fri Apr 4 19:01:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 878340 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2043.outbound.protection.outlook.com [40.107.20.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 300C5221F11; Fri, 4 Apr 2025 19:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743793355; cv=fail; b=DNrhkQIpp9EJyiHjq5BLvPsAo/2R2IrDEXDsSG62b5o3cQG6aXjRfqdnZHnalORwyUzuHDntThz3GB6BtEYbbndiBmFsdDmppfehIoYinvZxEc+TdfKkCPgPupDLlvVfkSI0/HgxgY/pMsbNGZuaSLDAIPlKG859JITukfuaBDI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743793355; c=relaxed/simple; bh=Mp2cXn9FsMWsG/hvucQeIBBPPQdjWFLzH+Ukbq7aPzU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=dqhweBMbTFHp6R7rlTPSduU45ff0++SPt0bFCLSXkJXIdLe1gMYlgGdCiNZMMUGc94zKQaOKxf9WT1SjHl+aDXsz+pehKdGO1BDodlg0HY+hpwLtFfeYd9atKibTifTGF79aMnTDdB+O8uFkoe/pLHrbxY8mUxV8N8RomH3iP7E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Ppg5M3Cd; arc=fail smtp.client-ip=40.107.20.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Ppg5M3Cd" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qxSPQf8CfxrVtLSuhwEM2KN8edjioIRFg05ByUrO7C5En1AFs0AbYEuH2TRXPpplXETcAjHcQDVbGLYaexNcafB9pjsnlEgEqqMlnCks1aUw0zyC4dDyyBw4UBJKSGg8Y3WzhEY3tMV8COkvCvMIwnL5y3o4ghJXsKK1OHNTkW9zmPFIgEFFtpi6KAmqwQsIsRpzYqmPDgAlsxwyTvjLhYeVaWEcDAdN8Qn7UK3BWdm1EkbTZpDX2A4U8qneNwI2V/Gjvq1FFYDDWRLw9YF8URe3T+UcKEX+glhQLyWtEuaCrFxgVyJ8okUZA/dudvgK88faUt/iPNzmLKRvQhhUxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=u+qwraQmG61cZxMtmXO5VrRkCys/e7X2Bx0RuL0d/hk=; b=E55h7UqfP8yZFBWyYZVvVi6yU6uhb8EsOMK7BwZ7ZEyVLepU5+HNpjqcpf+fyg+ltetgP18AFwxxlwwMjarxdps1bNEmLf047QumZoLvxpJLm47LVt2KZ6T6a4lD/y1g9Pq7WsQfYqEljwmxXQPu2m8vCs45Bvgo7zjIFFWZd5qEla4z46TD1d8pt6Axxwe5mxjJ4YeFDFX+Mqqa+KqGNFQqbsTdIrvF33GKh+ZfWuY6xu60pQxjE55L1ZWL1yl3q4Cx0bcNVnQE+B64f4GmJLRQ5ZiZfLCxaofOo3GLWtJwgOelYiEWKmesGCIV6mqUfoFUGHcDIixglmFqP77hBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u+qwraQmG61cZxMtmXO5VrRkCys/e7X2Bx0RuL0d/hk=; b=Ppg5M3CdH5Ayjoo2uUHGE5wrrvJBrk9jOLEVT5ZM85AyKoKM7YHg5yqmWxkJkL9u3e2WPD4t0eMC/ySBI0DOa4Xx6OewEE8FS1AEr3y1ZTnxNR+CD+AJs+WtThKaXp4VU/ZBVVzwCvfyDecqz0y10utZAX/XdSoCWEVmnEOed8zK/yVNey6N+ejQWgylqH8D1AWTcEMQ1UbiN/sT8tcfwxYaBgWH+gEAiiZ/gxPR/1UFz6sG71h6Y6Co//2x2LzGWl3xCXUw8UFHHX9bkcgdPz1j84YHDFkRFDX7e4TO55+5Pomcsf/xZrRhyrmEGFWWceg0OX0Or3uu3fvy+7b5Ig== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by VI1PR04MB6957.eurprd04.prod.outlook.com (2603:10a6:803:135::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.49; Fri, 4 Apr 2025 19:02:30 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.8534.048; Fri, 4 Apr 2025 19:02:30 +0000 From: Frank Li Date: Fri, 04 Apr 2025 15:01:10 -0400 Subject: [PATCH v16 09/15] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment Message-Id: <20250404-ep-msi-v16-9-d4919d68c0d0@nxp.com> References: <20250404-ep-msi-v16-0-d4919d68c0d0@nxp.com> In-Reply-To: <20250404-ep-msi-v16-0-d4919d68c0d0@nxp.com> To: Kishon Vijay Abraham I , "Rafael J. Wysocki" , Thomas Gleixner , Anup Patel , Kishon Vijay Abraham I , Marc Zyngier , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Manivannan Sadhasivam , =?utf-8?q?Krzysz?= =?utf-8?q?tof_Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Bjorn Helgaas , Arnd Bergmann , Shuah Khan , Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Krzysztof Kozlowski , Conor Dooley Cc: Niklas Cassel , dlemoal@kernel.org, jdmason@kudzu.us, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kselftest@vger.kernel.org, imx@lists.linux.dev, devicetree@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1743793288; l=4364; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Mp2cXn9FsMWsG/hvucQeIBBPPQdjWFLzH+Ukbq7aPzU=; b=bOfNKLiaFScP1ydO3C8L08eFpL3/qIyOYorrRe69HQ1oEl9JP5YB1hNNE1tLsfvSTBpd5C22t /AGgd/TnEeOChvZVMOWSI6PMTGqtQEa9cmgju7CSKC1x5Eq3gO5qXem X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: PH8P222CA0011.NAMP222.PROD.OUTLOOK.COM (2603:10b6:510:2d7::35) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|VI1PR04MB6957:EE_ X-MS-Office365-Filtering-Correlation-Id: de2ea5ce-6636-4485-a204-08dd73ab3fd5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?6ni3NEiJYPKeWgJ7QnhP96JZtXSztdG?= =?utf-8?q?LVvVl7lmSCiOTHCfaupdsEzoMKRQLpyNwUdmAeug3Md2WbCgFHg44BK0rmcoUqqSA?= =?utf-8?q?Pvme90I10fMFkk2TvexwRuc0oHRV0cw9Ikjr10NDl5rCRUft8hR5AOlFmYhyeyB+G?= =?utf-8?q?qGiT9UG1D9NHnqu/+2AGJCAX9KpCtbNuvqnaoN7qg6+O/rZJ4IXS9aWFo2HVXrPK/?= =?utf-8?q?TOC2F/ttSieJXf8Q7J+yAp+en9kXBb4ep6DeKNx8WbR1WFkDG8Jn/M+0lgfQ+SLJ4?= =?utf-8?q?Fwtb0uUoLc5DKI+umAGiOjBodIx/0yD9iYG03lrpIj1j7fEyaO8nxMfGcQhrcjYyO?= =?utf-8?q?HHLkTrQP98/zsg0Budnz+GGNfokiKUq4AVA+lor6M3L5muRax0bbBT/CMuOd92WIh?= =?utf-8?q?CwhqIjVzVJ3YpK22pFTyEk/tewk9XdPPqPtvN0s9mxKXgd3y+oS3oymCzhohxaU8A?= =?utf-8?q?shupPfRaufcMRpXXyVXsUxkLbuVb2Lqj6Eq2Dt2qjp1v+YJ5AVZu63nGxGvM+xc6R?= =?utf-8?q?KCxhukni9yYz9OtXYaRONDwYKa3VXVnC8jxPR6OT+tVHwaIvo/AYv3q8dzfd4FWwe?= =?utf-8?q?lOoJxtA8YQ8Zsf2nk148RrZEm5IAt+3r7kOrqnnBA3aN5ZGDOPRsy7Ul10dSBd5ul?= =?utf-8?q?BwDZRPmbg/SD/jLyMr9dMQ4VPUaJZAtcOJADlkmroRuOshkccUCKDqtEhpRKZure+?= =?utf-8?q?3NzwDsLA7dzScS8EidmacsRQ3LwMHQB9A/bWEXm7ZjukJs9cSHNX/SoR81nHGpxdf?= =?utf-8?q?skTzbna+4LKRQ3NkgWNPeNs7xXDkSeIt0EZBbaoMnWhhWJq7tF9Ohq5H+YeDpjBmC?= =?utf-8?q?FcyqIeJ79Ge9nepQ6y2LgB9H1cx7b5jFrsn44BP+h/efsq8NDSE+KEZpCqZMMdfn9?= =?utf-8?q?tpgN7ZNhd8cBJA5E8PrBxOtu1SjB5iQ6qzjrjRUfXnCiMBlRin7t6L4WFVMGPe42h?= =?utf-8?q?zyulIUbJ4xfyT2E63QJpxIkBrJO+TK9M0kZLixRL0LTb3YVzGNLGXuzdNKvW0GWH2?= =?utf-8?q?5ePgL42kYuEP2Ndn0dl1CP/L9KNZVyMx1yK3OMmNOusQSuHEiloKovjpyHus0qJfN?= =?utf-8?q?Jcjr5JygO6IEdtGCyBP9zvqO7sUzIYkT0hKLygBas6pucPWdZ1Qf7zRLIylFRTo2O?= =?utf-8?q?MnORp/d8MU+bQQ9TQwjneF1yDeopOxWFThXdd+psJfmdUmOY7nkhE/XfNJ6t15REP?= =?utf-8?q?1rJLfBxis3o9uTa+GFxjXLaek4mdKIZl1mLf/DBzVrwFf59S7kb6Cv7iUCISeAE9i?= =?utf-8?q?vJSkcDy2g7GpQHHMcR74egtg+J9JbwYrUBTanmLzTxHTnbwuTitIMBmLo1cBUMa4e?= =?utf-8?q?Ww/T/7ww7KkdHgfQLgyxcga84DCgpV/M4/27+an2dEqaQWZkxDwI/2JUy65+PneIP?= =?utf-8?q?Z9NGjNTWnN09OGAonAD1MJyZAterBOELA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9642.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(1800799024)(366016)(7416014)(376014)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5uPvPdIUdtbFULsDEy7R+wEUm7Kg?= =?utf-8?q?XGEm+RW9+A04wrtgp0vwW3Lj41X1Grm/KwPMmeSv3ncmrI2L4ETohQGg+pMUMVyhv?= =?utf-8?q?5vrpwNLm7omJRNUXXn6GpwOQi3QsGD2d+uyYwy7HpuKm89jAuBeFev3IqEFNoZvLT?= =?utf-8?q?tcYeVA7yqGMxrGDZX3UElyUHmg1pXLoyBSaiB/3TUBg87wJBygzBJXocfO1KS1i2t?= =?utf-8?q?zVOf1JvgkiwCLYDlOq39ZXU6QOLgnuTx/uBiceu4DwvTgKfVMd1oRwM70RR5eyMVc?= =?utf-8?q?XLZSsRSqdnWq5jJkOQlZts37e9Pb3dly8yLMYBaNNk5eqEYZhup31BDcB/9IIc5ZR?= =?utf-8?q?iTFhUptUxJvI3bD3nXXRinaBzukZzZywZ9UE26FG487eZHZffZvot8B+Z0sH1Mq5T?= =?utf-8?q?7cUzMrVUV3mURXr/FPAMOCpnUZQnSEKvi/jiaxpK6e679pwPAt47pkA/bJG3Ae7dM?= =?utf-8?q?q5/f8OIsaZg1sLyXmEpKm6Xfch840EUMEetzi/vFKEcfstCk8qhcyki+fxX4UIQHI?= =?utf-8?q?c5Ks+A2bAOIemsHwhLprgv31VRR8arw6pPghhfSbRYQULudN0KxVAnUjRIoRk5or1?= =?utf-8?q?h5hZDw9zHgKKfCBRnbQE7VTvvWFN+0aEFAyAAfIU17eEPT5fVNAyLmpQEWqD+vrnX?= =?utf-8?q?EJZYC62IIXD4nvriX/uKGtbowoKE7gGAgfFizXD7O0WpR0bmQtSmnuRaMQ7WqsE3V?= =?utf-8?q?6Y1VXJc8gey8u6f0W5S9kfiKrceHgq/YlLxHGdGTvd3pUHACXqJiwtZpUh6b6mEHG?= =?utf-8?q?oa3f8MPoitggSLlGol1nnlQU9htFLnJBvniZ+MMJmTnw4tXb3miREGa69JQks83ia?= =?utf-8?q?+hOHdkQb78ZWAT6/AOmPeuVEHzzUJ4yDGFGxP3ZDte46Fd26pds/CeduJ0IBe55EK?= =?utf-8?q?IiAlda2vSt23A1bzTYD/CXXKAK2u1ef3YSUoRjyRRgyMAT3zV6tlZIpvtfbz7OovZ?= =?utf-8?q?dwsmyX8eA0B6W1GTeB680b3DWQkLgx//uxyw0cjl//q5bv8z7Fp8kQxvpyMCrCOHE?= =?utf-8?q?+ixmImZo5hpit6b6/x+ufOfKFgbSIYuI4rFkdC6hOio2b6hJqnkonMLm74I9hZl1F?= =?utf-8?q?XeHU4ZMNmc8fXWhl/UnM3Jy0IO479DXSJ1iQidYJNfP0mbY++Zjmd7WZVHVS5vcBf?= =?utf-8?q?j9bNJnFS6UHFSZfJTTNWSzsa1IRbSLElaahBoY3ltftINUwYfqQqLwoloHgGTAhRU?= =?utf-8?q?v31MO1z3Ux0TOeuhgQBq/jBqX/uMbT32e4HTQug9x8RByqTImRfFLGRAqRM5J5rqr?= =?utf-8?q?nPcj7XEi/k1rkI/j9e0La5erU/Ff1wyYWt+5GGMModj4mVD2HiKkwABPE+F8KZZUi?= =?utf-8?q?smAYF+FLOuXMJepTFBb0RTY7tZNyuvrqsPK+hOfMFGfCXR8JIK/qyhJbRHxJ4Z03N?= =?utf-8?q?kkrPJptAtp2Vsa+9zdG/568o6OS0pgcZqS9TVghUuB7TSHug8Cg3syYutEBVtQwVE?= =?utf-8?q?JDSyKO8CDjvhkZUfBFc5tizER1MpkeWNsncZWjncnOIHEuhm+2724WG0=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: de2ea5ce-6636-4485-a204-08dd73ab3fd5 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2025 19:02:30.5299 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HCKPi9AuIhNKtPoobHd1dLOx96GZDyNyH6v9vQGj8qkWdYzP7NGKBWD41nBkzqrcbNltWBqCETbsWMLH1EXTSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6957 Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Change from v15 to v16 - none Change from v14 to v15 - change out address type to dma_addr_t to fix below build issue | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202502082311.G1hWGggF-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/pci/endpoint/functions/pci-epf-test.c: In function 'pci_epf_test_enable_doorbell': >> drivers/pci/endpoint/functions/pci-epf-test.c:726:42: error: passing argument 4 of 'pci_epf_align_inbound_addr' from incompatible pointer type [-Werror=incompatible-pointer-types] 726 | &epf_test->db_bar.phys_addr, &offset); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | dma_addr_t * {aka unsigned int *} In file included from include/linux/pci-epc.h:12, Change form v9 to v14 - none change from v8 to v9 - pci_epf_align_inbound_addr(), base and off must be not NULL - rm pci_epf_align_inbound_addr_lo_hi() change from v7 to v8 - change name to pci_epf_align_inbound_addr() - update comment said only need for memory, which not allocated by pci_epf_alloc_space(). change from v6 to v7 - new patch --- drivers/pci/endpoint/pci-epf-core.c | 44 +++++++++++++++++++++++++++++++++++++ include/linux/pci-epf.h | 3 +++ 2 files changed, 47 insertions(+) diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index d04224b8e1631..529dbaaf76750 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -473,6 +473,50 @@ struct pci_epf *pci_epf_create(const char *name) } EXPORT_SYMBOL_GPL(pci_epf_create); +/** + * pci_epf_align_inbound_addr() - Get base address and offset that match BAR's + * alignment requirement + * @epf: the EPF device + * @addr: the address of the memory + * @bar: the BAR number corresponding to map addr + * @base: return base address, which match BAR's alignment requirement. + * @off: return offset. + * + * Helper function to convert input 'addr' to base and offset, which match + * BAR's alignment requirement. + * + * The pci_epf_alloc_space() function already accounts for alignment. This is + * primarily intended for use with other memory regions not allocated by + * pci_epf_alloc_space(), such as peripheral register spaces or the trigger + * address for a platform MSI controller. + */ +int pci_epf_align_inbound_addr(struct pci_epf *epf, enum pci_barno bar, + u64 addr, dma_addr_t *base, size_t *off) +{ + const struct pci_epc_features *epc_features; + u64 align; + + if (!base || !off) + return -EINVAL; + + epc_features = pci_epc_get_features(epf->epc, epf->func_no, epf->vfunc_no); + if (!epc_features) { + dev_err(&epf->dev, "epc_features not implemented\n"); + return -EOPNOTSUPP; + } + + align = epc_features->align; + align = align ? align : 128; + if (epc_features->bar[bar].type == BAR_FIXED) + align = max(epc_features->bar[bar].fixed_size, align); + + *base = round_down(addr, align); + *off = addr & (align - 1); + + return 0; +} +EXPORT_SYMBOL_GPL(pci_epf_align_inbound_addr); + static void pci_epf_dev_release(struct device *dev) { struct pci_epf *epf = to_pci_epf(dev); diff --git a/include/linux/pci-epf.h b/include/linux/pci-epf.h index dcc6e2a2c6b3c..299ce1f1e2d80 100644 --- a/include/linux/pci-epf.h +++ b/include/linux/pci-epf.h @@ -241,6 +241,9 @@ void *pci_epf_alloc_space(struct pci_epf *epf, size_t size, enum pci_barno bar, enum pci_epc_interface_type type); void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar, enum pci_epc_interface_type type); + +int pci_epf_align_inbound_addr(struct pci_epf *epf, enum pci_barno bar, + u64 addr, dma_addr_t *base, size_t *off); int pci_epf_bind(struct pci_epf *epf); void pci_epf_unbind(struct pci_epf *epf); int pci_epf_add_vepf(struct pci_epf *epf_pf, struct pci_epf *epf_vf);