Re: [patch 02/20] genirq/irqdomain: Rename irq_domain::dev to irq_domain::pm_dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 11, 2022 at 02:56:40PM +0100, Thomas Gleixner wrote:
> irq_domain::dev is a misnomer as it's usually the rule that a device
> pointer points to something which is directly related to the instance.
> 
> irq_domain::dev can point to some other device for power management to
> ensure that this underlying device is not powered down when an interrupt is
> allocated.
> 
> The upcoming per device MSI domains really require a pointer to the device
> which instantiated the irq domain and not to some random other device which
> is required for power management down the chain.
> 
> Rename irq_domain::dev to irq_domain::pm_dev and fixup the few sites which
> use that pointer.
> 
> Conversion was done with the help of coccinelle.
> 
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> ---
>  drivers/irqchip/irq-gic.c |    4 +-
>  include/linux/irqdomain.h |   76 +++++++++++++++++++++++-----------------------
>  kernel/irq/chip.c         |    8 ++--
>  3 files changed, 44 insertions(+), 44 deletions(-)
> 
> --- a/drivers/irqchip/irq-gic.c
> +++ b/drivers/irqchip/irq-gic.c
> @@ -401,8 +401,8 @@ static void gic_irq_print_chip(struct ir
>  {
>  	struct gic_chip_data *gic = irq_data_get_irq_chip_data(d);
>  
> -	if (gic->domain->dev)
> -		seq_printf(p, gic->domain->dev->of_node->name);
> +	if (gic->domain->pm_dev)
> +		seq_printf(p, gic->domain->pm_dev->of_node->name);

This looks a bit odd now? I guess it still prints something meaningful
to debugfs but I suppose this would someday make more sense to be the
::dev version?

> --- a/include/linux/irqdomain.h
> +++ b/include/linux/irqdomain.h
> @@ -117,53 +117,53 @@ struct irq_domain_chip_generic;
>  
>  /**
>   * struct irq_domain - Hardware interrupt number translation object
> - * @link: Element in global irq_domain list.
> - * @name: Name of interrupt domain
> - * @ops: pointer to irq_domain methods
> - * @host_data: private data pointer for use by owner.  Not touched by irq_domain
> - *             core code.
> - * @flags: host per irq_domain flags
> - * @mapcount: The number of mapped interrupts
> + * @link:	Element in global irq_domain list.
> + * @name:	Name of interrupt domain
> + * @ops:	Pointer to irq_domain methods

Maybe all this whitespace change would like to be in its own patch?

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux