From nobody Fri Nov 29 20:59:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1629374884489282.1328246651308; Thu, 19 Aug 2021 05:08:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.168661.307927 (Exim 4.92) (envelope-from ) id 1mGgps-0007cw-Gv; Thu, 19 Aug 2021 12:07:52 +0000 Received: by outflank-mailman (output) from mailman id 168661.307927; Thu, 19 Aug 2021 12:07:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mGgps-0007cp-Db; Thu, 19 Aug 2021 12:07:52 +0000 Received: by outflank-mailman (input) for mailman id 168661; Thu, 19 Aug 2021 12:07:51 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mGgpr-0007cb-OH for xen-devel@lists.xenproject.org; Thu, 19 Aug 2021 12:07:51 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id c59c1134-6d59-4ab3-94a4-2c3029f94130; Thu, 19 Aug 2021 12:07:50 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3AE0831B; Thu, 19 Aug 2021 05:07:50 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 53BD83F70D; Thu, 19 Aug 2021 05:07:49 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c59c1134-6d59-4ab3-94a4-2c3029f94130 From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, rahul.singh@arm.com, Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH v1 09/14] xen/arm: Add cmdline boot option "pci=on" Date: Thu, 19 Aug 2021 13:02:49 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-ZM-MESSAGEID: 1629374884883100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add cmdline boot option "pci=3Don" to enable/disable the PCI init during boot. Signed-off-by: Rahul Singh --- xen/arch/arm/pci/pci.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/xen/arch/arm/pci/pci.c b/xen/arch/arm/pci/pci.c index d1c9cf997d..dc63bbc2a2 100644 --- a/xen/arch/arm/pci/pci.c +++ b/xen/arch/arm/pci/pci.c @@ -62,8 +62,38 @@ static void __init acpi_pci_init(void) static inline void __init acpi_pci_init(void) { } #endif =20 +static bool __initdata param_pci_enable; + +static int __init parse_pci_param(const char *arg) +{ + if ( !arg ) + { + param_pci_enable =3D false; + return 0; + } + + switch ( parse_bool(arg, NULL) ) + { + case 0: + param_pci_enable =3D false; + return 0; + case 1: + param_pci_enable =3D true; + return 0; + } + + return -EINVAL; +} +custom_param("pci", parse_pci_param); + static int __init pci_init(void) { + /* + * Enable PCI when has been enabled explicitly (pci=3Don) + */ + if ( !param_pci_enable) + return 0; + if ( acpi_disabled ) dt_pci_init(); else --=20 2.17.1