Thread (27 messages) 27 messages, 5 authors, 7d ago

Re: [RESEND PATCH v4 06/11] cxl/pci: Add the PMUs after configuring events

From: Jonathan Cameron <jic23@kernel.org>
Date: 2026-09-22 01:05:21
Also in: linux-cxl

On Wed,  5 Aug 2026 08:59:06 -0700
Dave Jiang [off-list ref] wrote:
cxl_pci_probe() adds the CPMU instances before configuring the event
interrupts. Both take an MSI/MSI-X vector the device names in its own
capability registers, and the spec lets a device point several capabilities
at one message number, so the two can collide.

They do not fail the same way. A failed devm_cxl_pmu_add() only breaks out
of the loop, while a failed cxl_event_config() aborts probe and the memory
device never appears. Going PMUs-first therefore lets a peripheral facility
take the vector and deny it to one that matters.

Configure events first, so a collision costs the PMU rather than the
memdev. Return 0 explicitly afterwards, since rc still holds any PMU error
that cxl_event_config() used to overwrite on the way past.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
v4:
- New patch, ahead of the PMU dropping IRQF_SHARED. Without this that
  change can turn a shared vector into a probe failure for the whole
  memdev rather than a missing PMU (sashiko-bot).
Make sense. Anyone crazy enough to share this interrupt gets to keep
the pieces.

Reviewed-by: Jonathan Cameron <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help