Lines Matching +full:msi +full:- +full:parent

1 // SPDX-License-Identifier: GPL-2.0-only
7 #include "irq-msi-lib.h"
10 * msi_lib_init_dev_msi_info - Domain info setup for MSI domains
13 * @real_parent: The real parent domain of the domain to be initialized
18 * This function is to be used for all types of MSI domains above the root
19 * parent domain and any intermediates. The topmost parent domain specific
30 const struct msi_parent_ops *pops = real_parent->msi_parent_ops; in msi_lib_init_dev_msi_info()
33 /* Parent ops available? */ in msi_lib_init_dev_msi_info()
38 * MSI parent domain specific settings. For now there is only the in msi_lib_init_dev_msi_info()
39 * root parent domain, e.g. NEXUS, acting as a MSI parent, but it is in msi_lib_init_dev_msi_info()
40 * possible to stack MSI parents. See x86 vector -> irq remapping in msi_lib_init_dev_msi_info()
42 if (domain->bus_token == pops->bus_select_token) { in msi_lib_init_dev_msi_info()
50 required_flags = pops->required_flags; in msi_lib_init_dev_msi_info()
53 switch(info->bus_token) { in msi_lib_init_dev_msi_info()
62 * Per device MSI should never have any MSI feature bits in msi_lib_init_dev_msi_info()
67 if (WARN_ON_ONCE(info->flags)) in msi_lib_init_dev_msi_info()
70 /* Core managed MSI descriptors */ in msi_lib_init_dev_msi_info()
71 info->flags = MSI_FLAG_ALLOC_SIMPLE_MSI_DESCS | MSI_FLAG_FREE_MSI_DESCS; in msi_lib_init_dev_msi_info()
87 * Mask out the domain specific MSI feature flags which are not in msi_lib_init_dev_msi_info()
88 * supported by the real parent. in msi_lib_init_dev_msi_info()
90 info->flags &= pops->supported_flags; in msi_lib_init_dev_msi_info()
92 info->flags |= required_flags; in msi_lib_init_dev_msi_info()
95 if (!info->chip->irq_eoi) in msi_lib_init_dev_msi_info()
96 info->chip->irq_eoi = irq_chip_eoi_parent; in msi_lib_init_dev_msi_info()
97 if (!info->chip->irq_ack) in msi_lib_init_dev_msi_info()
98 info->chip->irq_ack = irq_chip_ack_parent; in msi_lib_init_dev_msi_info()
101 * The device MSI domain can never have a set affinity callback. It in msi_lib_init_dev_msi_info()
102 * always has to rely on the parent domain to handle affinity in msi_lib_init_dev_msi_info()
103 * settings. The device MSI domain just has to write the resulting in msi_lib_init_dev_msi_info()
104 * MSI message into the hardware which is the whole purpose of the in msi_lib_init_dev_msi_info()
105 * device MSI domain aside of mask/unmask which is provided e.g. by in msi_lib_init_dev_msi_info()
106 * PCI/MSI device domains. in msi_lib_init_dev_msi_info()
108 info->chip->irq_set_affinity = msi_domain_set_affinity; in msi_lib_init_dev_msi_info()
114 * msi_lib_irq_domain_select - Shared select function for NEXUS domains
122 * if @d is providing the parent MSI domain for the functionality
128 const struct msi_parent_ops *ops = d->msi_parent_ops; in msi_lib_irq_domain_select()
134 if (fwspec->fwnode != d->fwnode || fwspec->param_count != 0) in msi_lib_irq_domain_select()
138 if (bus_token == ops->bus_select_token) in msi_lib_irq_domain_select()
141 return !!(ops->bus_select_mask & busmask); in msi_lib_irq_domain_select()