Skip to contentSkip to conversation

powerpc/opal-irqchip: Use interrupt names if present

DISCUSSION Geert Uytterhoeven 2 participants 3 messages Jun 2, 2017 – Jun 3, 2017 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20170222190235.92E5F661CEB-OoYKEaZ2EDaWaY/[email protected]

#2 lore raw

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 +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.

[mpe: Free irqs on error, check allocation of names, consolidate error
handling, whitespace.]

---
 arch/powerpc/platforms/powernv/opal-irqchip.c | 55 ++++++++++++++++++++-------
 1 file changed, 42 insertions(+), 13 deletions(-)
arch/powerpc/platforms/powernv/opal-irqchip.c +0 -0
index 998316bf2dad..ecdcba9d1220 100644

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

A message that is not in the archive (sent off-list or not yet received): CAMuHMdWGZYkM_aQ=vXr5J9-KFGzzWgq3hf+ZRY-n-+8-ghG5nQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw
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
index 998316bf2dad..ecdcba9d1220 100644
@@ -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

A message that is not in the archive (sent off-list or not yet received): 1496412702.2842.11.camel-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org

#6 lore raw

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
index 998316bf2dad..ecdcba9d1220 100644
@@ -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