Skip to content

Commit 752e021

Browse files
committed
irqchip/mbigen: Remove platform_msi_create_device_domain() fallback
Now that ITS provides the MSI parent domain, remove the unused fallback code. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Anna-Maria Behnsen <[email protected]> Signed-off-by: Shivamurthy Shastri <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7f2baef commit 752e021

File tree

1 file changed

+4
-70
lines changed

1 file changed

+4
-70
lines changed

drivers/irqchip/irq-mbigen.c

Lines changed: 4 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -180,64 +180,6 @@ static int mbigen_domain_translate(struct irq_domain *d, struct irq_fwspec *fwsp
180180
return -EINVAL;
181181
}
182182

183-
/* The following section will go away once ITS provides a MSI parent */
184-
185-
static struct irq_chip mbigen_irq_chip = {
186-
.name = "mbigen-v2",
187-
.irq_mask = irq_chip_mask_parent,
188-
.irq_unmask = irq_chip_unmask_parent,
189-
.irq_eoi = mbigen_eoi_irq,
190-
.irq_set_type = mbigen_set_type,
191-
.irq_set_affinity = irq_chip_set_affinity_parent,
192-
};
193-
194-
static int mbigen_irq_domain_alloc(struct irq_domain *domain,
195-
unsigned int virq,
196-
unsigned int nr_irqs,
197-
void *args)
198-
{
199-
struct irq_fwspec *fwspec = args;
200-
irq_hw_number_t hwirq;
201-
unsigned int type;
202-
struct mbigen_device *mgn_chip;
203-
int i, err;
204-
205-
err = mbigen_domain_translate(domain, fwspec, &hwirq, &type);
206-
if (err)
207-
return err;
208-
209-
err = platform_msi_device_domain_alloc(domain, virq, nr_irqs);
210-
if (err)
211-
return err;
212-
213-
mgn_chip = platform_msi_get_host_data(domain);
214-
215-
for (i = 0; i < nr_irqs; i++)
216-
irq_domain_set_hwirq_and_chip(domain, virq + i, hwirq + i,
217-
&mbigen_irq_chip, mgn_chip->base);
218-
219-
return 0;
220-
}
221-
222-
static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq,
223-
unsigned int nr_irqs)
224-
{
225-
platform_msi_device_domain_free(domain, virq, nr_irqs);
226-
}
227-
228-
static const struct irq_domain_ops mbigen_domain_ops = {
229-
.translate = mbigen_domain_translate,
230-
.alloc = mbigen_irq_domain_alloc,
231-
.free = mbigen_irq_domain_free,
232-
};
233-
234-
static void mbigen_write_msg(struct msi_desc *desc, struct msi_msg *msg)
235-
{
236-
mbigen_write_msi_msg(irq_get_irq_data(desc->irq), msg);
237-
}
238-
239-
/* End of to be removed section */
240-
241183
static void mbigen_domain_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc)
242184
{
243185
arg->desc = desc;
@@ -268,20 +210,12 @@ static const struct msi_domain_template mbigen_msi_template = {
268210
static bool mbigen_create_device_domain(struct device *dev, unsigned int size,
269211
struct mbigen_device *mgn_chip)
270212
{
271-
struct irq_domain *domain = dev->msi.domain;
272-
273-
if (WARN_ON_ONCE(!domain))
213+
if (WARN_ON_ONCE(!dev->msi.domain))
274214
return false;
275215

276-
if (irq_domain_is_msi_parent(domain)) {
277-
return msi_create_device_irq_domain(dev, MSI_DEFAULT_DOMAIN,
278-
&mbigen_msi_template, size,
279-
NULL, mgn_chip->base);
280-
}
281-
282-
/* Remove once ITS provides MSI parent */
283-
return !!platform_msi_create_device_domain(dev, size, mbigen_write_msg,
284-
&mbigen_domain_ops, mgn_chip);
216+
return msi_create_device_irq_domain(dev, MSI_DEFAULT_DOMAIN,
217+
&mbigen_msi_template, size,
218+
NULL, mgn_chip->base);
285219
}
286220

287221
static int mbigen_of_create_domain(struct platform_device *pdev,

0 commit comments

Comments
 (0)