Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7b999af authored by Jeevan Shriram's avatar Jeevan Shriram
Browse files

Revert "irqdomain: Implement and expose API to clear IRQ mapping for radix tree"



IPCC module is never unloaded on GKI based build, so clearing of the IRQ
mappings are not needed. Remove it's implementation and usage.

This reverts commit 2fd144aa.

Change-Id: Iff747c574cced63425da3ab5adefd229d43d3ed6
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent 0cbd8300
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -422,7 +422,6 @@ static int qcom_ipcc_remove(struct platform_device *pdev)
	disable_irq_wake(proto_data->irq);
	if (proto_data->num_chans)
		mbox_controller_unregister(&proto_data->mbox);
	irq_dispose_all_tree_mappings(proto_data->irq_domain);
	irq_domain_remove(proto_data->irq_domain);

	return 0;
+0 −33
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@
#include <linux/of.h>
#include <linux/mutex.h>
#include <linux/radix-tree.h>
#include <linux/slab.h>
#include <linux/irq.h>

struct device_node;
struct irq_domain;
@@ -390,37 +388,6 @@ extern unsigned int irq_create_mapping(struct irq_domain *host,
extern unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec);
extern void irq_dispose_mapping(unsigned int virq);

/**
* irq_dispose_all_tree_mappings() - Unmaps all interrupts from a domain
* @domain: domain owning the interrupt range
*
* This routine helps unmap all the interrupts that were mapped to the
* domain using a radix tree.
*/
static inline void irq_dispose_all_tree_mappings(
					struct irq_domain *domain)
{
	struct irq_data **irq_data;
	unsigned int num_irqs = 0;
	unsigned int max_irqs = domain->mapcount;
	unsigned int index = 0;

	if (!max_irqs)
		return;

	irq_data = kcalloc(max_irqs, sizeof(*irq_data), GFP_KERNEL);
	if (!irq_data)
		return;

	rcu_read_lock();
	num_irqs = radix_tree_gang_lookup(&domain->revmap_tree,
					(void **)irq_data, 0, max_irqs);
	rcu_read_unlock();
	for (index = 0; index < num_irqs; index++)
		irq_dispose_mapping(irq_data[index]->irq);
	kfree(irq_data);
}

/**
 * irq_linear_revmap() - Find a linux irq from a hw irq number.
 * @domain: domain owning this hardware interrupt