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:   Fri, 11 Jan 2019 15:52:15 +0000
From:   Marc Zyngier <marc.zyngier@....com>
To:     Loic Pallardy <loic.pallardy@...com>, tglx@...utronix.de,
        jason@...edaemon.net, mcoquelin.stm32@...il.com,
        alexandre.torgue@...com
Cc:     linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/1] irqchip: stm32-exti: add domain translate function

On 11/01/2019 13:58, Loic Pallardy wrote:
> Domain translate function is needed to recover irq
> configuration parameters from DT node
> 
> Signed-off-by: Loic Pallardy <loic.pallardy@...com>

Surely this fixes something, right? Can you please add a Fixes: tag?

> ---
>  drivers/irqchip/irq-stm32-exti.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
> index 6edfd4bfa169..717879028cc4 100644
> --- a/drivers/irqchip/irq-stm32-exti.c
> +++ b/drivers/irqchip/irq-stm32-exti.c
> @@ -819,9 +819,27 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
>  	return ret;
>  }
>  
> +static int stm32_exti_h_translate(struct irq_domain *d,
> +				  struct irq_fwspec *fwspec,
> +				  unsigned long *out_hwirq,
> +				  unsigned int *out_type)
> +{
> +	if (is_of_node(fwspec->fwnode)) {

Is there any case where this wouldn't be true? i.e. an stm32 ACPI system?

> +		if (fwspec->param_count != 2)
> +			return -EINVAL;
> +
> +		*out_hwirq = fwspec->param[0];
> +		*out_type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;
> +		return 0;
> +	}
> +
> +	return -EINVAL;
> +}

Because otherwise, this is exactly what irq_domain_xlate_twocell() does.

> +
>  static const struct irq_domain_ops stm32_exti_h_domain_ops = {
>  	.alloc	= stm32_exti_h_domain_alloc,
>  	.free	= irq_domain_free_irqs_common,
> +	.translate = stm32_exti_h_translate,
>  };
>  
>  static int
> 

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ