lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3UqSOGDHl+vnlo9@nvidia.com>
Date:   Wed, 16 Nov 2022 14:22:00 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Marc Zyngier <maz@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Dave Jiang <dave.jiang@...el.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Kevin Tian <kevin.tian@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        Ashok Raj <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
        Allen Hubbe <allenbh@...il.com>,
        "Ahmed S. Darwish" <darwi@...utronix.de>,
        Reinette Chatre <reinette.chatre@...el.com>
Subject: Re: [patch 02/20] genirq/irqdomain: Rename irq_domain::dev to
 irq_domain::pm_dev

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@...utronix.de>
> ---
>  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@...dia.com>

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ