From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08CD8379980 for ; Sun, 3 May 2026 20:30:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777840212; cv=none; b=OArcXjBhU7LDMEnpy+mpYUXqMKbKWyVvOCeaTl2hHrJUGTsR3z06Gdwp8JFdT2tbuO0tk/L40IOnkfXpMbZGftz3zLY4MFA01lwzdJIs6JzuvqtBvfTgUykSGh3dNjztgSl/ooWfIU7smChbzezqg/WRx1AWZQuEGgczH2vcXXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777840212; c=relaxed/simple; bh=bcezSkZUVFmq8awrbtFKLKUmQEyY8sZzF9XzM732STE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Benb3iUqZjOrGDK7YoowuX+9h+0vAwjx4TmnP/336K2XKy9OOtvBLu3hJty1G8Fsum8dhX/ZmDB2z48vRtLUbn9bM/CPFaRI1HRj9RqDAA7iszWhw6kr6ObB3tMQP3bwBPp08MN9dckXWt5cDC4qozRq8whi/VCcgZxOfwOlOAE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GUHmQrQ8; arc=none smtp.client-ip=209.85.128.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GUHmQrQ8" Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-79885f4a8ffso32778027b3.3 for ; Sun, 03 May 2026 13:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777840210; x=1778445010; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=utFZGAmkY5HSapsYpTO/OWvfTIFdh3s3Nz41thxW7Qs=; b=GUHmQrQ8hKWDTJOwRtc08rGvp+UVgi9NH61NCQCxliZna/4NcN2ejglHqVXhHK/9Ue jc4HuXxuBU+qWr5YEHdT2rv3RLh882BuKFXp51MIakVF/BCMB9fLMaW8n9QRmK+GFrRk RnR9uKyIr5vtMsqlfSjAgZa53AHrGvgznnYGBlGb4j3kiY8+qg32h/ejVc14Nj+QS/bJ QVqTN7RtFvUs3KrVhspsrM7Vgk8tT9Y0Jtnac26gHjs0WJdTGfDr50cw8Go1jHi54iaC 1SNVGNt0eMe8VKNtC1Mz3nCjQumjmedxjX7S+2qYdIqCsmohQgZPiAGAETxYdy4iVcLn SF4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777840210; x=1778445010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=utFZGAmkY5HSapsYpTO/OWvfTIFdh3s3Nz41thxW7Qs=; b=L7NuVS5pG5fzOs8+0B0JfREAGYqfhgtrXwakw6n7DW0BH4Kcl2qEe1+7zg5YBG/Rs9 2yNvfXg6kBVYfhfY3/ilTiFMJ8Qu2biN7UdGWcz52T2ikrybj+hV8jpmSkPjjz3awNxH E0LPHqKO0ZofbpHDTxYQ1Sip9IInn4iWNLxvSIFDRQ3ux8vlMdXQWIVveMC6I/Eu1o8N ETbNHgSPymkAs8NlTUj4YKQVusasBcEZgEXvtlnTVulCvEsU7xCMd1XFzLveLykbbeSo hQUiHUv7oLo/UWIV5m8mantnSezfRWWf5yc34gOmXkAVFnMemGoTZxjbJuyU2OM2wvcK qznw== X-Forwarded-Encrypted: i=1; AFNElJ+QO++RwtLlnt3+3Qjn8J9t4DBvABsGpmkOBLUgj9r/h93NYHcmsF33AvqBrxumPYeHs9Lwwbx6W0FB0Ms=@vger.kernel.org X-Gm-Message-State: AOJu0YwNitjXo65ouaFx1RrX8TdhTRdmFcou7McVEAx1ewl/uhSR5HhP UR+5aJMVDo5sS4a7FZbF/6h+AKqJrUrHPyXHDmYhHd1knMS0n/FwYGJZ X-Gm-Gg: AeBDieu8qFjbEx19L9M4+JAClHkvCFaNBV8eW5BKqAgVNmsRgE6TSOrvn5TzExdkB7+ kGXrDf2EWjkuNve1Ir1njXJN6LZUhXAGFOtxUIdWRGUofaXM20x2G9sepbK6Hq/6tcMgeylXgsq /FMf5eYBLa+yxGlUiDFrq4TnupMb1AtcSFe2Q1afTdhusIE+1x6qB+v+P0VybOVdbP8ZfUEzPE7 yUt8xz2OG2+UL88sR9NyNAsvIYi/mYsYm7POTdnRsnGvfqzdX9OmxVxEQoCrKLs5mHDSb93GLrj H/Q8A+GOkP6waxmHeFGP+MU14mD87pnMBKTLn6TEZYtnIWHMEQmr28vteuljydJBxiISi1YSzLh ltCb0GfZNpT0l5BymkUKyCGnQL+9x4jfIWlXGm49U+rZwupP/Hijju7I7KOr4r/RqiFgojncGHN usdp/TzhZ2ejH3pHMWkGb8Uj7302roRF/wJ0iV6iLGiC1yydvs2Ad8/JpFYi/kGZVpOF5aW4vTU CyQN4Ws4g== X-Received: by 2002:a05:690c:c4f6:b0:79a:40fb:9346 with SMTP id 00721157ae682-7bd76fabc9emr76374857b3.20.1777840209910; Sun, 03 May 2026 13:30:09 -0700 (PDT) Received: from localhost (104-48-214-220.lightspeed.snantx.sbcglobal.net. [104.48.214.220]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7bd66525651sm40140327b3.3.2026.05.03.13.30.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2026 13:30:09 -0700 (PDT) From: Steev Klimaszewski To: krishna.chundru@oss.qualcomm.com Cc: bhelgaas@google.com, bjorn.andersson@oss.qualcomm.com, jingoohan1@gmail.com, jonathanh@nvidia.com, kwilczynski@kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, mani@kernel.org, robh@kernel.org, will@kernel.org Subject: Re: PCI: qcom: Add D3cold support Date: Sun, 3 May 2026 15:30:06 -0500 Message-ID: <20260503203008.287559-1-threeway@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260429-d3cold-v5-0-89e9735b9df6@oss.qualcomm.com> References: <20260429-d3cold-v5-0-89e9735b9df6@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Krishna, > This series adds support for putting Qualcomm PCIe host bridges into D3cold > when downstream conditions allow it, and introduces a small common helper > to determine D3cold eligibility based on endpoint state. > On Qualcomm platforms, PCIe host controllers are currently kept powered > even when there are no active endpoints (i.e. all endpoints are already in > PCI_D3hot). This prevents the SoC from entering deeper low‑power states > such as CXPC. > While PCIe D3cold support exists in the PCI core, host controller drivers > lack a common mechanism to determine whether it is safe to power off the > host bridge without breaking active devices or wakeup functionality. > As a result, controllers either avoid entering D3cold or depend on rough, > driver‑specific workarounds. > This series addresses that gap. > 1. Introduces pci_host_common_can_enter_d3cold(), a helper that determines > whether a host bridge may enter D3cold based on downstream PCIe endpoint > state. The helper permits D3cold only when all *active* endpoints are > already in PCI_D3hot, and any wakeup‑enabled endpoint supports PME > from D3cold. > 2. Updates the Designware PCIe host driver to use this helper in the > suspend_noirq() path, replacing the existing heuristic that blocked > D3cold whenever L1 ASPM was enabled. > 3. Enables D3cold support for Qualcomm PCIe controllers by wiring them into > the DesignWare common suspend/resume flow and explicitly powering down > controller resources when all endpoints are in D3hot. > The immediate outcome of this series is that Qualcomm PCIe host bridges can > enter D3cold when all endpoints are in D3hot. > This is a necessary but not sufficient step toward unblocking CXPC. With > this series applied, CXPC can be achieved on systems with no attached NVMe > devices. Support for NVMe‑attached systems requires additional changes > in NVMe driver, which are being worked on separately. > Tested on: > - Qualcomm Lemans EVK, Monaco & sc7280 platforms. > Validation steps: > - Boot without NVMe attach: > * PCIe host enters D3cold during suspend > * SoC is able to reach CXPC provided other drivers also remove > their votes as part of suspend. I have been testing this patchset with Mani's patchset that is supposed to be related to NVMe on the Thinkpad X13s found at: https://lore.kernel.org/all/20260414-l1ss-fix-v1-0-adbb4555b5ab@oss.qualcomm.com/ v4 of this patchset *boots* along with Mani's patchset, however, v5 does not, and unfortunately, the machine does not seem to get to a point where I can even get logs from it. Do you know what I might be missing? I have *not* attempted to remove the nvme drive and boot off USB to test it. -- steev