[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c05ac8ce-044c-4cbe-8c97-846e473324df@amd.com>
Date: Thu, 11 Sep 2025 15:19:23 -0500
From: "Bowman, Terry" <terry.bowman@....com>
To: Gregory Price <gourry@...rry.net>
Cc: dave@...olabs.net, jonathan.cameron@...wei.com, dave.jiang@...el.com,
alison.schofield@...el.com, dan.j.williams@...el.com, bhelgaas@...gle.com,
shiju.jose@...wei.com, ming.li@...omail.com,
Smita.KoralahalliChannabasappa@....com, rrichter@....com,
dan.carpenter@...aro.org, PradeepVineshReddy.Kodamati@....com,
lukas@...ner.de, Benjamin.Cheatham@....com,
sathyanarayanan.kuppuswamy@...ux.intel.com, linux-cxl@...r.kernel.org,
alucerop@....com, ira.weiny@...el.com, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org
Subject: Re: [PATCH v11 23/23] CXL/PCI: Disable CXL protocol error interrupts
during CXL Port cleanup
On 9/10/2025 10:07 AM, Gregory Price wrote:
> Hi Terry,
>
> On Tue, Aug 26, 2025 at 08:35:38PM -0500, Terry Bowman wrote:
>> Introduce cxl_mask_proto_interrupts() to call pci_aer_mask_internal_errors().
>> Add calls to cxl_mask_proto_interrupts() within CXL Port teardown for CXL
>> Root Ports, CXL Downstream Switch Ports, CXL Upstream Switch Ports, and CXL
>> Endpoints. Follow the same "bottom-up" approach used during CXL Port
>> teardown.
>>
> ...
>> @@ -1471,6 +1475,8 @@ static void cxl_detach_ep(void *data)
>> {
>> struct cxl_memdev *cxlmd = data;
>>
>> + cxl_mask_proto_interrupts(cxlmd->cxlds->dev);
>> +
>> for (int i = cxlmd->depth - 1; i >= 1; i--) {
>> struct cxl_port *port, *parent_port;
>> struct detach_ctx ctx = {
> While testing v10 of this patch set, we found ourselves with a deadlock
> on boot with the following stack in the hung task:
>
> [ 252.784440] <TASK>
> [ 252.789090] schedule+0x5d6/0x1670
> [ 252.796629] ? schedule_preempt_disabled+0xa/0x10
> [ 252.807061] schedule_preempt_disabled+0xa/0x10
> [ 252.817108] __mutex_lock+0x245/0x7b0
> [ 252.825229] cxl_mask_proto_interrupts+0x23/0x50
> [ 252.835470] cxl_detach_ep+0x25/0x2e0
>
> This occurs on a system which fails to probe ports fully due to the
> duplicate id error resolved by the Delayed HB patch set.
>
> But it's concerning that there's a deadlock condition without that
> patch set. Can you help try to eyeball this? I'm trying to get more
> debug info, but testing system availability is limited.
>
> ~Gregory
>
Hi Greg,
Thanks for pointing out. We saw this too and is reason the device lock was removed from
v11's cxl_mask_proto_interrupts(). Looks like I need to force the EP detach. Do you have
steps for recreating the duplicate port id ?
Terry
Powered by blists - more mailing lists