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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1806191547340.10546@nanos.tec.linutronix.de>
Date:   Tue, 19 Jun 2018 15:47:57 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Marc Zyngier <marc.zyngier@....com>
cc:     Jason Cooper <jason@...edaemon.net>, linux-kernel@...r.kernel.org,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Yang Yingliang <yangyingliang@...wei.com>
Subject: Re: [PATCH 2/6] irqchip/ls-scfg-msi: Fix MSI affinity handling

On Tue, 19 Jun 2018, Marc Zyngier wrote:
> diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c
> index 2811cc53e425..c671b3212010 100644
> --- a/drivers/irqchip/irq-ls-scfg-msi.c
> +++ b/drivers/irqchip/irq-ls-scfg-msi.c
> @@ -93,8 +93,12 @@ static void ls_scfg_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
>  	msg->address_lo = lower_32_bits(msi_data->msiir_addr);
>  	msg->data = data->hwirq;
>  
> -	if (msi_affinity_flag)
> -		msg->data |= cpumask_first(data->common->affinity);
> +	if (msi_affinity_flag) {
> +		const struct cpumask *mask;
> +
> +		mask = irq_data_get_effective_affinity_mask(data);
> +		msg->data |= cpumask_first(mask);
> +	}
>  
>  	iommu_dma_map_msi_msg(data->irq, msg);
>  }
> @@ -121,7 +125,6 @@ static int ls_scfg_msi_set_affinity(struct irq_data *irq_data,
>  		return -EINVAL;
>  	}
>  
> -	cpumask_copy(irq_data->common->affinity, cpumask_of(cpu));
>  	irq_data_update_effective_affinity(irq_data, cpumask_of(cpu));
>  
>  	return IRQ_SET_MASK_OK;

Looks good!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ