Message ID | cover.1717486682.git.mazziesaccount@gmail.com |
---|---|
Headers | show |
Series | Support ROHM BD96801 Scalable PMIC | expand |
Matti! On Tue, Jun 04 2024 at 10:55, Matti Vaittinen wrote: > struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int size, > irq_hw_number_t hwirq_max, int direct_max, > const struct irq_domain_ops *ops, > - void *host_data); > + void *host_data, const char *name_suffix); > struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, > unsigned int size, > unsigned int first_irq, > @@ -350,7 +350,8 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no > const struct irq_domain_ops *ops, > void *host_data) > { > - return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, host_data); > + return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, > + host_data, NULL); .... Looking at the resulting amount of churn to add that argument, I'm not really enthused. There is some other unrelated change required in this area: https://lore.kernel.org/all/8734pr5yq1.ffs@tglx My suggestion to convert all of this mess into a template based mechanism would nicely solve your problem too. Can you please have a look and eventually team up with Herve (CC'ed) to sort this out? I'm happy to help and give guidance. Thanks, tglx
Hello Thomas, Herve. On 6/6/24 21:59, Thomas Gleixner wrote: > Matti! > > On Tue, Jun 04 2024 at 10:55, Matti Vaittinen wrote: >> struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int size, >> irq_hw_number_t hwirq_max, int direct_max, >> const struct irq_domain_ops *ops, >> - void *host_data); >> + void *host_data, const char *name_suffix); >> struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, >> unsigned int size, >> unsigned int first_irq, >> @@ -350,7 +350,8 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no >> const struct irq_domain_ops *ops, >> void *host_data) >> { >> - return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, host_data); >> + return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, >> + host_data, NULL); > > .... > > Looking at the resulting amount of churn to add that argument, I'm not > really enthused. There is some other unrelated change required in this > area: > > https://lore.kernel.org/all/8734pr5yq1.ffs@tglx > > My suggestion to convert all of this mess into a template based > mechanism would nicely solve your problem too. I am not entirely sure what you mean by template based in this context. My brains are somehow fixed to start thinking of C++ templates, or C macro magic with typeof() and I just can't get past that. Anyways, what I picked from discussion between you and Herve, is using an initialization structure (struct irq_domain_info) for the new domain creation function (irq_domain_instantiate()) instead of adding bunch of functions with quite a few separate arguments. So, I assume you're referring to a possibility to add the name-suffix in this initialization structure? I hope I got this right. I assume there is no intention to change the existing public irq_domain_creat_foo() APIs to use the new irq_domain_info - and change all the callers(?) But I think changing the internal __irq_domain_create() to use this new info struct should be very much doable - although, in my opinion, making existing callers of the __irq_domain_create() to assign their parameters to this struct so they can pass it to __irq_domain_create() does not seem so nice. So, even though I am not really happy about the delay (I secretly hoped to get the series merged before my summer vacations ;) ) - I admit your suggested change looks cleaner (again, at least to me). Herve, do you have any idea when you plan to do further sketching on this? Do you want me to try seeing if I can add the struct irq_domain_info and maybe use that in the __irq_domain_add() to get the name-suffix added? I might be able to send one version out during next week - but then I plan to be offline for couple of weeks ... so it may be I am not much of a help here. > Can you please have a look and eventually team up with Herve (CC'ed) to > sort this out? I'm happy to help and give guidance. I appreciate the guidance! Thanks Thomas. Yours, -- Matti
Hi Matti, On Fri, 7 Jun 2024 09:38:31 +0300 Matti Vaittinen <mazziesaccount@gmail.com> wrote: ... > Herve, do you have any idea when you plan to do further sketching on > this? Do you want me to try seeing if I can add the struct > irq_domain_info and maybe use that in the __irq_domain_add() to get the > name-suffix added? I might be able to send one version out during next > week - but then I plan to be offline for couple of weeks ... so it may > be I am not much of a help here. > On my side, I plan to work on it next week too. If you are off a couple of weeks after, I think I can start and move forward on this topic. Best regards, Hervé
On 6/7/24 11:13, Herve Codina wrote: > Hi Matti, > > On Fri, 7 Jun 2024 09:38:31 +0300 > Matti Vaittinen <mazziesaccount@gmail.com> wrote: > > ... > >> Herve, do you have any idea when you plan to do further sketching on >> this? Do you want me to try seeing if I can add the struct >> irq_domain_info and maybe use that in the __irq_domain_add() to get the >> name-suffix added? I might be able to send one version out during next >> week - but then I plan to be offline for couple of weeks ... so it may >> be I am not much of a help here. >> > > On my side, I plan to work on it next week too. > If you are off a couple of weeks after, I think I can start and move forward > on this topic. Thanks for the prompt reply and thanks for working with this :) I'll leave it to you for now then, as I don't think it makes much sense to intentionally do conflicting changes. I'll see what you've been up to when I return to the keyboard :) I'd appreciated if you added me to CC when sending the irqdomain refactoring patches (but I can dig them up if you don't). Have fun! Yours, -- Matti
On Fri, 7 Jun 2024 11:49:07 +0300 Matti Vaittinen <mazziesaccount@gmail.com> wrote: > On 6/7/24 11:13, Herve Codina wrote: > > Hi Matti, > > > > On Fri, 7 Jun 2024 09:38:31 +0300 > > Matti Vaittinen <mazziesaccount@gmail.com> wrote: > > > > ... > > > >> Herve, do you have any idea when you plan to do further sketching on > >> this? Do you want me to try seeing if I can add the struct > >> irq_domain_info and maybe use that in the __irq_domain_add() to get the > >> name-suffix added? I might be able to send one version out during next > >> week - but then I plan to be offline for couple of weeks ... so it may > >> be I am not much of a help here. > >> > > > > On my side, I plan to work on it next week too. > > If you are off a couple of weeks after, I think I can start and move forward > > on this topic. > > Thanks for the prompt reply and thanks for working with this :) I'll > leave it to you for now then, as I don't think it makes much sense to > intentionally do conflicting changes. I'll see what you've been up to > when I return to the keyboard :) I'd appreciated if you added me to CC > when sending the irqdomain refactoring patches (but I can dig them up if > you don't). Sure, you will CC you. Also, I am not sure that I will perfectly take into account your use-case but it should not be a big deal to add it on top of my commits afterwards. > > Have fun! > Cheers, Hervé
On 6/7/24 12:23, Herve Codina wrote: > On Fri, 7 Jun 2024 11:49:07 +0300 > Matti Vaittinen <mazziesaccount@gmail.com> wrote: > >> On 6/7/24 11:13, Herve Codina wrote: >>> Hi Matti, >>> >>> On Fri, 7 Jun 2024 09:38:31 +0300 >>> Matti Vaittinen <mazziesaccount@gmail.com> wrote: >>> >>> ... >>> >>>> Herve, do you have any idea when you plan to do further sketching on >>>> this? Do you want me to try seeing if I can add the struct >>>> irq_domain_info and maybe use that in the __irq_domain_add() to get the >>>> name-suffix added? I might be able to send one version out during next >>>> week - but then I plan to be offline for couple of weeks ... so it may >>>> be I am not much of a help here. >>>> >>> >>> On my side, I plan to work on it next week too. >>> If you are off a couple of weeks after, I think I can start and move forward >>> on this topic. >> >> Thanks for the prompt reply and thanks for working with this :) I'll >> leave it to you for now then, as I don't think it makes much sense to >> intentionally do conflicting changes. I'll see what you've been up to >> when I return to the keyboard :) I'd appreciated if you added me to CC >> when sending the irqdomain refactoring patches (but I can dig them up if >> you don't). > > Sure, you will CC you. Thanks! > Also, I am not sure that I will perfectly take into account your use-case > but it should not be a big deal to add it on top of my commits afterwards. No problem! That's just fine :)