Re: powerpc/opal-irqchip: Use interrupt names if present
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2017-06-02 12:39:19
Also in:
linux-devicetree
Hi Ben, On Wed, Feb 22, 2017 at 8:02 PM, Linux Kernel Mailing List [off-list ref] wrote:
quoted hunk
Web: https://git.kernel.org/torvalds/c/2717a33d60745f2f72e521cdaedf79b00f66f8ca Commit: 2717a33d60745f2f72e521cdaedf79b00f66f8ca Parent: 470a36a8c014e5cac7bb2df382948597f7ec1b2c Refname: refs/heads/master Author: Benjamin Herrenschmidt [off-list ref] AuthorDate: Mon Feb 6 16:07:36 2017 +1100 Committer: Michael Ellerman [off-list ref] CommitDate: Thu Feb 9 10:31:37 2017 +1100 powerpc/opal-irqchip: Use interrupt names if present Recent versions of OPAL can provide names for the various OPAL interrupts, so let's use them. This also modernises the code that fetches the interrupt array to use the helpers provided by the generic code instead of hand-parsing the property. Signed-off-by: Benjamin Herrenschmidt [off-list ref] [mpe: Free irqs on error, check allocation of names, consolidate error handling, whitespace.] Signed-off-by: Michael Ellerman [off-list ref] --- arch/powerpc/platforms/powernv/opal-irqchip.c | 55 ++++++++++++++++++++------- 1 file changed, 42 insertions(+), 13 deletions(-)diff --git a/arch/powerpc/platforms/powernv/opal-irqchip.c b/arch/powerpc/platforms/powernv/opal-irqchip.c index 998316bf2dad..ecdcba9d1220 100644 --- a/arch/powerpc/platforms/powernv/opal-irqchip.c +++ b/arch/powerpc/platforms/powernv/opal-irqchip.c@@ -183,8 +183,9 @@ void opal_event_shutdown(void)
+ /* It's not an error for the names to be missing */ + of_property_read_string_array(opal_node, "opal-interrupts-names", + names, opal_irq_count);
Just double-checking, as it's different from the standard "interrupt-names":
is "opal-interrupts-names" the correct name?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds