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

Re: [PATCH v2 11/17] xen/arm: PCI host bridge discovery within XEN on ARM


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Thu, 23 Sep 2021 13:03:09 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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; bh=gDW9yuq4Iug2NRkjjA7yR7nq+UKZzimaAIQHqisNjy0=; b=JSyL+2J5uLI7IPcF0ulSVpRTsbvx6PzfyxW0i5tdnHJBzjpMHV02QzERHiNv9aDqmyKfbJ+7FVpThGKPMqTnv0t5ypoSrHtHh+alhxZHl8zTvhXYHk2KvBretNal1vzxos+9pPz+FNn57tcWbQ9UcmPJjwZnsocNoTYN0tQs1d2Qp5Mh+Lz9xZen4x34RYtW/rmKwJGTFKrlHmUvMzixZl5OCS7qCtvp8QPSw1u2v+UIGmggf0sxcXjm0r0SUAgsIrewH9bs7OQBHFaArK2S/lhDb5Dn8KJ1UyOzmQHzwuaxHQ49iiiijIIsU27oBdhmt+cMg3Z2vBr2Tk31HLWXaQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OQMsbxw4Z1DmLBnZM9hqkVbBb5XPOfwDh3aNBqBu1pdXlppOCFJVJwiOWJGOxVdt0FDrL9FExXYtld5CkY0PGwUrjADaPaQ7LN1YxpeuqdukbjbX4/G3C2s/xfRuEzyrOxilAzDlmvPwT2odSkO9E0pcBp+5CfLiJMnBFE6RVussnUlB5pMDMqHJ+76o0H+B8ogABau+sErs0rZ3mY3oLllcyInUU32uv0zva/PN4R8Ob7mS9vcnPaVG4TeePBhYJslJm9SGbyDORvfoDA2Csx5/cUYhr8pzZXqFDXXWfbb5xmrZFdeFl8zlCJ4T9UxxqcCto8kbBJMCL8G8on7n4A==
  • Authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "andre.przywara@xxxxxxx" <andre.przywara@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 23 Sep 2021 13:03:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXsHtbREhsUX85MESzoUZXILt9Yg==
  • Thread-topic: [PATCH v2 11/17] xen/arm: PCI host bridge discovery within XEN on ARM

Hi, Stefano!

[snip]


>> +};
>> +
>> +/* Default ECAM ops */
>> +extern const struct pci_ecam_ops pci_generic_ecam_ops;
> If we use container_of and get rid of sysdata, I wonder if we get avoid
> exporting pci_generic_ecam_ops.
>
>
>> +int pci_host_common_probe(struct dt_device_node *dev, const void *data);
> This should be static and not exported
>
>
>> +int pci_generic_config_read(struct pci_host_bridge *bridge, uint32_t sbdf,
>> +                            uint32_t reg, uint32_t len, uint32_t *value);
> also this
>
>
>> +int pci_generic_config_write(struct pci_host_bridge *bridge, uint32_t sbdf,
>> +                            uint32_t reg, uint32_t len, uint32_t value);
> also this
>
>
>> +void __iomem *pci_ecam_map_bus(struct pci_host_bridge *bridge,
>> +                               uint32_t sbdf, uint32_t where);
> also this
>
>>   static always_inline bool is_pci_passthrough_enabled(void)
>>   {
>>       return pci_passthrough_enabled;
>> -- 
>> 2.17.1

All the above is still need to be exported as those are going to be used

by other bridge's implementations, see ZynqMP for instance later in the series.

I'll post a snippet from the future:

/* ECAM ops */
const struct pci_ecam_ops nwl_pcie_ops = {
     .bus_shift  = 20,
     .cfg_reg_index = nwl_cfg_reg_index,
     .pci_ops    = {
         .map_bus                = pci_ecam_map_bus,
         .read                   = pci_generic_config_read,
         .write                  = pci_generic_config_write,
         .need_p2m_mapping       = pci_ecam_need_p2m_mapping,
     }
};

DT_DEVICE_START(pci_gen, "PCI HOST ZYNQMP", DEVICE_PCI)
.dt_match = nwl_pcie_dt_match,
.init = pci_host_common_probe,
DT_DEVICE_END

 


Rackspace

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