diff options
author | Paul Burton <paul.burton@mips.com> | 2017-10-31 09:41:44 -0700 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-11-02 15:55:45 +0000 |
commit | 63b746b19fa660737df603f97fd5f435c511d1b5 (patch) | |
tree | bb71a03c556da8bd455be1bd63d6374de0f98ac6 /net/nsh | |
parent | 4e4cb1b183d6e9df57f4e54c8b1a5231995da820 (diff) | |
download | blackbird-obmc-linux-63b746b19fa660737df603f97fd5f435c511d1b5.tar.gz blackbird-obmc-linux-63b746b19fa660737df603f97fd5f435c511d1b5.zip |
irqchip: mips-gic: Inline gic_local_irq_domain_map()
The gic_local_irq_domain_map() function has only one callsite in
gic_irq_domain_map(), and the split between the two functions makes it
unclear that they duplicate calculations & checks.
Inline gic_local_irq_domain_map() into gic_irq_domain_map() in order to
clean this up. Doing this makes the following small issues obvious, and
the patch tidies them up:
- Both functions used GIC_HWIRQ_TO_LOCAL() to convert a hwirq number to
a local IRQ number. We now only do this once. Although the compiler
ought to have optimised this away before anyway, the change leaves us
with less duplicate code.
- gic_local_irq_domain_map() had a check for invalid local interrupt
numbers (intr > GIC_LOCAL_INT_FDC). This condition can never occur
because any hwirq higher than those used for local interrupts is a
shared interrupt, which gic_irq_domain_map() already handles
separately. We therefore remove this check.
- The decision of whether to map the interrupt to gic_cpu_pin or
timer_cpu_pin can be handled within the existing switch statement in
gic_irq_domain_map(), shortening the code a little.
The change additionally prepares us nicely for the following patch of
the series which would otherwise need to duplicate the check for whether
a local interrupt should be percpu_devid or just percpu (ie. the switch
statement from gic_irq_domain_map()) in gic_local_irq_domain_map().
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'net/nsh')
0 files changed, 0 insertions, 0 deletions