From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C22C2C433EF for ; Tue, 19 Jul 2022 10:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236990AbiGSKsq (ORCPT ); Tue, 19 Jul 2022 06:48:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234279AbiGSKsm (ORCPT ); Tue, 19 Jul 2022 06:48:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B81B610FDE for ; Tue, 19 Jul 2022 03:48:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 66000B81ADD for ; Tue, 19 Jul 2022 10:48:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DE6EC341C6; Tue, 19 Jul 2022 10:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658227719; bh=idCfQ9AYGz0wgq0UUQ7i0j7QMZKIoVuOY2DU7aGhXfs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=saXe1gznJj0l6BrjfIPENkZeRCnsvnUEDlWljmJJWQxZ1pN7cDBog7I6+zlHeJrPl rUR6r4OXr/CtScl655+C2bvQh/93iH1LMRyAp1OeTZHttUK0JFcAFR/6LidDtryhjS iwOa2g/CyzQ/aybnBgTA2TK/1gM4OSCAfKPKbyDIEvTNJMZl5vihrsWuYnMC5G6Gd2 2jby0DpKaF5rZQLEQE20thu1vbymDTGMXPCpVreWTWviuwxBb2LGP6lsgYdN3viplt 7dVmEsCGQeyD/xNLHqiN3x7qrw52srku/6m0Cd5KQJThttm4SgE3kZyC6zNcXTgm80 GvWOou9hgDK6A== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oDkmL-008SRs-0M; Tue, 19 Jul 2022 11:48:37 +0100 Date: Tue, 19 Jul 2022 11:48:36 +0100 Message-ID: <87fsixz8cb.wl-maz@kernel.org> From: Marc Zyngier To: AceLan Kao Cc: Thomas Gleixner , "Linux-Kernel@Vger. Kernel. Org" , Kai-Heng Feng Subject: Re: There are not enough CPU0 APIC IRQs while doing IRQ migration during S3 In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: acelan.kao@canonical.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, kai.heng.feng@canonical.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [- Jason] On Tue, 19 Jul 2022 06:55:21 +0100, AceLan Kao wrote: > > HI all, > > I encountered an issue while doing S3, it shows below message and then > failed to enter S3 > [ 106.731140] CPU 31 has 116 vectors, 85 available. Cannot disable CPU > [ 106.731551] ACPI: \_PR_.C01F: Found 2 idle states > [ 106.732610] Error taking CPU31 down: -28 > [ 106.732612] Non-boot CPUs are not disabled > > CPU: AMD Ryzen Threadripper PRO 3955WX 16-Cores > Kernel: v5.19-rc7 > There are 5 PCI to 4 type-c ports USB cards on the machine, and It > wouldn't lead to the issue if only 4 cards are plugged. So, it looks > like it can't handle 5 cards, and failed on the IRQ migration. > > The workaround provided by kaiheng is to release the irq while > suspending and request irq while resuming. > I'm wondering do we have a better solution for this kind of issue? > Thanks. > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > index edc6881c8a1b..91c79b21cb57 100644 > --- a/drivers/usb/host/xhci.c > +++ b/drivers/usb/host/xhci.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > > #include "xhci.h" > #include "xhci-trace.h" > @@ -1079,6 +1080,9 @@ int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup) > __func__); > } > > + if (pm_suspend_via_firmware()) > + xhci_cleanup_msix(xhci); I'm a bit clueless when it comes to the combination of x86 and xhci, but doesn't this prevent resuming on a xhci interrupt? M. -- Without deviation from the norm, progress is not possible.