powerpc/opal-irqchip: Use interrupt names if present
Hi Ben,
Quoted 29 lines · Linux Kernel Mailing List
Web: https://git.kernel.org/torvalds/c/2717a33d60745f2f72e521cdaedf79b00f66f8ca Commit: 2717a33d60745f2f72e521cdaedf79b00f66f8ca Parent: 470a36a8c014e5cac7bb2df382948597f7ec1b2c Refname: refs/heads/master Author: Benjamin Herrenschmidt <[email protected]> AuthorDate: Mon Feb 6 16:07:36 2017 +1100 Committer: Michael Ellerman <mpe-Gsx/[email protected]> CommitDate: Thu Feb 9 10:31:37 2017 +1100powerpc/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 <[email protected]>[mpe: Free irqs on error, check allocation of names, consolidate error
handling, whitespace.]Signed-off-by Michael Ellerman <mpe-Gsx/[email protected]>--- arch/powerpc/platforms/powernv/opal-irqchip.c | 55 ++++++++++++++++++++------- 1 file changed, 42 insertions(+), 13 deletions(-)arch/powerpc/platforms/powernv/opal-irqchip.c +0
-0
arch/powerpc/platforms/powernv/opal-irqchip.c void opal_event_shutdown(void) · line 186
Quoted 4 lines
arch/powerpc/platforms/powernv/opal-irqchip.c +3
-0@@ -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 -- [email protected]
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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Geert Uytterhoeven
arch/powerpc/platforms/powernv/opal-irqchip.c void opal_event_shutdown(void) · line 185
Quoted 9 lines
arch/powerpc/platforms/powernv/opal-irqchip.c +3
-0@@ -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?
Yes, because the property it refers to isn't a standard "interrupts" property... it's ... complicated :-)
It could have been mind you, but the decision for that was made years ago... it's a bunch of interrupts OPAL is interested in, which Linux requests and sets up a handler for which just calls back into OPAL.
In any case, firmwares with that property are out now.
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Ben,
Quoted 13 lines · Benjamin Herrenschmidt
Quoted 11 lines · Geert Uytterhoeven
arch/powerpc/platforms/powernv/opal-irqchip.c void opal_event_shutdown(void) · line 185
Quoted 8 lines
arch/powerpc/platforms/powernv/opal-irqchip.c +3
-0@@ -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?
Quoted 2 lines
Yes, because the property it refers to isn't a standard "interrupts" property... it's ... complicated :-)
I'm aware it's a different property.
Quoted 5 lines
It could have been mind you, but the decision for that was made years ago... it's a bunch of interrupts OPAL is interested in, which Linux requests and sets up a handler for which just calls back into OPAL.
In any case, firmwares with that property are out now.
Thanks for the confirmation!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html