From patchwork Tue Feb 23 19:17:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 12100801 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CC15C433E6 for ; Tue, 23 Feb 2021 19:19:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30CF064E09 for ; Tue, 23 Feb 2021 19:19:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233815AbhBWTSy (ORCPT ); Tue, 23 Feb 2021 14:18:54 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:14173 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233749AbhBWTSb (ORCPT ); Tue, 23 Feb 2021 14:18:31 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 23 Feb 2021 11:17:51 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Feb 2021 19:17:50 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 23 Feb 2021 19:17:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J758P+aYypEuvqZRIRM+dCOjZY5WdpAQ8XR2dJXdeTW1/I8jgU2wvjlRs+dcSv3BcE8qTUs7yWRO5SP1JE8s/h80rDWiysWe3VqVzEHMm0ig5XmM8r67pxjqUhJUi+ILpjaa54SYbDjuGdJgOeaijmxh8uN/fkK8/Drb80OsefnzepKvUH2zPjslchdbSWDP2nIC7w4xlkVim5qJlB4e1SEunZv0Ox3tx7081QLEmZr3yu5AmzaJn9ph85Lf/NgzRTBuOnBEq3/kKxAZPx9O4Dxv814jjQjcSqWS9ssqj87H/fHHk25wyyMq4vOH3YahwA10JpWh3hspmwG/9G49LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bQGfBhjILLOGDCYuCalfpYePJzUuN63E7RFskuTpOHY=; b=DSfimtwmSlE7h7lwdlg283VwZg6wuKj3/rKfOO2/JKQXNzcUToe5ZVKySIMHLeOKOOb8xdUo39iQOgagz74trmzrGwItg7WbOQowjl9erXhSAjtEFwT7p9MDhjW3vxo721Ai+pvUGh9o3ZjwP/+TglOQ6BSVR/aNejr/Gi6k8NWy245dNOaTcRy+wZ3bbPLXOpXP23JlFgkUN9bRhYHNVKEuGYbGivQ9BxJCN6lL3sYVGPEEYhfppFk7AZTWFqed3MnYl/CzOFF/uGSW/g2zPPoXyCflQ1Y3xGeKnvKgR0I37Q/Z8kW8ccekL6lLCBJ7Kv0Y5AekVq8mlEXi3lh86Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) by DM6PR12MB4943.namprd12.prod.outlook.com (2603:10b6:5:1bc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.32; Tue, 23 Feb 2021 19:17:50 +0000 Received: from DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87]) by DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87%6]) with mapi id 15.20.3868.033; Tue, 23 Feb 2021 19:17:49 +0000 From: Jason Gunthorpe To: Cornelia Huck , CC: Alex Williamson Subject: [PATCH 1/3] vfio: IOMMU_API should be selected Date: Tue, 23 Feb 2021 15:17:46 -0400 Message-ID: <1-v1-df057e0f92c3+91-vfio_arm_compile_test_jgg@nvidia.com> In-Reply-To: <0-v1-df057e0f92c3+91-vfio_arm_compile_test_jgg@nvidia.com> References: X-ClientProxiedBy: BL1PR13CA0034.namprd13.prod.outlook.com (2603:10b6:208:257::9) To DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mlx.ziepe.ca (142.162.115.133) by BL1PR13CA0034.namprd13.prod.outlook.com (2603:10b6:208:257::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.8 via Frontend Transport; Tue, 23 Feb 2021 19:17:49 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lEdBs-00FUTW-IX; Tue, 23 Feb 2021 15:17:48 -0400 X-Header: ProcessedBy-CMR-outbound DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614107871; bh=GM3lTqgSstKYkJKHJWcsUwmhCyLfTCLb50+37wERqgA=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Date:Message-ID:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy: MIME-Version:X-MS-Exchange-MessageSentRepresentingType:X-Header; b=NMnsYp+KcYrPrIRsV75imT7L0q0XwSvmPdQG3I7e9aL6SZLJ4Z1lnYfhV3Chw7qe+ 6s5VcrrhJOULWqw9Xm0NqPw479awtzoDzFrjNCeFdyIzrhrtVpBiUXRE5jRQsa7USF QiCMeYaCn5tdJf0nBES9J/yWLkNdwns6C6fylA3ZqtsSOiXNXhPtZJdijnMvlRJn/k YSay6pVlYX1UgTK7BYpvFgb/G0+9Tc13OclLwFwYBKgjG4r9vTGCULRy6ffOw4R/qM cXEU9WFo26E90RcxI9fmeivtQwYlBtEpVDlJmo4yw5s0P40sVabSknCesUqFC8In0y +OfbFaWMg15qA== Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org As IOMMU_API is a kconfig without a description (eg does not show in the menu) the correct operator is select not 'depends on'. Using 'depends on' for this kind of symbol means VFIO is not selectable unless some other random kconfig has already enabled IOMMU_API for it. Fixes: cba3345cc494 ("vfio: VFIO core") Signed-off-by: Jason Gunthorpe Reviewed-by: Eric Auger --- drivers/vfio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig index 5533df91b257d6..90c0525b1e0cf4 100644 --- a/drivers/vfio/Kconfig +++ b/drivers/vfio/Kconfig @@ -21,7 +21,7 @@ config VFIO_VIRQFD menuconfig VFIO tristate "VFIO Non-Privileged userspace driver framework" - depends on IOMMU_API + select IOMMU_API select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64) help VFIO provides a framework for secure userspace device drivers. From patchwork Tue Feb 23 19:17:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 12100803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAEDFC433DB for ; Tue, 23 Feb 2021 19:19:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A69D164E7A for ; Tue, 23 Feb 2021 19:19:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233851AbhBWTTO (ORCPT ); Tue, 23 Feb 2021 14:19:14 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:1375 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233753AbhBWTSb (ORCPT ); Tue, 23 Feb 2021 14:18:31 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 23 Feb 2021 11:17:51 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Feb 2021 19:17:50 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 23 Feb 2021 19:17:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YTc2RIt73oiHA/pPDVX33h4JgKkdGs5+a+hB5x+Q6USHW6FHvyBqncM9lPK0fBuTif+qBlGeNalDrV27g6p4SvfRFDEoScNjD+Y2oaWUzPoBNsxhk41RjkQ0ITYqtE5angCYJY2t7gd2/bVldPhLzrzySoLHJGGLaVIf9nSKRokVKmgzJzCWc2Q+KtBWrH7bDTJPZf9tG7EsmYPStLuoZGvwiNVKizeQu9AFLA8H58A14l9V/BK6RNdFAErnWM1dHq6Og44bq0R8iP4Cr8ZC7bybsr8M7VANaqrU5vO3u/iT/io581e9h0+tKFvFamOmeGzC6iJ09ULk4RNGRIoswA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9LaDRrha/DvYqjh86g+PKDbQ4qnYeM/go64YqZ01c5c=; b=QnQqA99BpW6hjXQUOO0x5RL75CUaaTmsQzYIi3TsJmlQyxEeX/BQqHX/t0hwY6BC1V3TusQnKvxQpNu1mGeOM+eFsCyqTLPsSQy/WU83+g6a08YaM/4mbOIZELxKmhprgsdmCwmrdd8RpkC96Yd4S42g0LE6mUXW6Jr/IqhOdtUyzdotsK6jo8ExBCD4i1puyuH+1kDvPAjUxVbMdUeRQDBYS0+zHfMiojHi6EOBh97QriGYE21mpiI25XiYXH2E29FgpOMeab0uGawzHrQlUihGajwLCUhHgC3+xZQF4PZEfWyQlibjKROaXvlyEVxe+b6rGQcx04DYpQ8aD2bXng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) by DM6PR12MB4943.namprd12.prod.outlook.com (2603:10b6:5:1bc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.32; Tue, 23 Feb 2021 19:17:50 +0000 Received: from DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87]) by DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87%6]) with mapi id 15.20.3868.033; Tue, 23 Feb 2021 19:17:50 +0000 From: Jason Gunthorpe To: Alex Williamson , Cornelia Huck , Eric Auger , Subject: [PATCH 2/3] vfio-platform: Add COMPILE_TEST to VFIO_PLATFORM Date: Tue, 23 Feb 2021 15:17:47 -0400 Message-ID: <2-v1-df057e0f92c3+91-vfio_arm_compile_test_jgg@nvidia.com> In-Reply-To: <0-v1-df057e0f92c3+91-vfio_arm_compile_test_jgg@nvidia.com> References: X-ClientProxiedBy: BLAPR03CA0023.namprd03.prod.outlook.com (2603:10b6:208:32b::28) To DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mlx.ziepe.ca (142.162.115.133) by BLAPR03CA0023.namprd03.prod.outlook.com (2603:10b6:208:32b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.28 via Frontend Transport; Tue, 23 Feb 2021 19:17:49 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lEdBs-00FUTa-Jq; Tue, 23 Feb 2021 15:17:48 -0400 X-Header: ProcessedBy-CMR-outbound DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614107871; bh=l+z0mVE56wW8SAkWjbXvJH59muDXI8ygtNGamCYHaWw=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: Subject:Date:Message-ID:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy: MIME-Version:X-MS-Exchange-MessageSentRepresentingType:X-Header; b=Le6EeaP0MHswwKvxM4J6ScUlyC9Eqg15nOwEZ3rUfkGdiwKHAxSxGe4ZvQz9G92A3 BzXvRUllQnIj/TIxM48OQj29MXcJ+pT+So/yDyZC0i+SQAPKotiJp5kusaXtbncWkC rPFHIlWxpFGVCY+yIwnp5eQrwXcDqvO9h9yWJCacHHwYidf0PczEQ2isN+VuZt2tLG rxr8Kt6dTzPJq27U5dzOsMsooogiUErvmoO9ZFl6ptRxdK4TRzbSMm9XvrU+PPlEDy RDkZODT/30Pbw/Z6yTZWuB7EojGAf8P/skndTYFfeqvWgYZv5g8TXL//lHdJkHNXnO /QSF5lPO6xFAQ== Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org x86 can build platform bus code too, so vfio-platform and all the platform reset implementations compile successfully on x86. Signed-off-by: Jason Gunthorpe --- drivers/vfio/platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig index dc1a3c44f2c62b..233efde219cc10 100644 --- a/drivers/vfio/platform/Kconfig +++ b/drivers/vfio/platform/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VFIO_PLATFORM tristate "VFIO support for platform devices" - depends on VFIO && EVENTFD && (ARM || ARM64) + depends on VFIO && EVENTFD && (ARM || ARM64 || COMPILE_TEST) select VFIO_VIRQFD help Support for platform devices with VFIO. This is required to make From patchwork Tue Feb 23 19:17:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 12100805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB05EC433DB for ; Tue, 23 Feb 2021 19:19:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAF1664EC3 for ; Tue, 23 Feb 2021 19:19:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232388AbhBWTT2 (ORCPT ); Tue, 23 Feb 2021 14:19:28 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:14174 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233755AbhBWTSb (ORCPT ); Tue, 23 Feb 2021 14:18:31 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 23 Feb 2021 11:17:51 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Feb 2021 19:17:51 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 23 Feb 2021 19:17:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g5sbRcRb3EAqrdkcxK0yTRSejzsoV3h0uRv8poa6M3WFn7PXvSyZH4XwWlYS37sJOomT/xNeB0usfree8BR9AFtCL+Cd695P4v2iRNi5OIcQpKoJEuKGkTmmo8HNqvGXx6h5NpwKf3NluAUDquY8/R3rEGjSW5SABpbO0D6CsWcUIfPHtILjLEVnqNd1dOGGT3hEtX9r1Qt564tsjaXn9b1YnG70w1TTgOsv4x8UIBjfEv74VniFYeUxwJPhQZT01KvqupDRQ6rfBQQUKNmJzJRLUPAVNY9EpRQb5NMa6bAjRxxMc1h2HB4gS4qMwKuDNMwlT/tG3bioLWQtnvzpqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aziIRWOvnmhi/KUzoHcwSOX+J++Sue1vZX/SHKH/9rM=; b=ZSXBJVCf+InhV29Unm6ugS5PU98gld2jVc7zoI+cbfugSvesp5XPl/O1AWWnSncDCjhlyHE5NF2AHrtI4nfau012rSac8hl9XB3uXmzso+0MkX9wlZ2hjWOVDPYXjiIpO7xcl1/SeX1TXHhF81UlxCOs9oEjwY46Ds3bbB4eTl6xEhhK5GOeuCu7VeYkU6uxnX76RqAz9cLIxuY44JBLbXfsZ25uWkNV+PWh7MTOWUlC3frCfpFiiWAVIsIrtqMq6hsCR3FqAbrFrmSMDHIBuR54jnOzFtiqPqehuTk8QfjgWyRUwtGCXEZnzqlLr/hFihPVaQXqYpCs07EA2B5l+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) by DM6PR12MB4943.namprd12.prod.outlook.com (2603:10b6:5:1bc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.32; Tue, 23 Feb 2021 19:17:50 +0000 Received: from DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87]) by DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1c62:7fa3:617b:ab87%6]) with mapi id 15.20.3868.033; Tue, 23 Feb 2021 19:17:50 +0000 From: Jason Gunthorpe To: Alex Williamson , Cornelia Huck , Eric Auger , , Russell King Subject: [PATCH 3/3] ARM: amba: Allow some ARM_AMBA users to compile with COMPILE_TEST Date: Tue, 23 Feb 2021 15:17:48 -0400 Message-ID: <3-v1-df057e0f92c3+91-vfio_arm_compile_test_jgg@nvidia.com> In-Reply-To: <0-v1-df057e0f92c3+91-vfio_arm_compile_test_jgg@nvidia.com> References: X-ClientProxiedBy: MN2PR01CA0014.prod.exchangelabs.com (2603:10b6:208:10c::27) To DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mlx.ziepe.ca (142.162.115.133) by MN2PR01CA0014.prod.exchangelabs.com (2603:10b6:208:10c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27 via Frontend Transport; Tue, 23 Feb 2021 19:17:49 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lEdBs-00FUTe-Ks; Tue, 23 Feb 2021 15:17:48 -0400 X-Header: ProcessedBy-CMR-outbound DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614107871; bh=OqtyLB3zJ0orbqau48q1SX6dOXqHs7rbXKAjHzQ/Km0=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: Subject:Date:Message-ID:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy: MIME-Version:X-MS-Exchange-MessageSentRepresentingType:X-Header; b=N5ynn6IRwcP7UIdIvLG8BSJ3OehJm8odAW9bChtvXi3RpFBRAdBV5/LJNqWRuseQo 5FdqBzGecL6rCalgB8/bf73tY0c9vt2lA3kBUMo+0JevaHbn2GTW2M41ijyjSDmFS3 iqKOUh26B04cpyRKyiB5+A1UzDh/i5pg2p6/Wl6KNPFFvQ2IKWRdLAB+sq6xtb31b/ FAFWQGHlFiFDH4NmhkTLiz13ZJPgrKrpYzsd3rtlFWrWDlZpg3oVgxqqstjNYVS/DB vJ2hGvt/RvVBBdRTEbRix4ZUgsjb2gWK8U/4se1xiM6Zv406XR4bCUiIq1Bro9n3My k0Wadpzy5RZGw== Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org CONFIG_VFIO_AMBA has a light use of AMBA, adding some inline fallbacks when AMBA is disabled will allow it to be compiled under COMPILE_TEST and make VFIO easier to maintain. Signed-off-by: Jason Gunthorpe Reviewed-by: Eric Auger --- drivers/vfio/platform/Kconfig | 2 +- include/linux/amba/bus.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig index 233efde219cc10..ab341108a0be94 100644 --- a/drivers/vfio/platform/Kconfig +++ b/drivers/vfio/platform/Kconfig @@ -12,7 +12,7 @@ config VFIO_PLATFORM config VFIO_AMBA tristate "VFIO support for AMBA devices" - depends on VFIO_PLATFORM && ARM_AMBA + depends on VFIO_PLATFORM && (ARM_AMBA || COMPILE_TEST) help Support for ARM AMBA devices with VFIO. This is required to make use of ARM AMBA devices present on the system using the VFIO diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 0bbfd647f5c6de..977edd6e541ddd 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h @@ -105,8 +105,19 @@ extern struct bus_type amba_bustype; #define amba_get_drvdata(d) dev_get_drvdata(&d->dev) #define amba_set_drvdata(d,p) dev_set_drvdata(&d->dev, p) +#ifdef CONFIG_ARM_AMBA int amba_driver_register(struct amba_driver *); void amba_driver_unregister(struct amba_driver *); +#else +static inline int amba_driver_register(struct amba_driver *drv) +{ + return -EINVAL; +} +static inline void amba_driver_unregister(struct amba_driver *drv) +{ +} +#endif + struct amba_device *amba_device_alloc(const char *, resource_size_t, size_t); void amba_device_put(struct amba_device *); int amba_device_add(struct amba_device *, struct resource *);