[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1812181545340.14031@nanos.tec.linutronix.de>
Date: Tue, 18 Dec 2018 16:26:01 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Dou Liyang <douliyangs@...il.com>
cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
kashyap.desai@...adcom.com,
shivasharan.srikanteshwara@...adcom.com, sumit.saxena@...adcom.com,
ming.lei@...hat.com, hch@....de, bhelgaas@...gle.com,
douliyang1@...wei.com
Subject: Re: [PATCH 2/3] irq/affinity: Add is_managed into struct
irq_affinity_desc
On Tue, 4 Dec 2018, Dou Liyang wrote:
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index 1562a36e7c0f..d122575ba1b4 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -289,6 +289,13 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
> for (; curvec < nvecs; curvec++)
> cpumask_copy(&masks[curvec].mask, irq_default_affinity);
>
> + /* Setup complementary information */
> + for (i = 0; i < nvecs; i++) {
> + if (i >= affd->pre_vectors && i < nvecs - affd->post_vectors)
> + masks[i].is_managed = 1;
> + else
> + masks[i].is_managed = 0;
Why want you clear the bit? The masks are allocated with kcalloc() so it's
clear already.
+ /* Mark the managed interrupts */
+ for (i = affd->pre_vectors; i < nvecs - affd->post_vectors; i++)
+ masks[i].is_managed = 1;
+
Is what I made it instead.
Thanks,
tglx
Powered by blists - more mailing lists