Skip to content

cpumask fallout: Initialize irq_default_affinity earlier et al.

David Daney linux-mips lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Make irq_*_affinity depend on CONFIG_GENERIC_HARDIRQS too.kernel/irq/manage.c+1 -10 replies
2/2cpumask fallout: Initialize irq_default_affinity earlier (v2).kernel/irq/handle.c kernel/irq/manage.c+12 -82 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMike Travis
1/2
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] cpumask fallout: Initialize irq_default_affinity earlier et al.

As I said in 2/2:

Move the initialization of irq_default_affinity to early_irq_init as core_initcall is too late.

irq_default_affinity can be used in init_IRQ and potentially timer and SMP init as well. All of these happen before core_initcall. Moving the initialization to early_irq_init ensures that it is initialized before it is used.

Mike Travis pointed out that irq_default_affinity depends on CONFIG_GENERIC_HARDIRQS in addition to CONFIG_SMP. So to make things consistent, I added 1/2 so that the irq_*_affinity functions and irq_default_affinity are defined for the same conditions that they are declared.

I Took Linus' suggestion to move init_irq_default_affinity over to kernel/irq/handle.c, however due to the way that cpumask_*() are defined, it is still necessary to have the ugly ifdefs, but now they are localized to init_irq_default_affinity.

Mike Travis also suggested that alloc_bootmem_cpumask_var() be used in preference to alloc_cpumask_var, so I incorporated that suggestion as well.

I tested both with and without CONFIG_SMP, on mips/cavium_octeon, Mike tested a similar(but not identical patch) on x86_64.

I will reply with the two patches.

David Daney (2):
Make irq_*_affinity depend on CONFIG_GENERIC_HARDIRQS too. cpumask fallout: Initialize irq_default_affinity earlier (v2).

kernel/irq/handle.c |   12 ++++++++++++
kernel/irq/manage.c |   10 +---------
2 files changed, 13 insertions(+), 9 deletions(-)