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: <58662181.2010409@hisilicon.com>
Date:   Fri, 30 Dec 2016 16:57:37 +0800
From:   Xinwei Kong <kong.kongxinwei@...ilicon.com>
To:     Hanjun Guo <guohanjun@...wei.com>,
        Marc Zyngier <marc.zyngier@....com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>
CC:     Charles Garcia-Tobin <charles.garcia-tobin@....com>,
        <jcm@...hat.com>, <yimin@...wei.com>,
        Tomasz Nowicki <tn@...ihalf.com>,
        <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>,
        Sinan Kaya <okaya@...eaurora.org>,
        <linux-acpi@...r.kernel.org>, Hanjun Guo <hanjun.guo@...aro.org>,
        Greg KH <gregkh@...uxfoundation.org>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        Agustin Vega-Frias <agustinv@...eaurora.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 06/14] irqchip: gicv3-its: platform-msi: refactor
 its_pmsi_init() to prepare for ACPI

On 2016/12/22 13:35, Hanjun Guo wrote:
> From: Hanjun Guo <hanjun.guo@...aro.org>
>
> Introduce its_pmsi_init_one() to refactor the code to isolate
> ACPI&DT common code to prepare for ACPI later.
>
> Signed-off-by: Hanjun Guo <hanjun.guo@...aro.org>
> Tested-by: Sinan Kaya <okaya@...eaurora.org>
> Cc: Marc Zyngier <marc.zyngier@....com>
> Cc: Tomasz Nowicki <tn@...ihalf.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> ---
>   drivers/irqchip/irq-gic-v3-its-platform-msi.c | 45 ++++++++++++++++-----------
>   1 file changed, 27 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/irqchip/irq-gic-v3-its-platform-msi.c b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
> index 16587a9..ff72704 100644
> --- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c
> +++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
> @@ -84,34 +84,43 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
>   	{},
>   };
>   
> -static int __init its_pmsi_init(void)
> +static int __init its_pmsi_init_one(struct fwnode_handle *fwnode,
> +				const char *name)
>   {
> -	struct device_node *np;
>   	struct irq_domain *parent;
>   
> +	parent = irq_find_matching_fwnode(fwnode, DOMAIN_BUS_NEXUS);
> +	if (!parent || !msi_get_domain_info(parent)) {
> +		pr_err("%s: unable to locate ITS domain\n", name);
> +		return -ENXIO;
> +	}
> +
> +	if (!platform_msi_create_irq_domain(fwnode, &its_pmsi_domain_info,
> +					    parent)) {
> +		pr_err("%s: unable to create platform domain\n", name);
> +		return -ENXIO;
> +	}
> +
> +	pr_info("Platform MSI: %s domain created\n", name);
> +	return 0;
> +}
> +
> +static void __init its_pmsi_of_init(void)
> +{
> +	struct device_node *np;
> +
>   	for (np = of_find_matching_node(NULL, its_device_id); np;
>   	     np = of_find_matching_node(np, its_device_id)) {
>   		if (!of_property_read_bool(np, "msi-controller"))
>   			continue;
>   
> -		parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS);
> -		if (!parent || !msi_get_domain_info(parent)) {
> -			pr_err("%s: unable to locate ITS domain\n",
> -			       np->full_name);
> -			continue;
> -		}
> -
> -		if (!platform_msi_create_irq_domain(of_node_to_fwnode(np),
> -						    &its_pmsi_domain_info,
> -						    parent)) {
> -			pr_err("%s: unable to create platform domain\n",
> -			       np->full_name);
> -			continue;
> -		}
> -
> -		pr_info("Platform MSI: %s domain created\n", np->full_name);
> +		its_pmsi_init_one(of_node_to_fwnode(np), np->full_name);
>   	}
> +}
>   
> +static int __init its_pmsi_init(void)
> +{
> +	its_pmsi_of_init();
>   	return 0;
>   }
>   early_initcall(its_pmsi_init);
Tested-by:  Xinwei Kong <kong.kongxinwei@...ilicon.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ