Skip to content

net: mvpp2: Survive CPU hotplug events

Marc Zyngier lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2genirq: Extract irq_set_affinity_masks() from devm_platform_get_irqs_affinity()drivers/base/platform.c include/linux/interrupt.h kernel/irq/affinity.c+38 -175 replies
2/2net: mvpp2: Convert to managed interrupts to fix CPU HP issuesdrivers/net/ethernet/marvell/mvpp2/mvpp2.h drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+34 -341 reply

Reviews trailers per patch

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

PatchGreg Kroah-HartmanJohn Garry
1/2R-b T-b
2/2

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] net: mvpp2: Survive CPU hotplug events

I recently realised that playing with CPU hotplug on a system equiped with a set of MVPP2 devices (Marvell 8040) was fraught with danger and would result in a rapid lockup or panic.

As it turns out, the per-CPU nature of the MVPP2 interrupts are getting in the way. A good solution for this seems to rely on the kernel's managed interrupt approach, where the core kernel will not move interrupts around as the CPUs for down, but will simply disable the corresponding interrupt.

Converting the driver to this requires a bit of refactoring in the IRQ subsystem to expose the required primitive, as well as a bit of surgery in the driver itself.

Note that although the system now survives such event, the driver seems to assume that all queues are always active and doesn't inform the device that a CPU has gone away. Someout who actually understand this driver should have a look at it.

Patches on top of 5.17-rc3, lightly tested on a McBin.

Marc Zyngier (2):
genirq: Extract irq_set_affinity_masks() from
devm_platform_get_irqs_affinity()
net: mvpp2: Convert to managed interrupts to fix CPU HP issues

 drivers/base/platform.c                       | 20 +-----
 drivers/net/ethernet/marvell/mvpp2/mvpp2.h    |  1 -
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 67 ++++++++++---------
 include/linux/interrupt.h                     |  8 +++
 kernel/irq/affinity.c                         | 27 ++++++++
 5 files changed, 72 insertions(+), 51 deletions(-)
Signature · 1 line
2.30.2