Re: [PATCH 2/3] irq/affinity: Add is_managed into struct irq_affinity_desc
From: Thomas Gleixner
Date: Tue Dec 18 2018 - 10:26:08 EST
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