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]
Date:	Sat, 25 Jul 2015 15:15:37 +0800
From:	Hanjun Guo <hanjun.guo@...aro.org>
To:	Marc Zyngier <marc.zyngier@....com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Jason Cooper <jason@...edaemon.net>
CC:	Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
	linux-pci@...r.kernel.org, Duc Dang <dhdang@....com>,
	linux-kernel@...r.kernel.org, Yijing Wang <wangyijing@...wei.com>,
	linux-arm-kernel@...ts.infradead.org, Ma Jun <majun258@...wei.com>
Subject: Re: [PATCH v5 01/19] genirq: irqdomain: Allow irq domain aliasing

On 07/23/2015 05:26 PM, Marc Zyngier wrote:
> It is not uncommon (at least with the ARM stuff) to have a piece
> of hardware that implements different flavours of "interrupts".
> A typical example of this is the GICv3 ITS, which implements
> standard PCI/MSI support, but also some form of "generic MSI".
>
> So far, the PCI/MSI domain is registered using the ITS device_node,
> so that irq_find_host can return it. On the contrary, the raw MSI
> domain is not registered with an device_node, making it impossible
> to be looked up by another subsystem (obviously, using the same
> device_node twice would only result in confusion, as it is not
> defined which one irq_find_host would return).
>
> A solution to this is to "type" domains that may be aliasing, and
> to be able to lookup an device_node that matches a given type.
> For this, we introduce irq_find_matching_host() as a superset
> of irq_find_host:
>
> struct irq_domain *irq_find_matching_host(struct device_node *node,
>                                  enum irq_domain_bus_token bus_token);
>
> where bus_token is the "type" we want to match the domain against
> (so far, only DOMAIN_BUS_ANY is defined). This result in some
> moderately invasive changes on the PPC side (which is the only
> user of the .match method).
>
> This has otherwise no functionnal change.
>
> Signed-off-by: Marc Zyngier <marc.zyngier@....com>
> ---
>   arch/powerpc/platforms/512x/mpc5121_ads_cpld.c   |  3 ++-
>   arch/powerpc/platforms/cell/interrupt.c          |  3 ++-
>   arch/powerpc/platforms/embedded6xx/flipper-pic.c |  3 ++-
>   arch/powerpc/platforms/powermac/pic.c            |  3 ++-
>   arch/powerpc/platforms/powernv/opal-irqchip.c    |  3 ++-
>   arch/powerpc/platforms/ps3/interrupt.c           |  3 ++-
>   arch/powerpc/sysdev/ehv_pic.c                    |  3 ++-
>   arch/powerpc/sysdev/i8259.c                      |  3 ++-
>   arch/powerpc/sysdev/ipic.c                       |  3 ++-
>   arch/powerpc/sysdev/mpic.c                       |  3 ++-
>   arch/powerpc/sysdev/qe_lib/qe_ic.c               |  3 ++-
>   arch/powerpc/sysdev/xics/xics-common.c           |  3 ++-
>   include/linux/irqdomain.h                        | 23 +++++++++++++++++++++--
>   kernel/irq/irqdomain.c                           | 18 +++++++++++++-----
>   14 files changed, 58 insertions(+), 19 deletions(-)

[...]

>   /**
>    * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain.
>    * @of_node: pointer to interrupt controller's device tree node.
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index 8c3577f..995d217 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -187,10 +187,12 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
>   EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
>
>   /**
> - * irq_find_host() - Locates a domain for a given device node
> + * irq_find_matching_host() - Locates a domain for a given device node
>    * @node: device-tree node of the interrupt controller
> + * @data: domain-specific data

Typo, @bus_token.

>    */
> -struct irq_domain *irq_find_host(struct device_node *node)
> +struct irq_domain *irq_find_matching_host(struct device_node *node,
> +					  enum irq_domain_bus_token bus_token)

Other than that,

Reviewed-by: Hanjun Guo <hanjun.guo@...aro.org>

Thanks
Hanjun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ