[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 04/14] xen/arm: Add support for PCI init to initialize the PCI driver.


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Fri, 10 Sep 2021 10:32:26 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • 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=sBm663vIp1pIJh8pt/Vtbd5Q3WrEzvITnnu51uJ0R2Y=; b=FPzN66bWqXeR8080MtDtlRb+eAah0zxMUYDbk0OOHrAlzxXMa31MpHpxuTY/w3UB8N0CY75pZwm+G/rgteA01CFPuu+SLoflTIfZPUPtE87+Of5W2xMwBqHNkWkCwlta9H2UxujQhBVWaHwhq/DP529FznlWS9c3+kSlnqYD1kAb3ASWdmp9mW0bRK5E2MtJf3tpfWrNUpqU2vXj7qnpf3ybpYs80k9ojUy9BnCfPnXvwshA273ZQv0H6XQGyjElTcmYmsMaCGQ+6k44GuuNB/nX2O8XKs5fNaFrWVx5oAqgl26qBRMVuD8WtaOA+EJWGVikeCKljwvSIdeHk7B+iA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FzcVefv7LhQLoi4XY+qc4QQBig07KD6LldaleyvF3RcNyAXRENsGXpV+Oe0PoqP7t1rGKY8k3Rpt1Ay+SS/bL9JCYBtDvZblOnD+yYvkhExd68Atj27sT844xh56t3pgKWUbbGv1GjEhYL1ol6S1FrG8OJDg1AEXKS7GuFu+lRvp0jSYAqTUB2t05RAveoOiMjddg2FG4aa92r8eDCrZxvkj29ZbQWLNZ8a0Xl8sWNrli8nQyl59N96gCxrDL5/PMQCj5347Hitw+OfBrpqwA7a3HjDDE/0XntO7FhUMLR/jTyArgUXwXwNinbjik80wJkEjNmm+OJ5IKVOf1XgLZw==
  • Authentication-results-original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 10 Sep 2021 10:33:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXlPKX2eY2zjLj706Keqt9aql1MKubBqqAgAItu4A=
  • Thread-topic: [PATCH v1 04/14] xen/arm: Add support for PCI init to initialize the PCI driver.

Hi Stefano,

> On 9 Sep 2021, at 2:16 am, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Thu, 19 Aug 2021, Rahul Singh wrote:
>> pci_init(..) will be called during xen startup to initialize and probe
>> the PCI host-bridge driver.
>> 
>> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
>> ---
>> xen/arch/arm/pci/pci.c       | 54 ++++++++++++++++++++++++++++++++++++
>> xen/include/asm-arm/device.h |  1 +
>> 2 files changed, 55 insertions(+)
>> 
>> diff --git a/xen/arch/arm/pci/pci.c b/xen/arch/arm/pci/pci.c
>> index dc55d23778..d1c9cf997d 100644
>> --- a/xen/arch/arm/pci/pci.c
>> +++ b/xen/arch/arm/pci/pci.c
>> @@ -14,13 +14,67 @@
>>  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
>>  */
>> 
>> +#include <xen/acpi.h>
>> +#include <xen/device_tree.h>
>> +#include <xen/errno.h>
>> +#include <xen/init.h>
>> #include <xen/pci.h>
>> +#include <xen/param.h>
>> 
>> int arch_pci_clean_pirqs(struct domain *d)
>> {
>>     return 0;
>> }
>> 
>> +static int __init dt_pci_init(void)
>> +{
>> +    struct dt_device_node *np;
>> +    int rc;
>> +
>> +    dt_for_each_device_node(dt_host, np)
>> +    {
>> +        rc = device_init(np, DEVICE_PCI, NULL);
>> +        if( !rc )
>> +            continue;
>> +        /*
>> +         * Ignore the following error codes:
>> +         *   - EBADF: Indicate the current is not an pci
>                                                     ^ a
> 
>> +         *   - ENODEV: The pci device is not present or cannot be used by
>> +         *     Xen.
>> +         */
>> +        else if ( rc != -EBADF && rc != -ENODEV )
>> +        {
>> +            printk(XENLOG_ERR "No driver found in XEN or driver init 
>> error.\n");
>> +            return rc;
>> +        }
>> +    }
>> +
>> +    return 0;
>> +}
>> +
>> +#ifdef CONFIG_ACPI
>> +static void __init acpi_pci_init(void)
> 
> If the DT init function returns int, then it would make sense for the
> ACPI init function to return int as well?

Ok. I will modify acpi_pci_init(..)  function to return int.

Regards,
Rahul



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.