Messages in this thread | | | From | Anup Patel <> | Date | Fri, 29 May 2020 17:15:03 +0530 | Subject | Re: [PATCH v5 3/6] irqchip: RISC-V per-HART local interrupt controller driver |
| |
On Fri, May 29, 2020 at 4:40 PM Marc Zyngier <maz@kernel.org> wrote: > > On 2020-05-29 11:45, Anup Patel wrote: > > On Fri, May 29, 2020 at 3:39 PM Marc Zyngier <maz@kernel.org> wrote: > >> > >> On 2020-05-21 14:32, Anup Patel wrote: > > [...] > > >> > +/* Get the OF device node used by INTC irq domain */ > >> > +struct device_node *riscv_of_intc_domain_node(void) > >> > +{ > >> > + return intc_domain_node; > >> > +} > >> > +EXPORT_SYMBOL_GPL(riscv_of_intc_domain_node); > >> > >> Why do you need this? Why can't the timer node refer to its > >> interrupt-parent? The irqchip shouldn't be in the business of > >> working around DT issues. > >> > >> At worse, use the default irqdomain if you must, but please > >> avoid this kind of construct. > > > > Even, I don't like exporting riscv_of_intc_domain_node(). > > > > Thanks for your suggestion, I will certainly use the default irqdomain. > > This should be a last resort solution. The irqdomain should > naturally come from the parent interrupt controller, accessible > from the device (the timer in this case) node. > > Use it to for backward compatibility if you *really* must, > but this is generally a very bad idea as it allows all kind > of bizarre fallbacks and hides bugs.
Okay, I will explore other approaches and keep default irqdomain as a last resort solution.
Regards, Anup
| |