Skip to content

Commit

Permalink
irqchip/gic: Kill the xlate method
Browse files Browse the repository at this point in the history
We are now left with only two use models for the GIC driver:
- Via a firmware interface, which mandates a hierarchical domain,
  and the use of the 'translate' method
- The legacy platforms, which assume irq==hwirq, hence not using
  the 'xlate' method.

The logical conclusion is that we can now nuke the 'xlate' method
altogether.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-and-tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Graeme Gregory <graeme@xora.org.uk>
Cc: Jake Oshins <jakeo@microsoft.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Link: http://lkml.kernel.org/r/1444737105-31573-14-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Marc Zyngier authored and Thomas Gleixner committed Oct 13, 2015
1 parent 891ae76 commit 18bd884
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions drivers/irqchip/irq-gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,30 +916,6 @@ static void gic_irq_domain_unmap(struct irq_domain *d, unsigned int irq)
{
}

static int gic_irq_domain_xlate(struct irq_domain *d,
struct device_node *controller,
const u32 *intspec, unsigned int intsize,
unsigned long *out_hwirq, unsigned int *out_type)
{
unsigned long ret = 0;

if (irq_domain_get_of_node(d) != controller)
return -EINVAL;
if (intsize < 3)
return -EINVAL;

/* Get the interrupt number and add 16 to skip over SGIs */
*out_hwirq = intspec[1] + 16;

/* For SPIs, we need to add 16 more to get the GIC irq ID number */
if (!intspec[0])
*out_hwirq += 16;

*out_type = intspec[2] & IRQ_TYPE_SENSE_MASK;

return ret;
}

static int gic_irq_domain_translate(struct irq_domain *d,
struct irq_fwspec *fwspec,
unsigned long *hwirq,
Expand Down Expand Up @@ -1021,7 +997,6 @@ static const struct irq_domain_ops gic_irq_domain_hierarchy_ops = {
static const struct irq_domain_ops gic_irq_domain_ops = {
.map = gic_irq_domain_map,
.unmap = gic_irq_domain_unmap,
.xlate = gic_irq_domain_xlate,
};

static void __init __gic_init_bases(unsigned int gic_nr, int irq_start,
Expand Down

0 comments on commit 18bd884

Please sign in to comment.